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 golf=* #661

Closed
dieterdreist opened this issue Jun 24, 2014 · 29 comments · Fixed by #4381
Closed

Add rendering for golf=* #661

dieterdreist opened this issue Jun 24, 2014 · 29 comments · Fixed by #4381

Comments

@dieterdreist
Copy link

Please consider importing the "golf" key and render its values, they are documented here:
http://wiki.openstreetmap.org/wiki/Tag:leisure%3Dgolf_course
Particularly golf=
bunker (rendered as sand)
hole (the hole area)
pin (zoom 18/19?)
green
fairway
rough (rendered like natural=scrub)

@Klumbumbus
Copy link

+1
How the rendering looks on OSM-FR: http://tile.openstreetmap.fr/?zoom=16&lat=48.72648&lon=2.60806

@gravitystorm gravitystorm added this to the 3.x - Needs upgrade to mapnik or openstreetmap-carto.style milestone Jun 24, 2014
@MarkCupitt
Copy link

@matthijsmelissen
Copy link
Collaborator

@Grillmannen
Copy link

At least bunkers can be tagged with natural=sand and fairways/tees/greens as landuse=grass. Water hazards are a little dubious because they usually aren't exacly the same as the natural=water but the lakes and streams can be tagged as they would outside of golf courses anyway.

Pins probably shouldn't be tagged since they are often moved around at different locations on a daily basis. Golf gps units usually count distances to the middle of the green or the green border.

Anyway I like this proposal.

@dieterdreist
Copy link
Author

2014-06-25 4:49 GMT+02:00 Grillmannen notifications@github.com:

At least bunkers can be tagged with natural=sand and fairways as
landuse=grass.

yes, osm allows to add any tag to anything, and there is no verification
besides the mappers, but both suggestions seem bad to me (basically tagging
for the renderer). natural=sand doesn't make sense, from no point of view,
first because "sand" is not something that fits into the
general/traditional scheme of "natural" (like "bay", "peak", "spring",
"scrub", "volcano", "cave_entrance", "tree", "wetland", "coastline",
"grassland", "glacier", "cliff", "heath", "beach", "wood", etc.) which are
all geographic features but are NOT descriptions of materials like "mud",
"sand", "ice", "grass", etc. . After "recent" wiki fiddling this isn't very
clear any more, and natural now seems to be a strange collection of stuff
viewed according to orthogonal concepts. BUT: even if you don't agree with
the above definition that natural should be an abstract geographic feature
but instead everything from "mother nature", it will still not be fitting
here, as golf bunkers aren't "natural" neither from this point of view,
they are clearly artificially designed and built.

landuse=grass isn't a nice tag either, (because "grass" is not a "use", and
even less on a fairway, whose use is something like "recreational" as being
part of a golf course), but was introduced to cover green areas on traffic
islands and along roads. It shouldn't be used for every strip of grass that
is growing somewhere (e.g. there is the tag landuse=meadow which does fit
under the "use" category).

IMHO the main style sheet shouldn't encourage bad (against logics) tagging,
because we will be ending up in an unlogic system where the keys will be
arbitrary and mapping will become more difficult (as will be impossible to
introduce new tags into a logical system, because the latter will have
vanished). FWIW, looking at the natural key page in the wiki, we are almost
there ;-)

I'm going to post something like this also on [tagging].

@matkoniecz
Copy link
Contributor

tile.openstreetmap.fr example is not the best example, default style displays almost the same things.

Main difference is not rendering these Orange/Bleu/... lines, weird for somebody without golf knowledge (it is using barrier symbol, or at least something very similar). I am not sure is it a good idea for a default layer.

@geozeisig
Copy link

A long time has passed and nothing has happened. So everybody uses tags that are rendered. That may be landuse=grass, leisure=pitch, highway=path (with golf=hole) etc. That is "Tagging for the renderer" and it is provoked when golf=* has not been rendered.
It is right that there may be up to 4 tee boxes on a given hole. In most cases, however, only one (the furthest) is drawn. In any case, this should not prevent us from finding a solution.
How it made on osm.fr is quite a discussion basis.

@nebulon42
Copy link
Contributor

"Nothing has happened" is not quite correct. This depends on the rendering database schema change, which is covered in #2533. So there is already a PR for the prerequisite to this issue and it is close to being merged.

@ElminsterAU
Copy link

