PostGIS 3.7.0dev-r@@SVN_REVISION@@
Loading...
Searching...
No Matches

◆ ST_MinimumClearance()

Datum ST_MinimumClearance ( PG_FUNCTION_ARGS  )

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

2585{
2586 GSERIALIZED* input;
2587 GEOSGeometry* input_geos;
2588 int error;
2589 double result;
2590
2591 initGEOS(lwpgnotice, lwgeom_geos_error);
2592
2593 input = PG_GETARG_GSERIALIZED_P(0);
2594 input_geos = POSTGIS2GEOS(input);
2595 if (!input_geos)
2596 HANDLE_GEOS_ERROR("Geometry could not be converted to GEOS");
2597
2598 error = GEOSMinimumClearance(input_geos, &result);
2599 GEOSGeom_destroy(input_geos);
2600 if (error) HANDLE_GEOS_ERROR("Error computing minimum clearance");
2601
2602 PG_FREE_IF_COPY(input, 0);
2603 PG_RETURN_FLOAT8(result);
2604}
char result[OUT_DOUBLE_BUFFER_SIZE]
Definition cu_print.c:267
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: