[Gdal-dev] Tilting of 7.5" Digital Elevation Models

Frank Warmerdam warmerdam at pobox.com
Wed Aug 18 11:06:21 EDT 2004


StefanReisser at t-online.de wrote:
> Hi!
> 
> Thanks for the quick responses! I know that the DEMs are projected and
> not "tilted". However, what I didn't know was, whether within one single
> UTM zone, they are "tilted" in both directions. As each zone has its
> central meridian, it's quite obvious that they are.

Stefan,

Right, which way it is tilted will depend on which side of the zone
meridian you are.

> So thanks again for your help. However, I have another question
> concerning the DEMs. Is there a possibility to determine the specific
> 7.5" section of the DEM with GDAL. That means, can I somehow get the
> "real" corner coordinates?

You could work this out though it is a bit of work.  For instance, you could
take the center of the DEM, convert that to lat/long and then figure out
what 7.5" cell you are in from that.  Then convert the corners back to
UTM and to pixel/line coordinates using the geotransform.

The gdalinfo.c program (corners part) can be used a an example of how to
convert between image projected coordinates and lat/long.

The part about "figure out what 7.5" cell you are in" would be by a process
of multiplying, integer truncation, and dividing.

Of course, it would be even better if I returned additional information as
metadata that is in the USGS DEM file.  But those DEM files are so variable
I hate to add extra dependencies.

Best regards,

-- 
---------------------------------------+--------------------------------------
I set the clouds in motion - turn up   | Frank Warmerdam, warmerdam at pobox.com
light and sound - activate the windows | http://pobox.com/~warmerdam
and watch the world go round - Rush    | Geospatial Programmer for Rent




More information about the Gdal-dev mailing list