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 entrances. #2936

Merged
merged 1 commit into from
Jan 20, 2018
Merged

Render entrances. #2936

merged 1 commit into from
Jan 20, 2018

Conversation

tpikonen
Copy link
Contributor

@tpikonen tpikonen commented Nov 8, 2017

Render entrances starting at z=17. The "main" and "staircase" entrances are rendered with a square marker, the "service" entrance with a circle (starting at z=18) and other entrances with a disc.

Three levels of marker brightness reflect the access permissions of the entrance. Darker color means more permissive access. The "main" entrances are dark by default. The access tag modifies the brightness such that access="yes" and "permissive" set the marker to darkest and access=no to the lightest colour. Entrances with other access tag values have intermediate brightness.

Exits, such as entrance=exit and entrance=emergency are not rendered.

Address label text-halo-radius is increased at z>=18 to improve readability of labels on top of entrance markers.

Examples:

Buildings with "main" and "service" entrances, z=17-18:
main_service_z17 main_service_z18

School with several entrance="yes" and access="permissive"|"private", z=17-18:
school_z17 school_z18

Apartment building with entrance="staircase" tagged with addr:unit, z=17-18:
unit_z17
unit_z18

@kocio-pl
Copy link
Collaborator

kocio-pl commented Nov 8, 2017

I think that we might use brown dot for some amenities, so I would try some other shape/color for entrances.

@tpikonen
Copy link
Contributor Author

tpikonen commented Nov 8, 2017

The color is the same or slightly darker or lighter than the building border in order to make the markers as unobtrusive as possible, especially on z=17.

On the other hand one could go to the other direction in color coding and make non-permissive entrances the same color as the border and permissive ones progressively lighter, giving an impression of an opening in the building border.

@kocio-pl
Copy link
Collaborator

kocio-pl commented Nov 8, 2017

What if we use square border only (without filling)?

@tpikonen
Copy link
Contributor Author

What if we use square border only (without filling)?

Ok, I tried this (branch updated) and it doesn't look that bad. Entrances are now rendered with a hollow square, except main entrances still with a solid one. Service entrances have just a hint of a square with a marker with only corners of a square, and access=no entrances have a diagonal line across the hollow square. Entrances with access=yes|permissive are rendered with a larger contrast (darker marker). Here's some images:

Apartments with main and service entrances, z=17-18:
main_service2_z17 main_service2_z18

School, z=17-18:
school2_z17 school2_z18

University buildings with entrance=main's, one with access=permissive, one without and several service entrances, z=17-18:
uni_z17 uni_z18

Two entrances, one with access=no, z=18-19:
accessno_z18 accessno_z19

@kocio-pl
Copy link
Collaborator

I like this scheme. However I would render all the entrances at z19 and on z18 maybe main entrances only.

@aceman444
Copy link

Yes, highlighting which entrance is main is great.

@boothym
Copy link
Contributor

boothym commented Nov 11, 2017

What does it look like for nodes which are tagged as both house numbers and entrances?

@tpikonen
Copy link
Contributor Author

I like this scheme. However I would render all the entrances at z19 and on z18 maybe main entrances only.

Did you perhaps mean z18 and z17? I think there is enough space to render all entrances at z18 without the map looking too busy. Also, addr:housenumber (+ addr:unit) is rendered at z>=17 also for entrances.

@tpikonen
Copy link
Contributor Author

What does it look like for nodes which are tagged as both house numbers and entrances?

The marker is not visible below the label. Have a look at the last image of the first comment.

@matkoniecz
Copy link
Contributor

How it looks at entrances tagged on places other than buildings? Especially on nodes where entrance and barrier=gate tag are tagged together?

@matkoniecz
Copy link
Contributor

It seems that code is using catch-all rendering, this is discouraged. For example entrance=yes;staircase should not be rendered.

@tpikonen
Copy link
Contributor Author

How it looks at entrances tagged on places other than buildings? Especially on nodes where entrance and barrier=gate tag are tagged together?

The layers in buildings.mss are rendered early, so an entrance marker is usually not visible if there is another marker on top of it, except in really high zooms. Here's images with barrier=gate at z17-19:

