PostGIS 3.7.0dev-r@@SVN_REVISION@@
Loading...
Searching...
No Matches

◆ ST_ConcaveHull()

Datum ST_ConcaveHull ( PG_FUNCTION_ARGS  )

Definition at line 879 of file postgis/lwgeom_geos.c.

880{
881#if POSTGIS_GEOS_VERSION < 31100
882
883 lwpgerror("The GEOS version this PostGIS binary "
884 "was compiled against (%d) doesn't support "
885 "'GEOSConcaveHull' function (3.11.0+ required)",
887 PG_RETURN_NULL();
888
889#else /* POSTGIS_GEOS_VERSION >= 31100 */
890 GSERIALIZED* geom = PG_GETARG_GSERIALIZED_P(0);
891 double ratio = PG_GETARG_FLOAT8(1);
892 bool allow_holes = PG_GETARG_BOOL(2);
893
894 LWGEOM* lwgeom = lwgeom_from_gserialized(geom);
895 LWGEOM* lwresult = lwgeom_concavehull(lwgeom, ratio, allow_holes);
896 GSERIALIZED* result = geometry_serialize(lwresult);
897
898 lwgeom_free(lwgeom);
899 lwgeom_free(lwresult);
900 PG_FREE_IF_COPY(geom, 0);
901 PG_RETURN_POINTER(result);
902#endif
903}
char result[OUT_DOUBLE_BUFFER_SIZE]
Definition cu_print.c:267
LWGEOM * lwgeom_from_gserialized(const GSERIALIZED *g)
Allocate a new LWGEOM from a GSERIALIZED.
void lwgeom_free(LWGEOM *geom)
Definition lwgeom.c:1246
LWGEOM * lwgeom_concavehull(const LWGEOM *geom, double ratio, uint32_t allow_holes)
Take a geometry and build the concave hull.
#define POSTGIS_GEOS_VERSION
Definition sqldefines.h:11

References lwgeom_concavehull(), lwgeom_free(), lwgeom_from_gserialized(), POSTGIS_GEOS_VERSION, and result.

Here is the call graph for this function: