Topology Types | |
---|---|
getfaceedges_returntype | A composite type that consists of a sequence number and edge number. This is the return type for ST_GetFaceEdges |
topogeometry | A composite type that refers to a topology geometry in a specific topology, layer, having specific type (1:[multi]point, 2:[multi]line, 3:[multi]poly, 4:collection) with specific identifier id in the topology. The id uniquely defines the topogeometry in the topology. |
validatetopology_returntype | A composite type that consists of an error message and id1 and id2 to denote location of error. This is the return type for ST_ValidateTopology |
Topology Domains | |
---|---|
TopoElement | An array of 2 integers generally used to identify a TopoGeometry component. |
topoelementarray | An array of element_id,element_type values. a bidimensional array of integers: '{{id,type}, {id,type}, ...}' |
Topology and TopoGeometry Management | |
---|---|
AddTopoGeometryColumn | Adds a topogeometry column to an existing feature table, registers this new column as a layer in topology.layer and returns the new layer_id. |
CreateTopology | Creates a new topology schema and registers this new schema in the topology.topology table. |
DropTopology | Use with caution: Drops a topology schema and deletes its reference from topology.topology table and references to tables in that schema from the geometry_columns table. |
CopyTopology1 | Makes a copy of a topology structure (nodes, edges, faces, layers and TopoGeometries). |
DropTopoGeometryColumn | Drops the topogeometry column from the table named table_name in schema schema_name and unregisters the columns from topology.layer table. |
ST_InitTopoGeo | Creates a new topology schema and registers this new schema in the topology.topology table and details summary of process. |
TopologySummary1 | Takes a topology name and provides summary totals of types of objects in topology |
ValidateTopology | Returns a set of validatetopology_returntype objects detailing issues with topology |
Topology Constructors | |
---|---|
ST_CreateTopoGeo1 | Adds a collection of geometries to a given empty topology and returns a message detailing success. |
Topology Editors | |
---|---|
ST_AddIsoNode | Adds an isolated node to a face in a topology and returns the nodeid of the new node. If face is null, the node is still created. |
ST_AddIsoEdge | Adds an isolated edge defined by geometry alinestring to a topology connecting two existing isolated nodes anode and anothernode and returns the edge id of the new edge. |
ST_AddEdgeNewFaces1 | Add a new edge and, if in doing so it splits a face, delete the original face and replace it with two new faces. |
ST_AddEdgeModFace1 | Add a new edge and, if in doing so it splits a face, modify the original face and add a new face. |
ST_RemEdgeNewFace1 | Removes an edge and, if the removed edge separated two faces, delete the original faces and replace them with a new face. |
ST_RemEdgeModFace1 | Removes an edge and, if the removed edge separated two faces, delete one of the them and modify the other to take the space of both. |
ST_ChangeEdgeGeom | Changes the linestring that define the specified edge. Will raise an error if the start and end points are not the same as the original or the new linestring crosses an existing edge (not at end points) or new linestring is not simple. |
ST_ModEdgeSplit | Split an edge by creating a new node along an existing edge, modifying the original edge and adding a new edge. |
ST_ModEdgeHeal1 | Heal two edges by deleting the node connecting them, modifying the first edge and deleting the second edge. Returns the id of the deleted node. |
ST_NewEdgeHeal1 | Heal two edges by deleting the node connecting them, deleting both edges, and replacing them with an edge whose direction is the same as the first edge provided. |
ST_MoveIsoNode | Moves an isolated node in a topology from one point to another. If new apoint geometry exists as a node an error is thrown. REturns description of move. |
ST_NewEdgesSplit | Split an edge by creating a new node along an existing edge, deleting the original edge and replacing it with two new edges. Returns the id of the new node created that joins the new edges. |
ST_RemoveIsoNode | Removes an isolated node and returns description of action. If the node is not isolated (is start or end of an edge), then an exception is thrown. |
Topology Accessors | |
---|---|
GetEdgeByPoint1 | Find the edge-id of an edge that intersects a given point |
GetFaceByPoint1 | Find the face-id of a face that intersects a given point |
GetNodeByPoint1 | Find the id of a node at a point location |
GetTopologyID | Returns the id of a topology in the topology.topology table given the name of the topology. |
GetTopologyName | Returns the name of a topology (schema) given the id of the topology. |
ST_GetFaceEdges1 | Returns a set of ordered edges that bound aface includes the sequence order. |
ST_GetFaceGeometry | Returns the polygon in the given topology with the specified face id. |
Topology Processing | |
---|---|
AddEdge1 | Adds a linestring edge to the edge table and associated start and end points to the point nodes table of the specified topology schema using the specified linestring geometry and returns the edgeid of the new (or existing) edge. |
AddFace1 | Registers a face primitive to a topology and get it's identifier. |
Polygonize1 | Find and register all faces defined by topology edges |
AddNode1 | 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. |
TopoGeometry Constructors | |
---|---|
CreateTopoGeom | Creates a new topo geometry object from topo element array - tg_type: 1:[multi]point, 2:[multi]line, 3:[multi]poly, 4:collection |
TopoElementArray_Agg1 | Returns a topoelementarray for a set of element_id, type arrays (topoelements) |
TopoGeometry Accessors | |
---|---|
GetTopoGeomElementArray | Returns a topoelementarray (an array of topoelements) containing the topological elements and type of the given TopoGeometry (primitive elements) |
GetTopoGeomElements | Returns a set of topoelement objects containing the topological element_id,element_type of the given TopoGeometry (primitive elements) |
TopoGeometry Outputs | |
---|---|
AsGML1 | Returns the GML representation of a topogeometry. |
Topology Domains Examples | |
---|---|
TopoElementSELECT ARRAY[1,2]::topology.topoelement;
| |
topoelementarraySELECT '{{1,2},{4,3}}'::topology.topoelementarray As tea;
|
Topology and TopoGeometry Management Examples | |
---|---|
AddTopoGeometryColumn-- Note for this example we created our new table in the ma_topo schema
| |
CreateTopologySELECT topology.CreateTopology('ma_topo',26986, 0.5); | |
DropTopologySELECT topology.DropTopology('ma_topo'); | |
CopyTopologySELECT topology.CopyTopology('ma_topo', 'ma_topo_bakup'); | |
DropTopoGeometryColumnSELECT topology.DropTopoGeometryColumn('ma_topo', 'parcel_topo', 'topo'); | |
ST_InitTopoGeoSELECT topology.ST_InitTopoGeo('topo_schema_to_create') AS topocreation;
| |
TopologySummarySELECT topology.topologysummary('city_data');
| |
ValidateTopologySELECT * FROM topology.ValidateTopology('ma_topo');
|
Topology Constructors Examples | |
---|---|
ST_CreateTopoGeo
|
Topology Editors Examples | |
---|---|
ST_ChangeEdgeGeomSELECT topology.ST_ChangeEdgeGeom('ma_topo', 1,
| |
ST_ModEdgeSplit
| |
ST_MoveIsoNode
| |
ST_NewEdgesSplit
| |
ST_RemoveIsoNode
|
Topology Accessors Examples | |
---|---|
GetEdgeByPointSELECT topology.GetEdgeByPoint('ma_topo',geom, 1) As with1mtol, topology.GetEdgeByPoint('ma_topo',geom,0) As withnotol
| |
GetFaceByPointSELECT topology.GetFaceByPoint('ma_topo',geom, 10) As with1mtol, topology.GetFaceByPoint('ma_topo',geom,0) As withnotol
| |
GetNodeByPointSELECT topology.GetNodeByPoint('ma_topo',geom, 1) As nearnode
| |
GetTopologyIDSELECT topology.GetTopologyID('ma_topo') As topo_id;
| |
GetTopologyNameSELECT topology.GetTopologyName(1) As topo_name;
| |
ST_GetFaceEdges
| |
ST_GetFaceGeometry
|
Topology Processing Examples | |
---|---|
AddEdgeSELECT topology.AddEdge('ma_topo', ST_GeomFromText('LINESTRING(227575.8 893917.2,227591.9 893900.4)', 26986) ) As edgeid;
| |
AddFace
| |
AddNodeSELECT topology.AddNode('ma_topo', ST_GeomFromText('POINT(227641.6 893816.5)', 26986) ) As nodeid;
|
TopoGeometry Constructors Examples | |
---|---|
CreateTopoGeomINSERT INTO ri.ri_roads(road_name, topo) VALUES('Unknown', topology.CreateTopoGeom('ri_topo',2,2,'{{1,2}}'::topology.topoelementarray); | |
TopoElementArray_AggSELECT topology.TopoElementArray_Agg(ARRAY[e,t]) As tea
|
TopoGeometry Accessors Examples |
---|
TopoGeometry Outputs Examples | |
---|---|
AsGMLSELECT topology.AsGML(topo) As rdgml
|