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

Add rendering for waterway=waterfall #336

Closed
ghost opened this issue Feb 10, 2014 · 32 comments
Closed

Add rendering for waterway=waterfall #336

ghost opened this issue Feb 10, 2014 · 32 comments
Assignees
Milestone

Comments

@ghost
Copy link

ghost commented Feb 10, 2014

It would be nice if mapnik would display a waterfall icon for nodes marked with waterway=waterfall

I have created http://wiki.openstreetmap.org/wiki/Waterfall some time ago and this part seems fairly stable.

@matthijsmelissen
Copy link
Collaborator

@ghost
Copy link
Author

ghost commented Apr 14, 2014

I have slightly updated the wiki page about waterfalls: I thought it would be a good idea to define it so that the waterway and cliff share a node, and this very node is marked with waterway=waterfall.

This combination may be now interpreted so, that the natural=cliff is the waterfall edge and could be rendered in some special way. The width of it is only defined by the riverbanks or river width at the moment.

@matthijsmelissen
Copy link
Collaborator

Example icon: http://osm-icons.org/wiki/File:24009.svg

@pnorman
Copy link
Collaborator

pnorman commented Jun 18, 2014

10k waterway=waterfall, 2.5k natural=waterfall

@matthijsmelissen matthijsmelissen added this to the New features milestone Aug 18, 2014
@matthijsmelissen matthijsmelissen changed the title Waterfall Icon Add rendering for waterway=waterfall Sep 24, 2014
@ghost ghost mentioned this issue Jan 13, 2015
@nebulon42
Copy link
Contributor

Icon available in Osmic now: waterfall-16

@kocio-pl
Copy link
Collaborator

Not bad, but before/after images would be welcome, because the color may have some impact on the final look.

BTW: I'm almost done with Tilemill rendering at last, so I'm almost ready for making real PRs, but want to know some hints how to make such before/after images, like:

  1. What zoom level to choose (or any will do, including z>19 if the details will be better visible)?
  2. Is there a simple way for recreating the same box after closing TileMill (or there's no need or it's purely manual)?

@nebulon42
Copy link
Contributor

I choose the zoom level depending on the situation as I see fit. Using z20+ is not a good idea as it is not rendered live. I'm not aware of a method to get the same box again in TileMill, maybe it can be adjusted in the settings?

@kocio-pl
Copy link
Collaborator

@StyXman You mean the same level for before and after? Sure! In my case however if there's a lot of shops around I would choose zoom level which shows mainly the one I want to render, so z>19 for both would make same sense.

One more question regarding pushing - if I want to push multiple shop icons, should I push them with separate PRs or just one for all? I guess the latter would be better in my case, since they all deal with the same, long YAML lines, so probably there would be too many conflicts to resolve.

@nebulon42
Copy link
Contributor

New icons trigger discussions. According to my experience it is less likely to get them merged the more (controversial) icons a PR contains. If you split them you have to deal with possible merge conflicts, especially if you modify the project file. It depends, I would say. :)

@pnorman
Copy link
Collaborator

pnorman commented May 20, 2015

One more question regarding pushing - if I want to push multiple shop icons, should I push them with separate PRs or just one for all? I guess the latter would be better in my case, since they all deal with the same, long YAML lines, so probably there would be too many conflicts to resolve

It depends. If the icon changes are tied together (e.g. hotels and hostels) they're better as one PR. If they're discrete changes, they're better as different PRs.

Merge conflicts caused by adding to a list on the same line in two PRs are easy to resolve - word diff shows that all you did is add a word, and that change can then be redone by hand quickly.

@matkoniecz
Copy link
Contributor

Is there a simple way for recreating the same box after closing TileMill

