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

Spring icon invisible under waterway=river #3253

Closed
polarbearing opened this issue May 29, 2018 · 11 comments · Fixed by #3738
Closed

Spring icon invisible under waterway=river #3253

polarbearing opened this issue May 29, 2018 · 11 comments · Fixed by #3738

Comments

@polarbearing
Copy link
Contributor

The spring icon was recently refurbished as a blue ring with a white halo #3189.

Unfortunately this was not tested when surrounded with a body of water, which is a common case for a spring. Example: Big Spring Missouri, mapped as a node in a body of water. The old 'S' icon was visible, see example in comment. The new one is not:
204155

The ring is defined slightly darker than water colour and has a halo, so it is not clear to me why it is completely invisible. I had done some analysis so far (from #3189):

The SVG is constructed atypically compared to other icons. It seems to have no artboard size, thus git shows the icon in a large transparent square, opening with Illustrator presents it on an A4 sheet, partially hanging over the border.
It has 3 grouped paths being concentric rings. One is the blue ring (# 7abcec), the others are white (# ffffff). One of the white rings sits behind the blue and is thicker, thus constructs the 'halo'. The function of the third ring is unclear since it is thinner and behind the blue.
The SVG contains some 'transform' operations which apparently just shift the rings onto each other and could be avoided if they were drawn in the right place already.

All new icons I have analysed so far use fill while the stroke is empty. This SVG is the opposite.

Typically we have the icon black and define the colour in carto.

The ring (# 7abcec) is darker than water (@water-color defined as # aad3df)

IIRC, the order of the 'id:' elements in the 'Layer:' section in the project.mml defines the painting order? If so, 'water-areas' are painted earlier than 'springs' which are earlier than 'water-lines'.

This explains why a river line is painted over the ring, but I don't understand why the white rings disappear over a water area?

Finally I'd have the style for the spring rather in the water.mss with the natural things, while water-features.mss mostly has the man-made barrieres etc.

@kocio-pl
Copy link
Collaborator

Would you like to prepare the code solving this problem?

@polarbearing
Copy link
Contributor Author

I haven't understood the reason yet. The icon is supposedly painted above the water layer, so I don't understand why both the darker blue and the white halo remain invisible. Or my analysis is wrong.

@polarbearing
Copy link
Contributor Author

Things were getting more mysterious. There are examples, where the icon is rendered when surrounded (or on the border of) natural=water, and some where not.

The reason however is simple: the icon is covered by the waterway=river line, which is typical for larger springs. When attached to a stream on the other hand, the icon is wider than the stream line.
Parts of the icon appear from z16 or lower when the river line becomes thinner.

Shown:
https://www.openstreetmap.org/node/1678238492 (not connected to a way)
https://www.openstreetmap.org/node/2006105431 (not connected to a way)
https://www.openstreetmap.org/node/1889250060 (on the boundary of natural=water)
https://www.openstreetmap.org/node/5228692718 (attached to a stream)

These examples reveal another oddity: within a lake, the spring icon appears to have a blue middle dot. This however is the blue from the lake looking through the transparent centre of the icon.

Not shown:
https://www.openstreetmap.org/node/1563919839 (attached to a river)
https://www.openstreetmap.org/node/3141264012 (attached to a river)
https://www.openstreetmap.org/node/5442671644 (attached to a river)
https://www.openstreetmap.org/node/5591150537 (attached to a river)
https://www.openstreetmap.org/node/3195263763 (attached to a river)
https://www.openstreetmap.org/node/256435736 (attached to a river)

Just on a river, no water body around:
https://www.openstreetmap.org/node/4971116279
https://www.openstreetmap.org/node/947900034

Queries:
spring within natural=water about 300
within waterway=riverbank 64
spring on river works only on bbox

So, to conclude, the easiest solution would be to give up the rendering under waterways and move the icon layer above them...

@polarbearing polarbearing changed the title Spring icon invisible in water body Spring icon invisible under waterway=river May 30, 2018
@Penegal
Copy link
Contributor

Penegal commented Jun 4, 2018

So, to conclude, the easiest solution would be to give up the rendering under waterways and move the icon layer above them...

Beware that the spring layer was added below the waterways on purpose, to make the last interrupt the spring outline and suggest that the water outputs from the spring. What you are describing here seems merely a size problem between the river way width and the spring icon size. Typically, springs output a stream and not directly a river, and that shows no such problem AFAIK, so changing the fundamental design of the icon for this issue, which seems a corner case to me, sounds overkill.

Please note that I took part in the new spring rendering, so I cannot affirm that this answer is objective enough.

@meased
Copy link
Contributor

meased commented Jun 6, 2018

I ran across another case of this: https://www.openstreetmap.org/#map=18/47.53435/-111.23012

I don't think it's that much of a corner case,

@Penegal
Copy link
Contributor

Penegal commented Jun 7, 2018

Corner case was not the right term here; I meant that the case of a river outgoing from a spring is a reduced subset of all springs, and, therefore, should not be the sole reason to trash the new design, which works for a vast majority of cases.

@polarbearing
Copy link
Contributor Author

Typically, springs output a stream and not directly a river

Small springs output a stream, big springs output a river. 13 cubic meters per second from Big Spring in Missouri fail the OSM definition of jumping over a stream. Something that works on the majority of small cases but fails on the prominent ones is a bug for me.

During my search above I have found plenty cases where the spring is not connected to a waterway at all, so to expect that the waterway is part of the icon message is inconsistent. I know it was intentional, but as it leads to inconsistency, I suggest to drop it.

I'd also like to close the transparent middle of the icon as it leads to another inconsistency. Filling with blue creates a nice circular 'wave ripple' effect, you can study that on springs in water bodies that are not covered by a river.

@Penegal
Copy link
Contributor

Penegal commented Jun 8, 2018

I'd also like to close the transparent middle of the icon as it leads to another inconsistency. Filling with blue creates a nice circular 'wave ripple' effect, you can study that on springs in water bodies that are not covered by a river.

This design was rejected because of risk of confusion with other water features, which could ultimately lead to mistagging.

@kocio-pl
Copy link
Collaborator

I think this ticket could be closed, since implementing #3461 would resolve also this problem:

_mimirc
epsvrlfa

@polarbearing
Copy link
Contributor Author

Well, but close it at the time the other one is implemented, not because it will be implemented.

@jeisenbe
Copy link
Collaborator

jeisenbe commented Sep 9, 2019

Fixed by #3738

@jeisenbe jeisenbe closed this as completed Sep 9, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
5 participants