[Geotiff] Adding projection to GeoTIFF file from MapInfo Tab file

Frank Warmerdam warmerdam at pobox.com
Mon Dec 10 13:24:50 EST 2007


Thomas Mejer Hansen wrote:
> Hi
> I would like to use 'geotifcp' to add Geotoff tags to Tiff files 
> exported from Matlab.
> 
> I can add the geo-locations using geotifcp and a tfw file. However I 
> cannot find an easy way to add the projection information.
> 
> Using MapInfo a tab file with projection information is output, that for 
> example looks like
> --
> !table
> !version 300
> !charset WindowsLatin1
> 
> Definition Table
>   File "meancondep_00000_00020_geo.tif"
>   Type "RASTER"
>   (411532.09825564997,7665490.0398676498) (0,0) Label "Pt 1",
>   (421410.47578294994,7665490.0398676498) (1679,0) Label "Pt 2",
>   (411532.09825564997,7656411.7285644496 ) (0,1544) Label "Pt 3"
>   CoordSys Earth Projection 8, 104, "m", 21, 0, 0.9996, 500000, 0
>   Units "m"
> --
> 
> Is there a way to use the projection info in this tab file  together 
> with geotifcp, to add the proper projection information to the geotiff 
> file ?

Thomas,

Based on a conversion using GDAL tools I get a GeoTIFF
definition something like this for the described CoordSys.

    Keyed_Information:
       GTModelTypeGeoKey (Short,1): ModelTypeProjected
       GTRasterTypeGeoKey (Short,1): RasterPixelIsArea
       GTCitationGeoKey (Ascii,8): "unnamed"
       GeogCitationGeoKey (Ascii,8): "unnamed"
       GeogAngularUnitsGeoKey (Short,1): Angular_Degree
       ProjectedCSTypeGeoKey (Short,1): PCS_WGS84_UTM_zone_34N
       ProjLinearUnitsGeoKey (Short,1): Linear_Meter
       End_Of_Keys.
    End_Of_Geotiff.

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 Geotiff mailing list