-
Notifications
You must be signed in to change notification settings - Fork 819
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
Update leisure=golf_course color and render golf=* features (gravitystorm#661) #4381
Conversation
- 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)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think the polygon fill colors are overall a good choice - though the rough color is IMO too close to scrub color and too different from grass color. A rough is AFAIK usually still just longer grass so a much darker color indicating something different is a bit misleading. See the following comparison with how the ac-style renders it:
I also don't think it is a good idea to add further labels/linework/symbols in green color that are not strictly vegetation related. We would most certainly maneuver us seeing eyes into a situation similar to that with blue cycleways conflicting with the use of blue for water related features.
The hole symbol not being centered at the base of the flag seems to be a bit confusing to me.
- Adjust rough color to be lighter - Change golf-lines colors to be @admin-boundaries - Modify golf_pin.svg with invisible bounding box to work around mapnik#1122 - Remove explicit bbox condition in SQL - Leave @golf_course variable defined
I've updated the rough color; see screenshots below.
I tried changing these to
This appears to be a bug in mapnik with a workaround. I've adjusted the SVG file so the bounding box of the marker is calculated correctly. Updated images: https://www.openstreetmap.org/#map=15/41.7849/-93.7247 https://www.openstreetmap.org/#map=14/41.8705/-93.2144 |
I like this! My only criticism is that the color of the greens seems a little too close to the color of the water. Maybe modify it to be less blue. #B5E3B5, which I think is the current carto golf course fill, might work? Also a question: if a hole has a name and a ref, how will that be handled? It would probably be ideal to include both ref and name, at least at higher zoom levels. (For example see the Jubilee Course at St Andrew's) |
…ift pin SVG instead of changing SVG file, make sure golf=pin ref label actually renders
I agree. This came up in the previous PR too, with @imagico agreeing to some extent. I'm trying to build consensus, though, and so far consensus seems to mean
It looks like the tile.openstreetmap.fr renderer will display hole |
If the pitch color has issue with being too similar to other colors with a very different meaning the right way is to change the pitch color, not to introduce a new color to address the issue only for new color uses. Current pitch color was selected in #2363. I don't think introducing yet another point symbol color and overloading the dark purple for administrative boundaries for other stuff are a good idea. Generally speaking dark purple is always a very problematic color where mixing with other (background) colors happens because it leads to all kind of weird colors in combination with the green tones in many areas dominating the base map (in particular also on golf courses). For the lines i would probably go either with a neutral color or try a very feint green drawn directly above the landcover and water layers. Not sure if that would work though, just an idea. |
Thanks for the input. Using
I don't disagree. Is that something that should be proposed in a separate PR? |
I updated the first comment in this PR to match the current state of the PR. Comments welcome. |
Like with #4331 this should be reviewed by someone else because i am a bit prejudiced by having picked a different design approach to this elsewhere. |
Dismissing as stale because there have been fundamental changes since then
I'd love to have something like this merged, as someone who loves mapping golf courses. Most existing golf courses I see are mapping for the renderer, despite the wiki saying:
I don't make sweeping changes to existing golf courses when I see people having used |
Reviewing isn't just for maintainers. Everyone can review. |
I like the new color. Maybe one thing to consider. In issue #3143 it was also proposed to change the greens in order to be able to render landuse=meadow and natural=grassland differently. There it was proposed to give campsite the same color as the golfcourse (the old color) and use the campsite color for landuse=meadow ( you now used the old campsite color or golf courses). I don't have a problem with the new golf course color, it is just because of the limited amount of available greens, it is good to also take this into account. Maybe (in a new PR for #3143) the new golf course color can be used for both golf courses and meadows. The campsite then needs to be changed to the green of leisure (see image at the end of #3143). |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I still need to review the cartography, but found some technical issues.
project.mml
Outdated
@@ -2024,7 +2041,8 @@ Layer: | |||
OR leisure IN ('slipway', 'track') | |||
OR waterway IN ('dam', 'weir') | |||
OR "natural" IN ('arete', 'cliff', 'ridge')) | |||
AND name IS NOT NULL | |||
AND name IS NOT NULL) | |||
OR tags @> 'golf=>hole' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is going to have negative performance impacts since it will be unable to use the planet_osm_line_name index
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What's the best way to address this?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm thinking WHERE ([existing conditions] AND name IS NOT NULL) OR ([new conditions] AND ref IS NOT NULL)
then rename the planet_osm_line_name index to planet_osm_line_label and make it have the condition name IS NOT NULL OR ref IS NOT NULL
, but it could use more thought and testing.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I concur - we also have other queries from planet_osm_line which have a ref IS NOT NULL
condition, that is roads-text-ref
and roads-text-ref-minor
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I've updated the index defined in indexes.sql
/indexes.yml
and reformatted the query's condition as described.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I ran EXPLAIN
on a sample query, and it does appear the index is being used and has a positive effect on query cost.
With only planet_osm_line_name
:
Bitmap Heap Scan on planet_osm_line (cost=55.42..3376.13 rows=7 width=85)
Recheck Cond: (way && '<snip>'::geometry)
Filter: ((((man_made = ANY ('{pier,breakwater,groyne,embankment}'::text[])) OR ((man_made = 'pipeline'::text) AND ((tags -> 'location'::text) =
ANY ('{overground,overhead,surface,outdoor}'::text[]))) OR (bridge = ANY ('{yes,aqueduct,cantilever,covered,trestle,viaduct}'::text[])) OR (tags @>
'"attraction"=>"water_slide"'::hstore) OR (aerialway = ANY ('{cable_car,gondola,mixed_lift,goods,chair_lift,drag_lift,t-bar,j-bar,platter,rope_tow
,zip_line}'::text[])) OR (leisure = ANY ('{slipway,track}'::text[])) OR (waterway = ANY ('{dam,weir}'::text[])) OR ("natural" = ANY ('{arete,cliff,
ridge}'::text[]))) AND (name IS NOT NULL)) OR ((tags @> '"golf"=>"hole"'::hstore) AND (ref IS NOT NULL)))
-> Bitmap Index Scan on planet_osm_line_way_idx (cost=0.00..55.42 rows=951 width=0)
Index Cond: (way && '<snip>'::geometry)
After creating planet_osm_line_label
:
Bitmap Heap Scan on planet_osm_line (cost=18.47..1116.75 rows=7 width=85)
Recheck Cond: ((way && '<snip>'::geometry) AND ((name IS NOT NULL) OR (ref IS NOT NULL)))
Filter: ((((man_made = ANY ('{pier,breakwater,groyne,embankment}'::text[])) OR ((man_made = 'pipeline'::text) AND ((tags -> 'location'::text) =
ANY ('{overground,overhead,surface,outdoor}'::text[]))) OR (bridge = ANY ('{yes,aqueduct,cantilever,covered,trestle,viaduct}'::text[])) OR (tags @>
'"attraction"=>"water_slide"'::hstore) OR (aerialway = ANY ('{cable_car,gondola,mixed_lift,goods,chair_lift,drag_lift,t-bar,j-bar,platter,rope_tow
,zip_line}'::text[])) OR (leisure = ANY ('{slipway,track}'::text[])) OR (waterway = ANY ('{dam,weir}'::text[])) OR ("natural" = ANY ('{arete,cliff,
ridge}'::text[]))) AND (name IS NOT NULL)) OR ((tags @> '"golf"=>"hole"'::hstore) AND (ref IS NOT NULL)))
-> Bitmap Index Scan on planet_osm_line_label (cost=0.00..18.47 rows=292 width=0)
Index Cond: (way && '<snip>'::geometry)
* Use consistent JSON operator * Remove scaled-up marker * Use marker-geometry-transform instead of marker-transform for offset * Set default text label to eliminate extra rule
…e rows where ref IS NOT NULL Update text-line layer query to take advantage of the updated index
Use invisible rectangle to center golf_pin.svg
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just a couple minor technical changes, then it looks ready to go
Co-authored-by: Paul Norman <[email protected]>
Co-authored-by: Paul Norman <[email protected]>
Thanks, everyone! |
I am seeing the following error, and I'm wondering if it might be related to this PR?
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This change appears to be causing SQL errors that I don't fully understand. When I remove the "natural", 'golf_' || tags->'golf'
code, it compiles normally.
Fixed in 871804d |
Even though I don't like golf, this is a good addition to the OSM 'standard' map. It's these details which makes it stand out from its competitors. I concur with the feeling that golf=green (@pitch) is a bit too blue, especially given it's shape & size making it look similar to a pond. There /are/ differences between it & water features, but they have to be studied intently to notice them. Aside: I've never been keen on the current @pitch colour being used on sports pitches. Should be a bit 'greener' IMO. Edit: To check - Are all landuse/landcover/natural/surface tags being ignored? |
What about reusing the old golf course colour - rgb(181 227 181) - for golf greens, as that is less blue than the current pitch colour? |
(Comment updated June 5 to current state of PR, test renderings also updated)
Fixes #661
Changes proposed in this pull request:
@campsite
, eliminating@golf_course
colorlandcover
layer to include golf area featuresamenity-points
layer to include golf point featuresgolf-line
layerstyle/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@address-color
line, labeled with ref or name, z>=16)golf=hole
as point andgolf=pin
(symbols/golf_pin.svg
; labeled withref
in@leisure-green
, z>=16)See #4212 for previous discussion of how these colors and textures were chosen. Corrections, feedback, critiques welcome.
Test rendering with links to the example places (before/after):
https://www.openstreetmap.org/#map=15/41.7849/-93.7247
z15
z16
z17
https://www.openstreetmap.org/#map=14/41.8705/-93.2144
z14
z15
z16
z17
https://www.openstreetmap.org/#map=15/41.2767/-95.7367
z15
z16
z17