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

Public transport shelter should not be labeled with elevation #4270

Closed
1ec5 opened this issue Dec 22, 2020 · 14 comments · Fixed by #4313
Closed

Public transport shelter should not be labeled with elevation #4270

1ec5 opened this issue Dec 22, 2020 · 14 comments · Fixed by #4313

Comments

@1ec5
Copy link

1ec5 commented Dec 22, 2020

Expected behavior

A bus shelter tagged amenity=shelter building=yes shelter_type=public_transport should be rendered as an ordinary building with or without an ele tag.

Actual behavior

The ele tag causes the bus shelter to be rendered like an alpine hut, labeled with a 🌧️ and an elevation. For example, this way was added as part of a building import that included elevations and heights for every building. The bus shelter is useful for avoiding the rain, but the elevation is not particularly interesting for a 2D renderer. (It might be useful for a 3D renderer.)

Links and screenshots illustrating the problem

vta

/ref #3382

@imagico
Copy link
Collaborator

imagico commented Dec 22, 2020

Thanks for the report. There seem to be a few misconceptions here:

  • The shown rendering is not the rendering for alpine huts - alpine huts are rendered like this: https://www.openstreetmap.org/#map=17/46.50142/8.05286
  • The addition of the ele tag does not change the rendering beyond displaying the elevation in the label in addition to the name (or alone if no name is tagged).
  • The rendering of the building is completely independent of the shelter and ele tagging.

I think this issue could still make sense in the following versions:

  • propose to not render ele on amenity=shelter + shelter_type=public_transport - that makes quite a lot of sense IMO.
  • propose not to render shelter_type=public_transport with a symbol - i don't think that is a good idea because those shelters (whether they qualify as building or not) are fairly useful to map users.
  • propose to render shelter_type=public_transport with a symbol distinct from ordinary amenity=shelter. That in principle makes sense IMO but would depend on a suitable symbol of course.

@polarbearing
Copy link
Contributor

I'd prefer "render shelter_type=public_transport with a symbol distinct from ordinary amenity=shelter" as well as "not render ele on amenity=shelter + shelter_type=public_transport".

@polarbearing
Copy link
Contributor

Quick mockup: side-view of a back wall with a tilted roof, supposed to be transport-blue. Do we need the raindrops?
shelter-pt1

@1ec5
Copy link
Author

1ec5 commented Dec 22, 2020

Thank you for clearing up my misunderstanding. Indeed, I meant to suggest omitting the elevation from shelter_type=public_transport, but a distinct icon would be even better. The mockup makes sense to me; hopefully it would be intuitive regardless of which side of the road the shelter is on.

@imagico imagico changed the title Bus shelter labeled with elevation Public transport shelter should not be labeled with elevation Dec 22, 2020
@imagico
Copy link
Collaborator

imagico commented Dec 22, 2020

Ok, i changed the title to reflect the idea or removing the elevation label - that is non-controversial and a good first issue for new developers. Differentiated rendering of different shelter_type values is more tricky to do in an intuitive fashion.

@GoutamVerma
Copy link
Contributor

GoutamVerma commented Jan 28, 2021

hey @imagico i would like to work on it .
it will be going to be my first contribution

@GoutamVerma
Copy link
Contributor

will you guys help me

@imagico
Copy link
Collaborator

imagico commented Jan 28, 2021

Sure - general instructions how to get started with this style can be found on

https://github.com/gravitystorm/openstreetmap-carto/blob/master/INSTALL.md
https://github.com/gravitystorm/openstreetmap-carto/blob/master/CONTRIBUTING.md

With any specific questions on how to fix this issue just ask.

@jeisenbe
Copy link
Collaborator

@GoutamVerma there is a fairly detailed explanation about how to do a PR and test changes at #2291 (comment) - and the following comment.

@GoutamVerma
Copy link
Contributor

hey @jeisenbe and @imagico i'm done with the setup. will you please tell me how to fix this issues .where i need to make changes in project.mml .

@jeisenbe
Copy link
Collaborator

jeisenbe commented Jan 31, 2021

This line adds the elevation for the name of all tpes of amenity=shelter:

OR amenity = 'shelter')

If you simply want to not render the ele=* when there is a shelter_type=public_transport tag on the same feature, you could add AND tags->shelter_type IS NOT public_transport, I believe.

But you might also want to consider what other shelter_type values should or should not have the elevation rendered. Perhaps this is also not needed for a picnic_shelter, for example.

In that case you could add AND tags->shelter_type NOT IN (public_transport, picnic_shelter)

@GoutamVerma
Copy link
Contributor

hey @imagico and @jeisenbe. I made a pull request against this issue please review and accept this . Thank you

@imagico
Copy link
Collaborator

imagico commented Jan 31, 2021

@jeisenbe already mentioned where the change needs to be made. For additional context - the label shelters and other POIs are labeled with is defined by

CONCAT(
name,
E'\n' || CONCAT( -- by doing this with a || if both the ele and height branches are null, this entire expression is null and only name is used
CASE
WHEN (tags ? 'ele') AND tags->'ele' ~ '^-?\d{1,4}(\.\d+)?$'
AND ("natural" IN ('peak', 'volcano', 'saddle')
OR tourism = 'alpine_hut' OR (tourism = 'information' AND tags->'information' = 'guidepost')
OR amenity = 'shelter')
THEN CONCAT(REPLACE(ROUND((tags->'ele')::NUMERIC)::TEXT, '-', U&'\2212'), U&'\00A0', 'm') END,
CASE
WHEN (tags ? 'height') AND tags->'height' ~ '^\d{1,3}(\.\d+)?$'
AND waterway = 'waterfall'
THEN CONCAT(ROUND((tags->'height')::NUMERIC)::TEXT, U&'\00A0', 'm') END
)
) AS name,

That is a very complex expression combining both elevation values for peaks and shelters and height values for other features. You can simply ignore most of it and modify the condition for shelters as @jeisenbe explained. Make sure you get the braces right, that needs to be:

OR (amenity = 'shelter' AND tags->shelter_type NOT IN (public_transport, picnic_shelter))

@jdhoek
Copy link
Contributor

jdhoek commented Feb 2, 2021

Quick mockup: side-view of a back wall with a tilted roof, supposed to be transport-blue. Do we need the raindrops?
shelter-pt1

Nice! That's how I would expect to see them too. This is how these show up on Dutch government maps for street furniture:

Screenshot from 2021-02-02 12-13-21

That shape seems like it would convey the meaning of a bus/tram stop shelter quite well.

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