Opened 6 months ago

Closed 6 months ago

Last modified 6 months ago

#6788 closed defect (fixed)

ogr2ogr ODS driver filtering by FID inconsistent

Reported by: sfischaber Owned by: warmerdam
Priority: normal Milestone: 2.1.4
Component: OGR_SF Version: svn-trunk
Severity: normal Keywords: ogr2ogr ODS XLSX
Cc:

Description

Running ogr2ogr on an ODS datatype and trying to filter by fid returns a different row if you use the -fid option versus using -sql and a where clause:

Returns the first data record (the header being row 1)

./ogr2ogr -fid 2 -f "CSV" /tmp/data/od.csv /vsicurl/https://www.gov.uk/government/uploads/system/uploads/attachment_data/file/584466/prc-transferred-cancelled-crime-march2012-march2015-tabs.ods --config OGR_ODS_HEADERS FORCE

Returns the third data record; to get the same row as above you need to use fid=0

./ogr2ogr -sql "select * from Open_Data where fid=2" -f "CSV" /tmp/data/od.csv /vsicurl/https://www.gov.uk/government/uploads/system/uploads/attachment_data/file/584466/prc-transferred-cancelled-crime-march2012-march2015-tabs.ods --config OGR_ODS_HEADERS FORCE

Change History (4)

comment:1 Changed 6 months ago by Even Rouault

Resolution: fixed
Status: newclosed

In 37192:

ODS: fix FID filtering (fixes #6788)

comment:2 Changed 6 months ago by Even Rouault

In 37193:

ODS: fix FID filtering (fixes #6788)

comment:3 Changed 6 months ago by Even Rouault

Fix in 2.1 branch done post 2.1.3RC1

comment:4 Changed 6 months ago by Even Rouault

Milestone: 2.1.4
Note: See TracTickets for help on using tickets.