GDAL -SQL or -where options

المشرف العام

Administrator
طاقم الإدارة
ogr2ogr -overwrite -t_srs EPSG:3978 -f "ESRI Shapefile" -sql "SELECT * FROM 'Layer Name' WHERE FIELD_NAME = 'A CLASS'" dst.shp src.shp

help me out here - looking to 1) reproject a shape and 2) select only "A CLASS" from field named "FIELD_NAME"3) and save it to src.shp

my output is ERROR 1: Type mismatch or improper type of arguments to = operator.

I've also tried ogr2ogr -overwrite -t_srs EPSG:3978 -f "ESRI Shapefile" -where "FIELD_NAME = 'A CLASS'" dst.shp src.shpresulting in:ERROR 1: SQL Expression Parsing Error: syntax errorFAILURE: SetAttributeFilter( WHERE FIELD_NAME = 'A CLASSS') on layer 'LAYER NAME' failed.

and

ogr2ogr -overwrite -t_srs EPSG:3978 -f "ESRI Shapefile" -where "FIELD_NAME LIKE 'A CLA%'" dst.shp src.shpwith the laswhich only produces one results, where 10,000+ records satisfy the query.



أكثر...
 
أعلى