PostGIS  2.1.10dev-r@@SVN_REVISION@@
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(), result, 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:389
POINTARRAY * ptarray_construct_empty(char hasz, char hasm, uint32_t maxpoints)
Create a new POINTARRAY with no points.
Definition: ptarray.c:57
Definition: liblwgeom.h:73
GBOX * bbox
Definition: liblwgeom.h:387
char ** result
Definition: liblwgeom.h:218
uint8_t type
Definition: liblwgeom.h:385
uint8_t gflags(int hasz, int hasm, int geodetic)
Construct a new flags char.
Definition: g_util.c:131
void * lwalloc(size_t size)
Definition: lwutil.c:175
int32_t srid
Definition: liblwgeom.h:388
uint8_t flags
Definition: liblwgeom.h:386

Here is the call graph for this function:

Here is the caller graph for this function: