Skip to content

Commit

Permalink
Adding wave pattern for natural=sand
Browse files Browse the repository at this point in the history
  • Loading branch information
kocio-pl committed Aug 13, 2017
1 parent d4408e6 commit c25520d
Show file tree
Hide file tree
Showing 4 changed files with 50 additions and 2 deletions.
4 changes: 4 additions & 0 deletions landcover.mss
Original file line number Diff line number Diff line change
Expand Up @@ -617,6 +617,10 @@
}

#landcover-area-symbols {
[natural = 'sand'][zoom >= 8] {
polygon-pattern-file: url('symbols/waves.svg');
polygon-pattern-alignment: global;
}
[int_wetland != null][zoom >= 10] {
polygon-pattern-file: url('symbols/wetland.svg');
polygon-pattern-alignment: global;
Expand Down
4 changes: 2 additions & 2 deletions project.mml
Original file line number Diff line number Diff line change
Expand Up @@ -260,13 +260,13 @@ Layer:
END
END AS int_wetland
FROM planet_osm_polygon
WHERE ("natural" IN ('marsh', 'mud', 'wetland', 'wood', 'beach', 'shoal', 'reef', 'scrub') OR landuse = 'forest')
WHERE ("natural" IN ('marsh', 'mud', 'wetland', 'wood', 'beach', 'shoal', 'reef', 'scrub', 'sand') OR landuse = 'forest')
AND building IS NULL
AND way_area > 0.01*!pixel_width!::real*!pixel_height!::real
ORDER BY COALESCE(layer,0), way_area DESC
) AS landcover_area_symbols
properties:
minzoom: 10
minzoom: 8
- id: icesheet-outlines
geometry: linestring
<<: *extents
Expand Down
13 changes: 13 additions & 0 deletions symbols/generating_patterns/sand.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
The sand pattern is generated by visiting http://www.imagico.de/map/jsdotpattern.php and using the following options:

- random pattern ('generate' button)
- distance = 60
- radius = 32
- radius y = 32
- metric = 2
- wave image
- use the "render (inlined & aligned)" option

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 waves.svg
31 changes: 31 additions & 0 deletions symbols/waves.svg
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 c25520d

Please sign in to comment.