Bug report #11972
GdalTools clipper: wrong command when mask layer has a filter
Status: | Closed | ||
---|---|---|---|
Priority: | Normal | ||
Assignee: | - | ||
Category: | GDAL Tools | ||
Affected QGIS version: | 2.6.0 | Regression?: | No |
Operating System: | Easy fix?: | No | |
Pull Request or Patch supplied: | No | Resolution: | |
Crashes QGIS or corrupts data: | No | Copied to github as #: | 20179 |
Description
I found a bug in GdalTools/Clipper, when a mask layer is used with a filter expression, the generated gdalwarp command is is not valid. The generated command looks like this:
gdalwarp -q -cutline "poly.shp|layerid=0|subset=\\"Nev\\" = 'Heves'" -crop_to_cutline input.tif output.tif
the correct command would be:
gdalwarp -q -cutline "poly.shp" -cwhere="Nev='Heves'" -crop_to_cutline input.tif output.tif
I suppose in getArgsModeMask (doClipper.py) after line 167 the mask should be processed if it contains "|".
Associated revisions
[processing] take in account vector subsets when clipping raster (fix #11972)
History
#1 Updated by Giovanni Manghi almost 10 years ago
- OS version deleted (
2.6) - Operating System deleted (
All) - Category set to GDAL Tools
- Subject changed from GdalTools plug-in clipper to GdalTools clipper: wrong command when mask layer has a filter
#2 Updated by Alexander Bruy almost 9 years ago
- Status changed from Open to Closed
Fixed in changeset fe2bb2f09fe799c1363a206ced23bb2a5a1b3b38.