PostGIS  3.3.9dev-r@@SVN_REVISION@@

◆ ST_MinimumClearance()

Datum ST_MinimumClearance ( PG_FUNCTION_ARGS  )

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

3513 {
3514  GSERIALIZED* input;
3515  GEOSGeometry* input_geos;
3516  int error;
3517  double result;
3518 
3519  initGEOS(lwpgnotice, lwgeom_geos_error);
3520 
3521  input = PG_GETARG_GSERIALIZED_P(0);
3522  input_geos = POSTGIS2GEOS(input);
3523  if (!input_geos)
3524  HANDLE_GEOS_ERROR("Geometry could not be converted to GEOS");
3525 
3526  error = GEOSMinimumClearance(input_geos, &result);
3527  GEOSGeom_destroy(input_geos);
3528  if (error) HANDLE_GEOS_ERROR("Error computing minimum clearance");
3529 
3530  PG_FREE_IF_COPY(input, 0);
3531  PG_RETURN_FLOAT8(result);
3532 }
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: