I am just starting to get into PostGIS and pgRouting and stumbled upon the following problem: I imported a Network-Graph into my DB, and the routing inside of that Table (from node A to node B) works fine. However I would like to find a route between Points that are in another table (e.g. Customers and Shops). Can someone help me out on how to use Points (Nodes) from a different table than the network as start/end (or source/target)? Thanks
Asked
Active
Viewed 192 times
0
-
There could be multiple ways of doing this. But one solution is to have nearest_node field in your Customers or shops tables and populate it with the source column value of the network graph table nearest road segment and then pass those id value to your pgrouting as source and target field based on selection of shop or customer – Arun May 16 '21 at 11:38
-
thanks a lot for the response, took me some time to work it out but managed to do it! – afflicitor May 30 '21 at 09:51