[Mapserver-users] Problem to show a raster layer?

Stephen Clark stephen.clark at focus.ca
Mon Feb 23 08:35:48 PST 2004


Try something like the following:
LAYER

NAME a69_layer

DATA "d:/to/some/path/a69.tif"

TYPE RASTER

STATUS ON

# turn off the black background in the image files if you have one or just
comment out

OFFSITE 0 0 0

END


Note I use forward slashes in my paths.
I also see you are adding a RASTER file inside a POLYGON layer.
You should use two layers --- one for polgons and one for rasters.

hope this helps
Stephen


----- Original Message ----- 
From: "Nely Balderas" <balderas_n at hotmail.com>
To: <mapserver-users at lists.gis.umn.edu>
Sent: Saturday, February 21, 2004 12:10 AM
Subject: [Mapserver-users] Problem to show a raster layer?


> Sorry i am new in mapserver... i want to show a raster layer but i can't,
> i'm using mapserver 4.0 and windows binaries and phpmapscript
>
> my raster is a69.tif, it has a tfw file with this information
> 10.3352258255599
> 0
> 0
> -10.3401980506
> 461745.077948169
> 2076516.13845759
>
> the map file has a simple polygon shapefile an also i want to show  raster
> file
> but my problem is that my layer doesn't show.
> its possible to use jpg or pgn like symbols or reference imagenes.
>
> could you help me?
>
> MAP
> NAME PRIMERMAPA
>
> IMAGETYPE PNG
> #STATUS on
> SIZE 400 350
> UNITS METERS
>
> SYMBOLSET "c:\\program
> files\\nusphere\\apache\\nsdocs\\mapa_siciem\\etc\\symbols.sym"
> FONTSET "c:\\program
> files\\nusphere\\apache\\nsdocs\\mapa_siciem\\etc\\fonts.list"
>
> EXTENT 448203.823337231 2026726.16845977 538509.467913451 2115325.67281802
> IMAGECOLOR 168 168 168
> SHAPEPATH "c:\\program files\\nusphere\\apache\\nsdocs\\mapa_siciem\\"
> WEB
> #MINSCALE 2000
> #MAXSCALE 1500000
> IMAGEPATH "c:\\program files\\nusphere\\apache\\nsdocs\\tmp"
> IMAGEURL "/tmp"
> END
>
> LAYER
> NAME morelos
> TYPE POLYGON
> STATUS on
> DATA morelos
> CLASS
> NAME "mpios"
> COLOR 150 230 165
> TEMPLATE void
> OUTLINECOLOR 100 100 70
> END
> TOLERANCE 10
> END
>
>   LAYER # imagen de cartografia
>     NAME miraster
>     DATA 'relieve.tif'
>     STATUS default
>     TYPE RASTER
>     PROCESSING "BANDS=1,2,3"
>     OFFSITE 71 74 65
>   END
>
>
> END # Fin del mapa
>
>
>
>
>
> <?php
>
> $map_path="mapa_siciem";
> $map=ms_newMapObj($map_path. "\morelos.map");
> $image=$map->draw();
> $testpt->draw($map, $testlayer, $image, 0, " ");
> $image_url=$image->saveWebImage(MS_PNG,1,1,0);
> ?>
>
> <HTML>
> <HEAD>
> <TITLE>MAPA </title>
> </head>
> <BODY>
> <img SRC=<?php echo $image_url; ?>>
> </body>
> </html>
>
> _________________________________________________________________
> Charla con tus amigos en línea mediante MSN Messenger:
> http://messenger.microsoft.com/es
>
> _______________________________________________
> Mapserver-users mailing list
> Mapserver-users at lists.gis.umn.edu
> http://lists.gis.umn.edu/mailman/listinfo/mapserver-users
>




More information about the MapServer-users mailing list