PostGIS  3.3.9dev-r@@SVN_REVISION@@

◆ ST_ConcaveHull()

Datum ST_ConcaveHull ( PG_FUNCTION_ARGS  )

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

825 {
826 #if POSTGIS_GEOS_VERSION < 31100
827 
828  lwpgerror("The GEOS version this PostGIS binary "
829  "was compiled against (%d) doesn't support "
830  "'GEOSConcaveHull' function (3.11.0+ required)",
832  PG_RETURN_NULL();
833 
834 #else /* POSTGIS_GEOS_VERSION >= 31100 */
835  GSERIALIZED* geom = PG_GETARG_GSERIALIZED_P(0);
836  double ratio = PG_GETARG_FLOAT8(1);
837  bool allow_holes = PG_GETARG_BOOL(2);
838 
839  LWGEOM* lwgeom = lwgeom_from_gserialized(geom);
840  LWGEOM* lwresult = lwgeom_concavehull(lwgeom, ratio, allow_holes);
841  GSERIALIZED* result = geometry_serialize(lwresult);
842 
843  lwgeom_free(lwgeom);
844  lwgeom_free(lwresult);
845  PG_FREE_IF_COPY(geom, 0);
846  PG_RETURN_POINTER(result);
847 #endif
848 }
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.
Definition: gserialized.c:239
void lwgeom_free(LWGEOM *geom)
Definition: lwgeom.c:1155
#define POSTGIS_GEOS_VERSION
Definition: sqldefines.h:11

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

Here is the call graph for this function: