PostGIS  3.1.6dev-r@@SVN_REVISION@@

◆ ST_MinimumClearance()

Datum ST_MinimumClearance ( PG_FUNCTION_ARGS  )

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

3568 {
3569  GSERIALIZED* input;
3570  GEOSGeometry* input_geos;
3571  int error;
3572  double result;
3573 
3574  initGEOS(lwpgnotice, lwgeom_geos_error);
3575 
3576  input = PG_GETARG_GSERIALIZED_P(0);
3577  input_geos = POSTGIS2GEOS(input);
3578  if (!input_geos)
3579  HANDLE_GEOS_ERROR("Geometry could not be converted to GEOS");
3580 
3581  error = GEOSMinimumClearance(input_geos, &result);
3582  GEOSGeom_destroy(input_geos);
3583  if (error) HANDLE_GEOS_ERROR("Error computing minimum clearance");
3584 
3585  PG_FREE_IF_COPY(input, 0);
3586  PG_RETURN_FLOAT8(result);
3587 }
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: