| 703 | } |
| 704 | |
| 705 | shapeObj *msGEOSTopologyPreservingSimplify(shapeObj *shape, double tolerance) |
| 706 | { |
| 707 | #ifdef USE_GEOS |
| 708 | GEOSGeom g1, g2; |
| 709 | |
| 710 | if(!shape) |
| 711 | return NULL; |
| 712 | |
| 713 | if(!shape->geometry) /* if no geometry for the shape then build one */ |
| 714 | shape->geometry = (GEOSGeom) msGEOSShape2Geometry(shape); |
| 715 | |
| 716 | g1 = (GEOSGeom) shape->geometry; |
| 717 | if(!g1) return NULL; |
| 718 | |
| 719 | g2 = GEOSTopologyPreserveSimplify(g1, tolerance); |
| 720 | return msGEOSGeometry2Shape(g2); |
| 721 | #else |
| 722 | msSetError(MS_GEOSERR, "GEOS Simplify support is not available.", "msGEOSTopologyPreservingSimplify()"); |
| 723 | return NULL; |
| 724 | #endif |
| 725 | } |
| 726 | |
| 727 | shapeObj *msGEOSConvexHull(shapeObj *shape) |
| 728 | { |
no test coverage detected