PostGIS  2.4.9dev-r@@SVN_REVISION@@

◆ lwcurvepoly_construct_empty()

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

Definition at line 36 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().

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 }
LWGEOM ** rings
Definition: liblwgeom.h:535
int maxrings
Definition: liblwgeom.h:534
#define CURVEPOLYTYPE
Definition: liblwgeom.h:94
uint8_t type
Definition: liblwgeom.h:529
int32_t srid
Definition: liblwgeom.h:532
GBOX * bbox
Definition: liblwgeom.h:531
uint8_t flags
Definition: liblwgeom.h:530
uint8_t gflags(int hasz, int hasm, int geodetic)
Construct a new flags char.
Definition: g_util.c:145
void * lwalloc(size_t size)
Definition: lwutil.c:229
Here is the call graph for this function:
Here is the caller graph for this function: