[pgrouting-users] pass query results to routing function

Hugh Kelley hghklly at gmail.com
Mon May 9 12:22:11 PDT 2022


Hi,


I'm wondering if anyone has an example of a query that calculates routes
between pairs of nodes  that is a subset of all the possible pairs in the
network.

I have a network with ~5297 nodes, for ~28 million possible pairs. I could
calculate routes for all of these pairs and then use the subset of routes
that i need, but it seems that there could be a way to calculate only
routes for the ~17 thousand pairs I actually care about.  If possible I
would filter to only calculate pairs where the origin node is
ST_DWITHIN(a.geom, b.geom, 250), for example.

is there a way to pass the results of a query to the pgr_dijkstra()
function? I haven't seen an example of that as I've read through the docs.
is there a way to apply a condition like st_diwthin() to the arrays passed
to the function?

thanks for any advice or suggestions, hope everyone's week is off to a good
start.

Hugh
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/pgrouting-users/attachments/20220509/9909df0b/attachment.htm>


More information about the Pgrouting-users mailing list