PostGIS  3.3.9dev-r@@SVN_REVISION@@

◆ ST_MinimumClearance()

Datum ST_MinimumClearance ( PG_FUNCTION_ARGS  )

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

3512 {
3513  GSERIALIZED* input;
3514  GEOSGeometry* input_geos;
3515  int error;
3516  double result;
3517 
3518  initGEOS(lwpgnotice, lwgeom_geos_error);
3519 
3520  input = PG_GETARG_GSERIALIZED_P(0);
3521  input_geos = POSTGIS2GEOS(input);
3522  if (!input_geos)
3523  HANDLE_GEOS_ERROR("Geometry could not be converted to GEOS");
3524 
3525  error = GEOSMinimumClearance(input_geos, &result);
3526  GEOSGeom_destroy(input_geos);
3527  if (error) HANDLE_GEOS_ERROR("Error computing minimum clearance");
3528 
3529  PG_FREE_IF_COPY(input, 0);
3530  PG_RETURN_FLOAT8(result);
3531 }
char result[OUT_DOUBLE_BUFFER_SIZE]
Definition: cu_print.c:267
void lwgeom_geos_error(const char *fmt,...)
#define HANDLE_GEOS_ERROR(label)
GEOSGeometry * POSTGIS2GEOS(const GSERIALIZED *pglwgeom)

References HANDLE_GEOS_ERROR, lwgeom_geos_error(), POSTGIS2GEOS(), and result.

Here is the call graph for this function: