id,summary,reporter,owner,description,type,status,priority,milestone,component,version,severity,resolution,keywords,cc 4590,Minor problem with OGR clipping (input parameters robustness),egrosso,warmerdam,"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): else if (EQUALN(papszArgv[iArg+1], ""POLYGON"", 7) || EQUALN(papszArgv[iArg+1], ""MULTIPOLYGON"", 12)) Change a bit the code, e.g. ""POLYGON"", 7 becomes ""POLYGON("", 8, could do the trick.",defect,closed,normal,1.9.1,default,1.9.0,normal,fixed,"OGR, clipping, input parameters, robustness",