#4590 closed defect (fixed)
Minor problem with OGR clipping (input parameters robustness)
Reported by: | egrosso | Owned by: | warmerdam |
---|---|---|---|
Priority: | normal | Milestone: | 1.9.1 |
Component: | default | Version: | 1.9.0 |
Severity: | normal | Keywords: | OGR, clipping, input parameters, robustness |
Cc: |
Description
If the filename of the polygon which is used to do the clipping begins with "polygon" or "multipolygon" based on "ogr2ogr -clipsrc arg1 arg2 arg3" piece of code, the algorithm tries to convert the argument arg1 in WKT. Exemple: ogr2ogr -clipsrc polygon_selection.shp output.shp input.shp
The following error is displayed: "FAILURE: Invalid geometry. Must be a valid POLYGON or MULTIPOLYGON WKT"
Here is the code extract of ogr2ogr.cpp which is linked to this problem (same for -clipsrc and -clipdst options):
EQUALN(papszArgv[iArg+1], "MULTIPOLYGON", 12)) |
Change a bit the code, e.g. "POLYGON", 7 becomes "POLYGON(", 8, could do the trick.
Change History (2)
comment:1 by , 12 years ago
Milestone: | → 1.9.1 |
---|---|
Resolution: | → fixed |
Status: | new → closed |
Note:
See TracTickets
for help on using tickets.
Fixed in trunk (r24170) and in branches/1.9 (r24171)