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

◆ _lwt_split_by_nodes()

static LWGEOM * _lwt_split_by_nodes ( const LWGEOM g,
const LWGEOM nodes 
)
static

Definition at line 5509 of file lwgeom_topo.c.

5510{
5512 uint32_t i;
5513 LWGEOM *bg;
5514
5515 bg = lwgeom_clone_deep(g);
5516 if ( ! col->ngeoms ) return bg;
5517
5518 for (i=0; i<col->ngeoms; ++i)
5519 {
5520 LWGEOM *g2;
5521 g2 = lwgeom_split(bg, col->geoms[i]);
5522 lwgeom_free(bg);
5523 bg = g2;
5524 }
5525 bg->srid = nodes->srid;
5526
5527 return bg;
5528}
LWGEOM * lwgeom_split(const LWGEOM *lwgeom_in, const LWGEOM *blade_in)
void lwgeom_free(LWGEOM *geom)
Definition lwgeom.c:1138
LWCOLLECTION * lwgeom_as_lwcollection(const LWGEOM *lwgeom)
Definition lwgeom.c:215
LWGEOM * lwgeom_clone_deep(const LWGEOM *lwgeom)
Deep clone an LWGEOM, everything is copied.
Definition lwgeom.c:511
uint32_t ngeoms
Definition liblwgeom.h:566
LWGEOM ** geoms
Definition liblwgeom.h:561
int32_t srid
Definition liblwgeom.h:446

References LWCOLLECTION::geoms, lwgeom_as_lwcollection(), lwgeom_clone_deep(), lwgeom_free(), lwgeom_split(), LWCOLLECTION::ngeoms, and LWGEOM::srid.

Referenced by _lwt_AddLine().

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