Opened 16 years ago
Closed 16 years ago
#2289 closed defect (fixed)
N56E102.hgt SRTM file misidentified as SGI format
Reported by: | ozdemiray | Owned by: | Even Rouault |
---|---|---|---|
Priority: | normal | Milestone: | 1.5.2 |
Component: | GDAL_Raster | Version: | unspecified |
Severity: | normal | Keywords: | srtm sgi |
Cc: | warmerdam |
Description
N56E103.hgt file (and there may be others too) cannot be opened by GDALOpen, because SGI driver's Open method creates an error.
SGI driver is tried before SRTMHGT driver in GDALOpen. In SGI Driver's open method, first 2 bytes of the file is compared with 474 and if it passes the file is considered to be an SGI file. Then 4th byte of the file is compared with 1, and if it is not, then an error is created.
The problem may be solved, if SRTMHGT driver is tried before SGI driver in GDALOpen (which means SRTMHGT driver will be registered first).
Attachments (1)
Change History (7)
by , 16 years ago
Attachment: | N56E102.hgt.zip added |
---|
comment:1 by , 16 years ago
Summary: | N56E103.hgt SRTM file cannot be opened → N56E102.hgt SRTM file cannot be opened |
---|
comment:2 by , 16 years ago
comment:3 by , 16 years ago
Cc: | added |
---|---|
Component: | default → GDAL_Raster |
Keywords: | srtm sgi added |
Owner: | changed from | to
Summary: | N56E102.hgt SRTM file cannot be opened → N56E102.hgt SRTM file misidentified as SGI format |
Chris,
Could you confirm this, and look into an appropriate correction for the SGI driver? Reordering would be a last resort solution. Much better to make the sgi recognition stricter.
comment:4 by , 16 years ago
Owner: | changed from | to
---|
comment:5 by , 16 years ago
Status: | new → assigned |
---|
comment:6 by , 16 years ago
Milestone: | → 1.5.2 |
---|---|
Resolution: | → fixed |
Status: | assigned → closed |
N56E102.hgt file (and there may be others too) cannot be opened by GDALOpen, because SGI driver's Open method creates an error.
SGI driver is tried before SRTMHGT driver in GDALOpen. In SGI Driver's open method, first 2 bytes of the file is compared with 474 and if it passes the file is considered to be an SGI file. Then 4th byte of the file is compared with 1, and if it is not, then an error is created.
The problem may be solved, if SRTMHGT driver is tried before SGI driver in GDALOpen (which means SRTMHGT driver will be registered first).