[GRASS-user] Trouble with gdal/ogr grass plugin

John Overton jd3 at renci.org
Tue Jul 8 15:44:02 EDT 2008


Hello,

I am having trouble getting the grass plugin for gdal/ogr to work.  I 
ultimately want to get Mapserver and GRASS working together and I am 
getting stopped at this step.  When I run
ogrinfo -ro  on some of the spearfish vector data I get
FAILURE:
Unable to open datasource 
`/home/jd3/grassdata/spearfish60/PERMANENT/vector/tracts' with the 
following drivers.
  -> GRASS
  -> ESRI Shapefile
  -> MapInfo File
  -> UK .NTF
  -> SDTS
  -> TIGER
  -> S57
  -> DGN
  -> VRT
  -> REC
  -> Memory
  -> BNA
  -> CSV
  -> GML
  -> GPX
  -> KML
  -> GeoJSON
  -> GMT
  -> PostgreSQL
  -> AVCBin
I use the full path, and I made sure the dirs are all readable.

I built all of the components from source.
I am working with GRASS 6.2.3

First I built GDAL version 1.5.1  using --without-grass
Then I built gdal-grass-1.4.3 configuring it like this ./configure 
--with-gdal=/usr/local/bin/gdal-config --with-grass=/usr/local/grass-6.2.3

The gdal and ogr grass plugins were installed in /usr/local/lib/gdalplugins

When I do gdal_translate --formats, I do indeed see the plugin
-bash-3.00$ gdal_translate --formats
Supported Formats:
  GRASS (ro): GRASS Database Rasters (5.7+)
  VRT (rw+): Virtual Raster ...

Using gdal on the GRASS raster formats gives a similar error.

When I try to access the GRASS data through Mapserver I get :
msDrawMap(): Image handling error. Failed to draw layer named 'Example2'.
msOGRFileOpen(): OGR error. Open failed for OGR connection 
`/home/jd3/grassdata/spearfish60/PERMANENT/vector/t_tracts'. File not 
found or unsupported format.

This is the Mapserver I am working with
-bash-3.00$ ./mapserv -v
MapServer version 4.10.2 OUTPUT=GIF OUTPUT=PNG OUTPUT=JPEG OUTPUT=WBMP 
OUTPUT=SW
F OUTPUT=SVG SUPPORTS=PROJ SUPPORTS=FREETYPE SUPPORTS=WMS_SERVER 
SUPPORTS=WMS_CL
IENT SUPPORTS=WFS_CLIENT SUPPORTS=WCS_SERVER SUPPORTS=THREADS INPUT=TIFF 
INPUT=E
PPL7 INPUT=POSTGIS INPUT=OGR INPUT=GDAL INPUT=SHAPEFILE

Could all this be due to a mismatch of versions between GDAL and GRASS?  
I have made sure that I am indeed calling the versions that I think I am 
by using the command 'which'.
Ultimately, I want to display GRASS data in a web interface.  Any 
suggestions would be greatly appreciated.

Thanks,
John David Overton




More information about the grass-user mailing list