Skip to content

Commit

Permalink
Enable compilation using GEOS 3 as well as GEOS 2.
Browse files Browse the repository at this point in the history
git-svn-id: http://svn.osgeo.org/qgis/trunk/qgis@6274 c8812cc2-4d05-0410-92ff-de0c093fc19c
  • Loading branch information
telwertowski committed Dec 18, 2006
1 parent 5470922 commit 3f4af92
Show file tree
Hide file tree
Showing 11 changed files with 152 additions and 100 deletions.
4 changes: 2 additions & 2 deletions acinclude.m4
Expand Up @@ -91,8 +91,8 @@ if test x${GEOS_CONFIG} = xno ; then
AC_MSG_ERROR([geos-config not found! Supply it with --with-geos=PATH])
else
ac_geos_version=`${GEOS_CONFIG} --version`
if test `echo ${ac_geos_version} | sed -e 's#2\.[0-9].*#OK#'` != OK ; then
AC_MSG_ERROR([Geos Version 2.x.x is needed, but you have $ac_geos_version!])
if test `echo ${ac_geos_version} | sed -e 's#[2-9]\.[0-9].*#OK#'` != OK ; then
AC_MSG_ERROR([Geos Version 2.x.x or greater is needed, but you have $ac_geos_version!])
else
AC_MSG_CHECKING([GEOS_CFLAGS])
GEOS_CFLAGS=`$GEOS_CONFIG --cflags`
Expand Down
10 changes: 5 additions & 5 deletions src/core/qgsfeature.cpp
Expand Up @@ -818,9 +818,9 @@ void QgsFeature::resetDirty()
// {
// bool returnval=false;
//
// geos::GeometryFactory *gf = new geos::GeometryFactory();
// geos::WKTReader *wktReader = new geos::WKTReader(gf);
// geos::Geometry *geosGeom = wktReader->read( qstrdup(wellKnownText()) );
// GEOS_GEOM::GeometryFactory *gf = new GEOS_GEOM::GeometryFactory();
// GEOS_IO::WKTReader *wktReader = new GEOS_IO::WKTReader(gf);
// GEOS_GEOM::Geometry *geosGeom = wktReader->read( qstrdup(wellKnownText()) );
//
// //write the selection rectangle to wkt by hand
// QString rectwkt="POLYGON((";
Expand All @@ -845,7 +845,7 @@ void QgsFeature::resetDirty()
// rectwkt+=QString::number(r->yMin(),'f',3);
// rectwkt+="))";
//
// geos::Geometry *geosRect = wktReader->read( qstrdup(rectwkt) );
// GEOS_GEOM::Geometry *geosRect = wktReader->read( qstrdup(rectwkt) );
// if(geosGeom->intersects(geosRect))
// {
// returnval=true;
Expand Down Expand Up @@ -1655,7 +1655,7 @@ QgsRect QgsFeature::boundingBox() const
// }
//

geos::Geometry* QgsFeature::geosGeometry() const
GEOS_GEOM::Geometry* QgsFeature::geosGeometry() const
{
return mGeometry->geosGeometry();
}
2 changes: 1 addition & 1 deletion src/core/qgsfeature.h
Expand Up @@ -235,7 +235,7 @@ class QgsFeature {
/** Creates a geos geometry from this features geometry. Note, that the returned object needs to be deleted.
@note This function is deprecated - use geometry()->geosGeometry() instead.
*/
geos::Geometry* geosGeometry() const;
GEOS_GEOM::Geometry* geosGeometry() const;

private:

Expand Down

0 comments on commit 3f4af92

Please sign in to comment.