PostGIS  3.7.0dev-r@@SVN_REVISION@@

◆ ST_MinimumClearance()

Datum ST_MinimumClearance ( PG_FUNCTION_ARGS  )

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

2584 {
2585  GSERIALIZED* input;
2586  GEOSGeometry* input_geos;
2587  int error;
2588  double result;
2589 
2590  initGEOS(lwpgnotice, lwgeom_geos_error);
2591 
2592  input = PG_GETARG_GSERIALIZED_P(0);
2593  input_geos = POSTGIS2GEOS(input);
2594  if (!input_geos)
2595  HANDLE_GEOS_ERROR("Geometry could not be converted to GEOS");
2596 
2597  error = GEOSMinimumClearance(input_geos, &result);
2598  GEOSGeom_destroy(input_geos);
2599  if (error) HANDLE_GEOS_ERROR("Error computing minimum clearance");
2600 
2601  PG_FREE_IF_COPY(input, 0);
2602  PG_RETURN_FLOAT8(result);
2603 }
char result[OUT_DOUBLE_BUFFER_SIZE]
Definition: cu_print.c:267
void lwgeom_geos_error(const char *fmt,...)
GEOSGeometry * POSTGIS2GEOS(const GSERIALIZED *pglwgeom)
#define HANDLE_GEOS_ERROR(label)

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

Here is the call graph for this function: