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)

N56E102.hgt.zip (809.9 KB ) - added by ozdemiray 16 years ago.

Download all attachments as: .zip

Change History (7)

by ozdemiray, 16 years ago

Attachment: N56E102.hgt.zip added

comment:1 by ozdemiray, 16 years ago

Summary: N56E103.hgt SRTM file cannot be openedN56E102.hgt SRTM file cannot be opened

comment:2 by ozdemiray, 16 years ago

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).

comment:3 by warmerdam, 16 years ago

Cc: warmerdam added
Component: defaultGDAL_Raster
Keywords: srtm sgi added
Owner: changed from warmerdam to chowell
Summary: N56E102.hgt SRTM file cannot be openedN56E102.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 Even Rouault, 16 years ago

Owner: changed from chowell to Even Rouault

comment:5 by Even Rouault, 16 years ago

Status: newassigned

comment:6 by Even Rouault, 16 years ago

Milestone: 1.5.2
Resolution: fixed
Status: assignedclosed

Fixed in trunk in r14401 and in branches/1.5 in r14402

Note: See TracTickets for help on using tickets.