Is it possible to specify the output type for gdal.Rasterize, similar to 
gdal.Warp and others? I don't see why the option would be available in the 
command line utility but not through the binding. It looks to be hardcoded in 
the source 
(https://github.com/OSGeo/gdal/blob/ba920209a2443b5a8492a23c16dd67fd53114c66/gdal/apps/gdal_rasterize_lib.cpp#L764).

Is it possible to fix or is there a workaround? For me the result is a much 
file than required (and associated slower I/O, increased memory usage).

Example usage:

myoptions = gdal.RasterizeOptions(attribute="MYATTRIBUTE")
gdal.Rasterize(dst_path, src_path, options=myoptions)

where the paths are direct file names to a Shapefile and a GeoTiff otput.

Thank you,

Benjamin

_______________________________________________
gdal-dev mailing list
[email protected]
https://lists.osgeo.org/mailman/listinfo/gdal-dev

Reply via email to