[Mapserver-users] Question about wld/gfw file {Scanned}

Siki Zoltan siki at agt.bme.hu
Thu Mar 18 05:31:51 EST 2004


On Thu, 18 Mar 2004, [iso-8859-1] TOH CZ wrote:

> Hi, I have a few questions about the wld/gfw files
> used in mapserver
> 1) Do I need to create a new wld/gfw file for each of
> my own maps?

No. World files sould be created for each raster layer.
World file must have the same name that the raster file and must be in the
same directory.

> 2) How do you determine what to put into the wld/gfw
> file?
> I tried searching the archives, I could not find one
> that contained information about using GIF files
> Right now, my file shows a blank GIF image

The world file contains the 6 parameters of an affine transformation.
x1 = Ax + By + C
y1 = Dx + Ey + F

World file stores them in the following order
A     the pixel size in x direction in real life
D     -1 * the pixel size in y direction in the real life
B     rotation I think it must be 0 for mapserver (no rotation)
E     rotation I think it must be 0 for mapserver (no rotation)
C     x co-ordinate for the upper left corner
F     y co-ordinate for the upper left corner

> 
> MAP
>   IMAGETYPE      GIF
>   EXTENT         201621.496941 -294488.285333
> 1425518.020722 498254.511514
>   SIZE           400 300
>   SHAPEPATH      "C:\Program Files\Apache
> Group\Apache2\htdocs\tutorial\data"
>   IMAGECOLOR     255 255 255
> 
>   PROJECTION
>     "proj=laea"
>     "ellps=clrk66"
>     "lat_0=45"
>     "lon_0=-100"
>   #
>   # Alternatively, you can specify an EPSG code.
>   # "init=epsg:2163"
>   #
>   END
> 
>   # Start of LAYER DEFINITIONS
> ---------------------------------------------
>   LAYER # States polygon layer begins here
>     NAME         tp_genmap
>     DATA         "tp_genmap.gif"
>     STATUS       DEFAULT
>     TYPE         RASTER
> 
>     PROJECTION
>       "init=epsg:4326"
>     END
> 
>     CLASS
>       COLOR        232 232 232
>       OUTLINECOLOR 32 32 32
>     END
>   END # States polygon layer ends here
>   # End of LAYER DEFINITIONS
> -------------------------------
> 
> END # end of map file/object
> Thanks
> 
> 
Try to find out the size of your image in pixels (ogrinfo can help)
set the EXTENT to these values.
Create a wld file like this
1
-1
0
0
0
pixel count in y direction

Remove projection.
Then you must see your image, but it will be in the origin.

Bye
Zoltan
> 	
> 	
> 		
> ___________________________________________________________
> Yahoo! Messenger - Communicate instantly..."Ping" 
> your friends today! Download Messenger Now 
> http://uk.messenger.yahoo.com/download/index.html
> _______________________________________________
> Mapserver-users mailing list
> Mapserver-users at lists.gis.umn.edu
> http://lists.gis.umn.edu/mailman/listinfo/mapserver-users
> 




More information about the mapserver-users mailing list