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

Render implied “oneway” on roundabouts #1367

Closed

Conversation

sommerluk
Copy link
Collaborator

Treat roads with “junction=roundabout” like oneways, as long as no “oneway=no” is present.

Resolves #467

Substitutes #1363

@matthijsmelissen
Copy link
Collaborator

Looks fine to me.

@matkoniecz
Copy link
Contributor

What about oneway=reversible? It is mentioned on wiki[1] and is used (rarely, 900 instances but it is). This pull requests would result in rendering oneway arrows for such ways.

[1]http://wiki.openstreetmap.org/wiki/Tag%3Aoneway%3Dreversible#Time_conditional_restrictions

More broadly, I am unsure about benefit of implicit oneway values - I think that benefit is small and it is yet another weird thing that makes processing data harder.

@sommerluk
Copy link
Collaborator Author

What about oneway=reversible?

Good catch!

Currently there is no element with both (junction=roundabout AND oneway=reversible) in the database, but the PR should be adapted.

I assume also the most combinations of junction=roundabout AND oneway=no are tagging errors, but that’s another topic.

However, I think first there should be made a decision about this:
– If it is decided that implied oneway on roundabout is rendered, I can adapt this PR.
– If it is decided that implied oneway on roundabout is not rendered, than issue #467 should be closed.

@matthijsmelissen
Copy link
Collaborator

I see both the advantages and disadvantages of rendering this, so I'm rather neutral.

@pnorman
Copy link
Collaborator

pnorman commented Mar 13, 2015

I assume also the most combinations of junction=roundabout AND oneway=yes are tagging errors, but that’s another topic.

Why would you assume this? An explicit oneway is preferable.

@sommerluk
Copy link
Collaborator Author

Oh, sorry, I did want to say “I assume also the most combinations of junction=roundabout AND oneway=no are tagging errors”.

@matthijsmelissen
Copy link
Collaborator

Oh, sorry, I did want to say “I assume also the most combinations of junction=roundabout AND oneway=no are tagging errors”.

Many of them are tagging mistakes, but this tag combination is also quite common (and correct) on bicycle paths in the Netherlands.

@sommerluk
Copy link
Collaborator Author

I’m also rather neutral (I don’t have a personal interest in this, I just saw #467 and thought that this is something that’s easy to implement.)

Rendering implied oneway on roundabouts but not on motorways would mean rendering implied oneways for some tags, but don’t do it for other tags – which could maybe also be confusing. So maybe it’s better to omit this PR (and close also #467 as WONTFIX) …

@matthijsmelissen
Copy link
Collaborator

Given that oneway=yes is often omitted, it's clear that that's the default, so I think treating oneway=no in our code too makes sense.

@sommerluk If you add the reversible case I will merge this.

@sommerluk
Copy link
Collaborator Author

@math1985 Done.

@matkoniecz
Copy link
Contributor

@sommerluk
It would be a good idea to rebase this PR.

nebulon42 and others added 14 commits March 16, 2015 19:20
Match the color of the following labels to their respective icons:

* natural=peak
* natural=volcano
* natural=saddle
* natural=cave_entrance
* historic=memorial
* historic=archaeological_site
* man_made=lighthouse
* Make sure conditions are checked in both WHERE and COALESCE
  Checking the condition in the WHERE class is necessary for performance.
  Checking the condition in the COALESCE is necessary to prevent unrendered tags
  blocking rendering of tags further down in the COALESCE.
  See also the discussion [here](gravitystorm#1038 (comment)).

  This is an improvement of gravitystorm#1038.

  This resolves gravitystorm#985, resolves gravitystorm#1029, resolves gravitystorm#1336.

* Give amenity priority over shop.

  This resolves gravitystorm#963.

* Give tourism priority over amenity, shop, leisure, landuse, man_made, natural,
  and place.

  This resolves gravitystorm#1269, resolves first issue of gravitystorm#1232.
Include values that are rendered as icon without label to prevent mismatch
beween icons and labels.
Rather than checking a huge list that contains all common shop
values, we can just check for not null in the where clause. Because
the COALESCE checks the shop value any additional shop values
will come through as feature is null, and not match any rendering
rule. With the shop list encompassing all common values, this
will seldom happen.

This allows query simplification and should be no performance loss
and a potential gain.
By moving the join with the ordering table out of the innermost
subselect we can have all the ordering information in one place.

This also adds WHERE conditions to the inner subselects to reduce
the number of rows that need to be COALESCED.
@sommerluk sommerluk closed this Mar 16, 2015
@sommerluk sommerluk deleted the impliedonewayroundabout branch March 16, 2015 20:30
@sommerluk
Copy link
Collaborator Author

Sorry. I failed in doing a rebase.

Follow-up PR at #1393

@matthijsmelissen
Copy link
Collaborator

I failed in doing a rebase.

For the future, something like this should work:
only once:

git remote add upstream https://github.com/gravitystorm/openstreetmap-carto.git

and then:

git checkout master
git pull upstream master
git checkout name_of_the_branch
git rebase master
git push -f origin name_of_the_branch

@sommerluk
Copy link
Collaborator Author

@math1985 Thanks a lot! I’ve tried this with an old branch and it worked. So I hope in the future I’ll do correct rebasing. (Git is sometimes really, really complicate …)

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

Successfully merging this pull request may close these issues.

Render junction=roundabout like oneway=yes
5 participants