Opened 13 years ago

Closed 13 years ago

#4015 closed defect (fixed)

ogr2ogr field required in -select if used in -where

Reported by: cnieman Owned by: Even Rouault
Priority: normal Milestone: 1.8.1
Component: OGR_SF Version: 1.8.0
Severity: normal Keywords:
Cc:

Description

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.

Change History (2)

comment:1 by Even Rouault, 13 years ago

Owner: changed from warmerdam to Even Rouault

comment:2 by Even Rouault, 13 years ago

Milestone: 1.8.1
Resolution: fixed
Status: newclosed

r22026 /trunk/ (5 files in 5 dirs): ogr2ogr: take into account fields specified in the -where clause in combinations with -select to create the correct list of fields to pass to SetIgnoredFields() (#4015)

r22027 /branches/1.8/ (5 files in 5 dirs): ogr2ogr: take into account fields specified in the -where clause in combinations with -select to create the correct list of fields to pass to SetIgnoredFields() (#4015)

Note: See TracTickets for help on using tickets.