Update of /cvsroot/monetdb/geom/src/lib
In directory sc8-pr-cvs16.sourceforge.net:/tmp/cvs-serv10574/src/lib

Modified Files:
      Tag: Geom_0-4
        libgeom.mx 
Log Message:
Port to geos 3.0.

U libgeom.mx
Index: libgeom.mx
===================================================================
RCS file: /cvsroot/monetdb/geom/src/lib/libgeom.mx,v
retrieving revision 1.5.4.4
retrieving revision 1.5.4.5
diff -u -d -r1.5.4.4 -r1.5.4.5
--- libgeom.mx  5 Jun 2008 13:12:25 -0000       1.5.4.4
+++ libgeom.mx  20 Jun 2008 16:36:17 -0000      1.5.4.5
@@ -178,7 +178,11 @@
                return 0;
 
        if (GEOSGeomTypeId(envelope) == GEOS_POINT) {
+#if GEOS_CAPI_VERSION_MAJOR >= 1 && GEOS_CAPI_VERSION_MINOR >= 3
+               const GEOSCoordSequence *coords = 
GEOSGeom_getCoordSeq(envelope);
+#else
                const GEOSCoordSeq coords = GEOSGeom_getCoordSeq(envelope);
+#endif
                GEOSCoordSeq_getX(coords, 0, &xmin);
                GEOSCoordSeq_getY(coords, 0, &ymin);
                res->xmin = xmin;
@@ -186,9 +190,17 @@
                res->xmax = xmin;
                res->ymax = ymin;
        } else { /* GEOSGeomTypeId(envelope) == GEOS_POLYGON */
+#if GEOS_CAPI_VERSION_MAJOR >= 1 && GEOS_CAPI_VERSION_MINOR >= 3
+               const GEOSGeometry *ring = GEOSGetExteriorRing(envelope);
+#else
                const GEOSGeom ring = GEOSGetExteriorRing(envelope);
+#endif
                if (ring) {
+#if GEOS_CAPI_VERSION_MAJOR >= 1 && GEOS_CAPI_VERSION_MINOR >= 3
+                       const GEOSCoordSequence *coords = 
GEOSGeom_getCoordSeq(ring);
+#else
                        const GEOSCoordSeq coords = GEOSGeom_getCoordSeq(ring); 
+#endif
                        GEOSCoordSeq_getX(coords, 0, &xmin);
                        GEOSCoordSeq_getY(coords, 0, &ymin);
                        GEOSCoordSeq_getX(coords, 2, &xmax);


-------------------------------------------------------------------------
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services for
just about anything Open Source.
http://sourceforge.net/services/buy/index.php
_______________________________________________
Monetdb-sql-checkins mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/monetdb-sql-checkins

Reply via email to