ad-freiburg / pfaedle

Precise map-matching for public transit feeds. Generates high-quality GTFS shapes from OSM data.
GNU General Public License v3.0
206 stars 29 forks source link

highway=service too penalized? #29

Closed hbruch closed 6 months ago

hbruch commented 3 years ago

We are using pfaedle with the standard pfaedle.cfg to calculate shapes for the VVS GTFS feed ( including -D to recalculate all shapes).

In the resulting shapes, there is a gap between the stops at Herrenberg station (e.g. de:08115:4512:5:B) and the generated shapes. It looks like the service roads to pass by the actual stop might be too heavily penalized(?).

grafik

I'm trying to figure out, which config change might be neeeded here and am unsure how it works exactly.

My reasoning until here:

Aeris1One commented 6 months ago

Can reproduce here with this dataset. (correct road in yellow)

image

I couldn't figure out a correct config :/

patrickbr commented 6 months ago

Can reproduce here with this dataset. (correct road in yellow)

In your case, the problem is an incorrectly mapped roundabout here: https://www.openstreetmap.org/way/603098876

The lower part of the roundabout is mapped in the wrong direction. junction=roundabout is by default a one-way street, and the geometry must be mapped in the direction of travel, see here.

You can actually see this when you look at the roundabout on the rendered map, the arrow in the lower part goes in the wrong direction. Coming from the bus=designated road, you thus cannot enter the roundabout without entering a one-way street in the wrong direction.

You can either fix this in OSM, or lower the penalty for using a one-way street with the options osm_one_way_speed_penalty_fac and osm_one_way_entry_cost.

I'm trying to figure out, which config change might be neeeded here and am unsure how it works exactly.

The rules are as follows:

  1. Any OSM object with a matching attribute listed in osm_filter_keep will be kept.
  2. Then the lowest level (beginning at 0) with a matching attribute will be assigned.
  3. Only one level is assigned to each edge.

Note that other penalties (for example, full turns, one-way streets, turn restrictions) may be present.