pgr_pointsToVids - Proposed¶
Name¶
pgr_pointsToVids - Converts an array of point geometries into vertex ids.
Warning
These are proposed functions
- They are not officially of the current release.
- They likely will not be officially be part of the next release:
- The functions might not make use of ANY-INTEGER and ANY-NUMERICAL
- Name might change.
- Signature might change.
- Functionality might change.
- pgTap tests might be missing.
- Might need c/c++ coding.
- May lack documentation.
- Documentation if any might need to be rewritten.
- Documentation examples might need to be automatically generated.
- Might need a lot of feedback from the comunity.
- Might depend on a proposed function of pgRouting
- Might depend on a deprecated function of pgRouting
Synopsis¶
Given an array of point geometries and an edge table and a max search tol distance the function converts points into vertex ids using pgr_pointtoedgenode().
The function returns:
- integer[] - An array of vertex_id.
integer[] pgr_pointsToVids(pnts geometry[], edges text, tol float8 DEFAULT(0.01))
Description¶
Parameters
pnts: | geometry[] - An array of point geometries. |
---|---|
edges: | text - The edge table to be used for the conversion. |
tol: | float8 - The maximum search distance for locating the closest edge. |
Warning
You need to check the results for any vids=-1 which indicates if failed to locate an edge.
History
- Proposed in version 2.1.0
Examples¶
SELECT * FROM pgr_pointstovids(
pgr_texttopoints('2,0;2,1;3,1;2,2', 0),
'edge_table'
);
NOTICE: Deperecated function: pgr_textToPoints
pgr_pointstovids
------------------
{1,2,3,5}
(1 row)
This example uses the Sample Data network.
See Also¶
- pgr_pointToEdgeNode - Proposed - convert a point geometry to the closest vertex_id of an edge..
Indices and tables