PostGIS 3.7.0dev-r@@SVN_REVISION@@
Loading...
Searching...
No Matches

◆ lwpoly_construct_rectangle()

LWPOLY * lwpoly_construct_rectangle ( char  hasz,
char  hasm,
POINT4D p1,
POINT4D p2,
POINT4D p3,
POINT4D p4 
)
extern

Definition at line 80 of file lwpoly.c.

82{
83 POINTARRAY *pa = ptarray_construct_empty(hasz, hasm, 5);
84 LWPOLY *lwpoly = lwpoly_construct_empty(SRID_UNKNOWN, hasz, hasm);
85
91
92 lwpoly_add_ring(lwpoly, pa);
93
94 return lwpoly;
95}
POINTARRAY * ptarray_construct_empty(char hasz, char hasm, uint32_t maxpoints)
Create a new POINTARRAY with no points.
Definition ptarray.c:59
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,...
Definition ptarray.c:147
#define LW_TRUE
Return types for functions with status returns.
Definition liblwgeom.h:93
#define SRID_UNKNOWN
Unknown SRID value.
Definition liblwgeom.h:215
int lwpoly_add_ring(LWPOLY *poly, POINTARRAY *pa)
Add a ring to a polygon.
Definition lwpoly.c:247
LWPOLY * lwpoly_construct_empty(int32_t srid, char hasz, char hasm)
Definition lwpoly.c:161

References LW_TRUE, lwpoly_add_ring(), lwpoly_construct_empty(), ptarray_append_point(), ptarray_construct_empty(), and SRID_UNKNOWN.

Referenced by BOX2D_to_LWGEOM(), BOX3D_to_LWGEOM(), LWGEOM_expand(), and lwpoly_construct_envelope().

Here is the call graph for this function:
Here is the caller graph for this function: