UrbanAnalyst / gtfsrouter

Routing and analysis engine for GTFS (General Transit Feed Specification) data
https://urbananalyst.github.io/gtfsrouter/
84 stars 17 forks source link

gtfs distances function #95

Open mpadge opened 1 year ago

mpadge commented 1 year ago

Develop an algorithm to return a distance, rather than time, matrix between all stops in a GTFS feed. Primary advantage is the ability to assess the overall "speed" of a network, through examining dependence of time on distance.

This should use shape data where such is provided, but it's generally not, so can use ˋosmdataˋ anywhere shape data is not provided. The routine will have to construct a bunch of sub-matrices for each modal type. These modes are given in the "route_type" field of the "routes" table, and currently include:

  1. tram
  2. subway
  3. rail
  4. bus
  5. ferry
  6. cable tram
  7. aerial lift, suspended cable car
  8. funicular
  9. trolley bus
  10. monorail

These modalities will have to be matched to OSM keys/values, and corresponding data extracted for each feed. Distances within each mode can then be calculated using the resultant modal network. Distances between modes will require matching stops for destination modes on to stops for origin modes, and calculating corresponding distances within the origin-mode network. All of these pieces will then have to be inserted into the resultant distance matrix.