[gdal-dev] gdal_contour attribute field not populated for polygons outputs

Even Rouault even.rouault at spatialys.com
Tue Oct 15 04:02:31 PDT 2019


On mardi 15 octobre 2019 12:57:16 CEST G. Allegri wrote:
> Dear list,
> I'm using gdal_contour with a single band (float) raster. It works as
> expected for the default linestring outputs but when I set the "-p" option
> the attribute field is created but it's empty.
> 
> This is the command I run:
> >gdal_contour -b 1 -a val -i 10.0 -p -f "ESRI Shapefile" <raster_path>.tif
> 
> <out_path>.shp
> 
> Is this a known issue or am I doing something wrong?

https://gdal.org/programs/gdal_contour.html :

"""

-a <name>
    Provides a name for the attribute in which to put the elevation. If not 
provided no elevation attribute is attached. Ignored in polygonal contouring 
(-p) mode.
"""

Use -amin / -amax

Even

-- 
Spatialys - Geospatial professional services
http://www.spatialys.com


More information about the gdal-dev mailing list