[Mapserver-users] GRASS raster from GDAL

Matt Doggett mdoggett at coas.oregonstate.edu
Thu Apr 3 12:25:56 EST 2003


I can access my GRASS raster using the GDAL utilities (like gdalinfo)
but I can't from Mapserver.  Can you show me how a GRASS raster layer is
added in a MapServer mapfile?  I tried the following, but the GRASS
raster simply wouldn't show up. In fact, it gave my browser conniptions
and I had to restart it. 

LAYER
    NAME "PPT"
    STATUS ON
    DATA "/home/precip/forages/data/grass/us/PERMANENT/cellhd/us_ppt_01"
    TYPE RASTER
    TEMPLATE "x"
END

Matt
 

> -----Original Message-----
> From: mapserver-users-admin at lists.gis.umn.edu [mailto:mapserver-users-
> admin at lists.gis.umn.edu] On Behalf Of Jan Hartmann
> Sent: Thursday, April 03, 2003 1:39 AM
> To: mapserver-users at lists.gis.umn.edu
> Subject: Re: [Mapserver-users] GRASS raster from GDAL
> 
> Matt,
> 
> As far as I have experimented, there are two ways of accessing GRASS
> data with GDAL:
> 
> - Standalone GDAL utilities, like gdalinfo and gdal_translate use the
> .grassrc5 file in the $HOME-directory. Any mapset in the current
> database location can be accessed by its name or qualified name (e.g.
> nations, or nations at PERMANENT in the "global" database). According to
> the README in the libgrass distribution, MapServer uses the .grassrc5
> file in the Document_Root directory of the Apache webserver, but that
> didn't work with me.
> 
> - Alternatively, you can use the full path to the raster layer in the
> cellhd subdirectory, irrespective of .grassrc5:
> $HOME/grass5/data/global/PERMANENT/cellhd/nations.
> This works both with MapServer and the standalone applications. I'm
not
> quite clear how GDAL handles GRASS colortables.
> 
> BTW: GRASS 5.1 alpha supports direct reading of PostGIS vector files.
> Together with the existing PostgreSQL query commands within GRASS
> (d.site.pg etc), and the libgrass link between MapServer and GRASS,
> there are great possibilities now to integrate MapServer, PostGIS and
> GRASS
> 
> BTW2: Slightly off topic, but in the same vein: Joe Conway has just
> released PL/R, a new language for use within PostgreSQL
> (www.joeconway.com). With it you can access within PostgreSQL
> practically all statistical functions from the the R program
> (http://www.r-project.org/). In standard SQl you already can write
> functions like "select avg(myvar)". With PL/R you can do thing like:
> "select median(myvar)" and much more complicated statistics. All this
> can  be combined with the PostGIS/MapServer/GRASS interface. It's
really
> a marvelous example of the way Open Source programs can be integrated.
> 
> Jan
> 
> Matt Doggett wrote:
> > I have GDAL compiled --with-grass and the gdal-config --formats
confirms
> > that grass is indeed supported. My mapserver is compiled --with-gdal
and
> > the mapserv -v confirms this. Great!
> >
> > So now, how the heck do you access the grass raster data using GDAL?
> > What should the mapfile look like?  Examples anyone?  I've tried
what I
> > know (which isn't much) and there's so little documentation out
there so
> > I defer to the group...
> >
> > Matt
> >
> > Matt Doggett
> > Spatial Climate Analysis Service
> > Oregon State University
> > 316 Strand Ag Hall
> > Corvallis, OR 97331
> > (541)737-9153
> > mdoggett at coas.oregonstate.edu
> >
> >
> >
> > _______________________________________________
> > Mapserver-users mailing list
> > Mapserver-users at lists.gis.umn.edu
> > http://lists.gis.umn.edu/mailman/listinfo/mapserver-users
> >
> Jan Hartmann
> Department of Geography
> University of Amsterdam
> jhart at frw.uva.nl
> 
> _______________________________________________
> 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