Given that all the prerequisites should be in place now, any chance something can be done about this in the near future?

I just tried mapping part of a golf course, and while this is how it looks in josm:

image

and this is how it's being rendered:

image

which is... somewhat disappointing.

As a minimum, I would be happy if areas (closed way or multipoly) with the following tags could just be rendered in different colors:

golf=bunker (as sand)
golf=rough (green, lighter than natural=scrub, darker than landuse=grass)
golf=fairway (green, either same or slighly lighter than landuse=grass)
golf=green (green, lighter than landuse=grass)
golf=tee (green, same as golf=green or between golf=fairway and golf=green)

Also, I would VERY much like leisure=golf_course to use a different color than natural=scrub.

Anything more complex than just coloring these areas can wait for later. But just these would greatly improve the visual feedback mappers get from mapping golf courses and would hopefully reduce the instances were golf features are tagged with nonsensical tags purely to make them show up in some way in the map.

@kocio-pl
Copy link
Collaborator

Would you like to prepare the code for this?

@geozeisig
Copy link

golf=pin (node) should be a small flag like this
golf_pin-14
The circle is almost in the middle because here the line for the hole ends.
golf_pin

golf=hole The way into the hole as a gray line.
golf=tee (node) As a small gray circle

@Tomasz-W
Copy link

I think it's too specialized for general map and we should reject this tha same as #3161

@kocio-pl
Copy link
Collaborator

I guess you're right, it's even more specialized.

@Adamant36
Copy link
Contributor

Darn, I was totally in the process of testing it out too. Although I agree its rather specialized, I think we should render golf related stuff anyway because its being miss tagged quite a lot. Plus, its being rendered properly on the French and German maps also. So why not?
As an example, I was only able to find a few golf courses in Northern California that didn't have greens tagged as landuse=grass and there are a lot of golf courses here. The wiki says there's currently 40,164 uses of just fairways and 82.32% are tagged as landuse=grass. There's 63,248 uses of golf=tee, 49,853 uses of golf=green of which 70.13% are tagged with a landuse tagged, and 110,003 uses of golf=bunker. I would hardly call those numbers specialized. Things with 1/10th those numbers are rendered. If for nothing else it would be helpful if they could be rendered properly just to encourage good tagging practices, instead of just leaving it for people to map for the render when its clearly such a big problem.

@Tomasz-W
Copy link

@Adamant36 In the topic of golf courses, you can taka a look at #2069 and try with an outline, because area filling seem to not working good there.

@Adamant36
Copy link
Contributor

@Tomasz-W, from the discussion on issue #426, it sounds like that issue was particular to leisure=golf. Which I assume is different from the particular golf=whatever tags. Plus it only in one situation which wasbnt that bad and not rendering something based on one outlier seems a little muh to me. Plus, #2069 is about the golf course as a whole being rendered, not its individual features. So its different then this one. Whatever issues it has. Not to mention mapping things like a green with an outline will do nothing to detor it from tagged as grass, if every feature on a golf course is shown as an outline instead of fill they will class with each other and look bad like national parks in northern California do now, and showing things like a pin or sand trap as an outline just isnt realistic. So I still think this should be reopened and reconsidered. It seemed like there was more support for it then oposition and the tags have thousands of uses.

@imagico
Copy link
Collaborator

imagico commented Jul 18, 2018

Note rendering golf=* features is currently complicated due to the database scheme not treating them as polygons by default.

@jeisenbe
Copy link
Collaborator

I think it would be worth rendering some of the golf tags. It would be straightforward to render fairways, tees and greens the same as grass and bunkers as sand. While it is somewhat specialized, the tags are used frequently are they are better than using landuse=grass and natural=sand to get the same rendering.

@kocio-pl, would you consider reopening this?
@Adamant36, do you want to try this?

@kocio-pl
Copy link
Collaborator

Sure, I will reopen if there will be a pending discussion, to reflect that there's some progress.

@Adamant36
Copy link
Contributor

Sure. I had them rendering a while back. It was a little complicated and took an extra .mss file for some reason. But im sure I can figure it out again.

@jeisenbe
Copy link
Collaborator

Reopened; requires database reload but we should decide first if these features should be added to the lua schema, so this requires some discussion about if it's worth considering.

