| 659 | */ |
| 660 | |
| 661 | shapeObj *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 | |
| 683 | shapeObj *msGEOSSimplify(shapeObj *shape, double tolerance) |
| 684 | { |
no test coverage detected