Opened 19 years ago

Closed 16 years ago

Last modified 16 years ago

#856 closed defect (fixed)

CDED (usgs) wrong extents north of 68°

Reported by: matt.wilkie@… Owned by: warmerdam
Priority: normal Milestone: 1.5.0
Component: GDAL_Raster Version: svn-trunk
Severity: normal Keywords: USGS CDED50K
Cc:

Description (last modified by warmerdam)

The cded export screws up north of 68° and exports the west half twice.

gdal_translate --optfile yt_cded.opt -co NTS=117d12e \
-co InternalName=117d12DEMe dem 117d12_e.dem

gdal_translate --optfile yt_cded.opt -co NTS=117d12w \
-co InternalName=117d12DEMw dem 117d12_w.dem

East:
Upper Left  (-140.0002083,  69.7501042) (140d 0'0.75"W, 69d45'0.38"N)
Lower Left  (-140.0002083,  69.4998958) (140d 0'0.75"W, 69d29'59.63"N)
Upper Right (-139.4997917,  69.7501042) (139d29'59.25"W, 69d45'0.38"N)
Lower Right (-139.4997917,  69.4998958) (139d29'59.25"W, 69d29'59.63"N)

West:
Upper Left  (-140.0002083,  69.7501042) (140d 0'0.75"W, 69d45'0.38"N)
Lower Left  (-140.0002083,  69.4998958) (140d 0'0.75"W, 69d29'59.63"N)
Upper Right (-139.4997917,  69.7501042) (139d29'59.25"W, 69d45'0.38"N)
Lower Right (-139.4997917,  69.4998958) (139d29'59.25"W, 69d29'59.63"N)

In this example east top left should be 139.5 (plus/minus the cell offset)

Attachments (3)

yt_cded.opt (240 bytes ) - added by maphew 17 years ago.
option file used for the posted commandline
gdalbug856.zip (183.3 KB ) - added by maphew 17 years ago.
test case showing bug: source data & script
gdal_svn_trunk_bug856.patch (1.3 KB ) - added by Even Rouault 16 years ago.

Download all attachments as: .zip

Change History (12)

comment:1 by matt.wilkie@…, 18 years ago

>bump<

comment:3 by maphew, 17 years ago

Priority: highnormal

I've forgotten the rationale for why this is "wontfix". Can you refresh my memory? thanks.

comment:4 by warmerdam, 17 years ago

Description: modified (diff)
Status: newassigned

Matt,

I don't think this is wontfix - it is just not followed up on. If you can provide a dataset, and control file that goes with the above commands, I'll try and look into this soon.

by maphew, 17 years ago

Attachment: yt_cded.opt added

option file used for the posted commandline

by maphew, 17 years ago

Attachment: gdalbug856.zip added

test case showing bug: source data & script

comment:5 by maphew, 17 years ago

Summary: CDED (usgs) wrong extents north of 68°CDED (usgs) wrong extents north of 68°

comment:6 by Even Rouault, 16 years ago

Keywords: USGS CDED50K added
Milestone: 1.5.0
Version: unspecifiedsvn-trunk

Although I'm totally unfamiliar with CDED, I've attached a patch that probably fixes the issue.

With it, gdalinfo reports :

gdalinfo 117d12_e.dem :
Upper Left  (-139.5002083,  69.7501042) (139d30'0.75"W, 69d45'0.38"N)
Lower Left  (-139.5002083,  69.4998958) (139d30'0.75"W, 69d29'59.63"N)
Upper Right (-138.9997917,  69.7501042) (138d59'59.25"W, 69d45'0.38"N)
Lower Right (-138.9997917,  69.4998958) (138d59'59.25"W, 69d29'59.63"N)

gdalinfo 117d12_w.dem :
Upper Left  (-140.0002083,  69.7501042) (140d 0'0.75"W, 69d45'0.38"N)
Lower Left  (-140.0002083,  69.4998958) (140d 0'0.75"W, 69d29'59.63"N)
Upper Right (-139.4997917,  69.7501042) (139d29'59.25"W, 69d45'0.38"N)
Lower Right (-139.4997917,  69.4998958) (139d29'59.25"W, 69d29'59.63"N)

by Even Rouault, 16 years ago

Attachment: gdal_svn_trunk_bug856.patch added

comment:7 by warmerdam, 16 years ago

Component: defaultGDAL_Raster

I have reviewed and applied Even's patch which *seems* reasonable. Matt, would you be able to test this out (from trunk)? If so, I would be willing to back patch it to 1.4 branch after testing.

Patch was r12320.

comment:8 by maphew, 16 years ago

I can't test from code right now. My linux machine at work is offline and cygwin does not compile out of the box. I'll try from home this weekend, kids and life permitting. :)

comment:9 by maphew, 16 years ago

Resolution: fixed
Status: assignedclosed

The patch seems to have fixed the problem, thank you!

There is a warning message I don't recall seeing before, "Warning 6: 'CDED50K' is an unexpected value for Product creation option of type string-select.". I don't have an old version to test if my memory is correct or not. It appears harmless as diff'ing the output of today's gdal_translate and the hand crafted 117d12_e.dem from a couple of years ago shows no difference.

comment:10 by warmerdam, 16 years ago

Matt,

Even recently introduced validation of creation parameters based on the driver metadata describing the available creation parameters. But it seems there was a small typo in this metadata for the USGS DEM driver. I have corrected this (r12593). In the meantime there is no problem, you can just ignore the warning.

Thanks

Note: See TracTickets for help on using tickets.