Liverpool-UK / somebody-should

A place to collect issues/suggestions/to-do items for the city of Liverpool
10 stars 1 forks source link

Improve cycle route trip planning #34

Open amcewen opened 5 years ago

amcewen commented 5 years ago

Inspired by this rant about route-planning software and its link to this article about OpenTripPlanner, I wonder if it'd be useful to spin up a Liverpool instance of that trip planner?

I like the idea of multi-modal planning, which would let me plan a trip where I cycle some of the way and get the train some of the way - I do that quite a bit already, and it'd be nice to have an easier way to work out useful nearby stations for such trips.

Having tried the route planning in Osmand (Android OpenStreetMap app) recently to get to Southport, it seems to do a worse job than Google for finding things like the canal towpath and the Cheshire Lines path, so maybe that would give a simple test of how it's better (or /one/ test, at least)...

amcewen commented 4 years ago

Turned out not too hard to at least get an MVP...

  1. Created a Digital Ocean Ubuntu 2020.4 droplet with 4GB of memory (the 2GB worked, but it seems to prefer the extra headroom)
  2. ssh into that, then run:
    1. apt get update && apt get upgrade
    2. mkdir otp && cd otp
    3. apt install openjdk-14-jre-headless
    4. Get latest version of OpenTripPlanner: wget https://repo1.maven.org/maven2/org/opentripplanner/otp/1.4.0/otp-1.4.0-shaded.jar
    5. Download the Merseyrail GTFS data: wget https://s3.eu-west-2.amazonaws.com/feeds.planar.network/gb-rail-latest.zip
    6. Download the OpenStreetMap data for Merseyside: wget http://download.geofabrik.de/europe/great-britain/england/merseyside-latest.osm.pbf
    7. Start the server: java -Xmx1500M -jar otp-1.4.0-shaded.jar --build ~/otp --port 80 --securePort 443 --inMemory --analyst
  3. Then you can head to http://<IP address of your droplet> and you should have a trip planner!

For example, here's a route from DoES Liverpool up to South Park in Bootle, using both bike and rail:

image

It can only use trains at the moment, because I don't have GTFS feeds for the buses (see #29 for more on that). There is support for bike hire schemes too, and accessibility options (which presumably requires good accessibility data in OpenStreetMap)

I've left the instance running at trips.mcqn.com (try http://209.97.132.40 if the DNS hasn't propagated yet), but don't make any guarantees about its uptime :grin:

amcewen commented 4 years ago

The default time travel isochrone view is interesting too.

amcewen commented 4 years ago

Now there's an instance of OpenTripPlanner up and running we could spin up a Liverpool instance of Trufi, which is basically an open-source/open-data version of CityMapper

jodischneider commented 3 years ago

May be worth comparing to Openrouteservice, a service of Heidelberg University’s GIScience Research Group, also running on OpenStreetMap.