| 725 | } |
| 726 | |
| 727 | shapeObj *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 | |
| 747 | shapeObj *msGEOSBoundary(shapeObj *shape) |
| 748 | { |
no test coverage detected