I'm new to pgrouting and normally use ArcMap to conduct any sort of network analysis. I have created a simple shortest path network along a downloaded OS Mastermap road network using pgRouting. However, I am unsure of how to develop an applied Origin-Destination route using point data (i.e. weighted population, libraries, public transport points etc..).
Do I need to join the point data with the road network layer to create a single network? I understand that the create topology function assigns nodes along the road network which are used as Source and Target points, but this will be a large scale project and can't afford to write out the lat long for each point along the road network.
I have also tried to use something like this below using the Foss4G format, however it didn't work. This created a random line along the road network rather between two 'Areas of Interest'.
INTO School_to_School
FROM pgr_dijkstra(
'SELECT gid as id, source, target, length:: double precision AS cost
FROM bristol_roads',
(SELECT id FROM bristol_education WHERE ref_no = 115422069),
(SELECT id FROM bristol_education WHERE ref_no = 110687656), false) as dr
JOIN bristol_roads
ON dr.edge = bristol_roads.gid;
id
from your education layer is different from the nodeid
in the road layer so it starts and finishes from a "random" point. You need to "snap" to the nearest road node for the eductaion points