Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Motorway only match - what rules are used? #84

Open
TyceHerrman opened this issue Aug 7, 2020 · 2 comments
Open

Motorway only match - what rules are used? #84

TyceHerrman opened this issue Aug 7, 2020 · 2 comments

Comments

@TyceHerrman
Copy link

My overall goal is to relate NYC LION, NYS Roadway Inventory System, and Here maps using sharedstreets. Starting with LION, my initial idea to improve matching is to pre-process LION using LION roadway attributes to create a network that closely resembles what the motorway only match for NYC would return. In essence, use a motorway only LION network in a sharestreets motorway only match. I tried looking through the code, but can't find what the motorway only match is using to determine links to use as motorways. Like the other filtering conditions in sharedstreets, is it also using OSRM? If so, is OSRM using OSM highway tag? And finally, if it is using the OSM highway tag, what values qualify as motorway (is it just motorway and motorway_link)? I'm pretty new to using OSM, sharedstreets, etc., so I suspect I may be missing something rather obvious. Thanks!

@TyceHerrman
Copy link
Author

After revisiting your code, it looks to me like you're using the OSM highway tag directly for defining roadclass. My follow up question then is whether assigning in this way also assigns the _link segments to the same roadclass. For instance, does assigning 'motorway' also assign 'motorway_link'?

@PaulTomchik
Copy link

It looks like RoadClass is determined using the OSM highway tag here: Way.roadClass()

Notice fields.get("highway").toLowerCase().trim().startsWith("motorway")).
I would say that motorway and motorway_link are assigned the same RoadClass because the startsWith method is used.

Links are apparently identified using fields.get("highway").toLowerCase().trim().endsWith("_link") in Way.isLink() and distinguished from non-links using FormOfWay.SlipRoad.

I would say that the ShstReferences fed to OSRM are determined using the RoadClass and the GraphMode here. I do not see any use of the FormOfWay there. I may be missing something, however.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants