[Gdal-dev] Linear units problem, feets or meters? (sorry for cross-posting)

Simone Giannecchini simboss1 at gmail.com
Wed Jan 10 07:58:40 EST 2007


Hi list,
I am writing because I would like to have some feedback on an issue I
ran into yesterday.

I was supplied with a GeoTiff file whose tiff tags are dumped here below.


    <TIFFField number="34735" name="GeoKeyDirectory">
      <TIFFShorts>
        <TIFFShort value="1"/>
        <TIFFShort value="1"/>
        <TIFFShort value="0"/>
        <TIFFShort value="12"/>
        <TIFFShort value="1024"/>
        <TIFFShort value="0"/>
        <TIFFShort value="1"/>
        <TIFFShort value="1"/>
        <TIFFShort value="1025"/>
        <TIFFShort value="0"/>
        <TIFFShort value="1"/>
        <TIFFShort value="1"/>
        <TIFFShort value="2050"/>
        <TIFFShort value="0"/>
        <TIFFShort value="1"/>
        <TIFFShort value="6269"/>
        <TIFFShort value="2056"/>
        <TIFFShort value="0"/>
        <TIFFShort value="1"/>
        <TIFFShort value="7019"/>
        <TIFFShort value="3072"/>
        <TIFFShort value="0"/>
        <TIFFShort value="1"/>
        <TIFFShort value="32111"/>
        <TIFFShort value="3073"/>
        <TIFFShort value="34737"/>
        <TIFFShort value="80"/>
        <TIFFShort value="0"/>
        <TIFFShort value="3076"/>
        <TIFFShort value="0"/>
        <TIFFShort value="1"/>
        <TIFFShort value="9003"/>
        <TIFFShort value="3080"/>
        <TIFFShort value="34736"/>
        <TIFFShort value="1"/>
        <TIFFShort value="0"/>
        <TIFFShort value="3081"/>
        <TIFFShort value="34736"/>
        <TIFFShort value="1"/>
        <TIFFShort value="1"/>
        <TIFFShort value="3082"/>
        <TIFFShort value="34736"/>
        <TIFFShort value="1"/>
        <TIFFShort value="2"/>
        <TIFFShort value="3083"/>
        <TIFFShort value="34736"/>
        <TIFFShort value="1"/>
        <TIFFShort value="3"/>
        <TIFFShort value="3092"/>
        <TIFFShort value="34736"/>
        <TIFFShort value="1"/>
        <TIFFShort value="4"/>
      </TIFFShorts>
    </TIFFField>
    <TIFFField number="34736" name="GeoDoubleParams">
      <TIFFDoubles>
        <TIFFDouble value="-74.5"/>
        <TIFFDouble value="38.8333333"/>
        <TIFFDouble value="1614580.1"/>
        <TIFFDouble value="0.0"/>
        <TIFFDouble value="0.9999"/>
      </TIFFDoubles>
    </TIFFField>
    <TIFFField number="34737" name="GeoAsciiParams">
      <TIFFAsciis>
        <TIFFAscii value="State Plane Coordinate System 1983; North
American 1983; GRS80; Zone New Jersey|"/>
      </TIFFAsciis>
    </TIFFField>

What seems strange to me about these tags is that it is clearly
declared that this image is using EPSG:32111 whose standard
description is as follows:

PROJCS["NAD83 / New Jersey",
  GEOGCS["NAD83",
    DATUM["North American Datum 1983",
      SPHEROID["GRS 1980", 6378137.0, 298.257222101, AUTHORITY["EPSG","7019"]],
      TOWGS84[1.0, 1.0, -1.0, 0.0, 0.0, 0.0, 0.0],
      AUTHORITY["EPSG","6269"]],
    PRIMEM["Greenwich", 0.0, AUTHORITY["EPSG","8901"]],
    UNIT["degree", 0.017453292519943295],
    AXIS["Geodetic longitude", EAST],
    AXIS["Geodetic latitude", NORTH],
    AUTHORITY["EPSG","4269"]],
  PROJECTION["Transverse Mercator", AUTHORITY["EPSG","9807"]],
  PARAMETER["central_meridian", -74.5],
  PARAMETER["latitude_of_origin", 38.833333333333336],
  PARAMETER["scale_factor", 0.9999],
  PARAMETER["false_easting", 150000.0],
  PARAMETER["false_northing", 0.0],
  UNIT["m", 1.0],
  AXIS["Easting", EAST],
  AXIS["Northing", NORTH],
  AUTHORITY["EPSG","32111"]]

while if I check the tags in the geodir I see that a bunch of
information in addition to the CRS itself are provided, like as an
instance:

GeogGeodeticDatumGeoKey
        <TIFFShort value="2050"/>
        <TIFFShort value="0"/>
        <TIFFShort value="1"/>
        <TIFFShort value="6269"/>


GeogEllipsoidGeoKey
        <TIFFShort value="2056"/>
        <TIFFShort value="0"/>
        <TIFFShort value="1"/>
        <TIFFShort value="7019"/>

ProjLinearUnitsGeoKey
        <TIFFShort value="3076"/>
        <TIFFShort value="0"/>
        <TIFFShort value="1"/>
        <TIFFShort value="9003"/>

I checked the geotiff with gdal (the one shipped with fwtools 1.1.3)
and I got the following WKT

PROJCS["NAD83 / New Jersey",
    GEOGCS["NAD83",
        DATUM["North_American_Datum_1983",
            SPHEROID["GRS 1980",6378137,298.2572221010002,
                AUTHORITY["EPSG","7019"]],
            AUTHORITY["EPSG","6269"]],
        PRIMEM["Greenwich",0],
        UNIT["degree",0.0174532925199433],
        AUTHORITY["EPSG","4269"]],
    PROJECTION["Transverse_Mercator"],
    PARAMETER["latitude_of_origin",38.83333333333334],
    PARAMETER["central_meridian",-74.5],
    PARAMETER["scale_factor",0.9999],
    PARAMETER["false_easting",492125],
    PARAMETER["false_northing",0],
    UNIT["US survey foot",0.3048006096012192,
        AUTHORITY["EPSG","9003"]],
    AUTHORITY["EPSG","32111"]]

while the EPSG file contains the following line for the proj params:
<32111> +proj=tmerc +lat_0=38.83333333333334 +lon_0=-74.5 +k=0.999900
+x_0=150000 +y_0=0 +ellps=GRS80 +datum=NAD83 +units=m +no_defs  <>


Note that the proj params are equivalent to the EPSG WKT while the WKT
I get fom GDAL has a different unit of measure definition.

I am wondering what is the right way to manage such geodirectory. Here
you have some thoughts:

>I always thought that when a GCS or a PCS is explicitly defined (like
we do here for EPSG:32111) we should go with it
>I could interpret this case as "modify the EPSG:32111" PCS with the
provided params" hence change the unit of measure. Anyway, IMHO, if I
do this (like I guess GDAL is doing) I think I should not state
anymore that this CRS is EPSG:32111 but I should be creating a
user-define PCS.
>Is this issue related to the old thread from early 2006 in the
geotiff ml with regard to handling feet UoM?


Sorry again for cross-posting, I am hoping to get some information on
this issue.
Regards,
Simone.

-- 
-------------------------------------------------------
Eng. Simone Giannecchini
President /CEO GeoSolutions

http://www.geo-solutions.it

-------------------------------------------------------



More information about the Gdal-dev mailing list