Raster Image

Leo Peiwen-Liu payneliu at HOTMAIL.COM
Sat Jun 30 16:24:23 EDT 2007


Hi,

I want to start my project with a simple raster layer demo. After a few
weeks' trying different codes, I'm stuck. The raster image won't display at
all. I tried to generate vector map from shapefile and it's working fine.

The following is the map file:

MAP
   NAME lpwUSA3
   STATUS ON
   IMAGETYPE PNG
   SIZE 800 500
   SHAPEPATH "/home/mapdata/"
   EXTENT -6086744.000 -2784127 4278894 4485901

WEB
   TEMPLATE '/opt/fgs/www/htdocs/lpwfirst.html'
   IMAGEPATH '/opt/fgs/www/htdocs/tmp/'
   IMAGEURL '/tmp/'
END

LAYER
NAME "Nighttime lights"
TYPE RASTER
STATUS ON
DATA "/home/mapdata/nitelti020l.tif"
END
END

The following is the html template:

<html>

<head> <title>lpw MapServer First Map</title></head>

<body>

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

      <input type="submit" value="Click Me">

      <input type="hidden" name="map" value="/home/mapdata/lpwnitelights.map">

      <input type="hidden" name="map_web_imagepath" 

             value="/opt/fgs/www/htdocs/tmp/">

   </form>

   <IMG SRC="[img]" width=800 height=640 border=0>

</body>

</html>


The nitelti020l.tif image and nitelti020l.tfw world file are located in
/home/mapdata/ . The following is the content of tfw file:

769.4780
0.000000
0.000000
-769.4780
-6086744.0000
4485901.0000

I'm using the FGS installation Mapserver 4.4.1 and Apache-base 1.3.33 on
Fedora core 6.

Thanks in advance,

Leo 



More information about the mapserver-users mailing list