]> granicus.if.org Git - postgis/commitdiff
Add note about toTopoGeom
authorSandro Santilli <strk@keybit.net>
Tue, 13 Mar 2012 09:17:46 +0000 (09:17 +0000)
committerSandro Santilli <strk@keybit.net>
Tue, 13 Mar 2012 09:17:46 +0000 (09:17 +0000)
git-svn-id: http://svn.osgeo.org/postgis/trunk@9481 b70326c6-7e19-0410-871a-916f4a2858ee

topology/README

index 4737f4e1d13adb69451a5edabe9861c24bc3d6c1..a2d17683dcf9e75889a8b625b459af5d51ecafb7 100644 (file)
@@ -170,13 +170,26 @@ For Hierarchical TopoGeometry objects this would be:
 
        {{child_layer_id, topogeoemtry_id}, ...}
 
-==Getting simple Geometry values from TopoGeometry objects
+==Converting Geometry to TopoGeometry while populating the topology
+
+You can import a Geometry into an existing topology and at the same
+time get its topological definition (its TopoGeometry equivalent)
+using the toTopoGeom function:
+
+    topology.toTopoGeom(
+
+        geometry, -- the simple geometry
 
-You currently need to explicit call the TopoGeometry=>Geometry
-cast function. This will probably be made implicit when the
-code is more tested:
+        topology_name,
+
+        layer_id -- as returned by AddTopoGeometryColumn
+    );
+
+==Getting simple Geometry values from TopoGeometry objects
 
-       SELECT topology.Geometry(TopoGeometry);
+TopoGeometry to Geometry casting is implicit, so any function accepting
+a Geometry would transparently also accept a TopoGeometry. Some functions
+may be optimized for TopoGeometry.
 
 =Issues