Trying to find overlapping routes that have common and uncommon segment using shapely and gtfs file

115 Views Asked by At

I am working with a gtfs file new to this shapely library and I was wondering if anyone can advise me with the steps needed to lets say deal with overlapping routes which has both common(identical) and uncommon segments(non-identical) to calculate the overall distance of routes that passes through a bus stop. I have so far been trying to use the shapes file to get the lat and lon and create a linestring using the library. This idea could help me generally get a grasp of what I need to do. Thanks in advance

So far I am trying to merge all the routes using linestring and not sure if I have to use MultiLinestring as the stop may deal with multiple routes. I am using the lat and lon from the shapes file to make the line string for all the route ids that passes the bus stop. I am expecting to be able to calculate the overall length of the routes combined together for a bus stop and also avoid counting overalapping stops multiple times whether they have identical route segment or different one.

0

There are 0 best solutions below