Changeset: 165a9254c5be for MonetDB
URL: http://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=165a9254c5be
Modified Files:
        geom/monetdb5/geom_x3d.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 (33 lines):

diff --git a/geom/monetdb5/geom_x3d.c b/geom/monetdb5/geom_x3d.c
--- a/geom/monetdb5/geom_x3d.c
+++ b/geom/monetdb5/geom_x3d.c
@@ -360,7 +360,8 @@ x3d_3_multi_buf(GEOSGeom col, char *outp
     char *ptr, *x3dtype;
     int i;
     int ngeoms;
-    int dimension= GEOS_getWKBOutputDims(col);
+    //int dimension= GEOS_getWKBOutputDims(col);
+    int dimension= GEOSGeom_getCoordinateDimension(col);
     int type = GEOSGeomTypeId(col)+1;
 
     GEOSGeom subgeom;
@@ -712,7 +713,8 @@ geom_toX3D3(const GEOSGeometry *geom, ch
 
     ptr = output;
 
-    if ( GEOS_getWKBOutputDims(geom) == 2)
+    //if ( GEOS_getWKBOutputDims(geom) == 2)
+    if ( GEOSGeom_getCoordinateDimension(geom) == 2)
     {
         for (i=0; i<npoints; i++)
         {
@@ -808,7 +810,8 @@ geom_X3Dsize(const GEOSGeometry *geom, i
     uint32_t npoints = 0;
     numPointsGeometry(&npoints, geom);
 
-    if (GEOS_getWKBOutputDims(geom) == 2)
+    //if (GEOS_getWKBOutputDims(geom) == 2)
+    if (GEOSGeom_getCoordinateDimension(geom) == 2)
         return (OUT_MAX_DIGS_DOUBLE + precision + sizeof(" "))
             * 2 * npoints;
 
_______________________________________________
checkin-list mailing list
checkin-list@monetdb.org
https://www.monetdb.org/mailman/listinfo/checkin-list

Reply via email to