[mapserver-users] Problem with rasters and world files
Stepan Kafka
stepan.kafka@centrum.cz
Thu, 10 Oct 2002 17:56:24 +0200
This is a multi-part message in MIME format.
------=_NextPart_000_0007_01C27086.5966C0B0
Content-Type: text/plain;
charset="iso-8859-1"
Content-Transfer-Encoding: 8bit
Hi James,
you MUST specify the pixel size not number of pixels at the 1. and 4. row
of your wld file.
Stepan Kafka
Help Service Remote Sensing
tel: +420-327514118
mailto:kafka@email.cz
http://www.bnhelp.cz
-----Puvodní zpráva-----
Od: owner-mapserver-users@lists.gis.umn.edu
[mailto:owner-mapserver-users@lists.gis.umn.edu]za uživatele James Anderson
Odesláno: 10. ríjna 2002 14:30
Komu: mapserver-users@lists.gis.umn.edu
Predmet: [mapserver-users] Problem with rasters and world files
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.
------=_NextPart_000_0007_01C27086.5966C0B0
Content-Type: text/html;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=3DContent-Type content=3D"text/html; =
charset=3Diso-8859-1">
<META content=3D"MSHTML 6.00.2600.0" name=3DGENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY bgColor=3D#ffffff>
<DIV><SPAN class=3D945135415-10102002><FONT face=3DArial color=3D#0000ff =
size=3D2>Hi=20
James,</FONT></SPAN></DIV>
<DIV><SPAN class=3D945135415-10102002><FONT face=3DArial color=3D#0000ff =
size=3D2> =20
you MUST specify the pixel size not number of pixels at the 1. and =
4. row=20
of your wld file.</FONT></SPAN></DIV>
<DIV><SPAN class=3D945135415-10102002><FONT face=3DArial color=3D#0000ff =
size=3D2></FONT></SPAN> </DIV>
<DIV><SPAN class=3D945135415-10102002><FONT color=3D#0000ff>
<P><FONT face=3DArial size=3D2><SPAN class=3D945135415-10102002>Stepan=20
Kafka<BR></SPAN></FONT><FONT face=3DArial size=3D2>Help Service Remote=20
Sensing<BR>tel: +420-327514118<BR></FONT><A =
href=3D"mailto:kafka@email.cz"=20
target=3D_blank><FONT face=3DArial =
size=3D2>mailto:kafka@email.cz</FONT></A><BR><A=20
href=3D"http://www.bnhelp.cz/" target=3D_blank><FONT face=3DArial=20
size=3D2>http://www.bnhelp.cz</FONT></A><FONT face=3DArial size=3D2>=20
</FONT></P></FONT></SPAN></DIV>
<BLOCKQUOTE dir=3Dltr=20
style=3D"PADDING-LEFT: 5px; MARGIN-LEFT: 5px; BORDER-LEFT: #0000ff 2px =
solid; MARGIN-RIGHT: 0px">
<DIV class=3DOutlookMessageHeader><FONT face=3D"Times New Roman"=20
size=3D2>-----Původn=ED zpr=E1va-----<BR><B>Od:</B>=20
owner-mapserver-users@lists.gis.umn.edu=20
[mailto:owner-mapserver-users@lists.gis.umn.edu]<B>za u=9Eivatele</B> =
James=20
Anderson<BR><B>Odesl=E1no:</B> 10. ř=EDjna 2002 =
14:30<BR><B>Komu:</B>=20
mapserver-users@lists.gis.umn.edu<BR><B>Předmět:</B> =
[mapserver-users] Problem=20
with rasters and world files<BR><BR></FONT></DIV>
<DIV><FONT face=3DArial size=3D2>Hi,</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT> </DIV>
<DIV><FONT face=3DArial size=3D2>I am a Mapserver newbie. Please =
Help=20
!!</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT> </DIV>
<DIV><FONT face=3DArial size=3D2>I am trying to display a raster =
image of=20
Harare. The raster file name is Harare.tif It is =
8bit=20
uncompressed. 13258x14646 pixels. I have =
made a=20
world file called Harare.wld They are in the C:\Rasters=20
directory</FONT></DIV>
<DIV><FONT face=3DArial size=3D2>The world file </FONT><FONT =
face=3DArial=20
size=3D2>looks like this:</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT> </DIV>
<DIV><FONT face=3DArial=20
=
size=3D2>13258<BR>0.0000000000<BR>0.0000000000<BR>-14646<BR>30.873957<BR>=
</FONT><FONT=20
face=3DArial size=3D2>-17.680917</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT> </DIV>
<DIV><FONT face=3DArial size=3D2>The top left corner of the image is =
at 30.873957=20
X and -17.680917 Y</FONT></DIV>
<DIV><FONT face=3DArial size=3D2>I have made a map file Harare.map =
that=20
looks like this:</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT> </DIV>
<DIV><FONT face=3DArial size=3D2>NAME EX1<BR>EXTENT -18.170 -35.000 =
54.531=20
38.020<BR>SIZE 400 400<BR>SHAPEPATH=20
"C:\Rasters"<BR>PROJECTION<BR> "proj=3Dlonglat"=20
<BR> "ellps=3DWGS84" <BR> =20
"datum=3DWGS84"<BR> "no_defs"<BR>END<BR>IMAGECOLOR =
18 23=20
89</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT> </DIV>
<DIV><FONT face=3DArial size=3D2>LAYER<BR> NAME =
"Harare"<BR> DATA=20
"Harare.tif"<BR> TYPE RASTER<BR> STATUS =
ON<BR>END</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT> </DIV>
<DIV><FONT face=3DArial size=3D2>END # end of map =
file<BR></FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT> </DIV>
<DIV><FONT face=3DArial size=3D2>And an html file default.html =
that looks=20
like this:</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT> </DIV>
<DIV><FONT face=3DArial size=3D2><!DOCTYPE HTML PUBLIC =
"-//IETF//DTD=20
=
HTML//EN"><BR><html><BR> <head><BR> <ti=
tle>Harare=20
Map</title><BR> </head><BR> <body=20
bgcolor=3D"#ffffff"><BR> <img border=3D"1"=20
=
src=3D"/cgi-bin/mapserv.exe?map=3DC:\Inetpub\wwwroot\map3\Harare.map&=
mode=3Dmap"></p><BR> </body><BR></html><BR></FO=
NT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT><FONT face=3DArial=20
size=3D2></FONT> </DIV>
<DIV><FONT face=3DArial size=3D2></FONT> </DIV>
<DIV><FONT face=3DArial size=3D2>Now I am not sure what I am doing =
wrong. =20
The mapserver outputs a dark blue image, same color as the imagecolor=20
statement in the mapfile. This means that the mapserver is =
working and=20
that my file permissions are ok. I am running under WinXP with=20
IIS5.1 You can see my image at <A=20
=
href=3D"http://www.thebeastie.net/map3/">http://www.thebeastie.net/map3/<=
/A></FONT></DIV>
<DIV><FONT face=3DArial size=3D2>I think =
that either the extent in=20
the mapfile is wrong or I have the world file wrong. I am not =
sure=20
which. The example of how to make world files is not very =
clear. =20
</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT> </DIV>
<DIV><FONT face=3DArial size=3D2>Can anyone help ?</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT> </DIV>
<DIV><FONT face=3DArial size=3D2>Thanks,</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT> </DIV>
<DIV><FONT face=3DArial size=3D2>James.</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT> </DIV>
<DIV><FONT face=3DArial =
size=3D2> </DIV></BLOCKQUOTE></FONT></BODY></HTML>
------=_NextPart_000_0007_01C27086.5966C0B0--