Ticket #4500 (closed defect: fixed)
ogr2ogr: Segmentation fault when using both: -select and -where
| Reported by: | peifer | Owned by: | warmerdam |
|---|---|---|---|
| Priority: | normal | Milestone: | |
| Component: | OGR_SF | Version: | 1.8.0 |
| Severity: | normal | Keywords: | |
| Cc: |
Description
"-select SITECODE" and "-where fid=1" work as expected when used alone, but ogr2ogr segfaults when both options are used in combination. See below. This looks like a bug to me.
> ogrinfo -al -so my.shp
INFO: Open of `my.shp'
using driver `ESRI Shapefile' successful.
Layer name: my
Geometry: Polygon
Feature Count: 10
Extent: (16.175822, 46.993819) - (17.063785, 47.999705)
Layer SRS WKT:
GEOGCS["GCS_WGS_1984",
DATUM["WGS_1984",
SPHEROID["WGS_84",6378137,298.257223563]],
PRIMEM["Greenwich",0],
UNIT["Degree",0.017453292519943295]]
SITECODE: String (9.0)
SITENAME: String (240.0)
RELEASE_DA: Date (10.0)
MS: String (2.0)
SITETYPE: String (1.0)
POINT_X: Real (19.11)
POINT_Y: Real (19.11)
Shape_Leng: Real (19.11)
Shape_Area: Real (19.11)
> ogr2ogr -f kml /dev/null my.shp -where fid=1
> ogr2ogr -f kml /dev/null my.shp -select SITECODE
> ogr2ogr -f kml /dev/null my.shp -select SITECODE -where fid=1
Segmentation fault
Attachments
Change History
Note: See
TracTickets for help on using
tickets.

