From: Martin Mares Date: Sun, 13 Mar 2022 20:01:11 +0000 (+0100) Subject: Průvodce: Rendering of boundary etc. X-Git-Url: http://mj.ucw.cz/gitweb/?a=commitdiff_plain;h=b3022844ed50db4390935e44d1a697da00473ea6;p=leo.git Průvodce: Rendering of boundary etc. --- diff --git a/boundary/cz-boundary b/boundary/cz-boundary new file mode 100644 index 0000000..9249748 --- /dev/null +++ b/boundary/cz-boundary @@ -0,0 +1,10 @@ +( +relation + ["boundary"="administrative"] + ["admin_level"="2"] + ["ISO3166-1:alpha2"="CZ"] + ; +way(r:"outer"); +node(w); +); +out meta; diff --git a/boundary/overpass-query b/boundary/overpass-query new file mode 100755 index 0000000..8026a2e --- /dev/null +++ b/boundary/overpass-query @@ -0,0 +1,3 @@ +#!/bin/sh +[ -n "$1" ] || exit 1 +wget -O "$1.osm" --post-file="$1" "http://overpass-api.de/api/interpreter" diff --git a/map.cf b/map.cf index 4762618..8bdf909 100644 --- a/map.cf +++ b/map.cf @@ -14,6 +14,12 @@ Map { StyleSheet pruvodce.css } + Source { + File boundary/cz-boundary.osm + Format osmxml + StyleSheet pruvodce.css + } + # Source { # Format fixed # StyleSheet pruvodce.css diff --git a/pruvodce.css b/pruvodce.css index 69b7d7b..efcd38b 100644 --- a/pruvodce.css +++ b/pruvodce.css @@ -7,154 +7,72 @@ way::* { casing-linecap: round; } -/* - * Assignment of z-indices: - * - * 0 default - * 0.1 subtypes of landuse - * 1.x highways - * 2.x railways - * 4 tourist routes - * 5 icons - * 9 hack:front - * 10 power lines and similar overhead objects - * - * Assignment of major-z-indices: - * - * 1 (default for areas} - * 1.1 water way casing - * 1.2 water ways - * 1.3 water areas - * 2 (default for casing) - * 2.9 (default for line patterns) - * 3 (default for lines) - * 4 (default for points) - * 4.9 (default for line text) - * 5 (default for point text) - */ +/*** Boundary ***/ -/*** Highways ***/ - -/* -way[highway][area?!] { +relation[boundary=administrative] way { color: #f00; - width: 0.3; -} -*/ - -area[highway=residential], -area[highway=unclassified], -area[highway=service] { - fill-color: #fff; -} - -area[highway=pedestrian], -area[highway=footway], -area[highway=path] { - fill-color: #ededed; -} - -area[highway=track] { - fill-color: #dfcc66; -} - -area[highway=platform], -area[railway=platform] { - fill-color: #bbbbbb; + width: 0.5; + z-index: 0.5; + linejoin: round; + linecap: round; + casing-linejoin: round; + casing-linecap: round; } -area[aeroway=runway], -area[aeroway=taxiway], -area[aeroway=helipad] { - fill-color: #bbc; - z-index: 1; -} +/*** Highways ***/ way[highway=motorway_link] { - color: #809bc0; - width: 0.5; - casing-color: #506077; - casing-width: 0.1; + width: 0.2; z-index: 1.9; } way[highway=trunk_link] { - color: #a9dba9; - width: 0.25; - casing-color: #477147; - casing-width: 0.08; + width: 0.2; z-index: 1.8; } way[highway=primary_link] { - color: #ec989a; - width: 0.15; - casing-color: #8d4346; - casing-width: 0.05; + width: 0.2; z-index: 1.7; } way[highway=secondary_link] { - color: #fed7a5; - width: 0.1; - casing-color: #a37b48; - casing-width: 0.05; + width: 0.2; z-index: 1.6; } way[highway=tertiary_link] { - color: #ffffb3; - width: 0.07; - casing-color: #bbb; - casing-width: 0.05; + width: 0.2; z-index: 1.5; } way[highway=motorway] { - color: #809bc0; - width: 0.5; - casing-color: #506077; - casing-width: 0.1; + width: 0.2; z-index: 1.9; } way[highway=trunk] { - color: #a9dba9; - width: 0.25; - casing-color: #477147; - casing-width: 0.08; + width: 0.2; z-index: 1.8; } way[highway=primary] { - color: #ec989a; - width: 0.15; - casing-color: #8d4346; - casing-width: 0.05; + width: 0.2; z-index: 1.7; } way[highway=secondary] { - color: #fed7a5; - width: 0.1; - casing-color: #a37b48; - casing-width: 0.05; + width: 0.2; z-index: 1.6; } way[highway=tertiary] { - color: #ffffb3; - width: 0.07; - casing-color: #bbb; - casing-width: 0.05; + width: 0.1; z-index: 1.5; } way[highway=road] { - color: #ddd; - width: 0.07; - casing-color: #999; - casing-width: 0.05; + width: 0.1; z-index: 1; } @@ -162,18 +80,12 @@ way[highway=residential], way[highway=unclassified], way[highway=road], way[highway=living_street] { - color: #fff; - width: 0.07; - casing-color: #999; - casing-width: 0.05; + width: 0.1; z-index: 1; } way[highway=service] { - color: #fff; - width: 0.05; - casing-color: #999; - casing-width: 0.03; + width: 0.1; z-index: 1; }