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

Function msGEOSConvexHull

mapgeos.c:727–745  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

725}
726
727shapeObj *msGEOSConvexHull(shapeObj *shape)
728{
729#ifdef USE_GEOS
730 GEOSGeom g1, g2;
731
732 if(!shape) return NULL;
733
734 if(!shape->geometry) /* if no geometry for the shape then build one */
735 shape->geometry = (GEOSGeom) msGEOSShape2Geometry(shape);
736 g1 = (GEOSGeom) shape->geometry;
737 if(!g1) return NULL;
738
739 g2 = GEOSConvexHull(g1);
740 return msGEOSGeometry2Shape(g2);
741#else
742 msSetError(MS_GEOSERR, "GEOS support is not available.", "msGEOSConvexHull()");
743 return NULL;
744#endif
745}
746
747shapeObj *msGEOSBoundary(shapeObj *shape)
748{

Callers 1

shapeObj_convexHullFunction · 0.85

Calls 3

msGEOSShape2GeometryFunction · 0.85
msGEOSGeometry2ShapeFunction · 0.85
msSetErrorFunction · 0.85

Tested by

no test coverage detected