[Mapserver-users] GRASS raster

Matt Doggett mdoggett at coas.oregonstate.edu
Mon Oct 20 13:45:18 EDT 2003


1. Have you confirmed that your mapserver will correctly render *any*
raster or other data not in GRASS?  There's been lots of posts lately
about blank maps.

2. Your GRASS data MUST contain integers of the range 0-255 (8 bit).  I
had to reclassify my GRASS rasters to conform to this.

3. Try adding CLASS statements to your LAYER object in the mapfile.
   Eg.
  
LAYER
    NAME "ReferenceSpecies"
    STATUS ON
    TYPE RASTER
    DATA "/home/server/forages/data/grass/us/PERMANENT/cellhd/fescue"
    TEMPLATE "ttt.html"
    CLASS
	  EXPRESSION ([pixel] < 0)
	  COLOR 255 255 255
    END
    CLASS
	Name "Not Suitable"
      EXPRESSION ([pixel] == 0)
      COLOR 155 105 30 
    END
    CLASS
		  Name "Marginal"
      EXPRESSION ([pixel] == 1)
      COLOR 255 240 55 
    END

  ...etc...


-md


>-----Original Message-----
>From: mapserver-users-admin at lists.gis.umn.edu [mailto:mapserver-users-
>admin at lists.gis.umn.edu] On Behalf Of Ling-Yen Liao
>Sent: Friday, October 17, 2003 12:56 PM
>To: mapserver-users at lists.gis.umn.edu
>Subject: Re: [Mapserver-users] GRASS raster
>
>Hi, I'm trying to find where the problem is.
>
>$ /usr/local/bin/gdal-config --formats
>finds grass;
>$ ldd /usr/local/bin/libgdal.1.1.so
>has a link to libgrass: libgrass5.so.0 => /usr/lib/libgrass5.so.0
>(0x40300000);
>also
>$ gdalinfo soils
>prints out something and looks like no problem;
>but
>$ /var/www/cgi-bin/shp2img -m soilsmap -o soils.png
>outputs a BLANK img.
>
>So anybody knows what's wrong?
>
>Thank you!
>
>-LY
>
>----- Original Message -----
>From: Ling-Yen Liao <lyl209 at nyu.edu>
>Date: Friday, October 17, 2003 3:17 am
>Subject: [Mapserver-users] GRASS raster
>
>> Hello,
>>
>> I'm trying to use Mapserver to display grass raster files.
>>
>> 1. I put .grassrc5 file under /var/www/html
>> 2. Here is my map file
>> NAME GRASS
>> STATUS ON
>> SIZE 950 700
>> SYMBOLSET /var/www/html/grsmap/map-script/marker.sym
>> #         W       S      E      N
>> EXTENT 590000 4914000 609000 4928000
>>
>> #GRASS raster map directly from location (8bit only):
>> LAYER
>>  NAME soils
>>  TYPE RASTER
>>  STATUS on
>> data "/data/grassdata/spearfish/PERMANENT/cellhd/soils"
>> END # Layer
>> end
>>
>> The weird thing is, when I open my browser with
>> http://localhost/cgi-bin/mapserv36?map=/var/www/html/grsmap/map-
>> script/soils.map&mode=mapThe title will be mapserv36(PNG Image,
>> 950x700 pixels), and no error messages (I checked
>> /var/log/httpd/error_log). But! The content of the browser is
>> BLANK. It looks like a white map in it...
>>
>> I really don't know what happened, can anyone tell me?
>>
>> I use redhat 9, GRASS 5.0.3, Mapserver 3.6.
>>
>> (BTW, I found that if I change the status to default then the
>> result will become "Server error! Error 500" and I don't know why.)
>>
>>
>> Best,
>> LY
>>
>> _______________________________________________
>> Mapserver-users mailing list
>> Mapserver-users at lists.gis.umn.edu
>> http://lists.gis.umn.edu/mailman/listinfo/mapserver-users
>>
>
>_______________________________________________
>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