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

[WIP] Add icons for sports pitches #3578

Closed
wants to merge 16 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
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
11 changes: 11 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,12 @@
<<<<<<< HEAD
## [Unreleased](https://github.com/gravitystorm/openstreetmap-carto/compare/v4.18.0...master)
<<<<<<< HEAD
=======
=======
## [Unreleased](https://github.com/gravitystorm/openstreetmap-carto/compare/v4.19.0...master)

## [v4.19.0](https://github.com/gravitystorm/openstreetmap-carto/compare/v4.18.0...v4.19.0) - 2019-01-18
>>>>>>> upstream/master
## Changes
- Adding rendering for boundary=protected_area (#3509)
- Nature reserve boundaries revision (#3574)
Expand Down Expand Up @@ -28,6 +34,7 @@
- Fixing label opacity for tourism features (#3616)
- Reverting lowzoom nobuilding test change (#3622)
- Removing trailing whitespace (#3637)
>>>>>>> upstream/master

## [v4.18.0](https://github.com/gravitystorm/openstreetmap-carto/compare/v4.17.0...v4.18.0) - 2018-12-21
## Changes
Expand All @@ -38,7 +45,11 @@
- Changing landuse=allotments color and pattern
- Adding rendering for natural=cape
- Rendering leisure=ice_rink
<<<<<<< HEAD
- Adding rendering for man_made=crane
=======
- Adding rendering for man_made=crane
>>>>>>> upstream/master
- Adding icons for shop=fabric and shop=carpet
- Updating icons for amenity=arts_centre, leisure=slipway, amenity=restaurant/amenity=food_court and man_made=storage_tank/man_made=silo
- Using dedicated icon for artwork_type=bust
Expand Down
113 changes: 109 additions & 4 deletions amenity-points.mss
Original file line number Diff line number Diff line change
Expand Up @@ -218,6 +218,97 @@
marker-clip: false;
}

[feature = 'leisure_pitch'][sport = 'american_football'][zoom >= 18] {
marker-file: url('symbols/sport/american_football.svg');
marker-fill: @leisure-green;
marker-placement: interior;
marker-clip: false;
}

[feature = 'leisure_pitch'][sport = 'archery'][zoom >= 18] {
marker-file: url('symbols/sport/archery.svg');
marker-fill: @leisure-green;
marker-placement: interior;
marker-clip: false;
}

[feature = 'leisure_pitch'][sport = 'badminton'][zoom >= 18] {
marker-file: url('symbols/sport/badminton.svg');
marker-fill: @leisure-green;
marker-placement: interior;
marker-clip: false;
}

[feature = 'leisure_pitch'][sport = 'baseball'][zoom >= 18] {
marker-file: url('symbols/sport/baseball.svg');
marker-fill: @leisure-green;
marker-placement: interior;
marker-clip: false;
}

[feature = 'leisure_pitch'][sport = 'basketball'][zoom >= 18] {
marker-file: url('symbols/sport/basketball.svg');
marker-fill: @leisure-green;
marker-placement: interior;
marker-clip: false;
}

[feature = 'leisure_pitch'][sport = 'handball'][zoom >= 18] {
marker-file: url('symbols/sport/handball.svg');
marker-fill: @leisure-green;
marker-placement: interior;
marker-clip: false;
}

[feature = 'leisure_pitch'][sport = 'running'][zoom >= 18] {
marker-file: url('symbols/sport/running.svg');
marker-fill: @leisure-green;
marker-placement: interior;
marker-clip: false;
}

[feature = 'leisure_pitch'][sport = 'shooting'][zoom >= 18] {
marker-file: url('symbols/sport/shooting.svg');
marker-fill: @leisure-green;
marker-placement: interior;
marker-clip: false;
}

[feature = 'leisure_pitch'][sport = 'skateboard'][zoom >= 18] {
marker-file: url('symbols/sport/skateboard.svg');
marker-fill: @leisure-green;
marker-placement: interior;
marker-clip: false;
}

[feature = 'leisure_pitch'][sport = 'soccer'][zoom >= 18] {
marker-file: url('symbols/sport/soccer.svg');
marker-fill: @leisure-green;
marker-placement: interior;
marker-clip: false;
}

[feature = 'leisure_pitch'][sport = 'table_tennis'][zoom >= 18] {
marker-file: url('symbols/sport/table_tennis.svg');
marker-fill: @leisure-green;
marker-placement: interior;
marker-clip: false;
}

[feature = 'leisure_pitch'][sport = 'tennis'][zoom >= 18] {
marker-file: url('symbols/sport/tennis.svg');
marker-fill: @leisure-green;
marker-placement: interior;
marker-clip: false;
}

[feature = 'leisure_pitch'][sport = 'volleyball'][zoom >= 18] {
marker-file: url('symbols/sport/volleyball.svg');
marker-fill: @leisure-green;
marker-placement: interior;
marker-clip: false;
}

[feature = 'tourism_artwork'][zoom >= 17] {
[artwork_type != 'statue'] {
marker-file: url('symbols/tourism/artwork.svg');
Expand Down Expand Up @@ -1995,7 +2086,12 @@
[feature = 'amenity_bicycle_repair_station'][zoom >= 19],
[feature = 'amenity_drinking_water'][zoom >= 17],
[feature = 'amenity_shower'][zoom >= 18],
<<<<<<< HEAD
[feature = 'tourism_picnic_site'][zoom >= 17],
[feature = 'leisure_picnic_table'][zoom >= 17] {
=======
[feature = 'tourism_picnic_site'][zoom >= 17] {
>>>>>>> upstream/master
text-name: "[name]";
text-size: @standard-font-size;
text-wrap-width: @standard-wrap-width;
Expand Down Expand Up @@ -2481,11 +2577,9 @@
}
[feature = 'landuse_meadow'],
[feature = 'natural_grassland'],
[feature = 'landuse_grass'] {
text-fill: darken(@grass, 50%);
}
[feature = 'landuse_grass'],
[feature = 'landuse_allotments'] {
text-fill: darken(@allotments, 50%);
text-fill: darken(@grass, 50%);
}
[feature = 'landuse_farmyard'] {
text-fill: darken(@farmyard, 50%);
Expand Down Expand Up @@ -2523,6 +2617,13 @@
text-fill: @tourism;
text-face-name: @bold-fonts; /*rendered bold to improve visibility since theme parks tend to have crowded backgrounds*/
}
<<<<<<< HEAD
[feature = 'tourism_attraction'] {
text-fill: @tourism;
text-face-name: @standard-font;
}
=======
>>>>>>> upstream/master
[feature = 'amenity_kindergarten'],
[feature = 'amenity_school'],
[feature = 'amenity_college'],
Expand Down Expand Up @@ -2655,6 +2756,10 @@
text-halo-radius: 0;
}
}
[access != ''][access != 'permissive'][access != 'yes'] {
text-opacity: 0.33;
text-halo-radius: 0;
}
}

[feature = 'amenity_taxi'][zoom >= 17] {
Expand Down
6 changes: 5 additions & 1 deletion landcover.mss
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
// --- Parks, woods, other green things ---

<<<<<<< HEAD
@grass: #cdebb0; // Lch(90,32,128) also grassland, meadow, common, village_green, garden, allotments
=======
@grass: #cdebb0; // Lch(90,32,128) also grassland, meadow, common, village_green, garden
>>>>>>> upstream/master
@scrub: #c8d7ab; // Lch(84,24,122)
@forest: #add19e; // Lch(80,30,135)
@forest-text: #46673b; // Lch(40,30,135)
Expand Down Expand Up @@ -302,7 +306,7 @@

[feature = 'landuse_allotments'] {
[zoom >= 10] {
polygon-fill: @allotments;
polygon-fill: @grass;
[way_pixels >= 4] { polygon-gamma: 0.75; }
[way_pixels >= 64] { polygon-gamma: 0.3; }
}
Expand Down
15 changes: 10 additions & 5 deletions project.mml
Original file line number Diff line number Diff line change
Expand Up @@ -1486,7 +1486,7 @@ Layer:
'office' || CASE WHEN tags->'office' IN ('no', 'vacant', 'closed', 'disused', 'empty') OR (tags->'office') IS NULL THEN NULL ELSE '' END,
'leisure_' || CASE WHEN leisure IN ('water_park', 'playground', 'miniature_golf', 'golf_course', 'picnic_table',
'fitness_centre', 'fitness_station', 'firepit', 'sauna', 'beach_resort',
'bowling_alley', 'outdoor_seating', 'bird_hide', 'amusement_arcade', 'sports_centre', 'swimming_area', 'fishing')
'bowling_alley', 'outdoor_seating', 'bird_hide', 'amusement_arcade', 'sports_centre', 'swimming_area', 'fishing', 'pitch')
THEN leisure ELSE NULL END,
'man_made_' || CASE WHEN (man_made IN ('mast', 'tower', 'water_tower', 'lighthouse', 'windmill', 'obelisk', 'communications_tower', 'telescope', 'chimney', 'crane', 'storage_tank', 'silo')
AND (tags->'location' NOT IN ('roof', 'rooftop') OR (tags->'location') IS NULL)) THEN man_made ELSE NULL END,
Expand Down Expand Up @@ -1557,7 +1557,7 @@ Layer:
OR (tags->'office') IS NOT NULL
OR leisure IN ('water_park', 'playground', 'miniature_golf', 'golf_course', 'picnic_table', 'fitness_centre',
'fitness_station', 'firepit', 'sauna', 'beach_resort', 'bowling_alley', 'outdoor_seating', 'bird_hide',
'amusement_arcade', 'sports_centre', 'swimming_area', 'fishing')
'amusement_arcade', 'sports_centre', 'swimming_area', 'fishing', 'pitch')
OR (man_made IN ('mast', 'tower', 'water_tower', 'lighthouse', 'windmill', 'obelisk', 'communications_tower', 'telescope', 'chimney', 'crane', 'storage_tank', 'silo')
AND (tags->'location' NOT IN ('roof', 'rooftop') OR (tags->'location') IS NULL))
OR "natural" IN ('spring')
Expand Down Expand Up @@ -1629,8 +1629,13 @@ Layer:
'leisure_' || CASE WHEN leisure IN ('water_park', 'playground', 'miniature_golf', 'golf_course', 'picnic_table', 'slipway',
'dog_park', 'fitness_centre', 'fitness_station', 'firepit', 'sauna', 'beach_resort',
'bowling_alley', 'outdoor_seating', 'bird_hide', 'amusement_arcade', 'sports_centre',
<<<<<<< HEAD
'swimming_area', 'fishing', 'pitch') THEN leisure ELSE NULL END,
'man_made_' || CASE WHEN (man_made IN ('mast', 'tower', 'water_tower', 'lighthouse', 'windmill', 'obelisk', 'communications_tower', 'telescope',
=======
'swimming_area', 'fishing') THEN leisure ELSE NULL END,
'man_made_' || CASE WHEN (man_made IN ('mast', 'tower', 'water_tower', 'lighthouse', 'windmill', 'obelisk', 'communications_tower', 'telescope',
>>>>>>> upstream/master
'chimney', 'crane', 'storage_tank', 'silo')
AND (tags->'location' NOT IN ('roof', 'rooftop') OR (tags->'location') IS NULL)) THEN man_made ELSE NULL END,
'natural_' || CASE WHEN "natural" IN ('peak', 'volcano', 'saddle', 'spring', 'cave_entrance') THEN "natural" ELSE NULL END,
Expand Down Expand Up @@ -1720,7 +1725,7 @@ Layer:
OR leisure IN ('water_park', 'playground', 'miniature_golf', 'golf_course', 'picnic_table', 'slipway',
'dog_park', 'fitness_centre', 'fitness_station', 'firepit', 'sauna', 'beach_resort',
'bowling_alley', 'outdoor_seating', 'bird_hide', 'amusement_arcade', 'sports_centre',
'swimming_area', 'fishing')
'swimming_area', 'fishing', 'pitch')
OR barrier IN ('toll_booth')
OR (man_made IN ('mast', 'tower', 'water_tower', 'lighthouse', 'windmill', 'cross', 'obelisk', 'communications_tower', 'telescope', 'chimney', 'crane', 'storage_tank', 'silo')
AND (tags->'location' NOT IN ('roof', 'rooftop') OR (tags->'location') IS NULL))
Expand Down Expand Up @@ -2127,7 +2132,7 @@ Layer:
'leisure_' || CASE WHEN leisure IN ('swimming_pool', 'water_park', 'miniature_golf', 'golf_course', 'fitness_centre', 'sports_centre', 'stadium', 'track',
'pitch', 'playground', 'park', 'recreation_ground', 'common', 'garden', 'nature_reserve', 'marina',
'picnic_table', 'dog_park', 'fitness_station', 'firepit', 'sauna', 'beach_resort', 'bowling_alley',
'outdoor_seating', 'bird_hide', 'amusement_arcade', 'swimming_area', 'fishing', 'ice_rink') THEN leisure ELSE NULL END,
'outdoor_seating', 'bird_hide', 'amusement_arcade', 'swimming_area', 'fishing', 'ice_rink', 'pitch') THEN leisure ELSE NULL END,
'power_' || CASE WHEN power IN ('plant', 'station', 'generator', 'sub_station', 'substation') THEN power ELSE NULL END,
'landuse_' || CASE WHEN landuse IN ('reservoir', 'basin', 'recreation_ground', 'village_green', 'quarry', 'vineyard', 'orchard', 'cemetery',
'residential', 'garages', 'meadow', 'grass', 'allotments', 'forest', 'farmyard', 'farmland',
Expand Down Expand Up @@ -2328,7 +2333,7 @@ Layer:
'leisure_' || CASE WHEN leisure IN ('swimming_pool', 'water_park', 'miniature_golf', 'golf_course', 'fitness_centre', 'sports_centre', 'stadium', 'track',
'pitch','playground', 'park', 'recreation_ground', 'common', 'garden', 'nature_reserve', 'marina',
'slipway', 'picnic_table', 'dog_park', 'fitness_station', 'firepit', 'sauna', 'beach_resort', 'bowling_alley',
'outdoor_seating', 'bird_hide', 'amusement_arcade', 'swimming_area', 'fishing', 'ice_rink') THEN leisure ELSE NULL END,
'outdoor_seating', 'bird_hide', 'amusement_arcade', 'swimming_area', 'fishing', 'ice_rink', 'pitch') THEN leisure ELSE NULL END,
'power_' || CASE WHEN power IN ('plant', 'station', 'generator', 'sub_station', 'substation') THEN power ELSE NULL END,
'landuse_' || CASE WHEN landuse IN ('reservoir', 'basin', 'recreation_ground', 'village_green', 'quarry', 'vineyard', 'orchard', 'cemetery',
'residential', 'garages', 'meadow', 'grass', 'allotments', 'forest', 'farmyard', 'farmland',
Expand Down
Binary file modified symbols/allotments.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
23 changes: 23 additions & 0 deletions symbols/generating_patterns/allotments.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,26 @@
<<<<<<< HEAD
Pattern file for allotments was generated in two steps.

SVG file is generated using JSDotPattern generator (http://www.imagico.de/map/jsdotpattern.php) using these options:

- symbol definition: pixel
- offset: 8 8
- scale: 0.25
- symbol pattern (foreground color): #f2faeb
- point generation
- distance: 4
- regular square dot pattern
- rendering: render (px aligned)
- pattern size: 64

(direct link: x,64,jdp34225;gs,4,32,32;rd,1,0,0,pixel,0.25,8,8,0,jdp4911,f2faeb,cdebb0;)

This generates file allotments.svg

However, since SVG files are not properly handled by Mapnik, the file was converted to png with alpha channel: symbols/allotments.png

=======
The allotments pattern is based on allotments.svg

However, since SVG patterns is not properly handled by Mapnik at this time, the SVG file was converted to a PNG file with alpha channel, allotments.png
>>>>>>> upstream/master
12 changes: 12 additions & 0 deletions symbols/generating_patterns/allotments.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
39 changes: 39 additions & 0 deletions symbols/sport/american_football.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
39 changes: 39 additions & 0 deletions symbols/sport/archery.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading