Tiff world file question

Ian iansgis at GMAIL.COM
Wed Jan 23 14:26:41 EST 2008


SRTM3 data (.img format w/index) for a basemap is slow, so to speed up our
draw times I'm using a script to make smaller tiles of this data. My script
writes the images to .tif format and works, but I also need to generate tiff
world files to maintain spatial reference. The definition I found for the
.tfw format is:

First row is x-pixel resolution
Second and third rows are "rotational components" but are set to zero in the
case of an unrotated map.
The fourth row is the y-pixel resolution. The negative sign indicates that
the image y-axis is positive down which is the opposite from real world
coordinates.
The 5th and 6th rows are the Easting and Northing of the upper left pixel
(0,0 in image coordinates)

So for SRTM3 data which is 90m resolution I am creating a .tfw file like:

90.00
0.00
0.00
-90.00
???
???

The last two rows are confusing me. Do I need to calculate the pixel
position of the upper left corner of each new tile with respect to the
pixels of ALL SRTM3 files? That calculation could be problematic.

Also if there is another tiling solution that maintains spatial reference
I'm all ears. Thank you.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osgeo.org/pipermail/mapserver-users/attachments/20080123/47097015/attachment.html


More information about the mapserver-users mailing list