PostGIS  3.7.0dev-r@@SVN_REVISION@@

◆ lwt_AddLine()

LWT_ELEMID* lwt_AddLine ( LWT_TOPOLOGY topo,
LWLINE line,
double  tol,
int *  nedges,
int  max_edges 
)

Adds a linestring to the topology.

The given line will snap to existing nodes or edges within given tolerance. Existing edges or faces may be split by the line.

Parameters
topothe topology to operate on
linethe line to add
tolsnap tolerance, the topology tolerance will be used if 0
nedgesoutput parameter, will be set to number of edges the line was split into, or -1 on error (liblwgeom error handler will be invoked with error message)
max_edgesthe maximum number of edges to allow the input line to be split into. 0 for no limits. An error will be returned if number of edges would exceed this number.
Returns
an array of <nedges> edge identifiers that sewed together will build up the input linestring (after snapping). Caller will need to free the array using lwfree(), if not null.

Definition at line 7540 of file lwgeom_topo.c.

7541 {
7542  return _lwt_AddLine(topo, line, tol, nedges, 1, max_new_edges);
7543 }
static LWT_ELEMID * _lwt_AddLine(LWT_TOPOLOGY *topo, LWLINE *line, double tol, int *nedges, int handleFaceSplit, int maxNewEdges)
Definition: lwgeom_topo.c:7136

References _lwt_AddLine().

Referenced by lwt_LoadLine().

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