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

wind turbines: do not show minor ones at zooms 15/16/17 #1017

Closed
matkoniecz opened this issue Oct 6, 2014 · 29 comments · Fixed by #3515
Closed

wind turbines: do not show minor ones at zooms 15/16/17 #1017

matkoniecz opened this issue Oct 6, 2014 · 29 comments · Fixed by #3515

Comments

@matkoniecz
Copy link
Contributor

PR #248 converted into a ticket

@danstowell suggests that we don't want to render all wind-turbines at zoom 15/16/17, only those marked man_made=tower.

Wind-turbines are sometimes significant landmarks (usually standlone towers) and sometimes not (small building-mounted turbines). The carto style currently errs on the side of eagerly showing wind turbines, which for some examples of tiny turbines in the city is undue prominence. Here's an example in Birmingham:

birmingham-turbine
http://www.openstreetmap.org/#map=15/52.4836/-1.8881

Here's an example in London:
highbury-turbine
http://www.openstreetmap.org/#map=15/51.5439/-0.1037

I asked on the "tagging" mailing list if anyone had suggestions. There wasn't much controversy, but not much definite direction. One suggestion was that landmark=yes could disambiguate. Seemed OK to me, but searching actual use, I don't see this actually used for wind turbines.

However, in Europe there are 427 wind turbines also marked with man_made=*, of which 133 are man_made=tower. (Other values include things not encouraged by the wiki such as man_made=wind_turbine, and things not relevant to landmarkness such as man_made=power.)

@gravitystorm

So to follow-up our in-person discussion:

  • Yep, I think it's good to differentiate, if possible. The rendering of wind turbines on this style is as much (if not more) about their giant landmarkness than their electricity supply interestingness.
  • I don't like "landmark=yes", since it's completely subjective
  • I worry that since they are all on towers of one height or another, then that doesn't distinguish

Perhaps a height, or a tower height tag?

@mboeringa

This pull-request suggests that we don't want to render all wind-turbines at zoom 15/16/17, only those marked man_made=tower.
...
I worry that since they are all on towers of one height or another, then that doesn't distinguish

I think the better solution to this, might be to consider the power output in kW of a turbine. Small turbines of less than say 50-100 kW, could be left out of the rendering at certain zoom levels, or drawn with a smaller icon. Larger turbines than these, are less likely to be found in dense city quarters, and if they do, like in industrial zones, they should probably be rendered.

Although it needs looking up in tag info for verification, I think the rated output may actually be also more consistently tagged on turbines, than the man_made=tower tag which is actually superfluous for a turbine, given the fact that turbines have their own tagging scheme.

The rated output of the turbine is, according to the new Power scheme, stored in either the "generator:output", or "generator:output:electricity" key, with the latter key the recommended one, but of course, the first option is likely to also exist in the OSM database. In a less optimal situation, the rated output of the turbine, might also have been tagged in the "plant:output(:electricity)" namespace, but this is inappropriate for a single turbine, at least not with "generator:output" as well.

@matkoniecz matkoniecz added this to the 3.x - Needs upgrade to mapnik or openstreetmap-carto.style milestone Oct 6, 2014
@matkoniecz
Copy link
Contributor Author

Both height and generator:output:electricity are currently not in the database.

@matthijsmelissen
Copy link
Collaborator

I worry that since they are all on towers of one height or another, then that doesn't distinguish

This is the one in Birmingham: http://upload.wikimedia.org/wikipedia/commons/3/33/Aston_University_Student_Village_phase_2_completed_-_James_Watt_Queensway.jpg
(Yes, it's the tiny thing on top). Not sure if that would count as a tower?

@danstowell
Copy link
Contributor

That might even be the one that inspired my pull request! I would say it's not a tower.

However, the real big issue is that there's no actual tag in use that indicates when a turbine is minor. Current practice does not tag any attributes of the support other than vertical/horizontal, doesn't tag height, and doesn't give the wattage of the turbine (no surprise, since to most surveyors that wouldn't be evident). So I must admit I don't think there's anything we can do at the rendering end, yet - we just have to wait for a convention to emerge from tagging practice...

@danstowell
Copy link
Contributor

P.S. There is also this conversation I started on the tagging list in 2013. The conversation was fairly inconclusive.

@mboeringa
Copy link

