PostGIS 3.7.0dev-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 7231 of file lwgeom_topo.c.

7232{
7234 uint32_t i;
7235 LWGEOM *bg;
7236
7237 bg = lwgeom_clone_deep(g);
7238 if ( ! col->ngeoms ) return bg;
7239
7240 for (i=0; i<col->ngeoms; ++i)
7241 {
7242 LWGEOM *g2;
7243 g2 = lwgeom_split(bg, col->geoms[i]);
7244 lwgeom_free(bg);
7245 bg = g2;
7246 }
7247 bg->srid = nodes->srid;
7248
7249 return bg;
7250}
LWGEOM * lwgeom_split(const LWGEOM *lwgeom_in, const LWGEOM *blade_in)
void lwgeom_free(LWGEOM *geom)
Definition lwgeom.c:1246
LWCOLLECTION * lwgeom_as_lwcollection(const LWGEOM *lwgeom)
Definition lwgeom.c:261
LWGEOM * lwgeom_clone_deep(const LWGEOM *lwgeom)
Deep clone an LWGEOM, everything is copied.
Definition lwgeom.c:557
uint32_t ngeoms
Definition liblwgeom.h:580
LWGEOM ** geoms
Definition liblwgeom.h:575
int32_t srid
Definition liblwgeom.h:460

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: