[gdal-dev] GRASS gdal and ogr plugins

Tom Russo russo at bogodyn.org
Fri Aug 22 07:49:51 PDT 2014


I've just svn updated gdal to r27596 and rebuilt it, grass, and the grass 
plugin and installed them.  I had not previously updated gdal since about 
May 14.  

Now gdalinfo and ogrinfo  are reporting:

> gdalinfo --formats 
ERROR 1: A non OGR driver is registered with the same name: GRASS
Supported Formats:
  GRASS -raster- (ro): GRASS Database Rasters (5.7+)
...

and 

> ogrinfo --formats 
ERROR 1: A non OGR driver is registered with the same name: GRASS
Supported Formats:
  PCIDSK -raster,vector- (rw+v): PCIDSK Database File
...

GRASS does not appear here, so clearly the registration of the OGR grass 
plugin is not happening.  The code does not exit abnormally, just prints the 
error message and clearly doesn't have the OGR grass plugin loaded.

The same happens from applications that are built against the gdal library.  
Normal operation, just no access to GRASS data through OGR.

Looking at ogr/ogrsf_frmts/generic/ogrsfdriverregistrar.cpp, I'm wondering
if that's because both the gdal grass driver and ogr driver are returning
"GRASS" as their name, and the "GRASS" provided by gdal is confusing the 
registrar?  Should the OGR driver maybe have a different name?  Or am I 
completely off the mark?

I do note that the change in ogrsfdriverregistrar.cpp that introduced the
error message was dated 24 May 2014, just 10 days after I had last built gdal
on this machine.  The previous build would report "GRASS" as an available 
format from OGR.

I'm using grass off of the "develbranch_6" branch, updated right before I built
the gdal plugin.

I build the gdal plugin so:
  build and install gdal without GRASS support
  build GRASS and install it
  build the plugin: 
  cd /.../gdal/frmts/grass/pkg
  ln -s ../grass57dataset.cpp .
  ln -s ../../../ogr/ogrsf_frmts/grass/ogrgrassdriver.cpp .
  ln -s ../../../ogr/ogrsf_frmts/grass/ogrgrassdatasource.cpp .
  ln -s ../../../ogr/ogrsf_frmts/grass/ogrgrasslayer.cpp .
  ln -s ../../../ogr/ogrsf_frmts/grass/ogrgrass.h .
  ./configure --with-gdal=/usr/local/bin/gdal-config --with-grass=/usr/local/grass-6.5.svn --with-autoload=/usr/local/lib/gdalplugins
  gmake
  sudo gmake install

The result is gdal_GRASS.so and ogr_GRASS.so in /usr/local/lib/gdalplugins.

Am I simply building the plugin wrong, or is this a bug?
 
-- 
Tom Russo    KM5VY   SAR502   DM64ux          http://www.swcp.com/~russo/
Tijeras, NM  QRPL#1592 K2#398  SOC#236        http://kevan.org/brain.cgi?DDTNM
 echo "prpv_a'rfg_cnf_har_cvcr" | sed -e 's/_/ /g' | tr [a-m][n-z] [n-z][a-m]


More information about the gdal-dev mailing list