Ticket #856 (closed defect: fixed)

Opened 8 years ago

Last modified 6 years ago

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) (diff)

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

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

Change History

Changed 7 years ago by matt.wilkie@…

>bump<

Changed 6 years ago by maphew

  • priority changed from high to normal

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

Changed 6 years ago by warmerdam

  • status changed from new to assigned
  • description modified (diff)

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.

Changed 6 years ago by maphew

option file used for the posted commandline

Changed 6 years ago by maphew

test case showing bug: source data & script

Changed 6 years ago by maphew

  • summary changed from CDED (usgs) wrong extents north of 68° to CDED (usgs) wrong extents north of 68°

Changed 6 years ago by rouault

  • keywords USGS CDED50K added
  • version changed from unspecified to svn-trunk
  • milestone set to 1.5.0

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)

Changed 6 years ago by rouault

Changed 6 years ago by warmerdam

  • component changed from default to GDAL_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.

Changed 6 years ago by maphew

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

Changed 6 years ago by maphew

  • status changed from assigned to closed
  • resolution set to fixed

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.

Changed 6 years ago by warmerdam

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.