Definition at line 2748 of file lwgeom_functions_basic.c.
References LWGEOM::bbox, LWGEOM::flags, FLAGS_GET_M, FLAGS_GET_Z, geometry_serialize(), LINETYPE, LW_TRUE, lwgeom_construct_empty(), lwgeom_free(), lwgeom_from_gserialized(), lwgeom_get_bbox(), lwline_as_lwgeom(), lwline_construct(), POINT4D::m, GBOX::mmax, GBOX::mmin, PG_FUNCTION_INFO_V1(), ptarray_append_point(), ptarray_construct_empty(), LWGEOM::srid, ST_Scale(), POINT4D::x, GBOX::xmax, GBOX::xmin, POINT4D::y, GBOX::ymax, GBOX::ymin, POINT4D::z, GBOX::zmax, and GBOX::zmin.
Referenced by ST_SwapOrdinates().
2750 GSERIALIZED *geom_in = PG_GETARG_GSERIALIZED_P(0);
2752 bool fits = PG_GETARG_BOOL(1);
2758 int srid = lwgeom_in->
srid;
2764 lwgeom_in->
bbox = NULL;
2790 PG_FREE_IF_COPY(geom_in, 0);
2795 PG_RETURN_POINTER(geom_out);
LWGEOM * lwgeom_from_gserialized(const GSERIALIZED *g)
Allocate a new LWGEOM from a GSERIALIZED.
POINTARRAY * ptarray_construct_empty(char hasz, char hasm, uint32_t maxpoints)
Create a new POINTARRAY with no points.
void lwgeom_free(LWGEOM *geom)
LWGEOM * lwline_as_lwgeom(const LWLINE *obj)
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, then a duplicate point will not be added.
#define LW_TRUE
Return types for functions with status returns.
LWLINE * lwline_construct(int srid, GBOX *bbox, POINTARRAY *points)
const GBOX * lwgeom_get_bbox(const LWGEOM *lwgeom)
Get a non-empty geometry bounding box, computing and caching it if not already there.
#define FLAGS_GET_Z(flags)
Macros for manipulating the 'flags' byte.
LWGEOM * lwgeom_construct_empty(uint8_t type, int srid, char hasz, char hasm)
GSERIALIZED * geometry_serialize(LWGEOM *lwgeom)
#define FLAGS_GET_M(flags)