[Gdal-dev] some geotiff export problems

Frank Warmerdam warmerdam at pobox.com
Mon Nov 25 00:43:53 EST 2002


Vladimir Slepnev wrote:
> 5) Here are some listgeo snippets.
> 
> A "good" GeoTIFF file (not GDAL-generated):
> 
>    Keyed_Information:
>       GTModelTypeGeoKey (Short,1): ModelTypeProjected
>       GTRasterTypeGeoKey (Short,1): RasterPixelIsPoint
>       GTCitationGeoKey (Ascii,25): "UTM Zone 37 N with WGS84"
>       GeogLinearUnitsGeoKey (Short,1): Linear_Meter
>       GeogAngularUnitsGeoKey (Short,1): Angular_Degree
>       ProjectedCSTypeGeoKey (Short,1): PCS_WGS84_UTM_zone_37N
>       End_Of_Keys.
>    End_Of_Geotiff.
> 
> 
> A GDAL-generated file:
> 
>    Keyed_Information:
>       GTModelTypeGeoKey (Short,1): ModelTypeProjected
>       GTRasterTypeGeoKey (Short,1): RasterPixelIsArea
>       ProjectedCSTypeGeoKey (Short,1): User-Defined
>       ProjectionGeoKey (Short,1): Proj_UTM_zone_25N
>       End_Of_Keys.
>    End_Of_Geotiff.
> 
> Why is ProjectedCSTypeGeoKey "User-Defined"?
> Why no linear units? I passed 'em, they were there in both the PROJ.4 string
> and the (converted from PROJ.4) WKT string!
> Why no GTCitationGeoKey?
> What's up with ProjectedCSTypeGeoKey and ProjectionGeoKey? Is GDAL confusing
> them?

Vladimir,

I was able to reproduce this with gdal_translate using:

gdal_translate -a_srs "+proj=utm +zone=11 +ellps=WGS84 +units=us-ft" in.tif out.tif

I fixed gt_wkt_srs.cpp so the units are written out, but the GEOGCS is still
not WGS84 since you have not set your datum to be WGS84 (just your ellipse).
I also get the right GEOGCS now if I use +datum=WGS84 instead of +ellps=WGS84.

Somewhat unrelated to your specific problem I also am not currently taking
any advantage of AUTHORITY[] information in my EPSG strings when writing out
GeoTIFF files.  I will try to fix this tomorrow.

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