[mapserver-users] Problem with rasters and world files

James Anderson james at danisat.net
Thu Oct 10 05:30:12 PDT 2002


Hi,

I am a Mapserver newbie.  Please Help !!

I am trying to display a raster image of Harare.  The raster file name is Harare.tif   It is 8bit uncompressed.  13258x14646 pixels.   I have made a world file called Harare.wld  They are in the C:\Rasters directory
The world file looks like this:

13258
0.0000000000
0.0000000000
-14646
30.873957
-17.680917

The top left corner of the image is at 30.873957 X and -17.680917 Y
I have made a map file Harare.map  that looks like this:

NAME EX1
EXTENT -18.170 -35.000 54.531 38.020
SIZE 400 400
SHAPEPATH "C:\Rasters"
PROJECTION
    "proj=longlat" 
    "ellps=WGS84" 
    "datum=WGS84"
    "no_defs"
END
IMAGECOLOR 18 23 89

LAYER
  NAME "Harare"
  DATA "Harare.tif"
  TYPE RASTER
  STATUS ON
END

END # end of map file


And an html file  default.html that looks like this:

<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN">
<html>
 <head>
  <title>Harare Map</title>
 </head>
 <body bgcolor="#ffffff">
  <img border="1" src="/cgi-bin/mapserv.exe?map=C:\Inetpub\wwwroot\map3\Harare.map&mode=map"></p>
 </body>
</html>



Now I am not sure what I am doing wrong.  The mapserver outputs a dark blue image, same color as the imagecolor statement in the mapfile.  This means that the mapserver is working and that my file permissions are ok.  I am running under WinXP with IIS5.1   You can see my image at http://www.thebeastie.net/map3/
I think that either the extent in the mapfile is wrong or I have the world file wrong.  I am not sure which.  The example of how to make world files is not very clear.  

Can anyone help ?

Thanks,

James.


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/mapserver-users/attachments/20021010/b21851a5/attachment.htm>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/x-pkcs7-signature
Size: 2951 bytes
Desc: not available
URL: <http://lists.osgeo.org/pipermail/mapserver-users/attachments/20021010/b21851a5/attachment.bin>


More information about the MapServer-users mailing list