[Mapserver-users] can't display raster

Jeff Austin jaustin at arb.ca.gov
Wed Feb 5 13:05:03 EST 2003


------=_NextPartTM-000-3740c024-adf8-414b-9d2c-5322bc4b6b33
Content-Type: multipart/alternative;
	 boundary="------------B59983525731241AEF137803"

--------------B59983525731241AEF137803
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit

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:

(1) Verified that MS was compiled with tiff support.
(2) Made sure the tiff image is indexed, not RGB
(3) Fiddled with the extents in the world file
(4) Made sure that the image path is specified correctly
(5) Tried changing the "STATUS ON" statement in the layer to "STATUS
DEFAULT"

Still, all I get is a blank image (just the background color) with no
map.  I would greatly appreciate any advice folks can give.

Here is the text of the four relevant files, cal03_init.html,
cal03.html, cal03.map map and cal03.wld:

cal03_init.html:

 <html>
 <head><title>MapServer Test Interface</title></head>
 <body bgcolor="#FFFFFF">

 <center><h2>MapServer Test Interface</h2></center>
 <p><hr><p>
 This is a test

 <form method=GET action="/cgi-bin/mapserv">

 <input type="hidden" name="map" value="/var/www/html/itasca/cal03.map">

 <input type="hidden" name="layer" value="raster_layer">
 <input type="hidden" name="program" value="/cgi-bin/mapserv">
 <input type="hidden" name="map_web_imagepath"
value="/var/www/html/itasca/tmp/">
 <input type="hidden" name="map_web_imageurl" value="/itasca/tmp/">
 <center><input type="submit" value="Initialize"></center>

 </form>

 <p><hr><p>

 </body></html>

cal03.html:

 <form method=GET action="[program]">
  <INPUT NAME="img" TYPE="image" SRC="[img]" width=960 height=580
border=1>
 </form>

cal03.map:

 #
 # Start of map file
 #

 NAME TEST
 STATUS ON
 SIZE 960 580
 EXTENT 0 0 960 580
 SHAPEPATH "test"
 IMAGECOLOR 0 0 0
 IMAGETYPE PNG

 WEB
   TEMPLATE "cal03.html"
   IMAGEPATH "set in cal03_init.html"
   IMAGEURL "set in cal03_init.html"
 END

 LAYER
   NAME raster_layer
   DATA "cal03.tif"
   TYPE RASTER
   STATUS ON
 END

 END # Map File

cal03.wld:

 1
 0.0
 0.0
 -1
 0.0
 0.0











--------------B59983525731241AEF137803
Content-Type: text/html; charset=us-ascii
Content-Transfer-Encoding: 7bit

<!doctype html public "-//w3c//dtd html 4.0 transitional//en">
<html>
I've been trying to display a map with a single layer - a raster image
- but so far I'm stumped.&nbsp; I'm using a tiff image with a world file.&nbsp;&nbsp;
Here's what I've tried so far:
<p>(1) Verified that MS was compiled with tiff support.
<br>(2) Made sure the tiff image is indexed, not RGB
<br>(3) Fiddled with the extents in the world file
<br>(4) Made sure that the image path is specified correctly
<br>(5) Tried changing the "STATUS ON" statement in the layer to "STATUS
DEFAULT"
<p>Still, all I get is a blank image (just the background color) with no
map.&nbsp; I would greatly appreciate any advice folks can give.
<p>Here is the text of the four relevant files, cal03_init.html, cal03.html,
cal03.map map and cal03.wld:
<p><u>cal03_init.html:</u>
<p>&nbsp;&lt;html>
<br>&nbsp;&lt;head>&lt;title>MapServer Test Interface&lt;/title>&lt;/head>
<br>&nbsp;&lt;body bgcolor="#FFFFFF">
<br>&nbsp;
<br>&nbsp;&lt;center>&lt;h2>MapServer Test Interface&lt;/h2>&lt;/center>
<br>&nbsp;&lt;p>&lt;hr>&lt;p>
<br>&nbsp;This is a test
<br>&nbsp;
<br>&nbsp;&lt;form method=GET action="/cgi-bin/mapserv">
<br>&nbsp;
<br>&nbsp;&lt;input type="hidden" name="map" value="/var/www/html/itasca/cal03.map">
<br>&nbsp;&lt;input type="hidden" name="layer" value="raster_layer">
<br>&nbsp;&lt;input type="hidden" name="program" value="/cgi-bin/mapserv">
<br>&nbsp;&lt;input type="hidden" name="map_web_imagepath" value="/var/www/html/itasca/tmp/">
<br>&nbsp;&lt;input type="hidden" name="map_web_imageurl" value="/itasca/tmp/">
<br>&nbsp;&lt;center>&lt;input type="submit" value="Initialize">&lt;/center>
<br>&nbsp;
<br>&nbsp;&lt;/form>
<br>&nbsp;
<br>&nbsp;&lt;p>&lt;hr>&lt;p>
<br>&nbsp;
<br>&nbsp;&lt;/body>&lt;/html>
<p><u>cal03.html:</u>
<p>&nbsp;&lt;form method=GET action="[program]">
<br>&nbsp; &lt;INPUT NAME="img" TYPE="image" SRC="[img]" width=960 height=580
border=1>
<br>&nbsp;&lt;/form>
<p><u>cal03.map:</u>
<p>&nbsp;#
<br>&nbsp;# Start of map file
<br>&nbsp;#
<br>&nbsp;
<br>&nbsp;NAME TEST
<br>&nbsp;STATUS ON
<br>&nbsp;SIZE 960 580
<br>&nbsp;EXTENT 0 0 960 580
<br>&nbsp;SHAPEPATH "test"
<br>&nbsp;IMAGECOLOR 0 0 0
<br>&nbsp;IMAGETYPE PNG
<br>&nbsp;
<br>&nbsp;WEB
<br>&nbsp;&nbsp; TEMPLATE "cal03.html"
<br>&nbsp;&nbsp; IMAGEPATH "set in cal03_init.html"
<br>&nbsp;&nbsp; IMAGEURL "set in cal03_init.html"
<br>&nbsp;END
<br>&nbsp;
<br>&nbsp;LAYER
<br>&nbsp;&nbsp; NAME raster_layer
<br>&nbsp;&nbsp; DATA "cal03.tif"
<br>&nbsp;&nbsp; TYPE RASTER
<br>&nbsp;&nbsp; STATUS ON
<br>&nbsp;END
<p>&nbsp;END # Map File
<p><u>cal03.wld:</u>
<p>&nbsp;1
<br>&nbsp;0.0
<br>&nbsp;0.0
<br>&nbsp;-1
<br>&nbsp;0.0
<br>&nbsp;0.0
<br>&nbsp;
<br>&nbsp;
<br>&nbsp;
<br>&nbsp;
<br>&nbsp;
<br>&nbsp;
<br>&nbsp;
<br>&nbsp;
<br>&nbsp;
<br>&nbsp;</html>

--------------B59983525731241AEF137803--


------=_NextPartTM-000-3740c024-adf8-414b-9d2c-5322bc4b6b33--




More information about the mapserver-users mailing list