Raster images

Dave Tee wildrov at BELLSOUTH.NET
Wed Jun 1 04:22:44 PDT 2005


Greetings Nuri,
  Here is the deal.  The Tif from the existing example is most likely in
GeoTif Format.  That means that there is extra info in the tif file.  If
you open it in an "image" program....Coral.....then save that image....you
strip out the extra info from the file.  So now it no longer works.

  Now you have a plan tif image that if you want to display it correctly
you will have to have a world file to go along with it.  These files are
in tfw or wld format.

If you have a file called example.tif you will need a file called
example.tfw to go along with it that contains the extra info.

 Georeference with World Files
World files are a simple mechanism for associating georeferencing (world
coordinates) information with raster files. ESRI was the first company to
propagate the use of world files, and they often used with TIFF instead of
embedding georeferencing information in the file itself.

The world file contents look like the following. The first coefficient is
the X pixel size. The second and third are rotational/shear coefficients
(and should normally be 0.0). The fourth is the Y pixel size, normally
negative indicating that Y decreases as you move down from the top left
origin. The final two values are the X and Y location of the center of the
top left pixel. This example is for an image with a 2m x 2m pixel size,
and a top left origin at (356800E, 5767999N).

2
0.0000000000
0.0000000000
-2
356800.00
5767999.00

The name of the world file is based on the file it relates to. For
instance, the world file for aerial.tif might be aerial.tfw. Conventions
vary for appropriate endings, but with MapServer the extension .wld is
always OK for world files.

You can read all about them here
http://mapserver.gis.umn.edu/doc44/raster-howto.html


Dave



More information about the MapServer-users mailing list