-
Notifications
You must be signed in to change notification settings - Fork 1
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
Add roadinfo=1 as default to queries? #7
Comments
Here is some background about roadinfo and here is a detailed documentation of all the possible fields we then return |
I'm seeing The position However, when querying it
we're not seeing "roadinfo" : {
"drive_on" : "right",
"lanes" : 2,
"maxspeed" : 140,
"oneway" : "yes",
"road" : "Autostrada Wolno\u015bci",
"road_reference" : "A2",
"road_reference_intl" : "E 30",
"road_type" : "motorway",
"speed_in" : "km/h",
"surface" : "asphalt"
}, Stabbing around on large roads north and south of Warsaw doesn't show any toll road, which may be a coincidence. |
great example, thanks. probably we need to adapt how we handle roads that are toll only for some classes of vehicles. investigating ... |
yes, that is the issue. It seems |
Breaking |
hmm, yes, that approach is good. I suppose multiple toll types - like your example - is then edit - not once in my life have I not mistyped "toll" as "tool" |
I personally would prefer an array:
but a comma-separated list would be fine if that's easier on your end. |
The good news is it seems toll status has much better coverage than it did a few years ago. Unfortunately it seems there is quite the range of options to include the case where only some types of vehicles pay a toll, or the total opposite, where all vehicles pay a toll, but certain types are excluded. So we need to do a bit of thinking about how to present this. |
ok I am now leaning towards something like
or
thoughts? |
Thinking aloud, that would permit something along these lines (in Python) which looks as though it's all there. lorry = False
if "included" in toll_type and "hgv" in toll_type["included"]:
lorry = True
if "excluded" in toll_type and "hgv" not in toll_type["excluded"]:
lorry = True So, yes, looks good to me. |
Well the issue is how to handle ambiguous data. For example we may simply have So I think you will need to program more defensively than that I am afraid. Welcome to OpenStreetMap |
ok, time to write lots of tests. Hopefully we will get this live tomorrow |
yes, of course |
ok, this is now live with one tweak. We decided to name the field The relevant docs are updated, post on the OpenCage blog coming in the next hour or so. |
Thank you, @freyfogle |
"roadinfo" : {
"drive_on" : "right",
"lanes" : 2,
"maxspeed" : 140,
"oneway" : "yes",
"road" : "Autostrada Wolno\u015bci",
"road_reference" : "A2",
"road_reference_intl" : "E 30",
"road_type" : "motorway",
"speed_in" : "km/h",
"surface" : "asphalt",
"toll" : "yes",
"toll_details" : {
"included" : [
"bus",
"hgv"
]
}
}, Looks good to me. |
As suggested by Ed.F in an email, it might be worth while for us to add
roadinfo=1
to reverse geo queries to OpenCage; as we use revgeod mainly for vehicles, we'd profit from this additional dataEd writes:
The text was updated successfully, but these errors were encountered: