matsim-org/matsim-code-examples

Osm_way_id speeds do not match osm tag speed or default speed of highway type

subrina0013 opened this issue · 3 comments

I am trying to understand why the osm_way_ids in my network do not match with what is in https://github.com/matsim-org/matsim-libs/blob/97f655596ca6961d12f268cde1bec9bd0389ce85/contribs/osm/src/main/java/org/matsim/contrib/osm/networkReader/LinkProperties.java#L30-L33. For example: I have residential links that have different speed limits where it should be 15 km/hr? Why is that? If the osm ids have different speed, then what is the point of setting the default speed? And based on what the speed is changing?

image

The freespeed is set here during the conversion process which calls this method which tries to parse the osm speed tag.

The freespeed is then set to something lower than the original speed tag here in case it is an urban link. The heuristic to decide whether it is an urban link is European centric, as it simply tests for a speed lower than 50km/h. The freespeed is reduced to account for things like traffic lights and intersections in urban contexts, as these things are usually not explicitly modelled in MATSim.

For 'non-urban' links the freespeed is taken from the osm tag.

In case we don't have a speed tag in osm, the default speed from the link properties you have found is used here. This method again applies some heuristic to reduce the speed on links the converter considers 'urban links'.

So, step1: original speed is obtained from osm tag
step2: check if it is urban or not. If urban then reduce, if not then original osm tag
step3: calculate for unknown speed tag with length of that link.
so, where in these steps the assigned speed limits (from MATSim) stands? only for calculating if the original speed is unknown?

image

Yes, the freespeed from LinkProperties is only used in case there is no speed limit tag in osm.