Unfortunately it impossible to do using TileMill interface (it may be done with command line export - see https://www.mapbox.com/tilemill/docs/manual/exporting/)

@StyXman
Copy link
Contributor

StyXman commented May 20, 2015

What you can do to generate a specific tile starting from osm-carto is:

  • Convert the project to MapnikXML with carto: carto project.mml openstreetmap-carto.xml.
  • Use this script to render a particular tile (or even a set of tiles in a bbox); one that has a waterfall is: generate_tiles.py --tile 19,271295,188504 --input-file openstreetmap-carto.xml. You can specify --tile several times.

I hope the program works out of my setup; I just heavily modified the original one in the old repo. Currently it also needs python-sqlalchemy for its basic MBTiles support.

@ghost
Copy link
Author

ghost commented May 24, 2015

I have recently clarified http://wiki.openstreetmap.org/wiki/Waterfalls to suggest adding height=* and width=* to the node waterway=waterfall.

Following properties could be used to decide at which zoom level to render the icon:

  • waterfall height, width - if present, so far not used afaics
  • presence of key:name, tourism=attraction
  • is it a river or stream

@daganzdaanda
Copy link

We really should show something that indicates a waterfall. I think @nebulon42 's icon from #1564 is good, and for the colour, we can use the same as fords.

For big and well-mapped waterfalls, we could render the natural=cliff line in blue, labelled with the name, if it also is tagged as waterway=waterfall. That kind of tagging is used at Niagara Falls at the moment, but I'm not sure if it's been agreed and documented.

@ghost
Copy link
Author

ghost commented Jun 19, 2016

@daganzdaanda : also had the idea tagging the waterfall cliffs as natural=cliff + waterway=waterfall. This does not work for artificial waterfalls which fall over a waterway=weir instead of natural=cliff. This may not be a big loss but for example the Rhine falls have a small section where the water falls over a weir. It is one of the http://wiki.openstreetmap.org/wiki/Waterfalls#Open_issues

@kocio-pl
Copy link
Collaborator

kocio-pl commented Sep 16, 2017

Maybe we should just drop the icon and show only the name and height when available. For example "Salto Ángel (979 m)" in a standard water color would be clear indicator of what it is.

@kocio-pl kocio-pl self-assigned this Sep 16, 2017
@andrewharvey
Copy link

Maybe we should just drop the icon and show only the name and height when available. For example "Salto Ángel (979 m)" in a standard water color would be clear indicator of what it is.

I'd prefer an icon. There are many unnamed waterfalls which would be useful to show, and without the icon and only the name, it can be unclear what the name is for.

@kocio-pl
Copy link
Collaborator

And what icon should it be then?

@andrewharvey
Copy link

@kocio-pl
Copy link
Collaborator

That's the same as proposed by @nebulon42 in #336 (comment). 😄

Because I was the one who opposed back then and now I am willing to accept it, I guess we could use this shape.

@SomeoneElseOSM
Copy link
Contributor

For info (just to show another rendering example) I went with a blue dot over at https://map.atownsend.org.uk/maps/map/map.html#zoom=17&lat=54.413704&lon=-2.0975 . The text has a big halo because often it gets rendered over natural=water colour.

@gpsvisualizer
Copy link

I'm resurrecting this old thread because most of my mapping efforts are outdoors-related, and we have a LOT of waterfalls in Oregon, and the lack of an icon for them seems like a major omission to me. What can we do to make this happen?

@kocio-pl
Copy link
Collaborator

If you share my opinion that this icon:

https://github.com/gmgeo/osmic/blob/master/nature/waterfall-14.svg

is good enough, you can try to prepare the code to show it (with a label perhaps and maybe even with height if you can, but that might be added later on).

Basically we need more coders, from copy-paste level beginners willing to fix small bugs to SQL/Carto CSS/Mapnik experts ready to make code refactoring (like #2869) and everyone in between who wants to implement selected features (like good first issue ). The basic facts about this style and how to install testing environment relatively easily using Docker:

Would you like to try? Let me know if you want any help.

@gpsvisualizer
Copy link

I'm afraid I don't know anything about the coding. My hands-on help will probably have to be limited to graphics.

I was hoping that in this case, no new code need to be invented; since a waterfall is just a point, wouldn't it be rendered the same way as a peak or a saddle or a spring? In fact, the rules and zoom levels for waterway=spring would probably be just about perfect for waterfalls.

I'll take a look at that waterfall-14 icon.

@kocio-pl
Copy link
Collaborator

kocio-pl commented Mar 31, 2018

I'm not a coder too, yet I'm able to make decent PRs just by cloning and tuning code of similar features, as you have just noted. It doesn't matter how small a given feature is - it has to be selected from database in project.mml and have a style defined in a related MSS file.

This is not a rocket science, for example style definition for peak icon looks like this:

[feature = 'natural_peak'][zoom >= 11] {
marker-file: url('symbols/peak.svg');
marker-fill: @landform-color;
marker-placement: interior;
marker-clip: false;
}

@gpsvisualizer
Copy link

It's not the .css code itself that worries me. I'm unfamiliar with the whole terminology of "pull requests" and git and all of that. And I'm spread too thin right now to learn a whole new process!

@kocio-pl
Copy link
Collaborator

Sure, you can do it whenever you feel you're ready (or just frustrated enough 😄 ).

Basic facts about our workflow:
https://github.com/gravitystorm/openstreetmap-carto/blob/master/CONTRIBUTING.md#workflow

@gpsvisualizer
Copy link

gpsvisualizer commented Mar 31, 2018

Here's my attempt to clean up the proposed waterfall icon a little bit; I chaged the "waves" at the bottom, made the top a tiny bit thicker, and extended the vertical lines.

Original: waterfall-14

Adjusted: waterfall2-14

In blue: waterfall2-14-blue

@kocio-pl
Copy link
Collaborator

I like original more because there's a space between water streams and waves, which makes this shape more readable.

@gpsvisualizer
Copy link

I added a little space.

v1: waterfall-14

v2: waterfall2-14

v3: waterfall3-14

v3: waterfall3-14-blue

v1-v2-v3: waterfall-14 waterfall2-14 waterfall3-14

@kocio-pl
Copy link
Collaborator

I like v3, since it's taller than original, has a space and the waves are a bit easier to recognize. Could you share this code as a gist?

@gpsvisualizer
Copy link

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

Successfully merging a pull request may close this issue.

10 participants