graphhopper / graphhopper

Open source routing engine for OpenStreetMap. Use it as Java library or standalone web server.
https://www.graphhopper.com/open-source/
Apache License 2.0
5.05k stars 1.57k forks source link

Regression to Public transit isochrones generation introduced in 3.0 #2341

Closed gcheval closed 3 years ago

gcheval commented 3 years ago

Describe the bug A regression was introduced to the generation of public transit isochrones in PR #2290.

Depending of the location where the isochrone starts, the code will generate an invalid polygon.

To Reproduce

Steps to reproduce the behavior. For examples:

  1. Checkout commit # 9a0a032e0440d26a1b9f2c7c071192739bb559e7.
  2. Download PBF: https://download.geofabrik.de/north-america/us/district-of-columbia-latest.osm.pbf
  3. Download GTFS: https://demo.transit.land/api/v2/rest/feed_versions/81e47cffd9a6df6ed30257f3b58bac3a6a547cbb/download
  4. run java -Ddw.graphhopper.datareader.file=district-of-columbia-latest.osm.pbf -Ddw.graphhopper.gtfs.file=81e47cffd9a6df6ed30257f3b58bac3a6a547cbb.zip -jar *.jar server config-example.yml
  5. Get query http://localhost:8989/isochrone-pt?pt.earliest_departure_time=2021-05-01T12:00:00Z&time_limit=2000&point=38.8979,-77.0351

Expected behavior The isochrone generated should be valid and relevant.

Screenshots & Logs

karussell commented 3 years ago

Thanks for reporting this. Unfortunately our tests did not caught this - do you have a reproducer? And does it work with these changes? (Please note that in this branch profiles are required, see the changes in pt config)

A temporary workaround could be to disable subnetwork removal.

gcheval commented 3 years ago

@karussell Hey Peter,

I'm still seeing an invalid polygon with issue_2341 branch.

To reproduce, I'm using district-of-columbia-latest.osm.pbf and 81e47cffd9a6df6ed30257f3b58bac3a6a547cbb.zip GTFS file.

My config:

graphhopper:
  graph.flag_encoders: foot,car
  profiles:
    - name: foot
      vehicle: foot
      weighting: fastest
    - name: car
      vehicle: car
      weighting: fastest
  profiles_ch:
    - profile: foot
    - profile: car
  profiles_lm: []

My query: http://localhost:8989/isochrone-pt?pt.earliest_departure_time=2021-05-01T12:00:00Z&time_limit=2000&point=38.8979,-77.0351

Tell me if there's anything else I can do to assist.

Thanks!

Guillaume

gcheval commented 3 years ago

Hey @karussell, I've created a PR #2342 towards this one. It seems like combined with your changes, it fixes the PT isochrones generation.

karussell commented 3 years ago

Thanks! See #2343 where your changes are merged.

Now we only need a small test that catches this (preferable without the need to add a different data set :) ). Will see if I can find it :)