From b40045391a9f9aea48d40146acc55b7064bdb5c9 Mon Sep 17 00:00:00 2001 From: Sandro Santilli Date: Mon, 5 Mar 2012 11:33:59 +0000 Subject: [PATCH] Move topology reference entries from "processing" to "constructors" git-svn-id: http://svn.osgeo.org/postgis/trunk@9397 b70326c6-7e19-0410-871a-916f4a2858ee --- doc/extras_topology.xml | 617 ++++++++++++++++++++-------------------- 1 file changed, 311 insertions(+), 306 deletions(-) diff --git a/doc/extras_topology.xml b/doc/extras_topology.xml index eac842fa6..77504c0ff 100644 --- a/doc/extras_topology.xml +++ b/doc/extras_topology.xml @@ -297,6 +297,193 @@ SELECT topology.AddTopoGeometryColumn('ri_topo', 'ri', 'roads', 'topo', 'LINE'); , + + + 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. + + + + + + integer DropTopology + varchar topology_schema_name + + + + + + Description + + Drops a topology schema and deletes its reference from topology.topology table and references to tables in that schema from the geometry_columns table. + This function should be USED WITH CAUTION, as it could destroy data you care about. If the schema does not exist, it just removes reference entries the named schema. + + + Availability: 1.? + + + + + Examples + Cascade drops the ma_topo schema and removes all references to it in topology.topology and geometry_columns. + SELECT topology.DropTopology('ma_topo'); + + + + + See Also + + + + + + DropTopoGeometryColumn + + Drops the topogeometry column from the table named table_name in schema schema_name and unregisters the columns from topology.layer table. + + + + + + text DropTopoGeometryColumn + varchar schema_name + varchar table_name + varchar column_name + + + + + + Description + + Drops the topogeometry column from the table named table_name in schema schema_name and unregisters the columns from topology.layer table. Returns summary + of drop status. NOTE: it first sets all values to NULL before dropping to bypass referential integrity checks. + + + Availability: 1.? + + + + + Examples + SELECT topology.DropTopoGeometryColumn('ma_topo', 'parcel_topo', 'topo'); + + + + + See Also + + + + + + + TopologySummary + + Takes a topology name and provides summary totals of types of objects in topology + + + + + + text TopologySummary + varchar topology_schema_name + + + + + + Description + + Takes a topology name and provides summary totals of types of objects in topology. + + + Availability: 2.0.0 + + + + + Examples + SELECT topology.topologysummary('city_data'); + topologysummary +-------------------------------------------------------- + Topology city_data (329), SRID 4326, precision: 0 + 22 nodes, 24 edges, 10 faces, 29 topogeoms in 5 layers + Layer 1, type Polygonal (3), 9 topogeoms + Deploy: features.land_parcels.feature + Layer 2, type Puntal (1), 8 topogeoms + Deploy: features.traffic_signs.feature + Layer 3, type Lineal (2), 8 topogeoms + Deploy: features.city_streets.feature + Layer 4, type Polygonal (3), 3 topogeoms + Hierarchy level 1, child layer 1 + Deploy: features.big_parcels.feature + Layer 5, type Puntal (1), 1 topogeoms + Hierarchy level 1, child layer 2 + Deploy: features.big_signs.feature + + + + See Also + + + + + + + ValidateTopology + + Returns a set of validatetopology_returntype objects detailing issues with topology + + + + + + setof validatetopology_returntype ValidateTopology + varchar topology_schema_name + + + + + + Description + + Returns a set of objects detailing issues with topology. Refer to + for listing of possible errors. + + + Availability: 1.? + + Enhanced: 2.0.0 more efficient edge crossing detection and fixes for false positives that were existent in prior versions. + + + + + Examples + SELECT * FROM topology.ValidateTopology('ma_topo'); + error | id1 | id2 +-------------------+-----+----- +face without edges | 0 | + + + + + + See Also + , + + + + + + + + This section covers the topology functions for creating new topologies. + + + Topology Constructors + CreateTopology @@ -367,45 +554,7 @@ topoid , , - - - 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. - - - - - - integer DropTopology - varchar topology_schema_name - - - - - - Description - - Drops a topology schema and deletes its reference from topology.topology table and references to tables in that schema from the geometry_columns table. - This function should be USED WITH CAUTION, as it could destroy data you care about. If the schema does not exist, it just removes reference entries the named schema. - - - Availability: 1.? - - - - - Examples - Cascade drops the ma_topo schema and removes all references to it in topology.topology and geometry_columns. - SELECT topology.DropTopology('ma_topo'); - - - - - See Also - - - + CopyTopology @@ -454,20 +603,18 @@ This example makes a backup of a topology called ma_topo , - + + - 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. - text DropTopoGeometryColumn - varchar schema_name - varchar table_name - varchar column_name + text ST_InitTopoGeo + varchar topology_schema_name @@ -475,37 +622,47 @@ This example makes a backup of a topology called ma_topo Description - Drops the topogeometry column from the table named table_name in schema schema_name and unregisters the columns from topology.layer table. Returns summary - of drop status. NOTE: it first sets all values to NULL before dropping to bypass referential integrity checks. + This is an SQL-MM equivalent of CreateTopology but lacks the spatial reference and tolerance options of CreateTopology and outputs a text description of creation instead of topology id. Availability: 1.? + &sqlmm_compliant; SQL-MM 3 Topo-Geo and Topo-Net 3: Routine Details: X.3.17 Examples - SELECT topology.DropTopoGeometryColumn('ma_topo', 'parcel_topo', 'topo'); + SELECT topology.ST_InitTopoGeo('topo_schema_to_create') AS topocreation; + astopocreation +------------------------------------------------------------ + Topology-Geometry 'topo_schema_to_create' (id:7) created. + See Also - + + - + + - ST_InitTopoGeo - Creates a new topology schema and registers this new schema in the topology.topology table and details summary of process. + ST_CreateTopoGeo + + +Adds a collection of geometries to a given empty topology and returns a message detailing success. + - text ST_InitTopoGeo - varchar topology_schema_name + text ST_CreateTopoGeo + varchar atopology + geometry acollection @@ -513,43 +670,71 @@ This example makes a backup of a topology called ma_topo Description - This is an SQL-MM equivalent of CreateTopology but lacks the spatial reference and tolerance options of CreateTopology and outputs a text description of creation instead of topology id. - + +Adds a collection of geometries to a given empty topology and returns a message detailing success. + + + Useful for populating an empty topology. + + - Availability: 1.? - &sqlmm_compliant; SQL-MM 3 Topo-Geo and Topo-Net 3: Routine Details: X.3.17 + Availability: 2.0 + &sqlmm_compliant; SQL-MM: Topo-Geo and Topo-Net 3: Routine Details -- X.3.18 Examples - SELECT topology.ST_InitTopoGeo('topo_schema_to_create') AS topocreation; - astopocreation ------------------------------------------------------------- - Topology-Geometry 'topo_schema_to_create' (id:7) created. + +-- Populate topology -- +SELECT topology.ST_CreateTopoGeo('ri_topo', + ST_GeomFromText('MULTILINESTRING((384744 236928,384750 236923,384769 236911,384799 236895,384811 236890,384833 236884, + 384844 236882,384866 236881,384879 236883,384954 236898,385087 236932,385117 236938, + 385167 236938,385203 236941,385224 236946,385233 236950,385241 236956,385254 236971, + 385260 236979,385268 236999,385273 237018,385273 237037,385271 237047,385267 237057, + 385225 237125,385210 237144,385192 237161,385167 237192,385162 237202,385159 237214, + 385159 237227,385162 237241,385166 237256,385196 237324,385209 237345,385234 237375, + 385237 237383,385238 237399,385236 237407,385227 237419,385213 237430,385193 237439, + 385174 237451,385170 237455,385169 237460,385171 237475,385181 237503,385190 237521, + 385200 237533,385206 237538,385213 237541,385221 237542,385235 237540,385242 237541, + 385249 237544,385260 237555,385270 237570,385289 237584,385292 237589,385291 237596,385284 237630))',3438) + ); + + st_createtopogeo +---------------------------- + Topology ri_topo populated + + +-- create tables and topo geometries -- +CREATE TABLE ri.roads(gid serial PRIMARY KEY, road_name text); + +SELECT topology.AddTopoGeometryColumn('ri_topo', 'ri', 'roads', 'topo', 'LINE'); See Also - - + , , - - + + - TopologySummary + TopoGeo_AddPoint - Takes a topology name and provides summary totals of types of objects in topology + +Adds a point to an existing topology using a tolerance and possibly splitting an existing edge. + - text TopologySummary - varchar topology_schema_name + integer TopoGeo_AddPoint + varchar toponame + geometry apoint + float8 tolerance @@ -557,52 +742,45 @@ This example makes a backup of a topology called ma_topo Description - Takes a topology name and provides summary totals of types of objects in topology. - + +Adds a point to an existing topology and return its identifier. +The given point will snap to existing nodes or edges within given tolerance. +An existing edge may be split by the snapped point. + + Availability: 2.0.0 - - Examples - SELECT topology.topologysummary('city_data'); - topologysummary --------------------------------------------------------- - Topology city_data (329), SRID 4326, precision: 0 - 22 nodes, 24 edges, 10 faces, 29 topogeoms in 5 layers - Layer 1, type Polygonal (3), 9 topogeoms - Deploy: features.land_parcels.feature - Layer 2, type Puntal (1), 8 topogeoms - Deploy: features.traffic_signs.feature - Layer 3, type Lineal (2), 8 topogeoms - Deploy: features.city_streets.feature - Layer 4, type Polygonal (3), 3 topogeoms - Hierarchy level 1, child layer 1 - Deploy: features.big_parcels.feature - Layer 5, type Puntal (1), 1 topogeoms - Hierarchy level 1, child layer 2 - Deploy: features.big_signs.feature - See Also - + +, +, +, + + - - + + - ValidateTopology + TopoGeo_AddLineString - Returns a set of validatetopology_returntype objects detailing issues with topology + +Adds a linestring to an existing topology using a tolerance and possibly splitting existing edges/faces. + - setof validatetopology_returntype ValidateTopology - varchar topology_schema_name + integer TopoGeo_AddLineString + varchar toponame + geometry aline + float8 tolerance @@ -610,55 +788,45 @@ This example makes a backup of a topology called ma_topo Description - Returns a set of objects detailing issues with topology. Refer to - for listing of possible errors. - + +Adds a linestring to an existing topology and return a set of edge identifiers forming it up. +The given line will snap to existing nodes or edges within given tolerance. +Existing edges and faces may be split by the line. + + - Availability: 1.? - - Enhanced: 2.0.0 more efficient edge crossing detection and fixes for false positives that were existent in prior versions. + Availability: 2.0.0 - - Examples - SELECT * FROM topology.ValidateTopology('ma_topo'); - error | id1 | id2 --------------------+-----+----- -face without edges | 0 | - - - See Also - , + +, +, +, + + - - - - - This section covers the topology functions for creating new topologies. - - - Topology Constructors - + - ST_CreateTopoGeo + TopoGeo_AddPolygon -Adds a collection of geometries to a given empty topology and returns a message detailing success. +Adds a polygon to an existing topology using a tolerance and possibly splitting existing edges/faces. - text ST_CreateTopoGeo - varchar atopology - geometry acollection + integer TopoGeo_AddPolygon + varchar atopology + geometry aline + float8 atolerance @@ -667,53 +835,28 @@ Adds a collection of geometries to a given empty topology and returns a message Description -Adds a collection of geometries to a given empty topology and returns a message detailing success. +Adds a polygon to an existing topology and return a set of face identifiers forming it up. +The boundary of the given polygon will snap to existing nodes or edges within given tolerance. +Existing edges and faces may be split by the boundary of the new polygon. - - Useful for populating an empty topology. - - + - Availability: 2.0 - &sqlmm_compliant; SQL-MM: Topo-Geo and Topo-Net 3: Routine Details -- X.3.18 + Availability: 2.0.0 - - Examples - --- Populate topology -- -SELECT topology.ST_CreateTopoGeo('ri_topo', - ST_GeomFromText('MULTILINESTRING((384744 236928,384750 236923,384769 236911,384799 236895,384811 236890,384833 236884, - 384844 236882,384866 236881,384879 236883,384954 236898,385087 236932,385117 236938, - 385167 236938,385203 236941,385224 236946,385233 236950,385241 236956,385254 236971, - 385260 236979,385268 236999,385273 237018,385273 237037,385271 237047,385267 237057, - 385225 237125,385210 237144,385192 237161,385167 237192,385162 237202,385159 237214, - 385159 237227,385162 237241,385166 237256,385196 237324,385209 237345,385234 237375, - 385237 237383,385238 237399,385236 237407,385227 237419,385213 237430,385193 237439, - 385174 237451,385170 237455,385169 237460,385171 237475,385181 237503,385190 237521, - 385200 237533,385206 237538,385213 237541,385221 237542,385235 237540,385242 237541, - 385249 237544,385260 237555,385270 237570,385289 237584,385292 237589,385291 237596,385284 237630))',3438) - ); - - st_createtopogeo ----------------------------- - Topology ri_topo populated - - --- create tables and topo geometries -- -CREATE TABLE ri.roads(gid serial PRIMARY KEY, road_name text); - -SELECT topology.AddTopoGeometryColumn('ri_topo', 'ri', 'roads', 'topo', 'LINE'); - - - See Also - , , + +, +, +, + + + @@ -1957,144 +2100,6 @@ and is thus usable to build edge ring linking. Topology Processing - - - TopoGeo_AddPoint - - -Adds a point to an existing topology using a tolerance and possibly splitting an existing edge. - - - - - - - integer TopoGeo_AddPoint - varchar toponame - geometry apoint - float8 tolerance - - - - - - Description - - -Adds a point to an existing topology and return its identifier. -The given point will snap to existing nodes or edges within given tolerance. -An existing edge may be split by the snapped point. - - - - Availability: 2.0.0 - - - - - - See Also - -, -, -, - - - - - - - - TopoGeo_AddLineString - - -Adds a linestring to an existing topology using a tolerance and possibly splitting existing edges. - - - - - - - integer TopoGeo_AddLineString - varchar toponame - geometry aline - float8 tolerance - - - - - - Description - - -Adds a linestring to an existing topology and return a set of edge identifiers forming it up. -The given line will snap to existing nodes or edges within given tolerance. -Existing edges may be split by the line. - - - - Availability: 2.0.0 - - - - - - See Also - -, -, -, - - - - - - - - TopoGeo_AddPolygon - - -Adds a polygon to an existing topology using a tolerance and possibly splitting existing edges/faces. - - - - - - - integer TopoGeo_AddPolygon - varchar atopology - geometry aline - float8 atolerance - - - - - - Description - - -Adds a polygon to an existing topology and return a set of face identifiers forming it up. -The boundary of the given polygon will snap to existing nodes or edges within given tolerance. -Existing edges and faces may be split by the boundary of the new polygon. - - - - Availability: 2.0.0 - - - - - - See Also - -, -, -, - - - - - Polygonize -- 2.40.0