Search code examples
gisrastergdalqgisrasterizing

How do I enable BIGTIFF=YES option when using gdal_rasterize?


I am using the Rasterize (write over existing raster) tool within QGIS - however same question would apply if you were calling gdal from command line or python.

I am burning a vector feature into a raster with values based on a field in the attribute table.

All fine and working except when the destination raster is >4GB BigTiff rather than a regular geotiff. How do I use the bigtiff option mentioned in the error?

The error is:

'ERROR 1: TIFFAppendToStrip:Maximum TIFF file size exceeded. Use BIGTIFF=YES creation option. 

Code is as follows:

gdal_rasterize -a burn_value -l shapefile_name C:/Users/Cate/Folder/shapefile_name.shp C:/Users/Cate/Folder/raster_name.tif

Solution

  • Use the creation options -co:

    gdal_rasterize -a burn_value -l shapefile_name C:/Users/Cate/Folder/shapefile_name.shp C:/Users/Cate/Folder/raster_name.tif -co BIGTIFF=YES