3

Right now I am working on a project related with the german railway network. I have a layer call "Stops_1_2" which contains the trip id, the stop sequence and the name of the station. I have another layer called "Railway_Germany" which I got from the Deutsche Bahn. I would like to create routes based on the common field trip_id and based on the network "Railway_Germany" so that I can get paths on the real network and not just straight lines.

I don't know how to adress this problem. I tried using shortes path ('Point to Point') but the problem is that I can only choose two points and I have a lot of data to do that manually.

This is the attribute table of my point layer....so what I need is for example create a for trip_id=10 following its stop_sequence, then create another route for trip_id=100 following the stop sequence and another route for trip_id=1001 following the stop sequence and so on that I cover all my trip_id.

attribute_table

This is my railway network and the stops

layers

Is there a way to this on QGIS? Like I said I am new using QGIS and my programming skills are not good at all. (If there is maybe a solution with other software (like ArcMap) it would be helpful also)

Taras
  • 32,823
  • 4
  • 66
  • 137
  • 1
    As a light workaround you may try using 'Points to path' with "trip_id" as a Group field and "stop_sequence" as a Order field. Then creating a buffer around those paths and afterwards selecting from "Railway Germany" within those buffers. – Taras Nov 06 '20 at 07:26
  • Maybe check these threads https://gis.stackexchange.com/q/76710/99589, https://gis.stackexchange.com/questions/56575/how-to-route-railcars-along-railroads – Taras Nov 06 '20 at 07:30
  • Also check this article https://anitagraser.com/2013/10/19/a-routing-script-for-the-processing-toolbox/. Before applying a script you can additionally break your point layer into groups of points with Split Vector Layer. – Taras Nov 06 '20 at 07:32
  • I tried but the problem is that I got straight lines that are sometime do cross a lot features of my network that I dont need....I mean...I have route A_1 that for example Start in city A then go the B thne to C and the D...but then I have route A-2 with the same star at A and the end at D without the stops in between...points to path generates this straight line between A-D and the output just crosses a lot of features that I dont need... – Bastian Radler Nov 06 '20 at 07:33
  • Thank you very much. I will look at the links you sent!! – Bastian Radler Nov 06 '20 at 07:33
  • Also do not forget about GRASS GIS in the Processing Tool, they have many good libraries for network analysis, e.g. v.net – Taras Nov 06 '20 at 07:39

0 Answers0