[mapserver-users] TIFF/GeoTIFF and World Files
Frank Warmerdam
warmerdam at pobox.com
Tue May 22 05:42:35 PDT 2001
Chris Stuber wrote:
>
> MapServer Folks,
>
> Back on the topic of raster images... In the past, I have manually created a
> world file to go with my raster images. I ran across a dataset (actually it is
> software) that generates GeoTIFF output. The GeoTIFF file contains
> GeoKeyDirectories with the following keys/values defined for each image:
>
> KeyDirVersion: 1, KeyMaj/MinRev: 1/2
> NumKeyDirKeys: 12
> GTModelTypeGeoKey: 2 (ModelTypeGeographic)
> GTRasterTypeGeoKey: 1 (RasterPixelIsArea)
> GeographicTypeGeoKey: (value always NAD83 or WGS_84 [virtually the same
> datum])
> GeogPrimeMeridianGeoKey: 8901 (PM_Greenwich)
> GeogAngularUnitsGeoKey: 9102 (Degrees)
> ProjectedCSTypeGeoKey: 32767 (UserDefinedVal)
> ProjectionGeoKey: 32767 (UserDefinedVal)
> ProjCoordTransGeoKey: 8 (currently always CT_LambertConfConic [could
> change])
> ProjStdParallelGeoKey: (value = Standard Parallel closest to equator)
> ProjStdParallel2GeoKey: (value = Standard Parallel furtherest from equator)
> ProjNatOriginLatGeoKey: (value = Mid Latitude)
> ProjCenterLongGeoKey: (value = Central Meridian)
>
> Now, my question is... to what degree does mapserver support GeoTIFF? Will
> mapserver
> read these GeoTIFF attributes? Do I still need to create a world file to match
> the
> image? By default, no ".tfw" is generated from this software..... If a
> world file
> *is* required, can it computed from the GeoTIFF Header information?? There
> will be
> quite a few images, and I can't image having to manually create world files for
> each.
Chris,
My understanding is that MapServer's existing (pre 3.5) TIFF support will
read the georeferencing coefficients from the .tif file if available, in which
case no .tfw is required. However, it does not read the coordinate system
definition, so you might need to define it using a PROJECTION section in your
map file. If, for some reason, you want a .tfw file anyways and aren't sure
how to create it by hand, the listgeo utility distributed with libgeotiff
(http://www.remotesensing.org/geotiff/geotiff.html) includes the ability to
create a .tfw file from a GeoTIFF file.
In the CVS code my new GDAL code will even read the projection definition,
removing the need for a user supplied conversion into PROJ.4 format.
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 MapServer-users
mailing list