Changeset: 9a23fad61bbe for MonetDB
URL: http://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=9a23fad61bbe
Modified Files:
        geom/monetdb5/geom.c
Branch: sfcgal
Log Message:

Do not use GEOS_getWKBOutputDims because it does not always return correct 
Dimension number, what we want is GEOSGeom_getCoordinateDimension


diffs (24 lines):

diff --git a/geom/monetdb5/geom.c b/geom/monetdb5/geom.c
--- a/geom/monetdb5/geom.c
+++ b/geom/monetdb5/geom.c
@@ -8063,8 +8063,6 @@ wkbAsX3D(str *res, wkb **geomWKB, int *m
        GEOSGeom geom = NULL;
     int srid;
        bit empty;
-    int dimension = 0;
-    int type = -1;
     
     //check if the geometry is empty
        if ((ret = wkbIsEmpty(&empty, geomWKB)) != MAL_SUCCEED) {
@@ -8088,10 +8086,7 @@ wkbAsX3D(str *res, wkb **geomWKB, int *m
         }
     }
 
-    dimension= GEOS_getWKBOutputDims(geom);
-    type = GEOSGeomTypeId(geom)+1;
-
-    if (dimension == 2 && type == wkbMultiPolygon_mdb) {
+    if (GEOSGeom_getCoordinateDimension(geom) == 2 && (GEOSGeomTypeId(geom)+1) 
== wkbMultiPolygon_mdb) {
         throw(MAL, "geom.wkbAsX3D", "For a MultiPolygon the dimension should 
be 3.");
     }
 
_______________________________________________
checkin-list mailing list
checkin-list@monetdb.org
https://www.monetdb.org/mailman/listinfo/checkin-list

Reply via email to