From: Regina Obe Date: Fri, 25 Feb 2011 23:01:51 +0000 (+0000) Subject: doucmentation for #791 , #793 - GetNodeByPoint, GetEdgeByPoint -- made some changes... X-Git-Tag: 2.0.0alpha1~1934 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=5838841bfd854b2c8ff85e4c6084e4b53397945b;p=postgis doucmentation for #791 , #793 - GetNodeByPoint, GetEdgeByPoint -- made some changes to Andrea Peri's wording and change ot examples so they really fall in MA. Still need to output results. git-svn-id: http://svn.osgeo.org/postgis/trunk@6867 b70326c6-7e19-0410-871a-916f4a2858ee --- diff --git a/doc/extras_topology.xml b/doc/extras_topology.xml index 485cc3848..deefe1ab8 100644 --- a/doc/extras_topology.xml +++ b/doc/extras_topology.xml @@ -959,6 +959,109 @@ SELECT topology.AddTopoGeometryColumn('ri_topo', 'ri', 'roads', 'topo', 'LINE'); TopoGeometry and other Topology Object Accessors + + + GetEdgeByPoint + + Find the edge-id of an edge that intersects a given point + + + + + + integer GetEdgeByPoint + text atopology + geometry apoint + float8 tol + + + + + + + Retrieve the id of an edge that intersects a Point + + The function returns an integer (id-edge) given a topology, a POINT and a tolerance. If tolerance = 0 then the point has to intersect the edge. + If the point is the location of a node, then an exception is thrown. To avoid this run the GetNodeByPoint function. + If there isn't any edge available in the Point, it returns 0 (zero). + If use tolerance > 0 and there is more than one edge near the point then an exception is thrown. + + + + + If tolerance = 0, the function use ST_Intersect otherwise use the ST_DWithin. + + + Availability: 2.0.0 - requires GEOS >= 3.3.0. + + + + + 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; + + + + + See Also + + + + + + + + GetNodeByPoint + + Find the id of a node at a point location + + + + + + integer GetNodeByPoint + text atopology + geometry point + float8 tol + + + + + + + Retrieve the id of a node at a point location + + The function return an integer (id-node) given a topology, a POINT and a tolerance. If tolerance = 0 mean exactly intersection otherwise retrieve the node from an interval. + If there isn't a node at the point, it return 0 (zero). + If use tolerance > 0 and near the point there are more than one node it throw an exception. + + + + + If tolerance = 0, the function use ST_Intersect otherwise use the ST_DWithin. + + + Availability: 2.0.0 - requires GEOS >= 3.3.0. + + + + + 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; + + + + + See Also + + GetEdgeByPoint + + + GetTopoGeomElementArray