Skip to content

gdal_rasterize: issue with -burn (master) #10766

@rouault

Description

@rouault

@elpaso There are regressions compared to 3.9

The following command lines no longer work:

  1. Source filename directly after -burn
$ rm -f out.tif; gdal_rasterize -ts 10 10 -burn 1 autotest/ogr/data/poly.shp out.tif
ERROR 1: Failed to parse 'autotest/ogr/data/poly.shp' as number: pattern 'autotest/ogr/data/poly.shp' does not match to the end

but adding -l poly after -burn works:

$ rm -f out.tif; gdal_rasterize -ts 10 10 -burn 1 -l poly autotest/ogr/data/poly.shp out.tif
0...10...20...30...40...50...60...70...80...90...100 - done.
  1. Or (probably same underlying issue):
$ rm -f out.tif; gdal_rasterize -ts 10 10 autotest/ogr/data/poly.shp out.tif -burn 1
ERROR 1: Failed to parse 'autotest/ogr/data/poly.shp' as number: pattern 'autotest/ogr/data/poly.shp' does not match to the end
  1. The non documented -burn "val1 val2 ..." no longer works:

$ rm -f out.tif; gdal_rasterize -ts 10 10 -burn "1 2" -l poly autotest/ogr/data/poly.shp out.tif
ERROR 1: Failed to parse '1 2' as number: pattern '1 2' does not match to the end

That point is minor compared to 1) and 2). I believe we have addressed that for some arguments of other utilities, but maybe I'm wrong / can't remember which ones

Metadata

Metadata

Assignees

Labels

blockerBug that should be addressed (category reserved for usage of the maintainers of the library)

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions