AddNode
Prev | 10.8. Topology Processing | Next

## Name

AddNode — Adds a point node to the node table in the specified topology schema and returns the nodeid of new node. If point already exists as node, the existing nodeid is returned.

## Synopsis

`integer AddNode(`varchar toponame, geometry apoint, boolean allowEdgeSplitting=false, boolean computeContainingFace=false`)`;

## Description

Adds a point node to the node table in the specified topology schema. The AddEdge function automatically adds start and end points of an edge when called so not necessary to explicitly add nodes of an edge.

If any edge crossing the node is found either an exception is raised or the edge is split, depending on the `allowEdgeSplitting` parameter value.

If `computeContainingFace` is true a newly added node would get the correct containing face computed.

If the `apoint` geometry already exists as a node, the node is not added but the existing nodeid is returned.

Availability: 2.0.0

## Examples

    SELECT topology.AddNode('ma_topo', ST_GeomFromText('POINT(227641.6 893816.5)', 26986) ) As nodeid;
    -- result --
    nodeid
    --------
     4

## See Also

AddEdge, CreateTopology

Prev | Up | Next
Polygonize | Home | AddEdge