Take a geometry and build the concave hull.
The concave hull is smaller than the convex hull, but still encompasses all the points of the input. For polygon input the hull encompasses all the input area. For line input the hull encompasses all the input lines.
- Parameters
-
| g | the input geometry |
| ratio | proportion of output vs input |
| allow_holes | can there be holes in the output. large performance penalty. |
Definition at line 1892 of file liblwgeom/lwgeom_geos.c.
1893{
1897 GEOSGeometry *g1, *g3;
1898 int geosGeomType;
1899
1901
1903
1904 geosGeomType = GEOSGeomTypeId(g1);
1905 if (geosGeomType == GEOS_POLYGON || geosGeomType == GEOS_MULTIPOLYGON) {
1907 g3 = GEOSConcaveHullOfPolygons(g1, ratio, is_tight, allow_holes);
1908 }
1909 else {
1910 g3 = GEOSConcaveHull(g1, ratio, allow_holes);
1911 }
1912
1913 if (!g3)
1915
1916 GEOSSetSRID(g3, srid);
1917
1920
1923}
char result[OUT_DOUBLE_BUFFER_SIZE]
GEOSGeometry * LWGEOM2GEOS(const LWGEOM *lwgeom, uint8_t autofix)
#define GEOS_FREE_AND_FAIL(...)
void lwgeom_geos_error(const char *fmt,...)
void(*) LWGEOM GEOS2LWGEOM)(const GEOSGeometry *geom, uint8_t want3d)
#define FLAGS_GET_Z(flags)
void lwnotice(const char *fmt,...) __attribute__((format(printf
Write a notice out to the notice handler.
References AUTOFIX, LWGEOM::flags, FLAGS_GET_Z, GEOS_FAIL, GEOS_FREE, GEOS_FREE_AND_FAIL, LW_FALSE, LWGEOM2GEOS(), lwgeom_geos_error(), lwnotice(), result, and RESULT_SRID.
Referenced by ST_ConcaveHull().