While I'm not a fan of golf myself, since these are such prominent features and double-tagging for rendering is some common, I think rendering might be worthwhile to improve the tagging . Most of the features could be rendered similarly to a common type of landcover, so it would not add to the burden of finding new colors, nor would new svg icons be required. The French style provides some ideas for implementation.

@jeisenbe
Copy link
Collaborator

#4017 is now open to import the features properly as polygons when mapped as closed ways.

@jeisenbe
Copy link
Collaborator

These features are now imported with the correct schema, so it is possible to open a PR to solve this issue.

I would suggest looking at how golf features are rendered in the French style (https://github.com/cquest/osmfr-cartocss/blob/master/sports.mss) and the alt-colors style (https://github.com/imagico/osm-carto-alternative-colors/blob/alternative-colors/golf.mss).

@Adamant36
Copy link
Contributor

@jeisenbe, would it be coded like a normal feature now or does it still take the work around other styles use? I had it rendering fine before it was imported and I fail to see what the difference would be now. Less code and increased speed or something else?

@jeisenbe
Copy link
Collaborator

All closed ways with golf= tags which represent an area, like water hazards, faireways, greens, sandtraps etc, are now imported as polygons, so nothing fancy is required to render these with a fill color now.

The tags are in the hstore "tags" column, I believe, so you would need to select the features like this:

'golf_' || CASE WHEN tags->'golf' in ('bunker', 'fairway', 'green', <etc>) THEN tags->'golf' END,

@dktue
Copy link

dktue commented Jul 27, 2020

I support the suggestion to render golf-tags. Yes, it's specialized but on a vast area like a golf course, where nothing else is of interest, I think it should be rendered.

jgruca pushed a commit to jgruca/openstreetmap-carto that referenced this issue Sep 29, 2020
- Update landcover layer to include golf area features
- Add golf-lines layer
- Add style/golf.mss and specify rendering for:
  - golf=green and golf=tee (light green color between @grass and @park;
    tee with gray point labeled with ref)
  - golf=fairway and golf=driving_range (@grass)
  - golf=bunker (color and pattern for @sand and beach)
  - golf=rough (darker green between @scrub and @grass)
  - golf=hole as way (dashed line, darker green derived from @golf_course; labeled with ref)
  - golf=hole as point and golf=pin (symbols/golf_pin.svg; labeled with ref)

Based largely on imagico/osm-carto-alternative-colors.
@jgruca
Copy link
Contributor

jgruca commented Sep 29, 2020

I've opened #4212 based on what I understand the current state of this issue is. All comments welcome.

jgruca pushed a commit to jgruca/openstreetmap-carto that referenced this issue Apr 19, 2021
- Update landcover layer to include golf area features
- Add golf-lines layer
- Add style/golf.mss and specify rendering for:
  - golf=green and golf=tee (light green color between @grass and @park;
    tee with gray point labeled with ref)
  - golf=fairway and golf=driving_range (@grass)
  - golf=bunker (color and pattern for @sand and beach)
  - golf=rough (darker green between @scrub and @grass)
  - golf=hole as way (dashed line, darker green derived from @golf_course; labeled with ref)
  - golf=hole as point and golf=pin (symbols/golf_pin.svg; labeled with ref)

Based largely on imagico/osm-carto-alternative-colors.
jgruca added a commit to jgruca/openstreetmap-carto that referenced this issue Apr 21, 2021
- Change leisure=golf_course/miniature_golf_course to @campsite, eliminating @golf_course color
- Update landcover layer to include golf area features
- Update amenity-points layer to include golf point features
- Add golf-line layer
- Add style/golf.mss and specify rendering for:
  - golf=tee/fairway/driving_range (@grass, z>=12)
  - golf=green (@pitch, z>=13)
  - golf=bunker (@sand, z>=13)
  - golf=rough (@grass, z>=12; with texture, z>=15)
  - golf=hole as way (solid @leisure-green line, labeled with ref, z>=16)
  - golf=hole as point and golf=pin (symbols/golf_pin.svg; labeled with ref in @leisure-green, z>=16)
pnorman added a commit that referenced this issue Sep 11, 2021
Update leisure=golf_course color and render golf=* features (#661)
@Silleroco
Copy link

Hello good,

We are looking for a database already made that contains the maps of the fields and fairways of a golf course or people who help us to do it. It's for a pilot project, can someone help or guide me?

Thank you very much in advance.

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