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

Country/locale-specific road marking colors #389

Open
matkoniecz opened this issue Nov 14, 2020 · 8 comments
Open

Country/locale-specific road marking colors #389

matkoniecz opened this issue Nov 14, 2020 · 8 comments
Labels
backlog Not working on it anytime soon

Comments

@matkoniecz
Copy link
Contributor

streetcomplete/StreetComplete#2269 - it is just a PR for now, but by the author and seems to be basically complete, so it should appear soon (posting here early, not after it was released as maybe someone would be interested in reviewing it)

So surveying with StreetComplete will become more useful for people using AB maps of places where they live.

@dabreegster
Copy link
Collaborator

This is awesome! Any thoughts on how different parts of the ecosystem should fit together? The goal is to get lane tagging more accurate. abst can help visualize the tags, and now StreetComplete can too, with editing. One low-priority idea I've had is to expand abst's parking mapper and have some basic lane mapper too. But the less work to do, the better. Potentially abst can export its rendered maps as something like Mapbox vector tiles, so that other parts of the OSM ecosystem could display them as one layer. Not sure if StreetComplete supports showing different basemaps, but that could be one way to make the overall lane auditing experience smoother.

@matkoniecz
Copy link
Contributor Author

matkoniecz commented Nov 14, 2020

This is awesome! Any thoughts on how different parts of the ecosystem should fit together?

I have no big ideas right now, beyond improving discoverability of various parts of OSM ecosystem. Maybe A/B Street can advertise StreetComplete on loading screen? Though given Seattle focus it probably should be made clear that it is Android-only.

I also opened streetcomplete/StreetComplete#2271

Not sure if StreetComplete supports showing different basemaps, but that could be one way to make the overall lane auditing experience smoother.

Data vizualisation is planned in SC though as I understand @westnordost is not planning to use separate basemap for each vizualisation but render it from raw OSM data (I may be mistaken, maybe ping will summon him).

Also, based on experience from streetcomplete/StreetComplete#1700 streetcomplete/StreetComplete#1011 streetcomplete/StreetComplete#1508 streetcomplete/StreetComplete#1687 streetcomplete/StreetComplete#1348 streetcomplete/StreetComplete#1032 and more of similar "map server is down" - maintaining server providing data tiles is quite involved sysadmin work.

@westnordost
Copy link

westnordost commented Nov 19, 2020

Not sure if I should post this here or a separate ticket. Please tell me if I should.

I noticed that in different countries, the center line and the shoulder lines will have different colors. I researched a bit and recorded it in this

https://github.com/westnordost/StreetComplete/blob/master/res/country_metadata/shoulderLine.yml
https://github.com/westnordost/StreetComplete/blob/master/res/country_metadata/centerLine.yml

You might also be interested in:
https://github.com/westnordost/StreetComplete/blob/master/res/country_metadata/isCenterLeftTurnLaneKnown.yml
https://github.com/westnordost/StreetComplete/blob/master/res/country_metadata/isLeftHandTraffic.yml

You may use these under the Apache license.

@westnordost
Copy link

westnordost commented Nov 19, 2020

And in that folder, there may be other data you may find useful, such as in which countries living streets (= pedestrians have right of way over cars), cycle streets (= cyclists have right of way over cars, at least), "slow zones" etc are known.

If you are interested, I could also outsource this data into an own repository.

@dabreegster
Copy link
Collaborator

I noticed that in different countries, the center line and the shoulder lines will have different colors. I researched a bit and recorded it in this

Thank you for forwarding these! This will help with i18n. There are a few other configuration choices based on country, like showing metric or imperial units by default. A/B Street imports from .osm extracts that don't usually include administrative boundaries for countries, so figuring out the country code is a challenge. Currently per-area config is hardcoded, like this. As part of this issue, I'll add a config option to change the lane rendering colors.

which countries living streets (= pedestrians have right of way over cars)

For this, I've been trusting the highway=living_street tag, which is now being used in the US a bit.

If you are interested, I could also outsource this data into an own repository.

This could eventually be convenient! I'll investigate options for pulling in data from a separate git repository; perhaps submodules. For the moment, determining country code is a blocker before using the YAML files.

Something that might be useful to SC is the current mapping from a way's tags to the list of lane types, ordered from the left side of the road to right. The code is lengthy, but hopefully straightforward. Things like lanes=1.5 are not handled; based on the current discussions happening, I might treat it the same as narrow=yes and just reduce the lane width. The tests might be more useful than the code. If different OSM consumers agreed on some description of lanes, I think a shared set of rules for determining lanes from tags could be a useful "standard" to exist. (And I'll note A/B Street's current rules are far from correct, especially not handling footpaths, tramways, cyclepaths, etc mapped separate from main roads.)

@westnordost
Copy link

Okay, in case you are interested, I wrote a reverse country offline geocoder in Java that can return the ISO country code of any given location. https://github.com/westnordost/countryboundaries
It's a very small library with no dependencies, so it should be quite straightforward to port it to Rust.

If you do use a SQL database with spatial capabilities/extensions, it gets even easier. I wrote the same in PHP recently, well, it's not that much PHP but actually mostly SQL commands, see here:
https://github.com/westnordost/sc-statistics-service/blob/master/classes/ReverseCountryGeocoder.class.php

For this, I've been trusting the highway=living_street tag, which is now being used in the US a bit.

Sure, I was thinking in terms of whether the user should have the possibility to select it at all in the UI in countries where the concept does not exist.

based on the current discussions happening

Oh, you are aware of https://lists.openstreetmap.org/pipermail/tagging/2020-November/056322.html ? I just posted it today.

@dabreegster
Copy link
Collaborator

It's a very small library with no dependencies, so it should be quite straightforward to port it to Rust.

Someone's already done this -- I just found https://github.com/llambda/rrgeo.

Oh, you are aware of https://lists.openstreetmap.org/pipermail/tagging/2020-November/056322.html ? I just posted it today.

Yep, I've been following the Slack thread and streetcomplete/StreetComplete#2299

@westnordost
Copy link

westnordost commented Nov 20, 2020

Someone's already done this -- I just found https://github.com/llambda/rrgeo.

That's nice! Though, I think this is not what you need. What this library does seems to be to find the closest city. The library knows which city belongs to which country, but what you actually need is the actual borders of countries and states.

@dabreegster dabreegster changed the title StreetComplete is adding lane count quest Country/locale-specific road marking colors Feb 27, 2021
@dabreegster dabreegster added the backlog Not working on it anytime soon label Feb 27, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backlog Not working on it anytime soon
Projects
None yet
Development

No branches or pull requests

3 participants