PostGIS  3.0.6dev-r@@SVN_REVISION@@

◆ lwtriangle_construct_empty()

LWTRIANGLE* lwtriangle_construct_empty ( int32_t  srid,
char  hasz,
char  hasm 
)

Definition at line 58 of file lwtriangle.c.

59 {
60  LWTRIANGLE *result = lwalloc(sizeof(LWTRIANGLE));
61  result->type = TRIANGLETYPE;
62  result->flags = lwflags(hasz,hasm,0);
63  result->srid = srid;
64  result->points = ptarray_construct_empty(hasz, hasm, 1);
65  result->bbox = NULL;
66  return result;
67 }
POINTARRAY * ptarray_construct_empty(char hasz, char hasm, uint32_t maxpoints)
Create a new POINTARRAY with no points.
Definition: ptarray.c:59
#define TRIANGLETYPE
Definition: liblwgeom.h:129
void * lwalloc(size_t size)
Definition: lwutil.c:227
lwflags_t lwflags(int hasz, int hasm, int geodetic)
Construct a new flags bitmask.
Definition: lwutil.c:471
int32_t srid
Definition: liblwgeom.h:482
uint8_t type
Definition: liblwgeom.h:484
GBOX * bbox
Definition: liblwgeom.h:480
lwflags_t flags
Definition: liblwgeom.h:483
POINTARRAY * points
Definition: liblwgeom.h:481

References LWTRIANGLE::bbox, LWTRIANGLE::flags, lwalloc(), lwflags(), 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().

Here is the call graph for this function:
Here is the caller graph for this function: