MCPcopy Index your code
hub / github.com/MapServer/MapServer / msGEOSGeometry2Shape

Function msGEOSGeometry2Shape

mapgeos.c:543–575  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

541}
542
543shapeObj *msGEOSGeometry2Shape(GEOSGeom g)
544{
545 int type;
546
547 if(!g)
548 return NULL; /* a NULL geometry generates a NULL shape */
549
550 type = GEOSGeomTypeId(g);
551 switch(type) {
552 case GEOS_POINT:
553 return msGEOSGeometry2Shape_point(g);
554 break;
555 case GEOS_MULTIPOINT:
556 return msGEOSGeometry2Shape_multipoint(g);
557 break;
558 case GEOS_LINESTRING:
559 return msGEOSGeometry2Shape_line(g);
560 break;
561 case GEOS_MULTILINESTRING:
562 return msGEOSGeometry2Shape_multiline(g);
563 break;
564 case GEOS_POLYGON:
565 return msGEOSGeometry2Shape_polygon(g);
566 break;
567 case GEOS_MULTIPOLYGON:
568 return msGEOSGeometry2Shape_multipolygon(g);
569 break;
570 default:
571 if (!GEOSisEmpty(g))
572 msSetError(MS_GEOSERR, "Unsupported GEOS geometry type (%d).", "msGEOSGeometry2Shape()", type);
573 return NULL;
574 }
575}
576#endif
577
578/*

Callers 10

msGEOSShapeFromWKTFunction · 0.85
msGEOSBufferFunction · 0.85
msGEOSSimplifyFunction · 0.85
msGEOSConvexHullFunction · 0.85
msGEOSBoundaryFunction · 0.85
msGEOSUnionFunction · 0.85
msGEOSIntersectionFunction · 0.85
msGEOSDifferenceFunction · 0.85
msGEOSSymDifferenceFunction · 0.85

Tested by

no test coverage detected