barrier_entrance_z17 barrier_entrance_z18 barrier_entrance_z19

It seems that code is using catch-all rendering, this is discouraged. For example entrance=yes;staircase should not be rendered.

I updated the PR to render just the entrance types which are in the table in the wiki.

@donaldrnoble
Copy link

I had been hoping entrances would be rendered for a while, but never done anything abou It.

I like the unfilled icons, but is it possible to use a rectangle for the icon? I think this would look more like a doorway, if it was something like twice as high as it was wide. This might also distinguish entrances from other generic circular/square icons.

@ikid0
Copy link

ikid0 commented Nov 19, 2017

@dieterdreist
Copy link

dieterdreist commented Nov 19, 2017 via email

@tohaklim
Copy link

I think @NetWormKido meant to render both the entrance ref (part of the address, but not included/covered by any address tags) and addr:flats, so as to show where each flat is at a glance

@tpikonen
Copy link
Contributor Author

@NetWormKido, take a look at PR #2932 which is about rendering of address labels. This PR is about rendering markers to entrance=* nodes.

Personally, I'm not against rendering addr:flats, but it should probably be only at the highest zoom levels (z>=19 or so). Also, I'd first like to finish PR #2932, which is mostly about addr:unit rendering before adding flat numbers.

@tohaklim
Copy link

I erroneously assumed (and was proven wrong) that addr:unit is the European/US way of tagging entrance=staircase's refs, but every time I see examples of usage I get confused again.
Both entrance=staircase refs and addr:unit seem to be used for apartment blocks. Both are used for entrances. Weird

@ikid0
Copy link

ikid0 commented Nov 20, 2017

@tpikonen, I completely agree that the addr:flats need to render at the highest zoom levels (z>=19). I hope you consider my proposal.

@nebulon42
Copy link
Contributor

Just a quick remark: Outline only rendering is quite noisy IMO. Otherwise good initiative.

@kocio-pl
Copy link
Collaborator

Did you perhaps mean z18 and z17? I think there is enough space to render all entrances at z18 without the map looking too busy. Also, addr:housenumber (+ addr:unit) is rendered at z>=17 also for entrances.

Sorry, it took me some time to think it over. This is nice feature to have, but I really mean z19+. It's not about the available space, I want to avoid the clutter.

Address numbers are used to search places on the street, so they can be shown earlier. Entrances are related to the single buildings and it's easy to guess they are here - most of the time footpath or multiple numbers indicate their existence. Sometimes even the shapes of the lawns are enough to know where is the entrance.

The only new thing that this code brings and which can't be guessed is the type of the entrance, but this is really local feature.

@tpikonen
Copy link
Contributor Author

This is nice feature to have, but I really mean z19+.

Ok, I'll update the code to do this eventually, but I would also like to remove the outline-only rendering of the markers (i.e. make the markers opaque), as @nebulon42 suggested. I don't know how to do it with the marker-* directives in carto, so this needs some thinking.

@tpikonen tpikonen closed this Dec 10, 2017
@tpikonen tpikonen reopened this Dec 10, 2017
@tpikonen
Copy link
Contributor Author

Main entrances are now rendered at z>=18 and the rest at z>=19, as requested.

Opaque markers with dark borders are apparently not possible (i.e. they would require non-monochrome markers), so the generic entrance markers are still outline only.

As far as I'm concerned, this PR is ready.

@kocio-pl
Copy link
Collaborator

Thanks, I hope I will check it soon.

@kocio-pl
Copy link
Collaborator

kocio-pl commented Jan 20, 2018

I like the outcome and that's what I would merge soon - the only request left is to squash all the commits into one.

Although we don't use z20 on OSMF servers currently, it makes sense in this case to extend the definition there, because the differences are sometimes still subtle on z19. I don't want to make it more evident earlier, because such small feature should not be too visible. Showing only main entrances on z18 sounds OK for me - that might help to find the way if the building is big enough.

