[Gdal-dev] Arc-second units?

trale at centrum.cz trale at centrum.cz
Wed Jan 24 21:00:19 EST 2007


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:

Driver: GTiff/GeoTIFF
Size is 777, 657
Coordinate System is:
GEOGCS["WGS 84",
    DATUM["WGS_1984",
        SPHEROID["WGS 84",6378137,298.2572235630016,
            AUTHORITY["EPSG","7030"]],
        AUTHORITY["EPSG","6326"]],
    PRIMEM["Greenwich",0],
    UNIT[,0.0174532925199433],
    AUTHORITY["EPSG","4326"]]
Origin = (-399424.610220731760000,116211.336444500940000)
Pixel Size = (0.647917999999991,-0.647917999999996)
Metadata:
  AREA_OR_POINT=Point
Corner Coordinates:
Upper Left  ( -399424.610,  116211.336)
(399424d36'36.79"W,116211d20'11.20"N)
Lower Left  ( -399424.610,  115785.654)
(399424d36'36.79"W,115785d39'15.55"N)
Upper Right ( -398921.178,  116211.336)
(398921d10'40.57"W,116211d20'11.20"N)
Lower Right ( -398921.178,  115785.654)
(398921d10'40.57"W,115785d39'15.55"N)
Center      ( -399172.894,  115998.495)
(399172d53'38.68"W,115998d29'43.37"N)
Band 1 Block=777x1 Type=Float32, ColorInterp=Gray

<!--
D(["mb","The UNIT is empty, but it clearly thinks the unit is DEGREES as the corner<br />coordinates are obviously completely wrong.<br /><br />When looking at the same file with a different reader (a GeoTIFF tag<br />reader), the information returned is:<br /><br />Elevation file:<br />Geotiff_Information:<br /> &amp;nbsp; &amp;nbsp;Version: 1<br /> &amp;nbsp; &amp;nbsp;Key_Revision: 1.0<br /> &amp;nbsp; &amp;nbsp;Tagged_Information:<br /> &amp;nbsp; &amp;nbsp; &amp;nbsp; ModelTiepointTag (2,3):<br /> &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;0 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;0 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;0<br /> &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;-399424.61 &amp;nbsp; &amp;nbsp; &amp;nbsp; 116211.336 &amp;nbsp; &amp;nbsp; &amp;nbsp; 0<br /> &amp;nbsp; &amp;nbsp; &amp;nbsp; ModelPixelScaleTag (1,3):<br /> &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;0.647918 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 0.647918 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 1<br /> &amp;nbsp; &amp;nbsp; &amp;nbsp; End_Of_Tags.<br /> &amp;nbsp; &amp;nbsp;Keyed_Information:<br /> &amp;nbsp; &amp;nbsp; &amp;nbsp; GTModelTypeGeoKey (Short,1): ModelTypeGeographic<br /> &amp;nbsp; &amp;nbsp; &amp;nbsp; GTRasterTypeGeoKey (Short,1): RasterPixelIsPoint<br /> &amp;nbsp; &amp;nbsp; &amp;nbsp; GeographicTypeGeoKey (Short,1): GCS_WGS_84<br /> &amp;nbsp; &amp;nbsp; &amp;nbsp; GeogAngularUnitsGeoKey (Short,1): Angular_Arc_Second<br /> &amp;nbsp; &amp;nbsp; &amp;nbsp; VerticalUnitsGeoKey (Short,1): Unknown-9001<br /> &amp;nbsp; &amp;nbsp; &amp;nbsp; End_Of_Keys.<br /> &amp;nbsp; &amp;nbsp;End_Of_Geotiff.<br /><br />The units are clearly set to Angular_Arc_Second. &amp;nbsp;If the coordinates above<br />are interpreted as arc-seconds then the corner coordinates are correct.<br /><br />First, am I understanding things correctly, and is my interpretation that<br />GDAL14 is not handling this correc
tly, correct? &amp;nbsp;Or am I missing something?<br />I\'m new to GDAL and certainly could easily be overlooking something very<br />basic.<br /><br />If GDAL does in fact not handle this type of coordinate correctly, can<br />someone point me to where in the sources I would need to make a patch? &amp;nbsp;I\'m<br />more than willing to go in and extend things as necessary.<br /><br />Thanks in advance,<br /></div>",1]
);

//-->The UNIT is empty, but it clearly thinks the unit is DEGREES as the corner
coordinates are obviously completely wrong.

When looking at the same file with a different reader (a GeoTIFF tag
reader), the information returned is:

Elevation file:
Geotiff_Information:
    Version: 1
    Key_Revision: 1.0
    Tagged_Information:
       ModelTiepointTag (2,3):
          0                0                0
          -399424.61       116211.336       0
       ModelPixelScaleTag (1,3):
          0.647918         0.647918         1
       End_Of_Tags.
    Keyed_Information:
       GTModelTypeGeoKey (Short,1): ModelTypeGeographic
       GTRasterTypeGeoKey (Short,1): RasterPixelIsPoint
       GeographicTypeGeoKey (Short,1): GCS_WGS_84
       GeogAngularUnitsGeoKey (Short,1): Angular_Arc_Second
       VerticalUnitsGeoKey (Short,1): Unknown-9001
       End_Of_Keys.
    End_Of_Geotiff.

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.

Thanks in advance,

Nick


-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osgeo.org/pipermail/gdal-dev/attachments/20070125/f7b0aa01/attachment.html


More information about the Gdal-dev mailing list