| 745 | } |
| 746 | |
| 747 | shapeObj *msGEOSBoundary(shapeObj *shape) |
| 748 | { |
| 749 | #ifdef USE_GEOS |
| 750 | GEOSGeom g1, g2; |
| 751 | |
| 752 | if(!shape) return NULL; |
| 753 | |
| 754 | if(!shape->geometry) /* if no geometry for the shape then build one */ |
| 755 | shape->geometry = (GEOSGeom) msGEOSShape2Geometry(shape); |
| 756 | g1 = (GEOSGeom) shape->geometry; |
| 757 | if(!g1) return NULL; |
| 758 | |
| 759 | g2 = GEOSBoundary(g1); |
| 760 | return msGEOSGeometry2Shape(g2); |
| 761 | #else |
| 762 | msSetError(MS_GEOSERR, "GEOS support is not available.", "msGEOSBoundary()"); |
| 763 | return NULL; |
| 764 | #endif |
| 765 | } |
| 766 | |
| 767 | pointObj *msGEOSGetCentroid(shapeObj *shape) |
| 768 | { |
no test coverage detected