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

Definition at line 159 of file lwpoly.c.

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

Referenced by _lwt_FaceByEdges(), buffer(), GeneratePolygonGeometry(), geography_centroid_from_mpoly(), GEOS2LWGEOM(), lwgeom_buildarea(), lwgeom_construct_empty(), lwgeom_segmentize_sphere(), lwpoly_construct_circle(), lwpoly_construct_rectangle(), lwpoly_force_dims(), lwpoly_from_twkb_state(), lwpoly_from_wkb_state(), lwpoly_set_effective_area(), lwt_GetFaceGeometry(), parse_geojson_multipolygon(), parse_geojson_polygon(), parse_gml_polygon(), SFCGAL2LWGEOM(), wkt_parser_polygon_finalize(), and wkt_parser_polygon_new().

160 {
161  LWPOLY *result = lwalloc(sizeof(LWPOLY));
162  result->type = POLYGONTYPE;
163  result->flags = gflags(hasz,hasm,0);
164  result->srid = srid;
165  result->nrings = 0;
166  result->maxrings = 1; /* Allocate room for ring, just in case. */
167  result->rings = lwalloc(result->maxrings * sizeof(POINTARRAY*));
168  result->bbox = NULL;
169  return result;
170 }
Definition: liblwgeom.h:86
GBOX * bbox
Definition: liblwgeom.h:452
uint32_t nrings
Definition: liblwgeom.h:454
uint8_t type
Definition: liblwgeom.h:450
uint32_t maxrings
Definition: liblwgeom.h:455
Definition: liblwgeom.h:456
uint8_t gflags(int hasz, int hasm, int geodetic)
Construct a new flags char.
Definition: g_util.c:145
int32_t srid
Definition: liblwgeom.h:453
uint8_t flags
Definition: liblwgeom.h:451
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: