[GRASS-user] grass vector files and mapserver
James McManus
jmpmcmanus at yahoo.com
Wed Mar 7 15:26:25 EST 2007
I am trying to serve grass files through mapserver. I have been
following the instructions at:
http://grass.gdf-hannover.de/wiki/GRASS_and_MapServer
I have successfully in served grass raster files, but not grass vector
files. If I try and use an HTML initialization file, nothing appears. If
try to do it using a python mapscript I get a glibc error. The layer
information, for the vector file, in my .map file is:
LAYER
NAME "roads"
TYPE line
STATUS on
CONNECTIONTYPE OGR
CONNECTION
"/var/www/html/mapserver/grassdata/MDI/PERMANENT/vector/roads/head"
DATA "1" # Layer number
CLASS
NAME "roads"
COLOR 250 100 0
END
END
I checked the layer number in the dbln file, and it is:
1 roads cat $GISDBASE/$LOCATION_NAME/$MAPSET/dbf/ dbf
so "1" looks correct. If I run ogrinfo on the header file, I get:
ogrinfo -ro -so
/var/www/html/mapserver/grassdata/MDI/PERMANENT/vector/roads/head
Warning 1: GRASS warning: GISBASE environment variable was not set, using:
/usr/local/grass-6.2.0
INFO: Open of
`/var/www/html/mapserver/grassdata/MDI/PERMANENT/vector/roads/head'
using driver `GRASS' successful.
1: 1 (Line String)
Could the GISBASE warning be my problem? If so how do I set this
variable, so ogr and mapserver can access it? I have tried the usual
setenv, and even hard coded the path in the dbln file, but had the same
problems.
Thanks
Jim
More information about the grass-user
mailing list