[mapserver-users] Matching .TFW file with EXTENT parameter?

Roger André randre at gmail.com
Mon Nov 3 13:18:36 EST 2008


Hi Kresh,

The parameters in a .tfw file are explained here:
http://www.kralidis.ca/gis/worldfile.htm

One caveat to be aware of is that the pixel coordinates are for the center
of the pixel, not the UL corner.  So if you have an image with the UL corner
at (x,y), you need to use the following in your worldfile

Pixel_X_size
0
0
Pixel_Y_size (usually a negative number when using North-up data)
UL_x + (Pixel_X_size / 2)
UL_y + (Pixel_Y_size /2)

Roger
--

On Sun, Nov 2, 2008 at 11:19 PM, kreshna_iceheart at yahoo.com <
kreshna_iceheart at yahoo.com> wrote:

> I have a map file with following MapExtent parameter:
>  EXTENT 106.335006 -6.896956 107.315811 -5.983994
>
> Recently, I got a TIFF file without coordinates. I plan to use the TIFF
> file with my map. Thus, I'm supposed to create a .TFW file using text
> editor, am I correct?
>
> Problem is: I'm not sure what parameter to be put in the .TFW file. Here is
> the parameters I put in my TFW file so far:
>      1.000
>      0.000
>      0.000
>     -1.000
>    106.335006
>     -5.983994
>
> And I failed to show the raster on my map.
>
> Please note that I am merely guessing. It seems that the fifth and the
> sixth like of the TFW should be the leftmost and rightmost number of my
> EXTENT parameter, respectively, but I have no idea what the first four lines
> are for.
>
> Based on EXTENT parameter above, what the correct .TFW values should be?
> Many thanks,
>
> -Kresh
>
>
>
>
>
> _______________________________________________
> mapserver-users mailing list
> mapserver-users at lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/mapserver-users
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osgeo.org/pipermail/mapserver-users/attachments/20081103/30e91f23/attachment.html


More information about the mapserver-users mailing list