1701{
1704 int32_t srid = lwgeom->
srid;
1709
1711 {
1712
1713 PG_RETURN_POINTER(geom);
1714 }
1715
1717 {
1718
1719 PG_RETURN_POINTER(geom);
1720 }
1721
1722
1723
1724
1725
1726
1727
1728
1729
1730
1731
1732
1734 {
1735
1739 }
1741 {
1743
1745
1746
1753
1754
1758 }
1759 else
1760 {
1764 ppa[0] = pa;
1765
1766
1782
1783
1787 }
1788
1789 PG_FREE_IF_COPY(geom, 0);
1790
1791 PG_RETURN_POINTER(result);
1792}
LWGEOM * lwgeom_from_gserialized(const GSERIALIZED *g)
Allocate a new LWGEOM from a GSERIALIZED.
LWGEOM * lwpoint_as_lwgeom(const LWPOINT *obj)
void lwpoint_free(LWPOINT *pt)
POINTARRAY * ptarray_construct_empty(char hasz, char hasm, uint32_t maxpoints)
Create a new POINTARRAY with no points.
void * lwalloc(size_t size)
LWLINE * lwline_construct(int32_t srid, GBOX *bbox, POINTARRAY *points)
LWPOINT * lwpoint_make2d(int32_t srid, double x, double y)
LWGEOM * lwline_as_lwgeom(const LWLINE *obj)
LWPOLY * lwpoly_construct(int32_t srid, GBOX *bbox, uint32_t nrings, POINTARRAY **points)
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,...
void lwpoly_free(LWPOLY *poly)
#define LW_TRUE
Return types for functions with status returns.
LWGEOM * lwpoly_as_lwgeom(const LWPOLY *obj)
void lwline_free(LWLINE *line)
static int lwgeom_is_empty(const LWGEOM *geom)
Return true or false depending on whether a geometry is an "empty" geometry (no vertices members)
GSERIALIZED * geometry_serialize(LWGEOM *lwgeom)