PostGIS  3.2.2dev-r@@SVN_REVISION@@

◆ ST_MinimumClearance()

Datum ST_MinimumClearance ( PG_FUNCTION_ARGS  )

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

3499 {
3500  GSERIALIZED* input;
3501  GEOSGeometry* input_geos;
3502  int error;
3503  double result;
3504 
3505  initGEOS(lwpgnotice, lwgeom_geos_error);
3506 
3507  input = PG_GETARG_GSERIALIZED_P(0);
3508  input_geos = POSTGIS2GEOS(input);
3509  if (!input_geos)
3510  HANDLE_GEOS_ERROR("Geometry could not be converted to GEOS");
3511 
3512  error = GEOSMinimumClearance(input_geos, &result);
3513  GEOSGeom_destroy(input_geos);
3514  if (error) HANDLE_GEOS_ERROR("Error computing minimum clearance");
3515 
3516  PG_FREE_IF_COPY(input, 0);
3517  PG_RETURN_FLOAT8(result);
3518 }
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: