[GRASS5] Re: [GRASSLIST:8620] Re: GRASS, gdal and mapserver

Stephan Holl holl at gdf-hannover.de
Fri Oct 14 07:25:55 EDT 2005


Hello Francisco, 

On Thu, 13 Oct 2005 20:56:03 +0200 Francisco Alonso <alonsarp at um.es>
wrote:

> 
> > On 10/13/05, Francisco Alonso <alonsarp at um.es> wrote:
> > > El Viernes, 14 de Octubre de 2005 10:25, Radim Blazek escribió:
> > > > On 10/12/05, Francisco Alonso <alonsarp at um.es> wrote:
> > > > > # ogrinfo
> > > > > /var/www/grass5_mapserver/spearfish60/PERMANENT/vector/streams/head
> > > > > Warning 1: GRASS warning: GISBASE enviroment variable was not
> > > > > set, using: /usr/local/grass-6.0.1
> > > > > ogrinfo: relocation
> > > > > error: /usr/local/lib/gdalplugins/ogr_GRASS.so: undefined
> > > > > symbol: Vect_set_fatal_error
> > > >
> 
> Ok I have it.
> 
> After realizing that 
> 
> # ldd ogr_GRASS.so  
> 
> didn't mention the grass vector library I remembered that I had
> linked just the grass libraries needed by gdal. On the other hand the
> makefile I obtained with:
> 
> ./configure --with-gdal=/usr/local/bin/gdal-config 
> --with-grass=/usr/local/grass-6.0.1
> 
> doesn't include any -lgrass_vect, so I put it myself just to try.
> 
> After that ldd ogr_GRASS .so did complain about libgrass_vect. I
> linked it, and after some more links and incluiding
> -lgrass_dbmidriver in the LIBS line of the Makefile I have ogrinfo
> working properly:
> 
> #
> ogrinfo /var/www/grass5_mapserver/spearfish60/PERMANENT/vector/streams/head
> Warning 1: GRASS warning: GISBASE enviroment variable was not set,
> using: /usr/local/grass-6.0.1 INFO: Open of 
> `/var/www/grass5_mapserver/spearfish60/PERMANENT/vector/streams/head'
> using driver `GRASS' successful.
> 1: 0
> 2: 1
> 
> Thanks a lot for your suggestions.
> 
> I am still working on my other problem (mapserver not showing GRASS
> raster files that gdal can read)
> 
> I tried to gdal_translate the spearfish soils layer to pcraster and
> reading it with mapserver (ugly colours but it worked) so it seem
> that grass-gdal connection works and mapserver-gdal also works. 
> 
> And now I have changed the roads layer definition in the map file to
> read the roads grass layer instead of shape (I'm workig with
> spearfish demo):

[...]

> 
> but  I have a prettty similar error message
> 
> # /usr/local/mapserver-4.6.1/shp2img -m 
> /var/www/grass5_mapserver/map-script/mapserver.map -o mapa.png
> 
> msDrawMap(): Image handling error. Failed to draw layer named
> 'roads'. <br> msSHPOpenFile(): Unable to access file. 
> (/var/www/grass5_mapserver/spearfish60/PERMANENT/vector/roads/head)
> <br> msSHPOpenFile(): Unable to access file. 
> (/var/www/grass5_mapserver/spearfish60/PERMANENT/vector/roads/head)
> <br>
> 
> but the file DO exist, do I need to specify in any way that it is a
> GRASS file?
> 
> Do you know where you can download the files of the demo 2 accesible
> from http://grass.itc.it/start.html ?
> 
> I will continue trying, but if anyone has suggestions ....

Try this:
Layer
  NAME GRASSVektor
  TYPE LINE
  CONNECTIONTYPE OGR
  CONNECTION /path/to/location/mapset/vector/map/head
  DATA "1"
  gml_include_items all
  DUMP true
   METADATA
    wfs_title ?GRASS_vektor?
    ...
   END
   CLASS
   END
...
END

Best
	Stephan


-- 
GDF Hannover - Solutions for spatial data analysis and remote sensing
Hannover Office      -     Mengendamm 16d      -     D-30177 Hannover
Internet: www.gdf-hannover.de      -      Email: holl at gdf-hannover.de
Phone : ++49-(0)511.39088507       -        Fax: ++49-(0)511.39088508




More information about the grass-dev mailing list