2

I have a polyline dataset of transit routes for my city. Around the transit stations, up to hundreds of routes overlap completely, but do not follow the correct path that the busses actually travel (possibly due to gps errors). I am trying to correct this and topologically align these segments to a city road network. the dataset in it's raw form is too inaccurate to automatically align via a tool such as the Integrate tool in ArcGIS Desktop.

Attempts at moving the vertices of multiple features simultaneously in ArcGIS Desktop using map topologies or the align features to shape tool resulted in the creation of multipart features, altered the direction of the lines, and in general, ruined the geometry of the lines. the digitization direction of each route is important for routing applications with the dataset.

In QGIS I could simply select overlapping vertices and move them together. This did not produce multipart features and preserved direction. However, the lines in their raw form do not have enough vertices to accurately be aligned to the road network.

Is there a way I can approach this, such as adding vertices to multiple overlapping polylines at the same time in QGIS?

I cannot fully automate this job, as the raw data is too misaligned from the road network.

  • maybe one of the densify tools will help you gis.stackexchange.com/questions/197174/… – csk Mar 4 at 16:22
  • was the network constructed from GTFS? – Marshall Mar 4 at 17:06
  • it was, yes. but its the route shapes, not the network dataset. – Alex Mar 4 at 18:01
  • I work with GTFS a lot and when you say "hundreds of shapes that overlap completely" I would like to suggest filtering the route selection since there are no doubt multiple representations of each route found in that collection. an important question is if you need every single route shape in the dataset or just routes that run on Monday morning, for example. gtfs can even have school bus routes in those shapes. I have a solution for cleaning GTFS route shapes and even building a road network out of GTFS, but it is all in python/postgis/pyscopg2. let me know if you would like to see it. – Marshall Mar 5 at 4:29
  • the client basically wants every route shape and every pattern of each route corrected. in the GTFS dataset I'm working with., there is no SHAPES column in the trips table, meaning that these shapes are essentially disconnected from the rest of the GTFS in any meaningful way. I would be interested in what you have though, please show me! – Alex Mar 5 at 22:16
0

You can use the GRASS v.split function and turn on the option to add vertices without actually splitting the line. Here is a screenshot of the tool.

enter image description here

  • so this works just like a densify tool then, right? Is there any way I can have it apply without making a new layer? densify + topological editing is working well for me so far but all the extra vertices are slowing down my computer – Alex Mar 4 at 16:54
  • You could say it is densifying a line according to a segment length parameter. For your second question, it seems that GRASS tools do not benefit from the "Edit features in place" processing option, which means the output is saved as a new layer. As to your computer slowing down, it really depends on the size of your data and how it is stored. Is it in a shapefile or in a database such as PostGIS or some other format? – Techie_Gus Mar 4 at 17:04
  • yeah, like the densify by interval tool! I think it probably would be better to store this in a postgis database. thanks! doesn't look like there's a way to directly add in vertices at specified points to multiple lines at the same time, but i can always densify then simplify – Alex Mar 4 at 17:13
  • Do you mean to interactively add points by clicking on the lines in the map view? – Techie_Gus Mar 4 at 17:16
  • 1
    Or you could use the advanced digitzing split tool to draw a line that crosses all your relevant lines but you will have to merge each 2 parts of the line together, which could potentially turn out to be a tedious task. I don't know of an automated way of doing that, except with probably some PyQGIS code which is not within my skillset. – Techie_Gus Mar 4 at 18:12

Your Answer

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.