[Mapserver-users] can't display raster

Jeff Austin jaustin at arb.ca.gov
Wed Feb 5 10:05:03 PST 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.  I'm using a tiff image with a world file.  
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.  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> <html>
<br> <head><title>MapServer Test Interface</title></head>
<br> <body bgcolor="#FFFFFF">
<br> 
<br> <center><h2>MapServer Test Interface</h2></center>
<br> <p><hr><p>
<br> This is a test
<br> 
<br> <form method=GET action="/cgi-bin/mapserv">
<br> 
<br> <input type="hidden" name="map" value="/var/www/html/itasca/cal03.map">
<br> <input type="hidden" name="layer" value="raster_layer">
<br> <input type="hidden" name="program" value="/cgi-bin/mapserv">
<br> <input type="hidden" name="map_web_imagepath" value="/var/www/html/itasca/tmp/">
<br> <input type="hidden" name="map_web_imageurl" value="/itasca/tmp/">
<br> <center><input type="submit" value="Initialize"></center>
<br> 
<br> </form>
<br> 
<br> <p><hr><p>
<br> 
<br> </body></html>
<p><u>cal03.html:</u>
<p> <form method=GET action="[program]">
<br>  <INPUT NAME="img" TYPE="image" SRC="[img]" width=960 height=580
border=1>
<br> </form>
<p><u>cal03.map:</u>
<p> #
<br> # Start of map file
<br> #
<br> 
<br> NAME TEST
<br> STATUS ON
<br> SIZE 960 580
<br> EXTENT 0 0 960 580
<br> SHAPEPATH "test"
<br> IMAGECOLOR 0 0 0
<br> IMAGETYPE PNG
<br> 
<br> WEB
<br>   TEMPLATE "cal03.html"
<br>   IMAGEPATH "set in cal03_init.html"
<br>   IMAGEURL "set in cal03_init.html"
<br> END
<br> 
<br> LAYER
<br>   NAME raster_layer
<br>   DATA "cal03.tif"
<br>   TYPE RASTER
<br>   STATUS ON
<br> END
<p> END # Map File
<p><u>cal03.wld:</u>
<p> 1
<br> 0.0
<br> 0.0
<br> -1
<br> 0.0
<br> 0.0
<br> 
<br> 
<br> 
<br> 
<br> 
<br> 
<br> 
<br> 
<br> 
<br> </html>

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


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




More information about the MapServer-users mailing list