PostGIS  3.0.6dev-r@@SVN_REVISION@@

◆ ST_MinimumClearance()

Datum ST_MinimumClearance ( PG_FUNCTION_ARGS  )

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

3411 {
3412  GSERIALIZED* input;
3413  GEOSGeometry* input_geos;
3414  int error;
3415  double result;
3416 
3417  initGEOS(lwpgnotice, lwgeom_geos_error);
3418 
3419  input = PG_GETARG_GSERIALIZED_P(0);
3420  input_geos = POSTGIS2GEOS(input);
3421  if (!input_geos)
3422  HANDLE_GEOS_ERROR("Geometry could not be converted to GEOS");
3423 
3424  error = GEOSMinimumClearance(input_geos, &result);
3425  GEOSGeom_destroy(input_geos);
3426  if (error) HANDLE_GEOS_ERROR("Error computing minimum clearance");
3427 
3428  PG_FREE_IF_COPY(input, 0);
3429  PG_RETURN_FLOAT8(result);
3430 }
void lwgeom_geos_error(const char *fmt,...)
#define HANDLE_GEOS_ERROR(label)
GEOSGeometry * POSTGIS2GEOS(GSERIALIZED *pglwgeom)

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

Here is the call graph for this function: