From: Regina Obe Date: Sat, 26 Feb 2011 04:22:20 +0000 (+0000) Subject: cealn up examples and data type mistake X-Git-Tag: 2.0.0alpha1~1932 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=c32b8c5900bccb8205273203762e62c0d8748afb;p=postgis cealn up examples and data type mistake git-svn-id: http://svn.osgeo.org/postgis/trunk@6869 b70326c6-7e19-0410-871a-916f4a2858ee --- diff --git a/doc/extras_topology.xml b/doc/extras_topology.xml index ad75fff5c..75d2cbe12 100644 --- a/doc/extras_topology.xml +++ b/doc/extras_topology.xml @@ -970,7 +970,7 @@ SELECT topology.AddTopoGeometryColumn('ri_topo', 'ri', 'roads', 'topo', 'LINE'); integer GetEdgeByPoint - text atopology + varchar atopology geometry apoint float8 tol @@ -998,16 +998,25 @@ SELECT topology.AddTopoGeometryColumn('ri_topo', 'ri', 'roads', 'topo', 'LINE'); Examples - - SELECT topology.GetEdgeByPoint('ma_topo',ST_GeomFromEWKT('SRID=26986;POINT(227591.9 893900)'), 0.001::float8) As result; - SELECT topology.GetEdgeByPoint('ma_topo',ST_GeomFromEWKT('SRID=26986;POINT(227622.6 893844.2)'), 0::float8) As result; + These examples use edges we created in + SELECT topology.GetEdgeByPoint('ma_topo',geom, 1) As with1mtol, topology.GetEdgeByPoint('ma_topo',geom,0) As withnotol +FROM ST_GeomFromEWKT('SRID=26986;POINT(227622.6 893843)') As geom; + with1mtol | withnotol +-----------+----------- + 2 | 0 + + SELECT topology.GetEdgeByPoint('ma_topo',geom, 1) As nearnode +FROM ST_GeomFromEWKT('SRID=26986;POINT(227591.9 893900.4)') As geom; + +-- get error -- +ERROR: Two or more edges founded See Also - + , @@ -1022,7 +1031,7 @@ SELECT topology.AddTopoGeometryColumn('ri_topo', 'ri', 'roads', 'topo', 'LINE'); integer GetNodeByPoint - text atopology + varchar atopology geometry point float8 tol @@ -1049,16 +1058,26 @@ SELECT topology.AddTopoGeometryColumn('ri_topo', 'ri', 'roads', 'topo', 'LINE'); Examples - - SELECT topology.GetNodeByPoint('ma_topo',ST_GeomFromEWKT('SRID=26986;POINT(227575.8 893917.4)'), 1) As result; - SELECT topology.GetNodeByPoint('ma_topo',ST_GeomFromEWKT('SRID=26986;POINT(1 4)'), 0) As result; + These examples use edges we created in + SELECT topology.GetNodeByPoint('ma_topo',geom, 1) As nearnode + FROM ST_GeomFromEWKT('SRID=26986;POINT(227591.9 893900.4)') As geom; + nearnode +---------- + 2 + + SELECT topology.GetNodeByPoint('ma_topo',geom, 1000) As too_much_tolerance + FROM ST_GeomFromEWKT('SRID=26986;POINT(227591.9 893900.4)') As geom; + + ----get error-- + ERROR: Two or more nodes founded + See Also - GetEdgeByPoint + ,