using CONFIG to set GISBASE

Frank Warmerdam warmerdam at POBOX.COM
Thu Mar 15 09:52:31 PDT 2007


James McManus wrote:
> I am getting the following error message when I try and read a grass 
> vector file:
> 
> msDrawMap(): Image handling error. Failed to draw layer named 'roads'.
> msOGRFileNextShape(): OGR error. Cannot open database dbf by driver 
> /var/www/html/mapserver/grassdata/MDI/PERMANENT/dbf/, check if GISBASE 
> environment variable is set, the driver is available and the database is 
> accessible.
> 
> I been trying to set GISBASE using the CONFIG keyword in my .map file:
> 
> NAME "MDI"
> UNITS DD
> EXTENT -68.40 44.23 -68.23 44.39
> SIZE 640 480
> IMAGECOLOR 189 202 222
> IMAGETYPE PNG
> CONFIG "GISBASE" "/usr/local/grass-6.2.0/"
> 
> I have tried variations, such as not using quotes, but no success so 
> far. How is this done? I'm using mapserver 4.10, so the CONFIG keyword 
> should be available.

Jim,

The CONFIG keyword in .map files does not actually set an environment
variable which is what is required by the OGR GRASS driver and GRASS itself
for GISBASE.  The CONFIG keyword will set a "GDAL config option" but it seems
the OGR GRASS driver was not setup to use that.  Even if that was fixed,
I suspect the GRASS libraries still require a real environment variable.

I'd suggest you try setting GISBASE with an Apache SetEnv, or a MapServer
wrapper script.

Best regards,
-- 
---------------------------------------+--------------------------------------
I set the clouds in motion - turn up   | Frank Warmerdam, warmerdam at pobox.com
light and sound - activate the windows | http://pobox.com/~warmerdam
and watch the world go round - Rush    | President OSGeo, http://osgeo.org



More information about the MapServer-users mailing list