Opened 9 years ago

Closed 9 years ago

Last modified 9 years ago

#3494 closed defect (fixed)

gdal doesn't read dem file correctly

Reported by: twsmith Owned by: warmerdam
Priority: normal Milestone: 1.7.2
Component: GDAL_Raster Version: 1.5.4
Severity: normal Keywords: usgsdem
Cc:

Description

I'm trying to read dem files like:

ftp://ftp.kymartian.ky.gov/dems_usgs/m39.dem.zip

gdalinfo reports invalid angles for this file:

... Corner Coordinates: Upper Left ( 1447.317, 1055.177) (Invalid angle,Invalid angle) ...

I'm not sure if the problem is with gdal or the source files.

Change History (6)

comment:1 Changed 9 years ago by warmerdam

Component: defaultGDAL_Raster
Keywords: usgsdem added
Status: newassigned
Version: unspecified1.5.4

I have preliminary confirmation. The file seems to be in a projected coordinate system but the driver doesn't seem to recognise this and may be parsing coordinates incorrectly. The first part of the file looks like:

DANVILLE, KY                            Reprojected to KY1Z by KyNREPC-OIS-GIS                                -8445 0.0000  373730.00005    MCMC     2     1     2  1600    .000000000000000D+00    .000000000000000D+00    .000000000000000D+00    .000000000000000D+00    .000000000000000D+00    .000000000000000D+00    .000000000000000D+00    .000000000000000D+00    .000000000000000D+00    .000000000000000D+00    .000000000000000D+00    .000000000000000D+00    .000000000000000D+00    .000000000000000D+00    .000000000000000D+00     1     1     4    .517464600000000D+07    .375233700000000D+07    .517422000000000D+07    .379784800000000D+07    .521035700000000D+07    .379821100000000D+07    .521084500000000D+07    .375270000000000D+07    .752000000000000D+03    .103500000000000D+04    .000000000000000D+00     1 .300000E+02 .300000E+02 .100000E+00     1  1220    00   10119502001I5 1 3 4   1   0 0 0 0 0   0.00                                                                                                                  1     1    64     1    .517425000000000D+07    .379593000000000D+07    .000000000000000D+00    .875300000000000D+03    .904000000000000D+03  8936  8946  8952  8954  8953  

comment:2 Changed 9 years ago by warmerdam

I have implemented rough support for USGS DEM files in state plane coordinates in trunk (r19170). I'd appreciate if you could test it, or at least confirm that the following report looks reasonable for the file:

Driver: USGSDEM/USGS Optional ASCII DEM (and CDED)
Files: m39.dem
Size is 1220, 1532
Coordinate System is:
PROJCS["NAD83 / Kentucky Single Zone",
    GEOGCS["NAD83",
        DATUM["North_American_Datum_1983",
            SPHEROID["GRS 1980",6378137,298.257222101,
                AUTHORITY["EPSG","7019"]],
            TOWGS84[0,0,0,0,0,0,0],
            AUTHORITY["EPSG","6269"]],
        PRIMEM["Greenwich",0,
            AUTHORITY["EPSG","8901"]],
        UNIT["degree",0.01745329251994328,
            AUTHORITY["EPSG","9122"]],
        AUTHORITY["EPSG","4269"]],
    UNIT["Foot",0.3048006096012192],
    PROJECTION["Lambert_Conformal_Conic_2SP"],
    PARAMETER["standard_parallel_1",37.08333333333334],
    PARAMETER["standard_parallel_2",38.66666666666666],
    PARAMETER["latitude_of_origin",36.33333333333334],
    PARAMETER["central_meridian",-85.75],
    PARAMETER["false_easting",4921250],
    PARAMETER["false_northing",3280833.333333333],
    AXIS["X",EAST],
    AXIS["Y",NORTH]]
Origin = (5174235.000000000000000,3798255.000000000000000)
Pixel Size = (30.000000000000000,-30.000000000000000)
Metadata:
  AREA_OR_POINT=Point
Corner Coordinates:
Upper Left  ( 5174235.000, 3798255.000) ( 84d52'29.76"W, 37d45'4.02"N)
Lower Left  ( 5174235.000, 3752295.000) ( 84d52'35.12"W, 37d37'29.63"N)
Upper Right ( 5210835.000, 3798255.000) ( 84d44'54.04"W, 37d45'0.38"N)
Lower Right ( 5210835.000, 3752295.000) ( 84d45'0.17"W, 37d37'25.99"N)
Center      ( 5192535.000, 3775275.000) ( 84d48'44.77"W, 37d41'15.07"N)
Band 1 Block=1220x1532 Type=Float32, ColorInterp=Undefined
  NoData Value=-32767
  Unit Type: ft

comment:3 Changed 9 years ago by warmerdam

Milestone: 1.8.0
Resolution: fixed
Status: assignedclosed

lacking feedback i'm closing this ticket with it fixed in trunk. I hesitate to take the changes into 1.7 branch without further validation.

comment:4 Changed 9 years ago by twsmith

Sorry, I should have followed up. I have been able to import the original dem files without further problem using svn version 19197, so the fix does appear to work.

Thanks again,

Tyler

comment:5 Changed 9 years ago by warmerdam

Milestone: 1.8.01.7.2

Back backported into 1.7 branch in time for 1.7.2.

comment:6 Changed 9 years ago by warmerdam

The backport into 1.7 was r19468.

Note: See TracTickets for help on using tickets.