PostGIS  2.5.7dev-r@@SVN_REVISION@@

◆ lwtriangle_construct()

LWTRIANGLE* lwtriangle_construct ( int  srid,
GBOX bbox,
POINTARRAY points 
)

Definition at line 40 of file lwtriangle.c.

41 {
42  LWTRIANGLE *result;
43 
44  result = (LWTRIANGLE*) lwalloc(sizeof(LWTRIANGLE));
45  result->type = TRIANGLETYPE;
46 
47  result->flags = points->flags;
48  FLAGS_SET_BBOX(result->flags, bbox?1:0);
49 
50  result->srid = srid;
51  result->points = points;
52  result->bbox = bbox;
53 
54  return result;
55 }
#define FLAGS_SET_BBOX(flags, value)
Definition: liblwgeom.h:148
#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
uint8_t flags
Definition: liblwgeom.h:372

References LWTRIANGLE::bbox, POINTARRAY::flags, LWTRIANGLE::flags, FLAGS_SET_BBOX, lwalloc(), LWTRIANGLE::points, LWTRIANGLE::srid, TRIANGLETYPE, and LWTRIANGLE::type.

Referenced by lwtin_from_geos(), lwtriangle_from_lwline(), 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: