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

Random scrub pattern #2395

Merged
merged 1 commit into from
Nov 17, 2016
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
20 changes: 9 additions & 11 deletions landcover.mss
Original file line number Diff line number Diff line change
Expand Up @@ -426,17 +426,10 @@
[way_pixels >= 64] { polygon-gamma: 0.3; }
}

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

[feature = 'wetland_swamp'][zoom >= 8] {
Expand Down Expand Up @@ -625,7 +618,12 @@
polygon-pattern-alignment: global;
}
}
[natural = 'scrub'] {
polygon-pattern-file: url('symbols/scrub.png');
polygon-pattern-alignment: global;
}
}

//Also landuse = forest, converted in the SQL
[natural = 'wood'][zoom >= 13]::wood {
polygon-pattern-file: url('symbols/forest.png'); // Lch(55,30,135)
Expand Down
2 changes: 1 addition & 1 deletion project.mml
Original file line number Diff line number Diff line change
Expand Up @@ -280,7 +280,7 @@
"srs": "+proj=merc +a=6378137 +b=6378137 +lat_ts=0.0 +lon_0=0.0 +x_0=0.0 +y_0=0.0 +k=1.0 +units=m +nadgrids=@null +wktext +no_defs +over",
"Datasource": {
"extent": "-20037508,-20037508,20037508,20037508",
"table": "(SELECT\n way, surface, \n COALESCE(CASE WHEN landuse = 'forest' THEN 'wood' ELSE NULL END, \"natural\") AS \"natural\",\n CASE WHEN \"natural\" IN ('marsh', 'mud') \n THEN \"natural\" \n ELSE CASE WHEN (\"natural\" = 'wetland' AND wetland IS NULL) \n THEN 'wetland' \n ELSE CASE WHEN (\"natural\" = 'wetland')\n THEN wetland\n ELSE NULL\n END \n END\n END AS int_wetland\n FROM planet_osm_polygon\n WHERE (\"natural\" IN ('marsh', 'mud', 'wetland', 'wood', 'beach', 'shoal', 'reef') OR landuse = 'forest')\n AND building IS NULL\n AND way_area > 0.01*!pixel_width!::real*!pixel_height!::real\n ORDER BY z_order, way_area DESC\n) AS landcover_area_symbols",
"table": "(SELECT\n way, surface, \n COALESCE(CASE WHEN landuse = 'forest' THEN 'wood' ELSE NULL END, \"natural\") AS \"natural\",\n CASE WHEN \"natural\" IN ('marsh', 'mud') \n THEN \"natural\" \n ELSE CASE WHEN (\"natural\" = 'wetland' AND wetland IS NULL) \n THEN 'wetland' \n ELSE CASE WHEN (\"natural\" = 'wetland')\n THEN wetland\n ELSE NULL\n END \n END\n END AS int_wetland\n FROM planet_osm_polygon\n WHERE (\"natural\" IN ('marsh', 'mud', 'wetland', 'wood', 'beach', 'shoal', 'reef', 'scrub') OR landuse = 'forest')\n AND building IS NULL\n AND way_area > 0.01*!pixel_width!::real*!pixel_height!::real\n ORDER BY z_order, way_area DESC\n) AS landcover_area_symbols",
"geometry_field": "way",
"type": "postgis",
"key_field": "",
Expand Down
2 changes: 1 addition & 1 deletion project.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -294,7 +294,7 @@ Layer:
END
END AS int_wetland
FROM planet_osm_polygon
WHERE ("natural" IN ('marsh', 'mud', 'wetland', 'wood', 'beach', 'shoal', 'reef') OR landuse = 'forest')
WHERE ("natural" IN ('marsh', 'mud', 'wetland', 'wood', 'beach', 'shoal', 'reef', 'scrub') OR landuse = 'forest')
AND building IS NULL
AND way_area > 0.01*!pixel_width!::real*!pixel_height!::real
ORDER BY z_order, way_area DESC
Expand Down
10 changes: 10 additions & 0 deletions symbols/generating_patterns/scrub.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
The scrub pattern is generated by visiting http://www.imagico.de/map/jsdotpattern.php and using the following options:

- regular snub square ('5' button)
- distance = 45
- radius = 64
- radius y = 64
- metric = 2
- about 10-20 relax clicks
- 'scrub2' image
- use the "render (px aligned)" option
9 changes: 9 additions & 0 deletions symbols/generating_patterns/scrub.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 modified symbols/scrub.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.