Current practice does not tag any attributes of the support other than vertical/horizontal, doesn't tag height, and doesn't give the wattage of the turbine (no surprise, since to most surveyors that wouldn't be evident).

While I agree probably not many wind turbines carry additional tags useful for discrimination (either by height / size or rated output) at this time since no real "turbine" specific tagging scheme seemed to exist, the new power scheme, including wind power, is now pretty well defined (e.g. see here: http://wiki.openstreetmap.org/wiki/Tag:power%3Dgenerator). Information about wind turbines power output, is often public-ally available and easily found, as it is a major selling point of wind turbine manufacturers. If the type of the turbine is known, than its rated maximum output is quite easily found, so I expect this information to trickle down to the OSM database.

And some urban turbines _do_ carry the required attributes, e.g. see these examples, including ones on top of buildings in London's city centre (but admittedly, this is probably a rarity):

http://www.openstreetmap.org/node/916163619
http://www.openstreetmap.org/node/914501326

@pnorman
Copy link
Collaborator

pnorman commented Dec 15, 2016

I must admit I don't think there's anything we can do at the rendering end, yet - we just have to wait for a convention to emerge from tagging practice...

Has this changed?

@jeisenbe
Copy link
Collaborator

I'm considering this issue again, since I'm looking to adjust the icon positioning per #3176

We can hide wind turbines on buildings in the city by using the same code to check for location on rooftop or roof, as with towers and masts: 'power_' || CASE WHEN power IN ('generator') THEN power AND (tags->'location' NOT IN ('roof', 'rooftop') OR (tags->'location') IS NULL)) THEN power ELSE NULL END,
We could also use height to render short wind turbines later. I was not able to find the percentage of wind turbines that have a height listed, but we could render shorter turbines later and continue to render height=null at z15.

Thoughts?

@kocio-pl
Copy link
Collaborator

Sounds sane for me.

@mboeringa
Copy link

We could also use height to render short wind turbines later. I was not able to find the percentage of wind turbines that have a height listed, but we could render shorter turbines later and continue to render height=null at z15.

I think the better solution to this issue is the use of the generator:output:electricity tag and its values in kW or MW, as I think this important key for generators like turbines is far more common than supplementary tags like location=rooftop or height=x. @matkoniecz already suggested this above in #1017 (comment).

The database is hstore enabled by now, isn't it, so this key is usable?

@kocio-pl
Copy link
Collaborator

The database is hstore enabled by now, isn't it, so this key is usable?

Yes, we have almost all the keys available since v4.0.0 (except some filtered as non interesting for rendering on general map).

@mboeringa
Copy link

Yes, we have almost all the keys available since v4.0.0 (except some filtered as non interesting for rendering on general map).

OK, of course, a combined filtering based on power output and location is also a possibility. If one doesn't catch it, than the other one does.

@jeisenbe
Copy link
Collaborator

jeisenbe commented Nov 11, 2018 via email

@jeisenbe
Copy link
Collaborator

I would like to try rendering wind turbines at:
z14 >100m height
z15 for height > 50m, and if height is not tagged
z16 for height >30 m but less than 50m
z17 for height <30 m
No rendering for wind turbines on rooftops. (These are usually more for show than for producing significant amounts of energy. Urban areas are not good places for wind generators)

This would match other tall features for orientation in rural areas such as towers and masts.

I'd be happy to consider using generator:output:electricity instead, if someone can find how this would correlate with the size of the generator, and if it's used more often than height. Maybe someone else already has some data downloaded and can check?

The other thing I noticed is that the wind turbine icon is currently black, instead of man-made-icon gray. I would recommend changing this to match.

@Adamant36
Copy link
Contributor

I don't know how helpful it is, but height is used on generator:method=* 6,352 times and 7, 999 times on generator:output:electricity. I don't know how you only came up with 500 uses of generator:output:electricity if 7,999 of them are tagged with height. That doesn't seem right. Also, I don't know how many of those are wind turbines. There's probably a math formula to figure it out that I'm just not privy to.

Unfortunately there isn't any combination stats for generator:method=wind_turbine on Taginfo because the numbers aren't high enough and there's way to find it in combination section of the height page. They should lower the numbers required for things to show up in the database.

86,700 buildings are co tagged with generator:method, of those 71,137 are tagged with generator:output:electricity.

There's 90,180 uses of generator:source on buildings with 171,623 uses of generator:source=solar  overall. Given that generator:output:electricity is used 71,137 times and is obligatory for solar, I feel like you could come up with a formula that would subtract the amount of one of those from the other. Then divide or something. In order to figure out how many are used on wind turbines or something. I'm way out of my depth though.

I do think if your not going to render wind turbines on roof tops you might be missing out on a lot of them though. It looks like some of them can be pretty substantial and you shouldn't not render them just because some people decide to map the more minor insignificant ones. The solution there might be rendering based on height also. Exclude rendering of ones shorter then 10 feet or something and you'll weed out all the minor ones.
roof wind turbine
roof wind turbine 2

@jeisenbe
Copy link
Collaborator

jeisenbe commented Nov 13, 2018

The most common value of generator:output:electricity is "yes" (about 67%) and that's what I've seen on several wind turbines.https://taginfo.openstreetmap.org/keys/generator%3Aoutput%3Aelectricity#values

According to this tag info, there are over 223,000 nodes tagged generator:source=wind (and just a handful of ways and relations). https://taginfo.openstreetmap.org/tags/generator:source=wind

I checked overpass in the Netherlands and found 2134 nodes with "generator:source"="wind". There are 621 nodes with "generator:source"="wind" and generator:output:electricity, but generator:source=wind with generator:output:electricity=yes was found 163 times, so only 458 nodes out of 2134, or less than 22%, have a useful electricity value. But only 221 in the Netherlands have "height", about 10%.

In Scotland there are 2753 total; 21 with height and 1011-381 = 630 with generator:output:electricity (not =yes).

California has 10363 total, only 159 have height. 3219 have generator:output:electricity but 2700 =yes, so only 519 have a useful value (about 10%).

Unfortunately, the values of generator:output:electricity include MW or kW, so I'm not sure how to code this.

[out:json][timeout:60];
{{geocodeArea:California}}->.searchArea;
(
  node["generator:source"="wind"]["generator:output:electricity"="yes"](area.searchArea);
);
out body;
>;
out skel qt;

Another thing to consider for the PR would be to remove power_source=wind from the code, because this key is deprecated and power_source=wind is only used 200 times now: https://taginfo.openstreetmap.org/keys/?key=power_source#values https://wiki.openstreetmap.org/wiki/Key:power_source

@Adamant36
Copy link
Contributor

Thanks for the information. How do you do a TagInfo search for the amount of uses for only California?

@mboeringa
Copy link

mboeringa commented Nov 13, 2018

I checked taginfo, and generator:output:electricity seemed to be used only 500 times, versus 100,000+ wind turbines, but perhaps I did the search wrong?

I don't know how helpful it is, but height is used on generator:method=* 6,352 times and 7, 999 times on generator:output:electricity. I don't know how you only came up with 500 uses of generator:output:electricity if 7,999 of them are tagged with height. That doesn't seem right. Also, I don't know how many of those are wind turbines. There's probably a math formula to figure it out that I'm just not privy to.

I agree this figure of 500 is likely way to low, just look at this Overpass Turbo query that selects wind turbines by both looking at the generator:source=wind and generator:method=wind_turbine tags to determine whether a tagged object is a wind turbine.

I assume here anything tagged with generator:source=wind is a wind turbine even if it hasn't got an additional generator:method=wind_turbine tag, but, although this assumption may theoretically be false, practically it should be fine given current technology - those elusive wind harvesting kites are still not there in real world application.

Admittedly, a lot of the selected features, maybe 1/3 to 1/2 are just generator:output:electricity=yes, but the rest does have values in kW or MW.

Overpass Turbo query selecting wind turbines

@jeisenbe
Copy link
Collaborator

jeisenbe commented Nov 14, 2018

@mboeringa you are right, I must have done the query wrong (perhaps I was using a smaller bounding box than I intended).

It looks like 5% to 30% of wind turbines are tagged with generator:output:electricity with a useful value, depending on location, and this is at least twice as common as the height tag.

Does anyone know how we can do a SQL query that selects the numeric values, properly adjusted for units (W, kW, MW and GW)?

@jeisenbe
Copy link
Collaborator

Here are two options for screening by location= roof or rooftop

  1. Use the SQL queries in project.mml to not select any power generators with location=rooftop or roof
    Hidden rooftop wind turbine z19
    islington-wind-hidden
    Hidden rooftop wind turbine z19
    chase-wind-hidden
    Not hidden; no location tag
    blackfriars-z18

  2. Use location to render wind turbines at z19 if on rooftops / roof
    Visible at z19 only
    blackfriars-z18
    islington-wind-19
    Still visible at z18 (no location tag)
    blackfriars-z18

In the code above I've removed power_source=wind (only 200 uses now; deprecated) and added generator:method=wind_turbine

I like the idea of using the generator:output and generator:output:electricity tags to further refine the initial zoom level, but I don't know how to do the SQL query.

Maybe something like:

           CASE
              WHEN "power" IN ('generator') THEN
                CASE
                  WHEN tags->'generator:output:electricity' ~ '^\d{1,4}(\.\d+)?( W)?( kW)?( MW)?( GW)?$' THEN (SUBSTRING(tags->'height', '^(\d{1,3}(\.\d+)?( W)?( kW)?( MW)?( GW)$'))::NUMERIC
                  ELSE NULL
                END
              ELSE NULL
            END AS wattage,

But there would need to be an adjustment, adding 3 places for KW, and again for MW and GW; I think the code above would consider 10 kW to be the same as 10 GW, clearly wrong.

@jeisenbe
Copy link
Collaborator

I have pushed two branches to my fork, and I can do a PR as soon as we decide which option is best

  1. Uses SQL queries in project.mml to not select any power generators with location=rooftop or =roof
    https://github.com/jeisenbe/openstreetmap-carto/tree/windturbine-not-rooftop

  2. Uses location to render wind turbines at z19 if on rooftops / roof, and at z15 otherwise
    https://github.com/jeisenbe/openstreetmap-carto/tree/windturbines-z19-rooftop

Both branches also change the wind turbine icon color to man-made-icon gray,
and start rendering name labels for wind turbines in the same color as other man-made features.

@Adamant36
Copy link
Contributor

Personally, id go with number 2. Its worth rendering ones on roofs. There doesn't seem to be any problem with them being rendered. So I don't see why not. Unless your deciding what to render and not render based on something completely arbitrary. Which could lead to a lot of other things not being rendered in other certain weird circumstances. So, there should be a standard. Either an item is rendered or not. There's shouldn't be an "uummm sure, but not in this instance." At least in this instance. I think rendering rooftop ones at z19 is a good compromise. Although, that's kind of arbitrary also. At least they are rendered that way though.

@jeisenbe
Copy link
Collaborator

jeisenbe commented Nov 14, 2018 via email

@Adamant36
Copy link
Contributor

Yeah, obviously. That's always an issue with things though. Its kind of a matter of if the wind turbine is in the same location of the POI or not. Id guess in most cases it wouldn't be. Your looking a slim probability based on the size of the building that it is. Especially if its only for Z19. If it does get in the way though, id assume, although I'm only speculating, that the POI icon would take precedence and the wind turbine just wouldn't display. Which is no big deal. Its kind of an "addon" feature in cases where they are part of a roof anyway.

@Adamant36
Copy link
Contributor

Btw, I appreciate the energy and diligence you have been putting into issues the last couple of weeks. I was doing PRs at a pretty good pace for a few months there, but unfortunately I haven't been able to dedicate much time to it lately. So its nice to see someone picking up the slack. Especially considering that your dealing with more then a few issues that are out of my coding expertise.

@jeisenbe
Copy link
Collaborator

@kocio-pl, what are your thoughts about excluding all rooftop wind turbines vs rendering only at z19? Both options are ready for a PR.

@kocio-pl
Copy link
Collaborator

They are probably much less common there than chimneys, so maybe we could render them at all.

@jeisenbe
Copy link
Collaborator

jeisenbe commented Nov 15, 2018 via email

@kocio-pl
Copy link
Collaborator

Chimneys on the roofs are never displayed, because there is a lot of them and it would dominate all the buildings, even on z19. Wind turbines on the roofs are not as popular, so it is probably safe to show them on z19+.

@jeisenbe
Copy link
Collaborator

jeisenbe commented Nov 16, 2018 via email

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