Skip to content

Commit 3388363

Browse files
author
telwertowski
committed
Enable compilation using GEOS 3 as well as GEOS 2.
git-svn-id: http://svn.osgeo.org/qgis/trunk@6274 c8812cc2-4d05-0410-92ff-de0c093fc19c
1 parent c68c76a commit 3388363

11 files changed

+152
-100
lines changed

acinclude.m4

+2-2
Original file line numberDiff line numberDiff line change
@@ -91,8 +91,8 @@ if test x${GEOS_CONFIG} = xno ; then
9191
AC_MSG_ERROR([geos-config not found! Supply it with --with-geos=PATH])
9292
else
9393
ac_geos_version=`${GEOS_CONFIG} --version`
94-
if test `echo ${ac_geos_version} | sed -e 's#2\.[0-9].*#OK#'` != OK ; then
95-
AC_MSG_ERROR([Geos Version 2.x.x is needed, but you have $ac_geos_version!])
94+
if test `echo ${ac_geos_version} | sed -e 's#[2-9]\.[0-9].*#OK#'` != OK ; then
95+
AC_MSG_ERROR([Geos Version 2.x.x or greater is needed, but you have $ac_geos_version!])
9696
else
9797
AC_MSG_CHECKING([GEOS_CFLAGS])
9898
GEOS_CFLAGS=`$GEOS_CONFIG --cflags`

src/core/qgsfeature.cpp

+5-5
Original file line numberDiff line numberDiff line change
@@ -818,9 +818,9 @@ void QgsFeature::resetDirty()
818818
// {
819819
// bool returnval=false;
820820
//
821-
// geos::GeometryFactory *gf = new geos::GeometryFactory();
822-
// geos::WKTReader *wktReader = new geos::WKTReader(gf);
823-
// geos::Geometry *geosGeom = wktReader->read( qstrdup(wellKnownText()) );
821+
// GEOS_GEOM::GeometryFactory *gf = new GEOS_GEOM::GeometryFactory();
822+
// GEOS_IO::WKTReader *wktReader = new GEOS_IO::WKTReader(gf);
823+
// GEOS_GEOM::Geometry *geosGeom = wktReader->read( qstrdup(wellKnownText()) );
824824
//
825825
// //write the selection rectangle to wkt by hand
826826
// QString rectwkt="POLYGON((";
@@ -845,7 +845,7 @@ void QgsFeature::resetDirty()
845845
// rectwkt+=QString::number(r->yMin(),'f',3);
846846
// rectwkt+="))";
847847
//
848-
// geos::Geometry *geosRect = wktReader->read( qstrdup(rectwkt) );
848+
// GEOS_GEOM::Geometry *geosRect = wktReader->read( qstrdup(rectwkt) );
849849
// if(geosGeom->intersects(geosRect))
850850
// {
851851
// returnval=true;
@@ -1655,7 +1655,7 @@ QgsRect QgsFeature::boundingBox() const
16551655
// }
16561656
//
16571657

1658-
geos::Geometry* QgsFeature::geosGeometry() const
1658+
GEOS_GEOM::Geometry* QgsFeature::geosGeometry() const
16591659
{
16601660
return mGeometry->geosGeometry();
16611661
}

src/core/qgsfeature.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -235,7 +235,7 @@ class QgsFeature {
235235
/** Creates a geos geometry from this features geometry. Note, that the returned object needs to be deleted.
236236
@note This function is deprecated - use geometry()->geosGeometry() instead.
237237
*/
238-
geos::Geometry* geosGeometry() const;
238+
GEOS_GEOM::Geometry* geosGeometry() const;
239239

240240
private:
241241

0 commit comments

Comments
 (0)