Morning all,
New to this forum and have tried many times to be able to see the .mbtiles created in QGis.
It has uploaded to QFieldCloud without issue and is only 26.9MB. I’ve checked in QFieldCloud online and the file is there, but isn’t being displayed.
The file has been selected as the Base Map in the Project Properties.
This file is necessary as field work will be done with no internet/cell coverage.
Any suggestions would be greatly appreciated.
Imported from GitHub discussion by @martingeh on 2023-01-03T02:54:36Z
Well I haven’t had much luck in getting the images to show in Qfield when out of mobile (cell) coverage. After my issue yesterday was resolved, I applied that check to this process as well and now all I see is a portion of the edge of the image.
From this I can see that the image is where is should be, but it simply won’t load. The file is 182MB - is that too big? Should I be making them smaller and if so, what is the optimum size per image?
Thanks in advance.
Imported from GitHub comment by @martingeh on 2023-01-29T23:51:23Z
martingeh , try to attach a reduced sample project here, it’ll be easier to help you out.
Imported from GitHub comment by @nirvn on 2023-01-30T00:32:56Z
Okay. I’ll get on to that and post when done. Thank you.
Imported from GitHub comment by @martingeh on 2023-01-30T01:10:16Z
Hi Mathieu
I’ve compressed and attach the project file.
Erosion.zip
Imported from GitHub comment by @martingeh on 2023-01-30T02:15:23Z
martingeh , opening this project on my Android device using 2.6.2, I see the mbtiles are rendering without problem. Have you tried this specific sample project on your iOS device to confirm it replicates the issue? If so, it might be iOS-specific here.
Imported from GitHub comment by @nirvn on 2023-01-30T02:30:34Z
Yes, I use iOS device and have tried this sample project and a range of other variations, all without the mbtiles rendering as expected. They do render on OSX though.
Imported from GitHub comment by @martingeh on 2023-01-30T02:43:00Z
martingeh , do you happen to have an Android phone you could test it against?
Imported from GitHub comment by @nirvn on 2023-01-30T02:44:34Z
I don’t, but I’ll ask someone this afternoon to try it for me. Should I log an issue for this?
Imported from GitHub comment by @martingeh on 2023-01-30T02:46:22Z
martingeh , opened an issue already.
Imported from GitHub comment by @nirvn on 2023-01-30T02:48:03Z
Okay. Thanks
Imported from GitHub comment by @martingeh on 2023-01-30T02:48:36Z
HI Mathieu. I have tried this on an Android unit and it does show what I’m expecting. I’ll just have to work without a raster file while off line/out of cell coverage for now. Thanks again for your help - much appreciated.
Imported from GitHub comment by @martingeh on 2023-01-30T08:25:27Z
martingeh , actually, there’s a known issue on iOS whereas JPG datasets aren’t rendered. I’ve just checked your mbtiles, and the tile format is JPEG. You could try to create a mbtiles using PNG8 for the tile. It’ll result in bigger GPKGs but it might very well unlock it for iOS.
Imported from GitHub comment by @nirvn on 2023-01-30T08:32:38Z
martingeh , alternatively, you could try alternative formats with overview pyramids (see Offline WMS – Benchmarking raster formats for QField – OPENGIS.ch , lots of useful info in there).
Imported from GitHub comment by @nirvn on 2023-01-30T08:34:23Z
martingeh , actually, I’m 100% sure it’ll work with mbtiles if you set the tile format to PNG.
The little you see rendered (i.e. the flipped L) are individual tiles saved in PNG format due to need for an alpha channel as the region doesn’t fully cover the tile:
So you’ve got your solution.
Imported from GitHub comment by @nirvn on 2023-01-30T08:53:57Z
Legend! I’ll work on that tonight and let you know how I go.
Imported from GitHub comment by @martingeh on 2023-01-30T08:55:36Z
Fantastic!!! Thankyou very much Mathieu.
Imported from GitHub comment by @martingeh on 2023-01-30T10:02:47Z
QField on iOS doesn’t render JPG datasets (or in this case mbtiles with individual tiles being JPG).
The issue is tracked here: Can't load jpg datasets on iOS · Issue #3611 · opengisch/QField · GitHub
Imported from GitHub comment by @nirvn on 2023-01-30T10:04:40Z