ogr2ogr field required in -select if used in -where
|Reported by:||cnieman||Owned by:||Even Rouault|
It seems that in gdal 1.8 if you do not include all fields used in the -where clause in -select, you get an empty output file.
e.g. in a shapefile with fields called NAME, CLASS, POPULATION. If your ogr2ogr command looks like:
ogr2ogr -select NAME -where "CLASS = 'capital'" capitals.shp cities.shp
an empty output file is created.