PostGIS  3.0.6dev-r@@SVN_REVISION@@

◆ lwcurvepoly_construct_empty()

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

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:125
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:471
int32_t srid
Definition: liblwgeom.h:590
GBOX * bbox
Definition: liblwgeom.h:588
uint8_t type
Definition: liblwgeom.h:592
LWGEOM ** rings
Definition: liblwgeom.h:589
lwflags_t flags
Definition: liblwgeom.h:591
uint32_t nrings
Definition: liblwgeom.h:594
uint32_t maxrings
Definition: liblwgeom.h:595

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: