1184 int segs_per_quarter;
1186 if (PG_ARGISNULL(0))
1189 geom = PG_GETARG_GSERIALIZED_P(0);
1190 segs_per_quarter = PG_GETARG_INT32(1);
1202 if (!(mbc && mbc->
center))
1204 lwpgerror(
"Error calculating minimum bounding circle.");
1219 center = geometry_serialize(lwcircle);
1222 PG_RETURN_POINTER(center);
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)...
LWGEOM * lwgeom_from_gserialized(const GSERIALIZED *g)
Allocate a new LWGEOM from a GSERIALIZED.
int gserialized_is_empty(const GSERIALIZED *g)
Check if a GSERIALIZED is empty without deserializing first.
LWPOINT * lwpoint_construct_empty(int32_t srid, char hasz, char hasm)
LWPOLY * lwpoly_construct_circle(int32_t srid, double x, double y, double radius, uint32_t segments_per_quarter, char exterior)
LWPOINT * lwpoint_make2d(int32_t srid, double x, double y)
void lwgeom_free(LWGEOM *geom)
LWGEOM * lwpoly_as_lwgeom(const LWPOLY *obj)
LWBOUNDINGCIRCLE * lwgeom_calculate_mbc(const LWGEOM *g)
LWGEOM * lwpoint_as_lwgeom(const LWPOINT *obj)
void lwboundingcircle_destroy(LWBOUNDINGCIRCLE *c)
#define LW_TRUE
Return types for functions with status returns.