0

I have a network I downloaded from OpenStreetMap. I created bus station points on it and I want to create segments between each two successive stations, each segment with a start_station & an end_station. I tried with the network plugin in QGIS,but it takes too long and the software stopped responding.
I created a small network and it worked but not the way I described, it just cuts the lines.
Is there any way to automatically create segments with start and end information (I have an empty segment table) ?
I'm using PostgreSQL & QGIS.

  • 1
    as you found out yourself, splitting lines is relatively easy; working out the segments order and station references however is the tough one here. without knowing what you have done exactly, I say you´d at least need to (manually) order the stations per bus line via consecutive numerical attribute. that way, you might be able to implement a start-end reference for your segments. how many bus stations and individual lines are we talking about? also, where did you get the OSM data from, how does your table structure look like? – ThingumaBob Mar 21 '18 at 12:54
  • also, what versions of QGIS, PostgreSQL and (I hope I assume correctly that you have installed) PostGIS do you use? – ThingumaBob Mar 21 '18 at 13:01
  • I'm using QGIS 2.18 and PostgreSQL 10.2. I have arround 300 bus stations, the lines are over 10 000 from OSM website, there is a lot of little lines, I tried to dissolve them into one feature but it still doesn't work. AS for tables I got Stations with ID & Name (thinking about adding a direction column but not sure if it will be useful for pgRouting), for Segments, I have ID, Start_station, End_station and Line. Thank you. – Ayogo Mar 21 '18 at 15:47

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.