0

I am using pgRouting with a street network. I added lines to the network that represent straight lines from destination points I am interested to the nearest street using ST_ShortestLine(). Now I ran pgr_nodeNetwork() to split the street network accordingly, so that it is ready for basic routing. However, when I run pgr_createTopology() the vertices are not all included to have efficient routing:

select pgr_createTopology('my_table_wgs84', 0.0001, 'geom', 'street_id');

Here is a screenshot, which shows that for the highlighted red line, there are actually no vertices (red rectangles) created at all (plus you see that the connection line I created from the green destination point is actually splitted into several sublines by pgr_nodeNetwork):

enter image description here

For the red line, for instance, the source and target is both the red rectangle you see in the bottom left. What might be the issue that pgr_createTopology don't create vertices everywhere a line ends?

1
  • If you think this is a bug, would you be able to prepare a reproducable example and file an issue on the pgRouting Github account? We can then take a look if it's a data problem or a mistake in the query or a bug: github.com/pgrouting/pgrouting – dkastl Nov 27 '20 at 0:18

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.