PostGIS 3.0.6dev-r@@SVN_REVISION@@
Loading...
Searching...
No Matches

◆ lwcompound_construct_from_lwline()

LWCOMPOUND * lwcompound_construct_from_lwline ( const LWLINE lwpoly)

Construct an equivalent compound curve from a linestring.

Compound curves can have linear components, so this works fine

Definition at line 204 of file lwcompound.c.

205{
206 LWCOMPOUND* ogeom = lwcompound_construct_empty(lwline->srid, FLAGS_GET_Z(lwline->flags), FLAGS_GET_M(lwline->flags));
207 lwcompound_add_lwgeom(ogeom, lwgeom_clone((LWGEOM*)lwline));
208 /* ogeom->bbox = lwline->bbox; */
209 return ogeom;
210}
LWGEOM * lwgeom_clone(const LWGEOM *lwgeom)
Clone LWGEOM object.
Definition lwgeom.c:473
#define FLAGS_GET_Z(flags)
Definition liblwgeom.h:179
#define FLAGS_GET_M(flags)
Definition liblwgeom.h:180
LWCOMPOUND * lwcompound_construct_empty(int32_t srid, char hasz, char hasm)
Definition lwcompound.c:123
int lwcompound_add_lwgeom(LWCOMPOUND *comp, LWGEOM *geom)
Add a component, allocating extra space if necessary.
Definition lwcompound.c:88
lwflags_t flags
Definition liblwgeom.h:471
int32_t srid
Definition liblwgeom.h:470

References LWLINE::flags, FLAGS_GET_M, FLAGS_GET_Z, lwcompound_add_lwgeom(), lwcompound_construct_empty(), lwgeom_clone(), and LWLINE::srid.

Referenced by lwgeom_as_curve().

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