3141 bool fits = PG_GETARG_BOOL(1);
3142 LWGEOM *lwgeom_out = NULL;
3154 GSERIALIZED *geom_in = PG_GETARG_GSERIALIZED_P(0);
3159 srid = lwgeom_in->
srid;
3190 geom_out = geometry_serialize(lwgeom_out);
3193 PG_RETURN_POINTER(geom_out);
LWGEOM * lwgeom_from_gserialized(const GSERIALIZED *g)
Allocate a new LWGEOM from a GSERIALIZED.
int gserialized_datum_get_internals_p(Datum gsdatum, GBOX *gbox, lwflags_t *flags, uint8_t *type, int32_t *srid)
Peak into a GSERIALIZED datum to find its bounding box and some other metadata.
LWGEOM * lwline_as_lwgeom(const LWLINE *obj)
void lwgeom_free(LWGEOM *geom)
#define FLAGS_GET_Z(flags)
LWLINE * lwline_construct(int32_t srid, GBOX *bbox, POINTARRAY *points)
POINTARRAY * ptarray_construct_empty(char hasz, char hasm, uint32_t maxpoints)
Create a new POINTARRAY with no points.
#define FLAGS_GET_M(flags)
int lwgeom_calculate_gbox(const LWGEOM *lwgeom, GBOX *gbox)
Calculate bounding box of a geometry, automatically taking into account whether it is cartesian or ge...
int ptarray_append_point(POINTARRAY *pa, const POINT4D *pt, int allow_duplicates)
Append a point to the end of an existing POINTARRAY If allow_duplicate is LW_FALSE,...
#define LW_TRUE
Return types for functions with status returns.
LWGEOM * lwgeom_construct_empty(uint8_t type, int32_t srid, char hasz, char hasm)