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 rule to render landuse flowerbed #4889

Merged
Merged
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
2 changes: 1 addition & 1 deletion project.mml
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ Layer:
('landuse_' || (CASE WHEN landuse IN ('quarry', 'vineyard', 'orchard', 'cemetery', 'residential', 'garages', 'meadow', 'grass',
'allotments', 'forest', 'farmyard', 'farmland', 'greenhouse_horticulture',
'recreation_ground', 'village_green', 'retail', 'industrial', 'railway', 'commercial',
'brownfield', 'landfill', 'salt_pond', 'construction', 'plant_nursery', 'religious') THEN landuse END)) AS landuse,
'brownfield', 'landfill', 'salt_pond', 'construction', 'plant_nursery', 'religious', 'flowerbed') THEN landuse END)) AS landuse,
('shop_' || (CASE WHEN shop IN ('mall') AND (tags->'location' NOT IN ('underground') OR (tags->'location') IS NULL) THEN shop END)) AS shop,
('leisure_' || (CASE WHEN leisure IN ('swimming_pool', 'playground', 'park', 'garden',
'golf_course', 'miniature_golf', 'sports_centre', 'stadium', 'pitch', 'ice_rink',
Expand Down
20 changes: 20 additions & 0 deletions style/landcover.mss
Original file line number Diff line number Diff line change
Expand Up @@ -168,6 +168,26 @@
}
}

[feature = 'landuse_flowerbed'] {
[zoom >= 10] {
polygon-fill: @grass;
[way_pixels >= 4] { polygon-gamma: 0.75; }
[way_pixels >= 64] { polygon-gamma: 0.3; }
}
[zoom >= 15] {
polygon-pattern-file: url('symbols/flowerbed_mid_zoom.svg');
polygon-pattern-alignment: global;
[way_pixels >= 4] { polygon-pattern-gamma: 0.75; }
[way_pixels >= 64] { polygon-pattern-gamma: 0.3; }
}
[zoom >= 17] {
polygon-pattern-file: url('symbols/flowerbed_high_zoom.svg');
polygon-pattern-alignment: global;
[way_pixels >= 4] { polygon-pattern-gamma: 0.75; }
[way_pixels >= 64] { polygon-pattern-gamma: 0.3; }
}
}

[feature = 'landuse_plant_nursery'] {
[zoom >= 10] {
polygon-fill: @orchard;
Expand Down
26 changes: 26 additions & 0 deletions symbols/flowerbed_high_zoom.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
26 changes: 26 additions & 0 deletions symbols/flowerbed_mid_zoom.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
15 changes: 15 additions & 0 deletions symbols/generating_patterns/flowerbed.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
The rendering for the flowerbed is split into two patterns: one for mid-zoom levels, and one for high zoom levels.

### Flowerbed mid zoom
The pattern is generated using [jsdotpattern (command sequence is recorded)](https://imagico.de/map/jsdotpattern.php#x,128,jdp47459;gv,6,32,32;tr;ts;rd,0,0,0,dot,0.125,4,4,0,jdp75205,eef6c0,cdebb0;).

Generated SVG image is sanitized for use with Mapnik by the script svg_pattern.sh from the jsdotpattern repository at http://github.com/imagico/jsdotpattern.

The final file is `flowerbed_mid_zoom.svg`

### Flowerbed high zoom
The pattern is generated using [jsdotpattern (command sequence is recorded)](https://imagico.de/map/jsdotpattern.php#x,128,jdp62563;gv,15,32,32;tr;rd,0,0,0,flower1,1,5,5,0,jdp49618,eef6c0,cdebb0;).

Generated SVG image is sanitized for use with Mapnik by the script svg_pattern.sh from the jsdotpattern repository at http://github.com/imagico/jsdotpattern.

The final file is `flowerbed_high_zoom.svg`