2

In our project we need to use rasters offline on QField. Our tablets are a very limited software and using uncompressed rasters is too slow to be practical.

First, we try to convert our tif files to ecw, but didn't recognice the file (shows an error like the file is missing). Then we try to use compressed tiffs, with overviews:

gdal_translate -b 1 -b 2 -b 3 -co COMPRESS=JPEG -co PHOTOMETRIC=YCBCR -co TILED=YES ortho.tif ortho_ycbcr_ov.tif
gdaladdo --config COMPRESS_OVERVIEW JPEG --config PHOTOMETRIC_OVERVIEW YCBCR --config INTERLEAVE_OVERVIEW PIXEL -r average ortho_ycbcr_ov.tif 2 4 8 16

The same result. Then we try without overviews and then withour YCBCR with the same results.

The only option who works is to use overviews with no compression. The files are huge, but the performances is pretty decent.

¿Any success with compressed formats?

EDIT: Now, I've realised that the overviews are generated with the command you see above. Who are compressed as JPEG and use YCBCR photometric command, but QField recognised it without trouble. That's very confusing.

3

QField does not support all raster data files. Some (like ECW) are difficult because of licensing issues. Some others would need some work (like JPEG compression).

Have a look at this list for reference: http://www.qfield.org/docs/project-management/dataformat.html#table

If you have further insights or information to add, please use "Edit on GitHub" link at the bottom, this will create a new enhancement proposal for the documentation, and add your findings, so it can be integrated for future reference.

The official recommendation is to use GeoPackage but some users reported better success with MBTiles.

You may also try using QFieldSync which is able to generate a GeoPackage raster from a raster layer or a map theme (base map functionality).

  • I've been trying GeoPackage and MBTiles and MBTiles seems to compress and perform better (from a 590Mb tif to 33Mb with overviews). Thanks! – cag Mar 2 '17 at 10:47
  • Out of curiosity, did you try it with the command in the link above? I'm asking because GeoPackage has different compression options. – Matthias Kuhn Mar 2 '17 at 12:50
  • In both formats I've used JPEG compression with the default quality (both should be 75) and use the same command to add the overviews. The GeoPackage file size is almost the double. Any recomendation? – cag Mar 2 '17 at 13:44
  • There are a lot of options available to tune gpkg, see gdal.org/drv_geopackage_raster.html I don't know them in detail, but please share if you find something useful there – Matthias Kuhn Mar 2 '17 at 14:10

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.