entrance=main and entrance=yes ( https://www.openstreetmap.org/#map=19/52.23146/21.00713 )
z18
kzrzjjhw
z19
1ndsi2cj
z20
mb2lodsb

entrance=yes + access=yes ( https://www.openstreetmap.org/node/5329685559 )
z19
dt5g4ofx
z20
aywiglel

entrance=yes + access=no ( https://www.openstreetmap.org/node/4709081766 )
z19
czpobi_u
z20
kshihnvh

entrance=service ( https://www.openstreetmap.org/node/3516047187 ) and entrance=yes (the difference is clear on z20)
z19
1enkqkmn
z20
juivryra

@polarbearing
Copy link
Contributor

There are lots of cases where people put the address label on an entrance node. This is somehow discussed in the first post, however is there a before/after comparison? Maybe the number should be under the icon, not on top?

New layer "entrances", with entrance and access tags.

Render entrance=main nodes starting at z=18 and other entrance types
defined in OSM wiki (entrance=yes|home|service|staircase) starting at z=19.

Most entrances are rendered with a hollow square marker. Entrances
marked as "main" are rendered with a solid square, "service" entrances
with corners of a hollow square and entrances with access="no" with a
hollow square with a line along a diagonal.

The marker brightness reflects the access permissions of the entrance.
Entrances with access="yes" and "permissive" have a darker color.
Markers with other access tag values have the same color as the building
perimeter line.

Exits, such as entrance=exit and entrance=emergency are not rendered.

Address label text-halo-radius is increased at z>=18 to improve
readability of labels on top of entrance markers.
@tpikonen
Copy link
Contributor Author

I like the outcome and that's what I would merge soon - the only request left is to squash all the commits into one.

Done. Thanks for the positive review.

@tpikonen
Copy link
Contributor Author

There are lots of cases where people put the address label on an entrance node. This is somehow discussed in the first post, however is there a before/after comparison? Maybe the number should be under the icon, not on top?

I have another PR (#2932) on labeling of entrances, so this change would probably fit there better. I'll see how it looks like after this PR is merged.

@kocio-pl kocio-pl merged commit 0bfba3d into gravitystorm:master Jan 20, 2018
@kocio-pl
Copy link
Collaborator

Thanks for all the work on this code, @tpikonen!

@polarbearing
Copy link
Contributor

While I appreciate rendering entrances in general, I find rendering the value "entrance" = "staircase" problematic. It was not part of the original key proposal, and is badly documented. It is a value where the physical appearance of the entrance conflicts with its function, such as "main" or "emergency".

@kocio-pl
Copy link
Collaborator

We can of course change that (or any other) part. Is this the only problem do you see here?

@polarbearing
Copy link
Contributor

I don't see examples what happens when addr:housenumber is on the entrance node,
http://www.openstreetmap.org/node/2825036652 18000 times in Berlin,
or even a shop icon in addition,
http://www.openstreetmap.org/node/2446830336 99 times in Berlin

@tpikonen
Copy link
Contributor Author

I don't see examples what happens when addr:housenumber is on the entrance node,
http://www.openstreetmap.org/node/2825036652 18000 times in Berlin,
or even a shop icon in addition,
http://www.openstreetmap.org/node/2446830336 99 times in Berlin

In both cases address label or shop icon will be placed on top of the entrance marker, since the entrances layer is lower than addresses and amenity points and allows overlaps.

In practice the entrance marker will not be visible, since its colors are chosen deliberately to be the same as in building borders.

@kocio-pl
Copy link
Collaborator

I believe staircase is OK, because in OSM many types are mixed and this one is not cryptic. We can change it in the future if needed, for the moment I'm inclined to stay with it.

@polarbearing
Copy link
Contributor

Thanks, could we see a preview for the housenumber/shop on an entrance?

@kocio-pl
Copy link
Collaborator

I don't get exactly what do you want to see, could you post a link to the example place?

@polarbearing
Copy link
Contributor

Posted some 5 posts above.

@kocio-pl
Copy link
Collaborator

Ok, now I see:
gu1o4snv
6e8v9ufx

@polarbearing
Copy link
Contributor

Hm, the entrance icons are not fully covered. They remain visible, in particular under the '7' being so narrow, and in the jewellery ring. The 71 looks a bit like 7.1. They would probably also be bigger than the generic shop dot.

Would it be possible to suppress them in the code when there is another icon or label on top?

@kocio-pl
Copy link
Collaborator

Please open new ticket for tuning this feature.

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.