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

Initial pass at rendering golf=* features #4212

Closed
wants to merge 62 commits into from
Closed
Show file tree
Hide file tree
Changes from 2 commits
Commits
Show all changes
62 commits
Select commit Hold shift + click to select a range
db0a119
Travis: build against Mapnik 3.0.22
hiddewie Jul 5, 2020
3d4311c
Clean up some svg images
pitdicker Sep 12, 2020
d8118bd
Initial pass at rendering golf=* features (gravitystorm/openstreetmap…
justingruca Sep 29, 2020
56d8354
Fix golf=hole selector and color golf=hole/golf=pin points same as go…
justingruca Sep 29, 2020
a6a704f
Simplify SVG for golf pin
justingruca Sep 29, 2020
460a39a
Minor color and pattern updates
justingruca Sep 29, 2020
f1aa90e
Layer/organizational changes; remove rendered point for tees
justingruca Oct 5, 2020
67eff1e
Render mini-roudabout just like a turning circle
hiddewie Oct 11, 2020
7457578
Render icon as non-blocking small dot in casing color
hiddewie Oct 11, 2020
13e8f14
Switch to @leisure for golf course background color
justingruca Oct 13, 2020
9f53b34
Revert "Switch to @leisure for golf course background color"
justingruca Oct 13, 2020
357a79f
Change golf=green to use @campsite and increase the border; remove bu…
justingruca Oct 13, 2020
84a4947
Use @pitch for golf=[tee|fairway|driving_range|rough] and @grass for …
justingruca Oct 17, 2020
c8ed058
Link to CARTOGRAPHY.md in README.md
polarbearing Dec 5, 2020
aabdb7b
added password as an extra option to get-external-data
terminaldweller Dec 11, 2020
1ade787
added the password for ogr2ogr as well
terminaldweller Dec 11, 2020
633775f
Create a partial index for waterways
pnorman Jan 9, 2021
b7c3ecf
update to growing issue count
matkoniecz Jan 10, 2021
8fba163
Merge pull request #4281 from matkoniecz/master
pnorman Jan 10, 2021
37f4aaf
Merge pull request #4280 from pnorman/waterway
pnorman Jan 11, 2021
31c649a
Use custom indexes to speed up ST_PointOnSurface queries
pnorman Jan 23, 2021
85ed024
Merge pull request #4205 from pitdicker/svg_cleanup
pnorman Jan 23, 2021
b01b2b1
Merge pull request #4218 from hiddewie/highway-roundabout
pnorman Jan 23, 2021
4074484
Merge pull request #4263 from polarbearing/patch-1
pnorman Jan 23, 2021
6899a71
Merge pull request #4265 from terminaldweller/master
pnorman Jan 23, 2021
faead20
Merge pull request #4175 from hiddewie/patch-1
pnorman Jan 24, 2021
bf1e82c
Update DB dockerfile to use the postgis image
hiddewie Jan 24, 2021
f701987
Downgrade to postgis 2.5, fix password
hiddewie Jan 26, 2021
42a6baf
Merge pull request #4292 from pnorman/pointonsurface_index
pnorman Jan 28, 2021
bfb77a8
Add to changelog
pnorman Jan 29, 2021
c0482cf
Update preview.png
pnorman Jan 29, 2021
70ffaa7
Update changelog for v5.3.0
pnorman Jan 29, 2021
34ea0de
Fix v5.3.0 heading in Changelog
pnorman Jan 29, 2021
94fe82b
Fix changelog typos
pnorman Jan 29, 2021
396778b
Switch from Natural Earth to its CDN
pnorman Jan 30, 2021
e77163e
Merge pull request #4306 from pnorman/ne_url
pnorman Jan 30, 2021
cd0f8d7
Add an option to grant permissions to a user for rendering from
pnorman Jan 30, 2021
fabb5c9
Update indexes.sql comment
pnorman Jan 30, 2021
351e828
Update install documentation for shapefile loading
pnorman Jan 30, 2021
962f353
Merge pull request #4310 from pnorman/documentation_fixes
pnorman Jan 31, 2021
bdd92cd
Merge pull request #4307 from pnorman/render_user
pnorman Feb 3, 2021
8f4204e
Add to changelog
pnorman Feb 5, 2021
00bcf61
Update changelog
pnorman Feb 5, 2021
e5494bd
Correctly update changelog this time
pnorman Feb 5, 2021
70ba48c
Set git attributes so that python scripts don't get mangled on Windows
ZeLonewolf Feb 10, 2021
785f159
Updating git attributes to also apply LF endings to python scripts
ZeLonewolf Feb 10, 2021
d384ddf
Adding newline
ZeLonewolf Feb 10, 2021
3618861
Merge pull request #4330 from ZeLonewolf/windows-line-ending-fix
pnorman Feb 10, 2021
e858de4
Update README.md
kocio-pl Apr 2, 2021
e433211
Merge pull request #4357 from gravitystorm/kocio-pl-readme-v5
matkoniecz Apr 13, 2021
a2077c0
Merge pull request #4294 from hiddewie/docker-compose-postgis
pnorman Apr 16, 2021
48ec53d
Initial pass at rendering golf=* features (gravitystorm/openstreetmap…
justingruca Sep 29, 2020
22661a3
Fix golf=hole selector and color golf=hole/golf=pin points same as go…
justingruca Sep 29, 2020
3f0b7c2
Simplify SVG for golf pin
justingruca Sep 29, 2020
98c0a34
Minor color and pattern updates
justingruca Sep 29, 2020
59b982d
Layer/organizational changes; remove rendered point for tees
justingruca Oct 5, 2020
585d619
Switch to @leisure for golf course background color
justingruca Oct 13, 2020
3b14a03
Revert "Switch to @leisure for golf course background color"
justingruca Oct 13, 2020
074ece7
Change golf=green to use @campsite and increase the border; remove bu…
justingruca Oct 13, 2020
48a51bc
Use @pitch for golf=[tee|fairway|driving_range|rough] and @grass for …
justingruca Oct 17, 2020
ac3818c
green is now @pitch, everything else is @grass
justingruca Apr 19, 2021
d3e1968
Merge branch 'render-golf-features' of https://github.com/jgruca/open…
justingruca Apr 19, 2021
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
31 changes: 30 additions & 1 deletion project.mml
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@ Stylesheet:
- style/aerialways.mss
- style/admin.mss
- style/addressing.mss
- style/golf.mss
Layer:
- id: landcover-low-zoom
geometry: polygon
Expand Down Expand Up @@ -87,10 +88,11 @@ Layer:
table: |-
(SELECT
way, name, religion, way_pixels, is_building,
COALESCE(aeroway, amenity, wetland, power, landuse, leisure, man_made, "natural", shop, tourism, highway, railway) AS feature
COALESCE(aeroway, golf, amenity, wetland, power, landuse, leisure, man_made, "natural", shop, tourism, highway, railway) AS feature
FROM (SELECT
way, COALESCE(name, '') AS name,
('aeroway_' || (CASE WHEN aeroway IN ('apron', 'aerodrome') THEN aeroway END)) AS aeroway,
('golf_' || (CASE WHEN (tags->'golf') IN ('rough', 'fairway', 'driving_range', 'water_hazard', 'green', 'bunker', 'tee') THEN tags->'golf' ELSE NULL END)) AS golf,
('amenity_' || (CASE WHEN amenity IN ('bicycle_parking', 'motorcycle_parking', 'university', 'college', 'school', 'taxi',
'hospital', 'kindergarten', 'grave_yard', 'prison', 'place_of_worship', 'clinic', 'ferry_terminal',
'marketplace', 'community_centre', 'social_facility', 'arts_centre', 'parking_space', 'bus_station',
Expand Down Expand Up @@ -119,6 +121,7 @@ Layer:
WHERE (landuse IS NOT NULL
OR leisure IS NOT NULL
OR aeroway IN ('apron', 'aerodrome')
OR (tags->'golf') IS NOT NULL
OR amenity IN ('parking', 'bicycle_parking', 'motorcycle_parking', 'taxi', 'university', 'college', 'school', 'hospital', 'kindergarten',
'grave_yard', 'place_of_worship', 'prison', 'clinic', 'ferry_terminal', 'marketplace', 'community_centre', 'social_facility',
'arts_centre', 'parking_space', 'bus_station', 'fire_station', 'police')
Expand Down Expand Up @@ -1037,6 +1040,32 @@ Layer:
properties:
cache-features: true
minzoom: 11
- id: golf-lines
<<: *extents
Datasource:
<<: *osm2pgsql
table: |-
(SELECT
way, geo, golf, ref, name
FROM
(SELECT
way, tags->'golf' AS golf, name, ref, 0 AS prio, 'polygon' AS geo
FROM planet_osm_polygon
WHERE (tags->'golf') IS NOT NULL AND way && !bbox!
UNION ALL
SELECT
p.way, p.tags->'golf' AS golf, p.name, coalesce(p.ref,l.ref) AS ref, 0 AS prio, 'point' AS geo
FROM planet_osm_point p LEFT JOIN planet_osm_line l ON (ST_Intersects(p.way, l.way) AND (l.tags->'golf') IS NOT NULL)
WHERE p.tags ? 'golf' AND p.way && !bbox!
UNION ALL
SELECT
way, tags->'golf' AS golf, name, ref, 1 AS prio, 'line' AS geo
FROM planet_osm_line WHERE (tags->'golf') IS NOT NULL AND way && !bbox!
) AS golf
ORDER BY prio
) AS golf_lines
properties:
minzoom: 16
- id: necountries
geometry: linestring
<<: *extents
Expand Down
66 changes: 66 additions & 0 deletions style/golf.mss
Original file line number Diff line number Diff line change
@@ -0,0 +1,66 @@
#landcover[zoom >= 14] {
::high-zoom[zoom >= 12] {
[feature = 'golf_green'],
[feature = 'golf_tee'] {
polygon-fill: mix(@grass, @park, 50%);
}
[feature = 'golf_fairway'],
[feature = 'golf_driving_range'] {
polygon-fill: @grass;
}
[feature = 'golf_bunker'] {
polygon-fill: @sand;
polygon-pattern-file: url('symbols/beach.png');
}
[feature = 'golf_rough'] {
polygon-fill: mix(@scrub, @grass, 50%);
}
}
}

#golf-lines[zoom >= 16] {
[golf = 'hole'][geo = 'line'] {
line-color: darken(@golf_course, 40%);
line-width: 0.5;
line-dasharray: 6, 2;
[ref != ''] {
text-placement: line;
text-name: "[ref]";
text-size: 11;
text-fill: darken(@golf_course, 40%);
text-face-name: @oblique-fonts;
text-halo-radius: 1;
text-halo-fill: fadeout(white, 30%);
}
}
[golf = 'hole'][geo = 'point'],
[golf = 'pin'] {
point-file: url('symbols/golf_pin.svg');
[ref != ''] {
text-fill: #444;
text-name: "[ref]";
text-face-name: @book-fonts;
text-dy: -10;
text-halo-radius: 1;
text-halo-fill: fadeout(white, 30%);
}
}
[golf = 'tee'] {
marker-fill: darken(@golf_course, 40%);
marker-width: 3;
marker-height: 3;
[ref != ''] {
text-name: "[ref]";
text-face-name: @book-fonts;
text-dy: 6;
text-halo-radius: 1;
text-halo-fill: fadeout(white, 30%);
}
}
}

#golf-lines[zoom >= 17] {
[golf = 'hole'][geo = 'line'][ref != ''] {
text-size: 14;
}
}
17 changes: 17 additions & 0 deletions symbols/golf_pin.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.