[Gdal-dev] Arc-second units?

Frank Warmerdam warmerdam at pobox.com
Wed Jan 24 23:06:50 EST 2007


trale at centrum.cz wrote:
> Hello,
> 
> It would appear that GDAL14 does not understand arc-second units.  I created
> an elevation file (GeoTIFF) using Global Mapper.  When I look at it with
> gdalinfo I get:
...
> The units are clearly set to Angular_Arc_Second.  If the coordinates above
> are interpreted as arc-seconds then the corner coordinates are correct.
> 
> First, am I understanding things correctly, and is my interpretation that
> GDAL14 is not handling this correctly, correct?  Or am I missing something?
> I'm new to GDAL and certainly could easily be overlooking something very
> basic.
> 
> If GDAL does in fact not handle this type of coordinate correctly, can
> someone point me to where in the sources I would need to make a patch?  I'm
> more than willing to go in and extend things as necessary.

Nick,

Your analysis is correct.  GDAL assumes all geographic coordinate systems
are using degrees as a unit and ignores any indication otherwise in the
WKT.  There may also be an issue that the GDAL GeoTIFF driver isn't
handling the tags properly.  This seems to be suggested by the lack of a
unit name and the fact that the degree to radian ratio is in the Units
field.

My usual approach to handling arc-seconds in the few cases they come up
has (in the ESRI .prj file handler I think) been to transform the values
into degrees before returning the values from the driver.

A more proper approach would be to get serious about angular units
handling through GDAL and GDAL based applications ... but that seems
like a lot to ask for very little real value.

So, if you want to hack on the GeoTIFF driver, then you would need to
hack around in gdal/frmts/gtiff/geotiff.cpp.  Likely you would want
to address it after the comment "Get the transform or gcps from the GeoTIFF
file".

Alternatively you could file it is a bug with an attached smallish
example file and the GDAL team might at some point get around to addressing
it.

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    | President OSGeo, http://osgeo.org




More information about the Gdal-dev mailing list