[Mapserver-users] can't display raster
Ed McNierney
ed at topozone.com
Wed Feb 5 10:13:06 PST 2003
This is a multi-part message in MIME format.
------_=_NextPart_001_01C2CD42.3B609D28
Content-Type: text/plain;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable
Jeff -
=20
Your world file reads:
=20
1
0
0
-1
0
0
=20
which means, "The upper-left corner of this image is at (0, 0), and =
image X coordinates increase by 1 per pixel moving to the right, and =
image Y coordinates DECREASE by 1 per pixel moving down".
=20
Therefore, if you map image is, for example, 960 pixels wide and 560 =
pixels high, all Y coordinates in the image file are negative, running =
from 0 (max) to -559 (at the bottom). Your Y extents are all positive, =
so you won't see the image. You need to either adjust the extents or =
the world file. I won't guarantee that this is your ONLY problem, =
however <g>, but we should fix it first.
=20
- Ed
Ed McNierney
President and Chief Mapmaker
TopoZone.com / Maps a la carte, Inc.
73 Princeton Street, Suite 305
North Chelmsford, MA 01863
ed at topozone.com
(978) 251-4242=20
-----Original Message-----
From: Jeff Austin [mailto:jaustin at arb.ca.gov]
Sent: Wednesday, February 05, 2003 1:05 PM
To: mapserver-users at lists.gis.umn.edu
Subject: [Mapserver-users] can't display raster
I've been trying to display a map with a single layer - a raster image - =
but so far I'm stumped. I'm using a tiff image with a world file. =
Here's what I've tried so far:=20
(1) Verified that MS was compiled with tiff support.=20
(2) Made sure the tiff image is indexed, not RGB=20
(3) Fiddled with the extents in the world file=20
(4) Made sure that the image path is specified correctly=20
(5) Tried changing the "STATUS ON" statement in the layer to "STATUS =
DEFAULT"=20
Still, all I get is a blank image (just the background color) with no =
map. I would greatly appreciate any advice folks can give.=20
Here is the text of the four relevant files, cal03_init.html, =
cal03.html, cal03.map map and cal03.wld:=20
cal03_init.html:=20
<html>=20
<head><title>MapServer Test Interface</title></head>=20
<body bgcolor=3D"#FFFFFF">=20
=20
<center><h2>MapServer Test Interface</h2></center>=20
<p><hr><p>=20
This is a test=20
=20
<form method=3DGET action=3D"/cgi-bin/mapserv">=20
=20
<input type=3D"hidden" name=3D"map" =
value=3D"/var/www/html/itasca/cal03.map">=20
<input type=3D"hidden" name=3D"layer" value=3D"raster_layer">=20
<input type=3D"hidden" name=3D"program" value=3D"/cgi-bin/mapserv">=20
<input type=3D"hidden" name=3D"map_web_imagepath" =
value=3D"/var/www/html/itasca/tmp/">=20
<input type=3D"hidden" name=3D"map_web_imageurl" =
value=3D"/itasca/tmp/">=20
<center><input type=3D"submit" value=3D"Initialize"></center>=20
=20
</form>=20
=20
<p><hr><p>=20
=20
</body></html>=20
cal03.html:=20
<form method=3DGET action=3D"[program]">=20
<INPUT NAME=3D"img" TYPE=3D"image" SRC=3D"[img]" width=3D960 =
height=3D580 border=3D1>=20
</form>=20
cal03.map:=20
#=20
# Start of map file=20
#=20
=20
NAME TEST=20
STATUS ON=20
SIZE 960 580=20
EXTENT 0 0 960 580=20
SHAPEPATH "test"=20
IMAGECOLOR 0 0 0=20
IMAGETYPE PNG=20
=20
WEB=20
TEMPLATE "cal03.html"=20
IMAGEPATH "set in cal03_init.html"=20
IMAGEURL "set in cal03_init.html"=20
END=20
=20
LAYER=20
NAME raster_layer=20
DATA "cal03.tif"=20
TYPE RASTER=20
STATUS ON=20
END=20
END # Map File=20
cal03.wld:=20
1=20
0.0=20
0.0=20
-1=20
0.0=20
0.0=20
=20
=20
=20
=20
=20
=20
=20
=20
=20
=20
------_=_NextPart_001_01C2CD42.3B609D28
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=3D"Content-Type" CONTENT=3D"text/html; =
charset=3Diso-8859-1">
<META content=3D"MSHTML 6.00.2800.1126" name=3DGENERATOR></HEAD>
<BODY>
<DIV><SPAN class=3D992171018-05022003><FONT face=3DArial color=3D#0000ff =
size=3D2>Jeff=20
-</FONT></SPAN></DIV>
<DIV><SPAN class=3D992171018-05022003><FONT face=3DArial color=3D#0000ff =
size=3D2></FONT></SPAN> </DIV>
<DIV><SPAN class=3D992171018-05022003><FONT face=3DArial color=3D#0000ff =
size=3D2>Your=20
world file reads:</FONT></SPAN></DIV>
<DIV><SPAN class=3D992171018-05022003><FONT face=3DArial color=3D#0000ff =
size=3D2></FONT></SPAN> </DIV>
<DIV><SPAN class=3D992171018-05022003><FONT face=3DArial color=3D#0000ff =
size=3D2>1</FONT></SPAN></DIV>
<DIV><SPAN class=3D992171018-05022003><FONT face=3DArial color=3D#0000ff =
size=3D2>0</FONT></SPAN></DIV>
<DIV><SPAN class=3D992171018-05022003><FONT face=3DArial color=3D#0000ff =
size=3D2>0</FONT></SPAN></DIV>
<DIV><SPAN class=3D992171018-05022003><FONT face=3DArial color=3D#0000ff =
size=3D2>-1</FONT></SPAN></DIV>
<DIV><SPAN class=3D992171018-05022003><FONT face=3DArial color=3D#0000ff =
size=3D2>0</FONT></SPAN></DIV>
<DIV><SPAN class=3D992171018-05022003><FONT face=3DArial color=3D#0000ff =
size=3D2>0</FONT></SPAN></DIV>
<DIV><SPAN class=3D992171018-05022003><FONT face=3DArial color=3D#0000ff =
size=3D2></FONT></SPAN> </DIV>
<DIV><SPAN class=3D992171018-05022003><FONT face=3DArial color=3D#0000ff =
size=3D2>which=20
means, "The upper-left corner of this image is at (0, 0), and image X=20
coordinates increase by 1 per pixel moving to the right, and image Y =
coordinates=20
DECREASE by 1 per pixel moving down".</FONT></SPAN></DIV>
<DIV><SPAN class=3D992171018-05022003><FONT face=3DArial color=3D#0000ff =
size=3D2></FONT></SPAN> </DIV>
<DIV><SPAN class=3D992171018-05022003><FONT face=3DArial color=3D#0000ff =
size=3D2>Therefore, if you map image is, for example, 960 pixels wide =
and 560=20
pixels high, all Y coordinates in the image file are negative, running =
from 0=20
(max) to -559 (at the bottom). Your Y extents are all positive, so =
you=20
won't see the image. You need to either adjust the extents or the =
world=20
file. I won't guarantee that this is your ONLY problem, however =
<g>,=20
but we should fix it first.</FONT></SPAN></DIV>
<DIV><SPAN class=3D992171018-05022003><FONT face=3DArial color=3D#0000ff =
size=3D2></FONT></SPAN> </DIV>
<DIV><SPAN class=3D992171018-05022003> <FONT =
face=3DArial=20
color=3D#0000ff size=3D2>- Ed</FONT></SPAN></DIV>
<DIV><SPAN class=3D992171018-05022003>
<P><FONT size=3D2>Ed McNierney<BR>President and Chief =
Mapmaker<BR>TopoZone.com /=20
Maps a la carte, Inc.<BR>73 Princeton Street, Suite 305<BR>North =
Chelmsford,=20
MA 01863<BR>ed at topozone.com<BR>(978) 251-4242 =
</FONT></P></SPAN></DIV>
<BLOCKQUOTE dir=3Dltr style=3D"MARGIN-RIGHT: 0px">
<DIV class=3DOutlookMessageHeader dir=3Dltr align=3Dleft><FONT =
face=3DTahoma=20
size=3D2>-----Original Message-----<BR><B>From:</B> Jeff Austin=20
[mailto:jaustin at arb.ca.gov]<BR><B>Sent:</B> Wednesday, February 05, =
2003 1:05=20
PM<BR><B>To:</B> mapserver-users at lists.gis.umn.edu<BR><B>Subject:</B>=20
[Mapserver-users] can't display raster<BR><BR></FONT></DIV>I've been =
trying to=20
display a map with a single layer - a raster image - but so far I'm=20
stumped. I'm using a tiff image with a world file. =
Here's=20
what I've tried so far:=20
<P>(1) Verified that MS was compiled with tiff support. <BR>(2) Made =
sure the=20
tiff image is indexed, not RGB <BR>(3) Fiddled with the extents in the =
world=20
file <BR>(4) Made sure that the image path is specified correctly =
<BR>(5)=20
Tried changing the "STATUS ON" statement in the layer to "STATUS =
DEFAULT"=20
<P>Still, all I get is a blank image (just the background color) with =
no=20
map. I would greatly appreciate any advice folks can give.=20
<P>Here is the text of the four relevant files, cal03_init.html, =
cal03.html,=20
cal03.map map and cal03.wld:=20
<P><U>cal03_init.html:</U>=20
<P> <html> <BR> <head><title>MapServer =
Test=20
Interface</title></head> <BR> <body =
bgcolor=3D"#FFFFFF">=20
<BR> <BR> <center><h2>MapServer Test=20
Interface</h2></center> =
<BR> <p><hr><p>=20
<BR> This is a test <BR> <BR> <form method=3DGET=20
action=3D"/cgi-bin/mapserv"> <BR> <BR> <input =
type=3D"hidden"=20
name=3D"map" value=3D"/var/www/html/itasca/cal03.map"> =
<BR> <input=20
type=3D"hidden" name=3D"layer" value=3D"raster_layer"> =
<BR> <input=20
type=3D"hidden" name=3D"program" value=3D"/cgi-bin/mapserv"> =
<BR> <input=20
type=3D"hidden" name=3D"map_web_imagepath" =
value=3D"/var/www/html/itasca/tmp/">=20
<BR> <input type=3D"hidden" name=3D"map_web_imageurl"=20
value=3D"/itasca/tmp/"> <BR> <center><input =
type=3D"submit"=20
value=3D"Initialize"></center> <BR> =
<BR> </form>=20
<BR> <BR> <p><hr><p> <BR> =20
<BR> </body></html>=20
<P><U>cal03.html:</U>=20
<P> <form method=3DGET action=3D"[program]"> <BR> =
<INPUT=20
NAME=3D"img" TYPE=3D"image" SRC=3D"[img]" width=3D960 height=3D580 =
border=3D1>=20
<BR> </form>=20
<P><U>cal03.map:</U>=20
<P> # <BR> # Start of map file <BR> # <BR> =
<BR> NAME=20
TEST <BR> STATUS ON <BR> SIZE 960 580 <BR> EXTENT 0 0 =
960 580=20
<BR> SHAPEPATH "test" <BR> IMAGECOLOR 0 0 0 =
<BR> IMAGETYPE PNG=20
<BR> <BR> WEB <BR> TEMPLATE "cal03.html"=20
<BR> IMAGEPATH "set in cal03_init.html" <BR> =
IMAGEURL=20
"set in cal03_init.html" <BR> END <BR> <BR> LAYER=20
<BR> NAME raster_layer <BR> DATA "cal03.tif"=20
<BR> TYPE RASTER <BR> STATUS ON <BR> END=20
<P> END # Map File=20
<P><U>cal03.wld:</U>=20
<P> 1 <BR> 0.0 <BR> 0.0 <BR> -1 <BR> 0.0=20
<BR> 0.0 <BR> <BR> <BR> <BR> <BR> =20
<BR> <BR> <BR> <BR> <BR> =20
</P></BLOCKQUOTE></BODY></HTML>
------_=_NextPart_001_01C2CD42.3B609D28--
More information about the MapServer-users
mailing list