On 03/03/15 10:26, Even Rouault wrote:
Le mardi 03 mars 2015 10:06:51, Vincent Schut a écrit :
Hi folks,
I'd like to revive this thread a bit, because I'm trying to compile
rsgislib (https://bitbucket.org/petebunting/rsgislib, a c++ rs/gis library
which links with gdal) against my trunk version of gdal 2.0, which does
not work. It does work with gdal 1.x, though. I'd like to get your opinion
whether this is something that should be dealt with in rsgislib, or if it
is seen as an unwanted incompatability between gdal 1.x and 2.x, and
should be fixed in gdal.
Vincent,
Those are intented changes. They are adressed by
http://svn.osgeo.org/gdal/trunk/gdal/MIGRATION_GUIDE.TXT (RFC 46)
Even
Thanks Even for that link!
Vincent.
Initially I get the following error:
[ 21%] Building CXX object
src/CMakeFiles/rsgis_geom.dir/geom/RSGISGeomTestExport.cpp.o
/usr/local/src/rsgislib/src/geom/RSGISGeomTestExport.cpp: In member
function ‘void
rsgis::geom::RSGISGeomTestExport::exportGEOSPolygons2SHP(std::string,
bool, std::list<geos::geom::Polygon*>*)’:
/usr/local/src/rsgislib/src/geom/RSGISGeomTestExport.cpp:291:87: error:
invalid conversion from ‘GDALDriver*’ to ‘OGRSFDriver*’ [-fpermissive]
shpFiledriver =
OGRSFDriverRegistrar::GetRegistrar()->GetDriverByName(pszDriverName ); ^
/usr/local/src/rsgislib/src/geom/RSGISGeomTestExport.cpp: In member
function ‘void
rsgis::geom::RSGISGeomTestExport::exportGEOSPolygons2SHP(std::string,
bool, std::vector<geos::geom::Polygon*>*)’:
/usr/local/src/rsgislib/src/geom/RSGISGeomTestExport.cpp:364:87: error:
invalid conversion from ‘GDALDriver*’ to ‘OGRSFDriver*’ [-fpermissive]
shpFiledriver =
OGRSFDriverRegistrar::GetRegistrar()->GetDriverByName(pszDriverName ); ^
/usr/local/src/rsgislib/src/geom/RSGISGeomTestExport.cpp: In member
function ‘void
rsgis::geom::RSGISGeomTestExport::exportGEOSCoordinates2SHP(std::string,
bool, std::vector<geos::geom::Coordinate*>*)’:
/usr/local/src/rsgislib/src/geom/RSGISGeomTestExport.cpp:437:87: error:
invalid conversion from ‘GDALDriver*’ to ‘OGRSFDriver*’ [-fpermissive]
shpFiledriver =
OGRSFDriverRegistrar::GetRegistrar()->GetDriverByName(pszDriverName ); ^
/usr/local/src/rsgislib/src/geom/RSGISGeomTestExport.cpp: In member
function ‘void
rsgis::geom::RSGISGeomTestExport::exportGEOSLineStrings2SHP(std::string,
bool, std::vector<geos::geom::LineString*>*)’:
/usr/local/src/rsgislib/src/geom/RSGISGeomTestExport.cpp:510:87: error:
invalid conversion from ‘GDALDriver*’ to ‘OGRSFDriver*’ [-fpermissive]
shpFiledriver =
OGRSFDriverRegistrar::GetRegistrar()->GetDriverByName(pszDriverName ); ^
/usr/local/src/rsgislib/src/geom/RSGISGeomTestExport.cpp: In member
function ‘void
rsgis::geom::RSGISGeomTestExport::exportGEOSLineSegments2SHP(std::string,
bool, std::vector<geos::geom::LineSegment*>*)’:
/usr/local/src/rsgislib/src/geom/RSGISGeomTestExport.cpp:584:87: error:
invalid conversion from ‘GDALDriver*’ to ‘OGRSFDriver*’ [-fpermissive]
shpFiledriver =
OGRSFDriverRegistrar::GetRegistrar()->GetDriverByName(pszDriverName ); ^
src/CMakeFiles/rsgis_geom.dir/build.make:169: recipe for target
'src/CMakeFiles/rsgis_geom.dir/geom/RSGISGeomTestExport.cpp.o' failed
make[2]: ***
[src/CMakeFiles/rsgis_geom.dir/geom/RSGISGeomTestExport.cpp.o] Error 1
CMakeFiles/Makefile2:487: recipe for target
'src/CMakeFiles/rsgis_geom.dir/all' failed make[1]: ***
[src/CMakeFiles/rsgis_geom.dir/all] Error 2
If I rebuild with -fpermissive, compilation continues a bit further, but
then halts here:
[ 65%] Building CXX object
src/CMakeFiles/rsgis_classify.dir/classifier/RSGISClassificationUtils.cpp.
o /usr/local/src/rsgislib/src/classifier/RSGISClassificationUtils.cpp: In
member function ‘void
rsgis::classifier::RSGISClassificationUtils::convertShapeFile2SpecLib(std:
:string, std::string, std::string, std::vector<std::basic_string<char> >*,
bool)’:
/usr/local/src/rsgislib/src/classifier/RSGISClassificationUtils.cpp:174:17
: error: ‘Open’ is not a member of ‘OGRSFDriverRegistrar’ inputSHPDS =
OGRSFDriverRegistrar::Open(vector.c_str(), FALSE); ^
src/CMakeFiles/rsgis_classify.dir/build.make:77: recipe for target
'src/CMakeFiles/rsgis_classify.dir/classifier/RSGISClassificationUtils.cpp
.o' failed make[2]: ***
[src/CMakeFiles/rsgis_classify.dir/classifier/RSGISClassificationUtils.cpp
.o] Error 1 CMakeFiles/Makefile2:290: recipe for target
'src/CMakeFiles/rsgis_classify.dir/all' failed make[1]: ***
[src/CMakeFiles/rsgis_classify.dir/all] Error 2
This is clearly a compatibiliby issue with the new gdal 2.0 raster/vector
unification. Question is: is this something that should be fixed within
gdal, or should it be changed in rsgislib?
Thanks for your insights!
Vincent.
On 12/16/14 11:27, Even Rouault wrote:
Le mardi 16 décembre 2014 11:06:14, Vincent Schut a écrit :
Folks,
I'd like to use gdal-trunk (e.g. 2.0) for all the new features and
improvements, but I wonder about its compatibility with other software.
Is gdal 2.0 supposed to work transparently with libraries/programs that
used to link against gdal 1.11, e.g. qgis, postgis, etc.?
Vincent,
They mostly work unmodified, although you could run into a few problems
if opening a dataset with curve geometries in QGIS for example (but
there be some work to use OGR curve geometries in QGIS soon)
Reason I ask is I get a configure error with postgis trying to find
gdal:
RASTER: Raster support requested
checking for gdal-config... /usr/local/bin/gdal-config
checking GDAL version... 2.0.0
checking for OGR enabled... yes
checking gdal.h usability... yes
checking gdal.h presence... yes
checking for gdal.h... yes
checking ogr_api.h usability... yes
checking ogr_api.h presence... yes
checking for ogr_api.h... yes
checking cpl_conv.h usability... yes
checking cpl_conv.h presence... yes
checking for cpl_conv.h... yes
checking for library containing GDALAllRegister... no
configure: error: could not find GDAL
the last line ("checking for library containing GDALAllRegister...")
takes a long time and then fails...
I know PostGIS has a continuous testing system tracking GDAL trunk, so
I'd say the issue is more on your side. GDALAllRegister is definitely a
symbol that still exists in GDAL 2.0dev
http://debbie.postgis.net:8080/job/GDAL_PostGIS_Regress/2074/consoleFull
Even
Thanks,
Vincent.
_______________________________________________
gdal-dev mailing list
[email protected]
http://lists.osgeo.org/mailman/listinfo/gdal-dev
_______________________________________________
gdal-dev mailing list
[email protected]
http://lists.osgeo.org/mailman/listinfo/gdal-dev
_______________________________________________
gdal-dev mailing list
[email protected]
http://lists.osgeo.org/mailman/listinfo/gdal-dev