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

◆ lwcurvepoly_construct_empty()

LWCURVEPOLY * lwcurvepoly_construct_empty ( int32_t  srid,
char  hasz,
char  hasm 
)
extern

Definition at line 35 of file lwcurvepoly.c.

36{
37 LWCURVEPOLY *ret;
38
39 ret = lwalloc(sizeof(LWCURVEPOLY));
40 ret->type = CURVEPOLYTYPE;
41 ret->flags = lwflags(hasz, hasm, 0);
42 ret->srid = srid;
43 ret->nrings = 0;
44 ret->maxrings = 1; /* Allocate room for sub-members, just in case. */
45 ret->rings = lwalloc(ret->maxrings * sizeof(LWGEOM*));
46 ret->bbox = NULL;
47
48 return ret;
49}
#define CURVEPOLYTYPE
Definition liblwgeom.h:111
void * lwalloc(size_t size)
Definition lwutil.c:227
lwflags_t lwflags(int hasz, int hasm, int geodetic)
Construct a new flags bitmask.
Definition lwutil.c:477
int32_t srid
Definition liblwgeom.h:604
GBOX * bbox
Definition liblwgeom.h:602
uint8_t type
Definition liblwgeom.h:606
LWGEOM ** rings
Definition liblwgeom.h:603
lwflags_t flags
Definition liblwgeom.h:605
uint32_t nrings
Definition liblwgeom.h:608
uint32_t maxrings
Definition liblwgeom.h:609

References LWCURVEPOLY::bbox, CURVEPOLYTYPE, LWCURVEPOLY::flags, lwalloc(), lwflags(), LWCURVEPOLY::maxrings, LWCURVEPOLY::nrings, LWCURVEPOLY::rings, LWCURVEPOLY::srid, and LWCURVEPOLY::type.

Referenced by lwcurvepoly_from_wkb_state(), lwgeom_construct_empty(), wkt_parser_curvepolygon_finalize(), and wkt_parser_curvepolygon_new().

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