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

Function msGEOSBuffer

mapgeos.c:661–681  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

659*/
660
661shapeObj *msGEOSBuffer(shapeObj *shape, double width)
662{
663#ifdef USE_GEOS
664 GEOSGeom g1, g2;
665
666 if(!shape)
667 return NULL;
668
669 if(!shape->geometry) /* if no geometry for the shape then build one */
670 shape->geometry = (GEOSGeom) msGEOSShape2Geometry(shape);
671
672 g1 = (GEOSGeom) shape->geometry;
673 if(!g1) return NULL;
674
675 g2 = GEOSBuffer(g1, width, 30);
676 return msGEOSGeometry2Shape(g2);
677#else
678 msSetError(MS_GEOSERR, "GEOS support is not available.", "msGEOSBuffer()");
679 return NULL;
680#endif
681}
682
683shapeObj *msGEOSSimplify(shapeObj *shape, double tolerance)
684{

Callers 4

yyparseFunction · 0.85
processShpxyTagFunction · 0.85
shapeObj_bufferFunction · 0.85

Calls 3

msGEOSShape2GeometryFunction · 0.85
msGEOSGeometry2ShapeFunction · 0.85
msSetErrorFunction · 0.85

Tested by

no test coverage detected