Opened 15 years ago

Closed 15 years ago

#2936 closed defect (invalid)

datum change on export

Reported by: mdunn Owned by: warmerdam
Priority: normal Milestone:
Component: GDAL_Raster Version: unspecified
Severity: normal Keywords: USGSDEM
Cc:

Description

started with GRS80 geographic elevation TIFF;

then used gdalwarp to change to NAD83 UTM;

then used gdal_translate to export to USGSDEM format

GDAL_TRANSLATE changed datum to NAD27 UTM

I had to use -a_srs "NAD83" to get correct output

Attachments (2)

oops_gdal_translate.txt (3.2 KB ) - added by mdunn 15 years ago.
76512677.zip (418.9 KB ) - added by mdunn 15 years ago.

Download all attachments as: .zip

Change History (10)

comment:1 by warmerdam, 15 years ago

Component: defaultGDAL_Raster
Keywords: USGSDEM added
Priority: highnormal
Status: newassigned

Mike,

As I understand it, the gdal_translate to USGSDEM format produced a file with NAD27 as the datum, when it should have been NAD83. Is that right? Could you provide a NAD83 UTM input file and the exactly parameters you used with gdal_translate to produce the incorrect USGS DEM file?

by mdunn, 15 years ago

Attachment: oops_gdal_translate.txt added

comment:2 by mdunn, 15 years ago

The original file came from http://seamless.usgs.gov

It is in West Virginia and is a 1/9 arc-second DEM in ESRI binary grid format, geographic.

My network will not let me attach it.

I was wrong on the -a_srs "fix" It didn't work after all.

comment:3 by warmerdam, 15 years ago

Mike, Can you provide a more directly link to the suggested dataset? I visited the seamless site, but it was not immediately obvious where I should be looking.

comment:4 by mdunn, 15 years ago

I tried to mail file again, got SMTP error again.

I can try again or show with GoToMeeting session but you have to send me a different email address

Sorry, problem is on my end!

by mdunn, 15 years ago

Attachment: 76512677.zip added

comment:5 by mdunn, 15 years ago

downloaded very small area

it is attached

same results

email to trac@… does not work.

comment:6 by warmerdam, 15 years ago

Mike, Can you provide a more directly link to the suggested dataset? I visited the seamless site, but it was not immediately obvious where I should be looking.

comment:7 by mdunn, 15 years ago

http://seamless.usgs.gov/website/seamless/viewer.htm

click XY button and enter -80.5, 39

click Download tab on right

expand Elevation

only check 1/9" NED

on left, select Define Rectangular Download Area

on map, draw very small box and wait.

Will be self-explaining after that.


I have found something: data element 27 at position 891 in the DEM has this strange character If I change to 3 or 4, the datum is correct.

comment:8 by Even Rouault, 15 years ago

Resolution: invalid
Status: assignedclosed

I don't think this is a GDAL bug, but an incorrect use of gdalwarp:

'gdalwarp -t_srs "+proj=utm +zone=17" in out' produces a out file with an undefined datum as 'gdalinfo out' shows on it. Then gdal_translate to USGSDEM uses a default datum, which happens to be NAD27.

The solution is to specify the datum in your proj.4 string. So use : 'gdalwarp -t_srs "+proj=utm +zone=17 +datum=nad83" in out'

I've checked that translating to USGSDEM afterwards keep NAD83 as the datum.

Note: See TracTickets for help on using tickets.