Replies: 1 comment 2 replies
-
Beta Was this translation helpful? Give feedback.
2 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
was looking at this documentation:
https://docs.pgrouting.org/latest/en/pgr_analyzeGraph.html
All the examples show the notices, but non show the contents of the vertices table.
And it so happens that ein & eout are allways NULL (found out that those are filled with pgr_analyzeOneWay)
terrible, terrible
I want to deprecate the function mainly because it alters tables by adding indexes and columns that might be unwanted by the user And maybe the user does not have the rights to those tables.
To be able to get rid of the function lets see in detail how everything can be replaced.
The "normal" process
from here
Create the routing topology
instead of pgr_createTopology and/or pgr_createVerticesTable
Use these instructions
https://docs.pgrouting.org/dev/en/pgr_extractVertices.html#create-a-routing-topology
Note that the user is in charge of
This step gives control to the user on what columns the vertex table will have. In the example all columns returned by
pgr_extractVertices
are saved in the vertex table.Thus,
is no longer valid as the user is in charge.
Isolated segments
The value:
There has been an evolution with pgRouting, and now it has components family of functions,
Using pgr_connectedComponents
Note that it is more interesting to know the components than the isolated segments, because routing between components gives
EMPTY SET
as result regardless of the size of the componentsSaving is so desired (this is not done by
pgr_analyzeGraph
)Obtaining the number of isolated segments
Obtaining the segments that belong to all components:
obtain the
cnt
values (aka degree of the vertices) of the whole graphObtaining cnt values of the whole graph
Saving the values if desired on the vertex table and with the desired column name
Yet again,
is no longer valid as the user is in charge.
dead ends (aka leaf nodes on an undirected graph)
The value:
Can be obtained:
Not only that, it can be found which nodes are dead ends:
As degree is a characteristic of graph's nodes suppose that
pgr_degree
exist:gaps
To know how many gaps:
But information that is not given by the function is where are those gaps:
intersection
Can be calculated as follows:
But information that the function does not give is which edges cross each other
Ring geometries:
The value can be obtained as follows:
In case that there was a ring geometry, to know which on is it can be done as follows:
Conclusions
pgr_degree
to calculatecnt
(user decides if it is worth to save on vertex table)pgr_connectedComponents
to find out for disconnected components (routing between different components givesEMTPY SET
as resultST_isRing
to find ring geometries if needed because of other reasons that are not pgRouting concerns. (pgRouting functions do not care about the geometry information)Beta Was this translation helpful? Give feedback.
All reactions