PostGIS  2.5.7dev-r@@SVN_REVISION@@

◆ lwtriangle_construct_empty()

LWTRIANGLE* lwtriangle_construct_empty ( int  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 = gflags(hasz,hasm,0);
63  result->srid = srid;
64  result->points = ptarray_construct_empty(hasz, hasm, 1);
65  result->bbox = NULL;
66  return result;
67 }
uint8_t gflags(int hasz, int hasm, int geodetic)
Construct a new flags char.
Definition: g_util.c:145
POINTARRAY * ptarray_construct_empty(char hasz, char hasm, uint32_t maxpoints)
Create a new POINTARRAY with no points.
Definition: ptarray.c:70
#define TRIANGLETYPE
Definition: liblwgeom.h:98
void * lwalloc(size_t size)
Definition: lwutil.c:229
int32_t srid
Definition: liblwgeom.h:435
uint8_t type
Definition: liblwgeom.h:432
GBOX * bbox
Definition: liblwgeom.h:434
POINTARRAY * points
Definition: liblwgeom.h:436
uint8_t flags
Definition: liblwgeom.h:433

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().

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