matsim-org / matsim-libs

Multi-Agent Transport Simulation
www.matsim.org
491 stars 450 forks source link

Refine OSM parsing for bicycles #3318

Open JWJoubert opened 5 months ago

JWJoubert commented 5 months ago

From the OSM Wiki (S6 lower down the page), stairs can be tagged to include (or not) a ramp for bicycles. We want to add this check for ramps.

Two possibilities:

  1. We exclude stair links that are not explicitly tagged with ramp:bicycle=yes, or
  2. We include stairs and only omit those stair links where it is tagged ramp=no.

I would prefer (1), but I would like your input, specifically referring to @dziemke.

marecabo commented 5 months ago

My preference is also 1. By default, I would rather consider them an obstacle for bike.

dziemke commented 5 months ago

Thanks @JWJoubert I also think that 1 is the better option, as this option is directly using the given data, not be based on any implicit assumption. I would also expect that stairs without any ramp specification on OSM will by tendency not have a ramp in reality.

JWJoubert commented 5 months ago

A quick update. I replaced here and here the OsmTags.STEPS with OsmTags.RAMP and OsmTags.RAMP_BICYCLE, but now a test fails: org.matsim.contrib.osm.networkReader.OsmBicycleReaderIT#test_andorra()

However, and I would like @Janekdererste to just confirm, the test file expected-result.xml.gz is not correct since there are many steps that are now considered navigable by bicycle where I would argue they're not (except, maybe, with a helmet and serious skills). Some examples:

Is it fine to just replace the expected results? 🤣