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

◆ lwcompound_construct_from_lwline()

LWCOMPOUND * lwcompound_construct_from_lwline ( const LWLINE lwpoly)
extern

Construct an equivalent compound curve from a linestring.

Compound curves can have linear components, so this works fine

Definition at line 232 of file lwcompound.c.

233{
234 LWCOMPOUND* ogeom = lwcompound_construct_empty(lwline->srid, FLAGS_GET_Z(lwline->flags), FLAGS_GET_M(lwline->flags));
235 lwcompound_add_lwgeom(ogeom, lwgeom_clone((LWGEOM*)lwline));
236 /* ogeom->bbox = lwline->bbox; */
237 return ogeom;
238}
LWGEOM * lwgeom_clone(const LWGEOM *lwgeom)
Clone LWGEOM object.
Definition lwgeom.c:519
#define FLAGS_GET_Z(flags)
Definition liblwgeom.h:165
#define FLAGS_GET_M(flags)
Definition liblwgeom.h:166
LWCOMPOUND * lwcompound_construct_empty(int32_t srid, char hasz, char hasm)
Definition lwcompound.c:166
int lwcompound_add_lwgeom(LWCOMPOUND *comp, LWGEOM *geom)
Add a component, allocating extra space if necessary.
Definition lwcompound.c:131

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: