MCPcopy Create free account
hub / github.com/MapServer/MapServer / msGEOSTopologyPreservingSimplify

Function msGEOSTopologyPreservingSimplify

mapgeos.c:705–725  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

703}
704
705shapeObj *msGEOSTopologyPreservingSimplify(shapeObj *shape, double tolerance)
706{
707#ifdef USE_GEOS
708 GEOSGeom g1, g2;
709
710 if(!shape)
711 return NULL;
712
713 if(!shape->geometry) /* if no geometry for the shape then build one */
714 shape->geometry = (GEOSGeom) msGEOSShape2Geometry(shape);
715
716 g1 = (GEOSGeom) shape->geometry;
717 if(!g1) return NULL;
718
719 g2 = GEOSTopologyPreserveSimplify(g1, tolerance);
720 return msGEOSGeometry2Shape(g2);
721#else
722 msSetError(MS_GEOSERR, "GEOS Simplify support is not available.", "msGEOSTopologyPreservingSimplify()");
723 return NULL;
724#endif
725}
726
727shapeObj *msGEOSConvexHull(shapeObj *shape)
728{

Callers 1

Calls 3

msGEOSShape2GeometryFunction · 0.85
msGEOSGeometry2ShapeFunction · 0.85
msSetErrorFunction · 0.85

Tested by

no test coverage detected