[pgrouting-users] Can pgr_connectedComponents be used to find isolated vertices?

glad.pen2421 at fastmail.com glad.pen2421 at fastmail.com
Wed Aug 2 10:58:12 PDT 2023


Thank you Regina, noted!

/GP

On Wed, 2 Aug 2023, at 19:56, Regina Obe wrote:
> I would say yes.  If you have multiple components, then those components are not reachable from each other.
>  
> Note this is only considering an undirected graph.
>  
> If you have a directed graph, use pgr_strongComponents instead https://docs.pgrouting.org/latest/en/pgr_strongComponents.html
>  
>  
>  
>  
> *From:* Pgrouting-users [mailto:pgrouting-users-bounces at lists.osgeo.org] *On Behalf Of *glad.pen2421 at fastmail.com
> *Sent:* Wednesday, August 2, 2023 12:40 PM
> *To:* pgrouting-users at lists.osgeo.org
> *Subject:* [pgrouting-users] Can pgr_connectedComponents be used to find isolated vertices?
>  
> Dear fellow pgRouting users,
>  
> As per the description of `pgr_connectedComponents`, it runs a breadth-first search to find sets of vertices "that are all reachable from each other".
>  
> Does that mean that if `pgr_connectedComponents` results in more than one connected component, some vertices are definitely not reachable from each other?
>  
> Can this be a way to guarantee that with more than 1 connected component it is guaranteed that algorithms like `pgr_dijkstra` will definitely fail on some pairs of vertices?
>  
> Thank you.
>  
> GP
>  
>  
> _______________________________________________
> Pgrouting-users mailing list
> Pgrouting-users at lists.osgeo.org
> https://lists.osgeo.org/mailman/listinfo/pgrouting-users
> 
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/pgrouting-users/attachments/20230802/9aea8dcb/attachment.htm>


More information about the Pgrouting-users mailing list