Skip to content
This documentation is sourced from a third-party project and is not maintained by pgEdge.

TopoGeometry Editors

clearTopoGeom

Clears the content of a topo geometry.

Synopsis

topogeometry clearTopoGeom(topogeometry  topogeom)

Description

Clears the content a topogeometry turning it into an empty one. Mostly useful in conjunction with toTopoGeom to replace the shape of existing objects and any dependent object in higher hierarchical levels.

Availability: 2.1

Examples

-- Shrink all TopoGeometry polygons by 10 meters
UPDATE nei_topo SET topo = toTopoGeom(ST_Buffer(topo, -10), clearTopoGeom(topo), 0);

See Also

toTopoGeom

TopoGeom_addElement

Adds an element to the definition of a TopoGeometry.

Synopsis

topogeometry TopoGeom_addElement(topogeometry  tg, topoelement  el)

Description

Adds a topoelement to the definition of a TopoGeometry object. Does not error out if the element is already part of the definition.

Availability: 2.3

Examples

-- Add edge 5 to TopoGeometry tg
UPDATE mylayer SET tg = TopoGeom_addElement(tg, '{5,2}');

See Also

TopoGeom_remElement, CreateTopoGeom

TopoGeom_remElement

Removes an element from the definition of a TopoGeometry.

Synopsis

topogeometry TopoGeom_remElement(topogeometry  tg, topoelement  el)

Description

Removes a topoelement from the definition of a TopoGeometry object.

Availability: 2.3

Examples

-- Remove face 43 from TopoGeometry tg
UPDATE mylayer SET tg = TopoGeom_remElement(tg, '{43,3}');

See Also

TopoGeom_addElement, CreateTopoGeom

TopoGeom_addTopoGeom

Adds element of a TopoGeometry to the definition of another TopoGeometry.

Synopsis

topogeometry TopoGeom_addTopoGeom(topogeometry  tgt, topogeometry  src)

Description

Adds the elements of a topogeometry to the definition of another TopoGeometry, possibly changing its cached type (type attribute) to a collection, if needed to hold all elements in the source object.

The two TopoGeometry objects need be defined against the same topology and, if hierarchically defined, need be composed by elements of the same child layer.

Availability: 3.2

Examples

-- Set an "overall" TopoGeometry value to be composed by all
-- elements of specific TopoGeometry values
UPDATE mylayer SET tg_overall = TopoGeom_addTopogeom(
    TopoGeom_addTopoGeom(
        clearTopoGeom(tg_overall),
        tg_specific1
    ),
    tg_specific2
);

See Also

TopoGeom_addElement, clearTopoGeom, CreateTopoGeom

toTopoGeom

Adds a geometry shape to an existing topo geometry.

Description

Refer to toTopoGeom.