PostGIS  2.1.10dev-r@@SVN_REVISION@@
LWPOLY* lwpoly_construct_empty ( int  srid,
char  hasz,
char  hasm 

Definition at line 66 of file lwpoly.c.

References LWPOLY::bbox, LWPOLY::flags, gflags(), lwalloc(), LWPOLY::maxrings, LWPOLY::nrings, POLYGONTYPE, result, LWPOLY::rings, LWPOLY::srid, and LWPOLY::type.

Referenced by buffer(), GeneratePolygonGeometry(), GEOS2LWGEOM(), lwgeom_buildarea(), lwgeom_construct_empty(), lwgeom_segmentize_sphere(), lwpoly_force_dims(), lwpoly_from_wkb_state(), lwpoly_simplify(), parse_geojson_multipolygon(), parse_geojson_polygon(), parse_gml_polygon(), SFCGAL2LWGEOM(), wkt_parser_polygon_finalize(), and wkt_parser_polygon_new().

67 {
68  LWPOLY *result = lwalloc(sizeof(LWPOLY));
69  result->type = POLYGONTYPE;
70  result->flags = gflags(hasz,hasm,0);
71  result->srid = srid;
72  result->nrings = 0;
73  result->maxrings = 1; /* Allocate room for ring, just in case. */
74  result->rings = lwalloc(result->maxrings * sizeof(POINTARRAY*));
75  result->bbox = NULL;
76  return result;
77 }
Definition: liblwgeom.h:62
GBOX * bbox
Definition: liblwgeom.h:409
char ** result
Definition: liblwgeom.h:218
uint8_t type
Definition: liblwgeom.h:407
Definition: liblwgeom.h:413
int nrings
Definition: liblwgeom.h:411
uint8_t gflags(int hasz, int hasm, int geodetic)
Construct a new flags char.
Definition: g_util.c:131
int maxrings
Definition: liblwgeom.h:412
int32_t srid
Definition: liblwgeom.h:410
uint8_t flags
Definition: liblwgeom.h:408
void * lwalloc(size_t size)
Definition: lwutil.c:175

Here is the call graph for this function:

Here is the caller graph for this function: