openstreetmap-carto
openstreetmap-carto copied to clipboard
Add rendering for natural=valley labels
The following issue has been moved over from trac:
The following are all tags used for common natural features in Iceland (and probably elsewhere) on nodes (along with place=locality to get them to render). They're traditionally rendered as plain text on maps:
- ~~natural=fjord~~
- natural=valley
- ~~natural=peninsula~~
- ~~natural=channel~~
- ~~natural=inlet~~
The list is ordered roughly by how prominent each should be on the map. But of course these things can differ wildly.
natural=heath has been added in the meantime, see #780. "valley" is not in the code, but #787 seems to say it is rendered? maybe it was once? The name of a "bay" should be rendered now at >=14 (#199 removed the fill)
+1 for showing the names of the rest.
Good rendering will not be easy, I assume. Putting a name on a fjord or inlet should be possible, since watery areas are not usually full of other things that get in the way, But a valley, or a natural=ridge?
People use things like place=locality or place=region to give names to larger areas. User maxbe has a way to render a name over a large area: http://geo.dianacht.de/topo/ Go to the alps to see the names of the regions there. Explanation: http://wiki.openstreetmap.org/wiki/User:Maxbe/Kartenversuch#Beschriftung_von_Gebirgen Short explanation in English (pic): http://wiki.openstreetmap.org/wiki/File:Maxbe-stubaier-beschriftung_en.png
It looks really great, but my guess is, it can't be done with carto-css alone. Or am I wrong?
#787 seems to say it is rendered?
I guess the catchall rendered it on lines and areas.
See also openmapsurfer as an example of nice rendering of strait (Kattegat, Skagerrak) and some other similar features. Also on the other zoom levels.
I would also add the following place tags to the list: place=sea - http://www.openstreetmap.org/node/305640275 place=ocean - http://www.openstreetmap.org/node/305640074
natural=cape http://wiki.openstreetmap.org/wiki/Tag:natural%3Dcape
Reopened - only resolved partially.
I think that it would be better to open separate tickets for separate tags. BTW, natural=bay is rendered and I removed it from list in the ticket.
place=ocean - http://www.openstreetmap.org/node/305640074
It is a really poor idea. Borders of oceans (and even number of oceans) varies depending on sources (see for example http://en.wikipedia.org/wiki/Borders_of_the_oceans). Also, mapping ocean as node is absurd. At this scale manually selected labels are a better solution.
Also, mapping ocean as node is absurd
Please keep in mind we do not only map for the renderer - the ocean nodes provide useful and relevant information and nodes are the only sensible way to map those currently in OSM. And in a (non real time) renderer they can - when reasonably placed - even be used to calculate appropriate automatic label placement.
natural=heath label is now rendered.
The tag natural=peninsula has 59 occurrences, natural=channel has 34 occurrences, and natural=inlet has 9 occurrences. That's too little to render them.
2015-03-22 1:45 GMT+01:00 math1985 [email protected]:
The tag natural=peninsula has 59 occurrences, natural=channel has 34 occurrences, and natural=inlet has 9 occurrences. That's too little to render them.
I don't agree, these are typically very significant features and supporting them will increase the overall cartographic quality. Also there exist much fewer of these features in the world than of other features, so maybe those numbers aren't that bad (refering to channel and peninsula).
Note natural=channel, natural=inlet, natural=fjord and natural=sound are all undocumented and it is not clear what exactly distinguishes them from natural=strait and natural=bay.
natural=fjord is the only one with more widespread and consistent use, could be defined as something like 'long and narrow bay formed by glaciers' and would make sense to be rendered together with natural=bay.
Labels to render:
- natural=fjord
- natural=valley
- natural=cape (https://github.com/gravitystorm/openstreetmap-carto/issues/3148)
- natural=ridge (https://github.com/gravitystorm/openstreetmap-carto/issues/1148 https://github.com/gravitystorm/openstreetmap-carto/issues/2774)
It would help a lot if the initial post was updated with the labels in the comment above and any other labels mentioned in the previous comments. I probably wouldn't have created issue #3148 then :-)
@matthijsmelissen Can you update a list in first post to a task list with tags from https://github.com/gravitystorm/openstreetmap-carto/issues/788#issuecomment-405082390
This may be a question more general to this style than this particular issue, but are there any issues using text-character-spacing
with all of the languages we render?
Some features (such as valleys, maybe even streams/rivers) would look nice with character separation but I believe some languages rely heavily on ligatures.
Has anyone looked into this before?
Ask @sommerluk about such things.
Some features (such as valleys, maybe even streams/rivers) would look nice with character separation
Indeed letter-spacing looks nice for features like big valleys or big water bodies. It’s something I would like to have.
but I believe some languages rely heavily on ligatures.
The problem are not so much the ligatures. OpenType does a quite good job separating typographic ligatures like “fi” from orthographic ligatures like “æ”: The former should break up when using letter-spacing, the latter not.
are there any issues using
text-character-spacing
with all of the languages we render?
Has anyone looked into this before?
The problem are cursive scripts. Quoting myself from another issue comment:
- Regular/letter-spacing works for LGC scripts and probably most other scripts without big problems except cursive scripts like arabic. Some Mapbox software even disables letter-spacing for Arabic scripts.
Apart from Arabic, there are many Indic scripts that have joined letter forms, though it seem they use sometimes letter-spacing, but the rules are complex and based on syllables, not on letters.
The latest Noto release “phase III” has not only introduced support for many new scripts, but also various font widths that are designed by hand and are a good choice for usage – not only for the Latin script, but also for many other scripts including Arabic and various Indic scripts. Unfortunately, the list of width is
- extracondensed
- condensed
- semicondensed
- normal
There are no “expanded” variants. It’s really a pity, because an “expanded” style would be perfect for our usage. (Anyway, maybe we can make use of one of the condensed styles one day…)
So, in summary I see some risks when using letter-spacing, that is difficult to control for complex scripts without breaking rendering – and scripts like Arabic and the Indic scripts together might have 10% or 20% of the population world-wide, which is considerable.
Thanks for the explanation @sommerluk, very informative.
natural=fjord
is discouraged on the wiki page in favour to bay=fjord
. Since natural=bay
is already supported (#3144), we can exclude fjord from the above todo list.
That’s right.
We could still add a special rendering for natural=bay with bay=fjord mapped as a linear way, with the text following the way. On Sat, Oct 20, 2018 at 6:03 AM Jérémy Ragusa [email protected] wrote:
natural=fjord is discouraged on the wiki page https://wiki.openstreetmap.org/wiki/Tag:bay%3Dfjord in favour to bay=fjord. Since natural=bayis already supported (#3144 https://github.com/gravitystorm/openstreetmap-carto/pull/3144), we can exclude fjord from the above todo list.
— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/gravitystorm/openstreetmap-carto/issues/788#issuecomment-431498142, or mute the thread https://github.com/notifications/unsubscribe-auth/AoxshBp0wOLZZUmMwbfwrBOu_EinI9J7ks5umj4RgaJpZM4CRmLr .
Task list:
- [x] natural=cape #3148 -> PR https://github.com/gravitystorm/openstreetmap-carto/pull/3452
- [ ] natural=ridge #1148 #2774
- [ ] natural=valley
- [ ] bay=fjord (https://github.com/gravitystorm/openstreetmap-carto/issues/788#issuecomment-431508369)
Please render the label for ocean and sea in the same way as bay. For ocean the tag place=ocean
is used and for a large sea place=sea
(Do you believe that place is right here?)
For example for the Mediterranean Sea there is a node. I think that's too little. We should use a polygon. But if we use the coastline, even a relation will be overloaded. We should draw a polygon that roughly represents the coastline and whose segments are about 10 km.
But which tag is right here? Or do we use bay or strait?
@geozeisig related to #1982 ?
@geozeisig There is already a ticket for this issue: https://github.com/gravitystorm/openstreetmap-carto/issues/2278
We could still add a special rendering for natural=bay with bay=fjord mapped as a linear way, with the text following the way.
@jeisenbe, it says on the wiki that they aren't suppose to be mapped as liner ways. Any other thoughts on possible rendering? Is there a reason they couldn't be rendered the same as capes with no fill and the name in the middle of the area?
Anyone have any idea how valleys or ridges could be rendered? I thought there was a PR for ridge rendering that was closed that could be used as an example, but I can't seem to find it. Maybe it was for something else.
There was #1148 and #2774, you can check it.
Thanks. I looked through #1148 before and didn't see it. Now I notice its issue #2138 though.