Skip to content

Commit

Permalink
Merge branch 'tweak-to-run'
Browse files Browse the repository at this point in the history
  • Loading branch information
dch0ph committed Oct 24, 2023
2 parents a3ecd3f + 88f07af commit c4b7dfd
Show file tree
Hide file tree
Showing 3 changed files with 62 additions and 36 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ that need some cartographic judgement.
There are many open-source stylesheets written for creating OpenStreetMap-based
maps using Mapnik, many based on this project. Some alternatives are:

* [OSM Bright](https://github.com/mapbox/osm-bright)
* [OSM Bright](https://github.com/geofabrik/osm-bright)
* [XML-based stylesheets](https://github.com/openstreetmap/mapnik-stylesheets)
* [OpenStreetMap "FR" Carto](https://github.com/cquest/osmfr-cartocss)
* [OpenStreetMap Carto German](https://github.com/giggls/openstreetmap-carto-de)
Expand Down
67 changes: 32 additions & 35 deletions project.mml
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ srs: *srs

Stylesheet:
- style/style.mss
- style/fonts.mss
- style/fonts-GilliusNo1.mss
- style/shapefiles.mss
- style/landcover.mss
- style/water.mss
Expand Down Expand Up @@ -157,18 +157,18 @@ Layer:
) AS landcover_line
properties:
minzoom: 14
- id: icesheet-poly
geometry: polygon
<<: *extents
Datasource:
<<: *osm2pgsql
table: |-
(SELECT
way
FROM icesheet_polygons
) AS icesheet_polygons
properties:
minzoom: 5
# - id: icesheet-poly
# geometry: polygon
# <<: *extents
# Datasource:
# <<: *osm2pgsql
# table: |-
# (SELECT
# way
# FROM icesheet_polygons
# ) AS icesheet_polygons
# properties:
# minzoom: 5
- id: water-lines-low-zoom
geometry: linestring
<<: *extents
Expand Down Expand Up @@ -293,19 +293,19 @@ Layer:
properties:
cache-features: true
minzoom: 9
- id: icesheet-outlines
geometry: linestring
<<: *extents
Datasource:
<<: *osm2pgsql
table: |-
(SELECT
way,
ice_edge
FROM icesheet_outlines
) AS icesheet_outlines
properties:
minzoom: 5
# - id: icesheet-outlines
# geometry: linestring
# <<: *extents
# Datasource:
# <<: *osm2pgsql
# table: |-
# (SELECT
# way,
# ice_edge
# FROM icesheet_outlines
# ) AS icesheet_outlines
# properties:
# minzoom: 5
- id: marinas-area
geometry: polygon
<<: *extents
Expand Down Expand Up @@ -655,16 +655,14 @@ Layer:
'highway_' || (CASE WHEN highway IN ('pedestrian', 'footway', 'service', 'platform') THEN highway END)),
('railway_' || (CASE WHEN (railway IN ('platform')
AND (tags->'location' NOT IN ('underground') OR (tags->'location') IS NULL)
AND (tunnel NOT IN ('yes', 'building_passage') OR tunnel IS NULL)
AND (covered NOT IN ('yes') OR covered IS NULL))
AND (tunnel NOT IN ('yes', 'building_passage') OR tunnel IS NULL))
THEN railway END))
) AS feature
FROM planet_osm_polygon
WHERE highway IN ('pedestrian', 'footway', 'service', 'platform')
OR (railway IN ('platform')
AND (tags->'location' NOT IN ('underground') OR (tags->'location') IS NULL)
AND (tunnel NOT IN ('yes', 'building_passage') OR tunnel IS NULL)
AND (covered NOT IN ('yes') OR covered IS NULL))
AND (tunnel NOT IN ('yes', 'building_passage') OR tunnel IS NULL))
ORDER BY COALESCE(layer,0), way_area DESC
) AS highway_area_casing
properties:
Expand Down Expand Up @@ -754,8 +752,9 @@ Layer:
z_order
FROM planet_osm_line
WHERE (tunnel IS NULL OR NOT tunnel IN ('yes', 'building_passage'))
AND (covered IS NULL OR NOT covered = 'yes')
AND (covered IS NULL OR NOT covered = 'yes' OR railway IN ('platform'))
AND (bridge IS NULL OR NOT bridge IN ('yes', 'boardwalk', 'cantilever', 'covered', 'low_water_crossing', 'movable', 'trestle', 'viaduct'))
AND (railway NOT IN ('platform') OR (tags->'location' NOT IN ('underground')) OR (tags->'location') IS NULL)
AND railway IS NOT NULL -- end of rail select
) AS features
ORDER BY
Expand Down Expand Up @@ -783,8 +782,7 @@ Layer:
'platform', 'services') THEN highway END)),
('railway_' || (CASE WHEN (railway IN ('platform')
AND (tags->'location' NOT IN ('underground') OR (tags->'location') IS NULL)
AND (tunnel NOT IN ('yes', 'building_passage') OR tunnel IS NULL)
AND (covered NOT IN ('yes') OR covered IS NULL))
AND (tunnel NOT IN ('yes', 'building_passage') OR tunnel IS NULL))
THEN railway END)),
(('aeroway_' || CASE WHEN aeroway IN ('runway', 'taxiway', 'helipad') THEN aeroway ELSE NULL END))
) AS feature,
Expand All @@ -798,8 +796,7 @@ Layer:
WHERE highway IN ('pedestrian', 'footway', 'service', 'living_street', 'platform', 'services')
OR (railway IN ('platform')
AND (tags->'location' NOT IN ('underground') OR (tags->'location') IS NULL)
AND (tunnel NOT IN ('yes', 'building_passage') OR tunnel IS NULL)
AND (covered NOT IN ('yes') OR covered IS NULL))
AND (tunnel NOT IN ('yes', 'building_passage') OR tunnel IS NULL))
OR aeroway IN ('runway', 'taxiway', 'helipad')
ORDER BY COALESCE(layer,0), way_area desc
) AS highway_area_fill
Expand Down
29 changes: 29 additions & 0 deletions style/fonts-GilliusNo1.mss
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
/*
3. Fallback fonts:
Hanazono covers almost all CJK characters, even in Unicode Plane 2.
*/

/* Use vendored fonts. This allows for more recent versions and better coverage */
Map {
font-directory: url('fonts');
}

/*
A regular style.
*/
@book-fonts: "Gillius ADF Regular",
"HanaMinA Regular", "HanaMinB Regular";

/*
Bold text is heavier than regular text and can be used for emphasis. Fallback is a regular style.
*/
@bold-fonts: "Gillius ADF Bold",
@book-fonts;

/*
Italics are only available for the (Latin-Greek-Cyrillic) base font, not the other scripts.
For a considerable number of labels this style will make no difference to the regular style.
*/
@oblique-fonts: "Gillius ADF Italic", @book-fonts;

0 comments on commit c4b7dfd

Please sign in to comment.