[gdal-dev] GRASS gdal and ogr plugins

Even Rouault even.rouault at spatialys.com
Fri Aug 22 10:17:15 PDT 2014


Tom,

Should be fixed by r27597. This was a side effect of the work done for 
http://trac.osgeo.org/gdal/wiki/rfc46_gdal_ogr_unification

Even

> 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?

-- 
Spatialys - Geospatial professional services
http://www.spatialys.com


More information about the gdal-dev mailing list