PostGIS  3.4.0dev-r@@SVN_REVISION@@

◆ ST_MinimumClearance()

Datum ST_MinimumClearance ( PG_FUNCTION_ARGS  )

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

3609 {
3610  GSERIALIZED* input;
3611  GEOSGeometry* input_geos;
3612  int error;
3613  double result;
3614 
3615  initGEOS(lwpgnotice, lwgeom_geos_error);
3616 
3617  input = PG_GETARG_GSERIALIZED_P(0);
3618  input_geos = POSTGIS2GEOS(input);
3619  if (!input_geos)
3620  HANDLE_GEOS_ERROR("Geometry could not be converted to GEOS");
3621 
3622  error = GEOSMinimumClearance(input_geos, &result);
3623  GEOSGeom_destroy(input_geos);
3624  if (error) HANDLE_GEOS_ERROR("Error computing minimum clearance");
3625 
3626  PG_FREE_IF_COPY(input, 0);
3627  PG_RETURN_FLOAT8(result);
3628 }
char result[OUT_DOUBLE_BUFFER_SIZE]
Definition: cu_print.c:262
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: