I am a beginner in pgrouting. I have two tables in my postgres database. A street table, where each segment (see red line) carries an Id (ogc_fid
). Additionally I have a nodes table (see brown points below). Each point also carries a unique Id (ogc_fid
). The nodes below do not intersect at overpasses and underpasses.
Based on the nodes table I want to find the shortest path. However, first I have to assign the nodes ID as source and target node to my street table. And split the streets based on the nodes. (so that each segment is connected to a source and target node from the nodes table)
However, when I use following example from the tutorial pgrouting create topology
SELECT pgr_createTopology('streets',0.001,'geom','ogc_fid','source','target');
The results are worse, because it doesn’t node the graph correctly (see below) and additionally it nodes overpasses and underpasses. This is why I want to use my nodes table instead of the automatically generated verticesstreets_verticec_pgr
My question: Is there a way to assign the ogc_fid
from the nodes table as source and target value to my streets table based on the digitized direction? Does anyone have useful links related to this issue?