2616{
2619 GEOSGeometry* input_geos;
2620 GEOSGeometry* result_geos;
2621 int32_t srid;
2622
2624
2625 input = PG_GETARG_GSERIALIZED_P(0);
2628 if (!input_geos)
2630
2631 result_geos = GEOSMinimumClearanceLine(input_geos);
2632 GEOSGeom_destroy(input_geos);
2633 if (!result_geos)
2635
2636 GEOSSetSRID(result_geos, srid);
2638 GEOSGeom_destroy(result_geos);
2639
2640 PG_FREE_IF_COPY(input, 0);
2641 PG_RETURN_POINTER(
result);
2642}
char result[OUT_DOUBLE_BUFFER_SIZE]
int32_t gserialized_get_srid(const GSERIALIZED *g)
Extract the SRID from the serialized form (it is packed into three bytes so this is a handy function)...
void lwgeom_geos_error(const char *fmt,...)
GSERIALIZED * GEOS2POSTGIS(GEOSGeom geom, char want3d)
GEOSGeometry * POSTGIS2GEOS(const GSERIALIZED *pglwgeom)
#define HANDLE_GEOS_ERROR(label)