PostGIS  2.2.7dev-r@@SVN_REVISION@@
LWCURVEPOLY* lwcurvepoly_construct_empty ( int  srid,
char  hasz,
char  hasm 
)

Definition at line 23 of file lwcurvepoly.c.

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().

24 {
25  LWCURVEPOLY *ret;
26 
27  ret = lwalloc(sizeof(LWCURVEPOLY));
28  ret->type = CURVEPOLYTYPE;
29  ret->flags = gflags(hasz, hasm, 0);
30  ret->srid = srid;
31  ret->nrings = 0;
32  ret->maxrings = 1; /* Allocate room for sub-members, just in case. */
33  ret->rings = lwalloc(ret->maxrings * sizeof(LWGEOM*));
34  ret->bbox = NULL;
35 
36  return ret;
37 }
LWGEOM ** rings
Definition: liblwgeom.h:519
int maxrings
Definition: liblwgeom.h:518
#define CURVEPOLYTYPE
Definition: liblwgeom.h:79
uint8_t type
Definition: liblwgeom.h:513
int32_t srid
Definition: liblwgeom.h:516
GBOX * bbox
Definition: liblwgeom.h:515
uint8_t flags
Definition: liblwgeom.h:514
uint8_t gflags(int hasz, int hasm, int geodetic)
Construct a new flags char.
Definition: g_util.c:130
void * lwalloc(size_t size)
Definition: lwutil.c:199

Here is the call graph for this function:

Here is the caller graph for this function: