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)
Change History (7)
comment:1 by , 10 years ago
Owner: | changed from | to
---|
comment:2 by , 10 years ago
by , 10 years ago
Attachment: | K3814.sit.LOG added |
---|
by , 10 years ago
Attachment: | K38032.sit.LOG added |
---|
comment:3 by , 10 years ago
Resolution: | → invalid |
---|---|
Status: | new → closed |
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 , 10 years ago
Resolution: | invalid |
---|---|
Status: | closed → reopened |
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.
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.