Skip to content

Instantly share code, notes, and snippets.

@AlisterH
Last active December 17, 2017 22:38
Show Gist options
  • Save AlisterH/1867e1ed0fab25622a88c570ba82eae3 to your computer and use it in GitHub Desktop.
Save AlisterH/1867e1ed0fab25622a88c570ba82eae3 to your computer and use it in GitHub Desktop.
gdalbuildvrt:
- use the raster menu, not the processing toolbox as it doesn't allow custom options!
- use either -vrtnodata 255 or -addalpha
Note that if you use addalpha you can't convert the result to a tiff with jpeg compression
gdalwarp:
- if using JPEG compression, use -ot=Byte
- use tiled output
- generate a world file
- for better JPEG compression, use -co PHOTOMETRIC=YCBCR
How to use this?:
--config GDAL_TIFF_INTERNAL_MASK YES
Do we have to use it with gdal_translate and this before using gdalwarp?: -b 1 -b 2 -b 3 -mask 4
Converting asc output by 12d, qgis claims it is float64, although all the values are round to the nearest mm, which doesn't match result converted to float geotiff.
use these options to set the nodata value:
-a_nodata -9999.0 for float64
-a_nodata 0 byte or uint16 or uint32 (0.0 accuracy)
float32 doesn't require it!?
float32 file size is only a fraction less than float64, and numbers seem to be the same. What?!
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment