PostGIS  2.5.7dev-r@@SVN_REVISION@@

◆ lwcurvepoly_construct_empty()

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

Definition at line 36 of file lwcurvepoly.c.

37 {
38  LWCURVEPOLY *ret;
39 
40  ret = lwalloc(sizeof(LWCURVEPOLY));
41  ret->type = CURVEPOLYTYPE;
42  ret->flags = gflags(hasz, hasm, 0);
43  ret->srid = srid;
44  ret->nrings = 0;
45  ret->maxrings = 1; /* Allocate room for sub-members, just in case. */
46  ret->rings = lwalloc(ret->maxrings * sizeof(LWGEOM*));
47  ret->bbox = NULL;
48 
49  return ret;
50 }
uint8_t gflags(int hasz, int hasm, int geodetic)
Construct a new flags char.
Definition: g_util.c:145
#define CURVEPOLYTYPE
Definition: liblwgeom.h:94
void * lwalloc(size_t size)
Definition: lwutil.c:229
int32_t srid
Definition: liblwgeom.h:535
GBOX * bbox
Definition: liblwgeom.h:534
uint8_t type
Definition: liblwgeom.h:532
LWGEOM ** rings
Definition: liblwgeom.h:538
uint8_t flags
Definition: liblwgeom.h:533
uint32_t nrings
Definition: liblwgeom.h:536
uint32_t maxrings
Definition: liblwgeom.h:537

References LWCURVEPOLY::bbox, CURVEPOLYTYPE, LWCURVEPOLY::flags, gflags(), lwalloc(), 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: