Opened 10 years ago

Closed 10 years ago

#3513 closed defect (fixed)

Can't open this USGS DEM

Reported by: gaopeng Owned by: warmerdam
Priority: normal Milestone: 1.8.0
Component: GDAL_Raster Version: 1.6.1
Severity: normal Keywords: usgsdem
Cc:

Description

Attached should be a USGS DEM. But GDAL can't open it. It looks like it has wrong header info.

Attachments (1)

fixed.dem (401.0 KB) - added by gaopeng 10 years ago.

Download all attachments as: .zip

Change History (6)

Changed 10 years ago by gaopeng

Attachment: fixed.dem added

comment:1 Changed 10 years ago by warmerdam

Keywords: usgsdem added
Milestone: 1.8.0
Resolution: fixed
Status: newclosed

The file is somewhat non-standard. In particular it uses -9999 and -9 for fields like coordinate system and units that it has no particular idea about. I have made adjustements to the driver to support this file in trunk (r19267) and 1.6-esri (r19268).

comment:2 Changed 10 years ago by gaopeng

Resolution: fixed
Status: closedreopened

This DEM should have no spatial reference. But it returns a real (wrong) SR, instead of none.

comment:3 Changed 10 years ago by warmerdam

Resolution: fixed
Status: reopenedclosed

I have made an adjustment to treat this sort of file as having no coordinate system in trunk (r19283) and 1.6-esri (r19284).

comment:4 Changed 10 years ago by gaopeng

Resolution: fixed
Status: closedreopened

Another problem. The DEM should be 200x200 looking like a circle. But currently only half of the image is visible, and the rest are considered bad.

            fscanf(poGDS->fp, "%d", &nElev);
            if (iY < 0 || iY >= GetYSize() )
                bad = TRUE;

comment:5 Changed 10 years ago by warmerdam

Resolution: fixed
Status: reopenedclosed

The problem turned out to be another place assuming not PROJCS must measured in arcseconds. Fixed in trunk (r19291) and 1.6-esri (r19292).

Note: See TracTickets for help on using tickets.