PostGIS  2.2.8dev-r@@SVN_REVISION@@

◆ lwtriangle_construct_empty()

LWTRIANGLE* lwtriangle_construct_empty ( int  srid,
char  hasz,
char  hasm 

Definition at line 45 of file lwtriangle.c.

References LWTRIANGLE::bbox, LWTRIANGLE::flags, gflags(), lwalloc(), LWTRIANGLE::points, ptarray_construct_empty(), LWTRIANGLE::srid, TRIANGLETYPE, and LWTRIANGLE::type.

Referenced by lwgeom_construct_empty(), lwtriangle_from_wkb_state(), parse_gml_triangle(), SFCGAL2LWGEOM(), and wkt_parser_triangle_new().

46 {
47  LWTRIANGLE *result = lwalloc(sizeof(LWTRIANGLE));
48  result->type = TRIANGLETYPE;
49  result->flags = gflags(hasz,hasm,0);
50  result->srid = srid;
51  result->points = ptarray_construct_empty(hasz, hasm, 1);
52  result->bbox = NULL;
53  return result;
54 }
Definition: liblwgeom.h:417
POINTARRAY * ptarray_construct_empty(char hasz, char hasm, uint32_t maxpoints)
Create a new POINTARRAY with no points.
Definition: ptarray.c:70
Definition: liblwgeom.h:83
GBOX * bbox
Definition: liblwgeom.h:415
uint8_t type
Definition: liblwgeom.h:413
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
int32_t srid
Definition: liblwgeom.h:416
uint8_t flags
Definition: liblwgeom.h:414
Here is the call graph for this function:
Here is the caller graph for this function: