Skip to content

Commit

Permalink
Adding rendering of landuse=plant_nursery
Browse files Browse the repository at this point in the history
  • Loading branch information
kocio-pl committed Jan 13, 2017
1 parent 41fb6ab commit 7b65eda
Show file tree
Hide file tree
Showing 6 changed files with 36 additions and 6 deletions.
4 changes: 3 additions & 1 deletion amenity-points.mss
Original file line number Diff line number Diff line change
Expand Up @@ -1542,6 +1542,7 @@
[feature = 'landuse_quarry'],
[feature = 'landuse_vineyard'],
[feature = 'landuse_orchard'],
[feature = 'landuse_plant_nursery'],
[feature = 'landuse_cemetery'],
[feature = 'amenity_grave_yard'],
[feature = 'landuse_residential'],
Expand Down Expand Up @@ -1616,7 +1617,8 @@
text-fill: darken(@quarry, 60%);
}
[feature = 'landuse_vineyard'],
[feature = 'landuse_orchard'] {
[feature = 'landuse_orchard'],
[feature = 'landuse_plant_nursery'] {
text-fill: darken(@orchard, 50%);
}
[feature = 'landuse_cemetery'],
Expand Down
16 changes: 15 additions & 1 deletion landcover.mss
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
@forest: #add19e; // Lch(80,30,135)
@forest-text: #46673b; // Lch(40,30,135)
@park: #c8facc; // Lch(94,30,145) also recreation_ground
@orchard: #aedfa3;
@orchard: #aedfa3; // also vineyard, plant_nursery

// --- "Base" landuses ---

Expand Down Expand Up @@ -145,6 +145,20 @@
}
}

[feature = 'landuse_plant_nursery'] {
[zoom >= 10] {
polygon-fill: @orchard;
[way_pixels >= 4] { polygon-gamma: 0.75; }
[way_pixels >= 64] { polygon-gamma: 0.3; }
}
[zoom >= 14] {
polygon-pattern-file: url('symbols/plant_nursery.png');
polygon-pattern-alignment: global;
[way_pixels >= 4] { polygon-pattern-gamma: 0.75; }
[way_pixels >= 64] { polygon-pattern-gamma: 0.3; }
}
}

[feature = 'landuse_cemetery'],
[feature = 'amenity_grave_yard'] {
[zoom >= 10] {
Expand Down
8 changes: 4 additions & 4 deletions project.mml
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,7 @@ Layer:
('landuse_' || (CASE WHEN landuse IN ('quarry', 'vineyard', 'orchard', 'cemetery', 'residential', 'garages', 'meadow', 'grass',
'allotments', 'forest', 'farmyard', 'farm', 'farmland', 'greenhouse_horticulture',
'recreation_ground', 'village_green', 'retail', 'industrial', 'railway', 'commercial',
'brownfield', 'landfill', 'construction') THEN landuse ELSE NULL END)) AS landuse,
'brownfield', 'landfill', 'construction', 'plant_nursery') THEN landuse ELSE NULL END)) AS landuse,
('leisure_' || (CASE WHEN leisure IN ('swimming_pool', 'playground', 'park', 'recreation_ground', 'common', 'garden',
'golf_course', 'miniature_golf', 'picnic_table', 'sports_centre', 'stadium', 'pitch',
'track', 'dog_park') THEN leisure ELSE NULL END)) AS leisure,
Expand Down Expand Up @@ -2083,7 +2083,7 @@ Layer:
'landuse_' || CASE WHEN landuse IN ('reservoir', 'basin', 'recreation_ground', 'village_green', 'quarry', 'vineyard', 'orchard', 'cemetery',
'residential', 'garages', 'meadow', 'grass', 'allotments', 'forest', 'farmyard', 'farm', 'farmland',
'greenhouse_horticulture', 'retail', 'industrial', 'railway', 'commercial', 'brownfield', 'landfill',
'construction', 'military') THEN landuse ELSE NULL END,
'construction', 'military', 'plant_nursery') THEN landuse ELSE NULL END,
'man_made_' || CASE WHEN man_made IN ('lighthouse', 'windmill', 'mast', 'water_tower', 'pier', 'breakwater', 'groyne', 'obelisk') THEN man_made ELSE NULL END,
'natural_' || CASE WHEN "natural" IN ('wood', 'water', 'mud', 'wetland', 'marsh', 'bay', 'spring', 'scree', 'shingle', 'bare_rock', 'sand', 'heath',
'grassland', 'scrub', 'beach', 'shoal', 'reef', 'glacier') THEN "natural" ELSE NULL END,
Expand Down Expand Up @@ -2210,7 +2210,7 @@ Layer:
'landuse_' || CASE WHEN landuse IN ('reservoir', 'basin', 'recreation_ground', 'village_green', 'quarry', 'vineyard', 'orchard', 'cemetery',
'residential', 'garages', 'meadow', 'grass', 'allotments', 'forest', 'farmyard', 'farm', 'farmland',
'greenhouse_horticulture', 'retail', 'industrial', 'railway', 'commercial', 'brownfield', 'landfill',
'construction', 'military') THEN landuse ELSE NULL END,
'construction', 'military', 'plant_nursery') THEN landuse ELSE NULL END,
'man_made_' || CASE WHEN man_made IN ('lighthouse', 'windmill', 'mast', 'water_tower', 'obelisk') THEN man_made ELSE NULL END,
'natural_' || CASE WHEN "natural" IN ('wood', 'peak', 'volcano', 'saddle', 'cave_entrance', 'water', 'mud', 'wetland', 'marsh', 'bay', 'spring',
'scree', 'shingle', 'bare_rock', 'sand', 'heath', 'grassland', 'scrub', 'beach', 'glacier', 'tree')
Expand Down Expand Up @@ -2250,7 +2250,7 @@ Layer:
OR leisure IS NOT NULL
OR landuse IN ('reservoir', 'basin', 'recreation_ground', 'village_green', 'quarry', 'vineyard', 'orchard', 'cemetery', 'residential',
'garages', 'meadow', 'grass', 'allotments', 'forest', 'farmyard', 'farm', 'farmland', 'greenhouse_horticulture',
'retail', 'industrial', 'railway', 'commercial', 'brownfield', 'landfill', 'construction', 'military')
'retail', 'industrial', 'railway', 'commercial', 'brownfield', 'landfill', 'construction', 'military', 'plant_nursery')
OR man_made IN ('lighthouse', 'windmill', 'mast', 'water_tower', 'cross', 'obelisk')
OR "natural" IS NOT NULL
OR place IN ('island', 'islet')
Expand Down
5 changes: 5 additions & 0 deletions symbols/generating_patterns/plant_nursery.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
This pattern is generated by jsdotpattern script through this link:

http://www.imagico.de/map/jsdotpattern.php#x,128,jdp32360;gv,6,32,32;rd,1,0,0,pixel,0.125,4,4,0,jdp23814,749d6c,aedea3;

Since exported SVG file is not properly handled by Mapnik, it was converted to PNG file with alpha channel.
9 changes: 9 additions & 0 deletions symbols/generating_patterns/plant_nursery.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added symbols/plant_nursery.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 7b65eda

Please sign in to comment.