Skip to content

Commit

Permalink
Merge remote-tracking branch 'upstream/master' into tweak-to-run
Browse files Browse the repository at this point in the history
  • Loading branch information
dch0ph committed Dec 24, 2023
2 parents 88f07af + 47a96cb commit 76216e2
Show file tree
Hide file tree
Showing 11 changed files with 205 additions and 48 deletions.
13 changes: 12 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,15 @@
## [Unreleased](https://github.com/gravitystorm/openstreetmap-carto/compare/v5.7.0...master)
## [Unreleased](https://github.com/gravitystorm/openstreetmap-carto/compare/v5.8.0...master)

## [v5.8.0](https://github.com/gravitystorm/openstreetmap-carto/compare/v5.7.0...v5.8.0) - 2023-11-26
### Changes
- Changing color of leisure=pitch to be more distinct and less similar to the water color (#4480)
- Fixing color of ref label for railway=subway_entrance (#4835)
- Fixes for highway=mini_roundabout rendering on various road types (#4904)
- Fixing merge error in previous change of rendering natural=bay/natural=strait (#4841)
- Removing point symbol rendering for golf=hole (#4857)
- Restoring rendering for railway=platform + covered=yes (#4797)
- Adding rendering of roller_coaster=track (#4666)
- Adding rendering of landuse=flowerbed (#4889)

## [v5.7.0](https://github.com/gravitystorm/openstreetmap-carto/compare/v5.6.2...v5.7.0) - 2023-01-11
### Changes
Expand Down
Binary file modified preview.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
19 changes: 10 additions & 9 deletions 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 Expand Up @@ -623,14 +623,15 @@ Layer:
JOIN planet_osm_line l
ON ST_DWithin(p.way, l.way, 0.1) -- Assumes Mercator
JOIN (VALUES
('primary', 1),
('secondary', 2),
('tertiary', 3),
('unclassified', 4),
('residential', 5),
('living_street', 6),
('service', 7),
('track', 8)
('trunk', 1),
('primary', 2),
('secondary', 3),
('tertiary', 4),
('unclassified', 5),
('residential', 6),
('living_street', 7),
('service', 8),
('track', 9)
) AS v (highway, prio)
ON v.highway = l.highway
WHERE p.highway IN (
Expand Down
2 changes: 1 addition & 1 deletion scripts/get-fonts.sh
Original file line number Diff line number Diff line change
Expand Up @@ -127,6 +127,6 @@ unzip -oqq "${TMPDIR}/Noto_Emoji.zip" static/NotoEmoji-Regular.ttf static/NotoEm
mv "${FONTDIR}/static/NotoEmoji-Regular.ttf" "${FONTDIR}"
mv "${FONTDIR}/static/NotoEmoji-Bold.ttf" "${FONTDIR}"

curl --fail -A "get-fonts.sh/osm-carto" -o "${TMPDIR}/hanazono.zip" -L 'https://osdn.net/frs/redir.php?f=hanazono-font%2F68253%2Fhanazono-20170904.zip'
curl --fail -A "get-fonts.sh/osm-carto" -o "${TMPDIR}/hanazono.zip" -L 'https://mirrors.dotsrc.org/osdn/hanazono-font/68253/hanazono-20170904.zip'

unzip -oqq "${TMPDIR}/hanazono.zip" HanaMinA.ttf HanaMinB.ttf -d "${FONTDIR}"
22 changes: 21 additions & 1 deletion style/landcover.mss
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@

// --- Sports ---

@pitch: #aae0cb; // Lch(85,22,168) also track
@pitch: #88e0be; // Lch(83,35,166) also track
@track: @pitch;
@stadium: @leisure; // also sports_centre
@golf_course: @campsite;
Expand Down 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
82 changes: 63 additions & 19 deletions style/roads.mss
Original file line number Diff line number Diff line change
Expand Up @@ -2780,21 +2780,42 @@ tertiary is rendered from z10 and is not included in osm_planet_roads. */
}

#turning-circle-casing {
[int_tc_type = 'trunk'][zoom >= 15] {
marker-fill: @trunk-casing;
marker-width: @trunk-width-z15 * 1.6 + 2 * @major-casing-width-z15;
marker-height: @trunk-width-z15 * 1.6 + 2 * @major-casing-width-z15;
[zoom >= 17] {
marker-width: @trunk-width-z17 * 1.6 + 2 * @major-casing-width-z17;
marker-height: @trunk-width-z17 * 1.6 + 2 * @major-casing-width-z17;
}
[zoom >= 18] {
marker-width: @trunk-width-z18 * 1.6 + 2 * @major-casing-width-z18;
marker-height: @trunk-width-z18 * 1.6 + 2 * @major-casing-width-z18;
}
[zoom >= 19] {
marker-width: @trunk-width-z19 * 1.6 + 2 * @major-casing-width-z19;
marker-height: @trunk-width-z19 * 1.6 + 2 * @major-casing-width-z19;
}
marker-allow-overlap: true;
marker-ignore-placement: true;
marker-line-width: 0;
}

[int_tc_type = 'primary'][zoom >= 15] {
marker-fill: @primary-casing;
marker-width: @primary-width-z15 * 1.6 + 2 * @casing-width-z15;
marker-height: @primary-width-z15 * 1.6 + 2 * @casing-width-z15;
marker-width: @primary-width-z15 * 1.6 + 2 * @major-casing-width-z15;
marker-height: @primary-width-z15 * 1.6 + 2 * @major-casing-width-z15;
[zoom >= 17] {
marker-width: @primary-width-z17 * 1.6 + 2 * @casing-width-z17;
marker-height: @primary-width-z17 * 1.6 + 2 * @casing-width-z17;
marker-width: @primary-width-z17 * 1.6 + 2 * @major-casing-width-z17;
marker-height: @primary-width-z17 * 1.6 + 2 * @major-casing-width-z17;
}
[zoom >= 18] {
marker-width: @primary-width-z18 * 1.6 + 2 * @casing-width-z18;
marker-height: @primary-width-z18 * 1.6 + 2 * @casing-width-z18;
marker-width: @primary-width-z18 * 1.6 + 2 * @major-casing-width-z18;
marker-height: @primary-width-z18 * 1.6 + 2 * @major-casing-width-z18;
}
[zoom >= 19] {
marker-width: @primary-width-z19 * 1.6 + 2 * @casing-width-z19;
marker-height: @primary-width-z19 * 1.6 + 2 * @casing-width-z19;
marker-width: @primary-width-z19 * 1.6 + 2 * @major-casing-width-z19;
marker-height: @primary-width-z19 * 1.6 + 2 * @major-casing-width-z19;
}
marker-allow-overlap: true;
marker-ignore-placement: true;
Expand All @@ -2803,23 +2824,23 @@ tertiary is rendered from z10 and is not included in osm_planet_roads. */

[int_tc_type = 'secondary'][zoom >= 15] {
marker-fill: @secondary-casing;
marker-width: @secondary-width-z15 * 1.6 + 2 * @casing-width-z15;
marker-height: @secondary-width-z15 * 1.6 + 2 * @casing-width-z15;
marker-width: @secondary-width-z15 * 1.6 + 2 * @secondary-casing-width-z15;
marker-height: @secondary-width-z15 * 1.6 + 2 * @secondary-casing-width-z15;
[zoom >= 16] {
marker-width: @secondary-width-z16 * 1.6 + 2 * @casing-width-z16;
marker-height: @secondary-width-z16 * 1.6 + 2 * @casing-width-z16;
marker-width: @secondary-width-z16 * 1.6 + 2 * @secondary-casing-width-z16;
marker-height: @secondary-width-z16 * 1.6 + 2 * @secondary-casing-width-z16;
}
[zoom >= 17] {
marker-width: @secondary-width-z17 * 1.6 + 2 * @casing-width-z17;
marker-height: @secondary-width-z17 * 1.6 + 2 * @casing-width-z17;
marker-width: @secondary-width-z17 * 1.6 + 2 * @secondary-casing-width-z17;
marker-height: @secondary-width-z17 * 1.6 + 2 * @secondary-casing-width-z17;
}
[zoom >= 18] {
marker-width: @secondary-width-z18 * 1.6 + 2 * @casing-width-z18;
marker-height: @secondary-width-z18 * 1.6 + 2 * @casing-width-z18;
marker-width: @secondary-width-z18 * 1.6 + 2 * @secondary-casing-width-z18;
marker-height: @secondary-width-z18 * 1.6 + 2 * @secondary-casing-width-z18;
}
[zoom >= 19] {
marker-width: @secondary-width-z19 * 1.6 + 2 * @casing-width-z19;
marker-height: @secondary-width-z19 * 1.6 + 2 * @casing-width-z19;
marker-width: @secondary-width-z19 * 1.6 + 2 * @secondary-casing-width-z19;
marker-height: @secondary-width-z19 * 1.6 + 2 * @secondary-casing-width-z19;
}
marker-allow-overlap: true;
marker-ignore-placement: true;
Expand Down Expand Up @@ -2946,6 +2967,27 @@ tertiary is rendered from z10 and is not included in osm_planet_roads. */
}

#turning-circle-fill {
[int_tc_type = 'trunk'][zoom >= 15] {
marker-fill: @trunk-fill;
marker-width: @trunk-width-z15 * 1.6;
marker-height: @trunk-width-z15 * 1.6;
[zoom >= 17] {
marker-width: @trunk-width-z17 * 1.6;
marker-height: @trunk-width-z17 * 1.6;
}
[zoom >= 18] {
marker-width: @trunk-width-z18 * 1.6;
marker-height: @trunk-width-z18 * 1.6;
}
[zoom >= 19] {
marker-width: @trunk-width-z19 * 1.6;
marker-height: @trunk-width-z19 * 1.6;
}
marker-allow-overlap: true;
marker-ignore-placement: true;
marker-line-width: 0;
}

[int_tc_type = 'primary'][zoom >= 15] {
marker-fill: @primary-fill;
marker-width: @primary-width-z15 * 1.6;
Expand Down Expand Up @@ -3131,9 +3173,11 @@ tertiary is rendered from z10 and is not included in osm_planet_roads. */
marker-ignore-placement: true;
marker-line-width: 0;

[int_tc_type = 'trunk'] { marker-fill: @trunk-casing; }
[int_tc_type = 'primary'] { marker-fill: @primary-casing; }
[int_tc_type = 'secondary'] { marker-fill: @secondary-casing; }
[int_tc_type = 'tertiary'] { marker-fill: @primary-casing; }
[int_tc_type = 'tertiary'] { marker-fill: @tertiary-casing; }
[int_tc_type = 'unclassified'] { marker-fill: @residential-casing; }
[int_tc_type = 'residential'] { marker-fill: @residential-casing; }
[int_tc_type = 'living_street'] { marker-fill: @living-street-casing; }
[int_tc_type = 'service'] { marker-fill: @service-casing; }
Expand Down
14 changes: 7 additions & 7 deletions style/tourism.mss
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/* For tourism features like roller coasters */

@track-casing: #707070;
@track-fill: #ddd;
@roller-coaster-casing: #707070;
@roller-coaster-fill: #ddd;

/* The purpose of “roller-coaster-gap-fill” layer is to fill in the gaps between sections of roller coaster track. */
#roller-coaster-gap-fill[zoom >= 15] {
Expand All @@ -27,14 +27,14 @@

::casing {
line-width: 1;
line-color: mix(@track-casing, @track-fill, 50%);
line-color: mix(@roller-coaster-casing, @roller-coaster-fill, 50%);
line-join: round;

[tunnel = 'yes'][zoom >= 16] {
line-color: lighten(@track-casing, 20%);
line-color: lighten(@roller-coaster-casing, 20%);
}
[zoom >= 16] {
line-color: @track-casing;
line-color: @roller-coaster-casing;
line-width: 2.5;
}
[zoom >= 17] { line-width: 4; }
Expand All @@ -45,11 +45,11 @@

::fill[zoom >= 16] {
line-width: 1.25;
line-color: @track-fill;
line-color: @roller-coaster-fill;
line-join: round;

[tunnel = 'yes'] {
line-color: lighten(@track-fill, 5%);
line-color: lighten(@roller-coaster-fill, 5%);
}
[zoom >= 17] { line-width: 2; }
[zoom >= 18] { line-width: 3; }
Expand Down
34 changes: 24 additions & 10 deletions style/water.mss
Original file line number Diff line number Diff line change
Expand Up @@ -289,30 +289,24 @@
[feature = 'natural_water'],
[feature = 'landuse_reservoir'],
[feature = 'landuse_basin'],
[feature = 'waterway_dock'],
[feature = 'natural_strait'],
[feature = 'natural_bay'] {
[feature = 'waterway_dock'] {
[zoom >= 5][way_pixels > 3000][way_pixels <= 768000],
[zoom >= 14][way_pixels <= 768000][feature = 'natural_bay'],
[zoom >= 14][way_pixels <= 768000][feature = 'natural_strait'],
[zoom >= 17][way_pixels <= 768000] {
text-name: "[name]";
text-size: 10;
text-wrap-width: 25; // 2.5 em
text-line-spacing: -1.5; // -0.15 em
[way_pixels > 12000][feature != 'natural_strait'][feature != 'natural_bay'],
[zoom >= 15][feature = 'natural_strait'],
[zoom >= 15][feature = 'natural_bay'] {
[way_pixels > 12000] {
text-size: 12;
text-wrap-width: 37; // 3.1 em
text-line-spacing: -1.6; // -0.13 em
}
[way_pixels > 48000][feature != 'natural_strait'][feature != 'natural_bay'] {
[way_pixels > 48000] {
text-size: 15;
text-wrap-width: 59; // 3.9 em
text-line-spacing: -1.5; // -0.10 em
}
[way_pixels > 192000][feature != 'natural_strait'][feature != 'natural_bay'] {
[way_pixels > 192000] {
text-size: 19;
text-wrap-width: 95; // 5.0 em
text-line-spacing: -0.95; // -0.05 em
Expand All @@ -325,3 +319,23 @@
}
}
}

#text-point[zoom >= 14] {
[feature = 'natural_bay'],
[feature = 'natural_strait'] {
text-name: "[name]";
text-size: 10;
text-wrap-width: 25; // 2.5 em
text-line-spacing: -1.5; // -0.15 em
text-fill: @water-text;
text-face-name: @oblique-fonts;
text-halo-radius: @standard-halo-radius;
text-halo-fill: @standard-halo-fill;
text-placement: interior;
[zoom >= 15] {
text-size: 12;
text-wrap-width: 37; // 3.1 em
text-line-spacing: -1.6; // -0.13 em
}
}
}
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`

0 comments on commit 76216e2

Please sign in to comment.