From 0d15f43645dea11fff556aa29abfa5b38a19ea21 Mon Sep 17 00:00:00 2001 From: Sandro Santilli Date: Fri, 7 Dec 2012 08:31:04 +0000 Subject: [PATCH] Document new toTopoGeom override and clearTopoGeom git-svn-id: http://svn.osgeo.org/postgis/trunk@10811 b70326c6-7e19-0410-871a-916f4a2858ee --- doc/extras_topology.xml | 110 +++++++++++++++++++++++++++++++++++++--- 1 file changed, 103 insertions(+), 7 deletions(-) diff --git a/doc/extras_topology.xml b/doc/extras_topology.xml index 2a4e78a6e..75edaea99 100644 --- a/doc/extras_topology.xml +++ b/doc/extras_topology.xml @@ -2574,7 +2574,9 @@ UPDATE boston.blockgroups SET new_geom = topo::geometry; toTopoGeom - Creates a new topo geometry from a simple geometry + +Converts a simple Geometry into a topo geometry + @@ -2586,6 +2588,13 @@ UPDATE boston.blockgroups SET new_geom = topo::geometry; integer layer_id float8 tolerance + + + topogeometry toTopoGeom + geometry geom + topogeometry topogeom + float8 tolerance + @@ -2593,20 +2602,41 @@ UPDATE boston.blockgroups SET new_geom = topo::geometry; Description -Creates a topogeometry object for layer denoted by layer_id and registers it in the relations table in the toponame schema. +Converts a simple Geometry into a TopoGeometry. + + + +Topological primitives required to represent the input geometry will be +added to the underlying topology, possibly splitting existing ones, +and they will be associated with the output TopoGeometry in the +relation table. -Topological primitives required to represent the input geometry will be added, possibly splitting existing ones. -Pre-existing TopoGeometry objects will retain their shapes. +Existing TopoGeometry objects (with the possible exception of +topogeom, if given) will retain their shapes. -When tolerance is given it will be used to snap the input geometry to existing primitives. +When tolerance is given it will be used to snap the +input geometry to existing primitives. + + + +In the first form a new TopoGeometry will be created for the given +layer (layer_id) of the given topology (toponame). + + + +In the second form the primitives resulting from the conversion will be +added to the pre-existing TopoGeometry (topogeom), +possibly adding space to its final shape. To have the new shape completely +replace the old one see . Availability: 2.0 + Enhanced: 2.1.0 adds the version taking an existing TopoGeometry. Examples @@ -2638,13 +2668,79 @@ Topology topo_boston_test (5), SRID 2249, precision 0 61 nodes, 87 edges, 35 faces, 15 topogeoms in 1 layers Layer 1, type Polygonal (3), 15 topogeoms Deploy: public.nei_topo.topo + + +-- Shrink all TopoGeometry polygons by 10 meters +UPDATE nei_topo SET topo = ST_Buffer(clearTopoGeom(topo), -10); + +-- Get the no-one-lands left by the above operation +-- I think GRASS calls this "polygon0 layer" +SELECT ST_GetFaceGeometry('topo_boston_test', f.face_id) + FROM topo_boston_test.face f + WHERE f.face_id > 0 -- don't consider the universe face + AND NOT EXISTS ( -- check that no TopoGeometry references the face + SELECT * FROM topo_boston_test.relation + WHERE layer_id = 1 AND element_id = f.face_id + ); + + + + + + See Also + +, +, +, +, + + + + + + + + clearTopoGeom + + Clears the content of a topo geometry + + + + + + 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 = ST_Buffer(clearTopoGeom(topo), -10); + See Also - ,, -, + + + -- 2.50.1