PostGIS  3.2.2dev-r@@SVN_REVISION@@

◆ ST_MinimumClearance()

Datum ST_MinimumClearance ( PG_FUNCTION_ARGS  )

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

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