]> granicus.if.org Git - postgis/commitdiff
GEOSpolygonize returns GEOMETRYCOLLECTION instead of MULTIPOLYGON
authorSandro Santilli <strk@keybit.net>
Mon, 3 Jan 2005 17:51:40 +0000 (17:51 +0000)
committerSandro Santilli <strk@keybit.net>
Mon, 3 Jan 2005 17:51:40 +0000 (17:51 +0000)
git-svn-id: http://svn.osgeo.org/postgis/trunk@1216 b70326c6-7e19-0410-871a-916f4a2858ee

lwgeom/lwgeom_geos_wrapper.cpp

index 03363a17a21c19a7d7ce50e5e60e543bf92c4a55..b915199ff1aeed0834a724cb52b1df134dd9a899 100644 (file)
@@ -1609,7 +1609,7 @@ Geometry *GEOSGetCentroid(Geometry *g, int *failure)
 Geometry *GEOSpolygonize(Geometry **g, unsigned int ngeoms)
 {
        unsigned int i;
-       Geometry *multipoly = NULL;
+       Geometry *out = NULL;
 
        // construct vector
        vector<Geometry *> *geoms = new vector<Geometry *>(ngeoms);
@@ -1641,7 +1641,7 @@ Geometry *GEOSpolygonize(Geometry **g, unsigned int ngeoms)
 
                geoms = new vector<Geometry *>(polys->size());
                for (i=0; i<polys->size(); i++) (*geoms)[i] = (*polys)[i];
-               multipoly = geomFactory->createMultiPolygon(geoms);
+               out = geomFactory->createGeometryCollection(geoms);
        }
        catch (GEOSException *ge)
        {
@@ -1654,7 +1654,7 @@ Geometry *GEOSpolygonize(Geometry **g, unsigned int ngeoms)
                return NULL;
        }
 
-       return multipoly;
+       return out;
 }
 #else // ! (GEOS_FIRST_INTERFACE <= 3 && GEOS_LAST_INTERFACE >= 3)
 Geometry *GEOSpolygonize(Geometry **g, unsigned int ngeoms)