Opened 10 years ago

Closed 10 years ago

#5456 closed defect (fixed)

SXF: version check is incorrect

Reported by: akhliustov Owned by: bishop
Priority: normal Milestone:
Component: OGR_SF Version: unspecified
Severity: normal Keywords: OGR, SXF
Cc:

Description

http://trac.osgeo.org/gdal/browser/trunk/gdal/ogr/ogrsf_frmts/sxf/ogrsxfdatasource.cpp#L202

If the driver supports SXF versions 3+, it should compare that value with 3, not 0.

Attachments (2)

K3814.sit.LOG (520 bytes ) - added by bishop 10 years ago.
K38032.sit.LOG (614 bytes ) - added by bishop 10 years ago.

Download all attachments as: .zip

Change History (7)

comment:1 by akhliustov, 10 years ago

Owner: changed from warmerdam to bishop

comment:2 by bishop, 10 years ago

In my test data the version 3 is indicated inside the file as 0 (in header). I attached 2 log files from Panorama for ver. 3 (K38032.sxf) and ver. 4 (K3814.SXF). As one can see - the Panorama also indicate ver. 3 file as 0. If you have other SXF file ver. 3 with indicator 3 in header, please find the way to provide it to me. I'll think how to solve this situation. Otherwise the ticket is wrong and should be closed.

by bishop, 10 years ago

Attachment: K3814.sit.LOG added

by bishop, 10 years ago

Attachment: K38032.sit.LOG added

comment:3 by bishop, 10 years ago

Resolution: invalid
Status: newclosed

Also I detect format by header size not by compare with 0. If Header is 400 - this is 4+, otherwise - 3-. And then read the version from appropriate position of the header.

comment:4 by akhliustov, 10 years ago

Resolution: invalid
Status: closedreopened

From my experience, oSXFPassport.version is assigned correctly for SXF versions 4, 3 and 2. The problem is that version 2 neither rejected nor supported; further conditional blocks look like

if (passport.version == 3)
{ ... }
else if (passport.version == 4)
{ ... }

Personally, I am against version 2 support. First, it has several incompatible minor versions, and second, maps themselves are of noticeably lower quality.

comment:5 by bishop, 10 years ago

Resolution: fixed
Status: reopenedclosed

Fix in r27291

Note: See TracTickets for help on using tickets.