I have intersecting polygons with an attribute that I'd like to burn into a raster with GDAL. In this simple example, the attribute
Value from three polygons in one shapefile is to be transferred to a one-band raster. However, I have hundreds of polygons and they are not organised according to attribute values or location.
If I run gdal_rasterize:
gdal_rasterize -ot Float32 -of gtiff -init -a Value -tr 1 1 -te -150 -150 150 150 -l test test.shp test.tif
I get a nice raster:
but my problem is that I want the highest value of any intersecting polygon to be burnt into the raster, not the last polygon.
What is the easiest way to burn the highest attribute value into a raster, only using gdal/ogr?