forked from Ahlzen/TopOSM
-
Notifications
You must be signed in to change notification settings - Fork 1
/
features_fills.mml
75 lines (72 loc) · 2.49 KB
/
features_fills.mml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
# -*- yaml -*-
name: TopOSM Feature Fills
description: Feature fill layer for TopOSM.
scale: 1
metatile: 2
bounds:
- -180
- -85.05112877980659
- 180
- 85.05112877980659
center:
- 0
- 0
- 4
format: png
interactivity: false
minzoom: 0
maxzoom: 22
srs: &srs +proj=merc +a=6378137 +b=6378137 +lat_ts=0 +lon_0=0 +x_0=0 +y_0=0 +k=1 +units=m +nadgrids=@null +wktext +no_defs +type=crs
Stylesheet:
- colors.mss
- sizes.mss
- fonts.mss
- features_fills.mss
- features_highways.mss
- features_railways.mss
- features_aeroways.mss
_parts:
osm2pgsql: &osm2pgsql
type: postgis
dbname: osm
port: 5433
extent: -20037508,-19929239,20037508,19929239
Layer:
- id: railway-fills
name: railway-fills
srs: *srs
Datasource:
<<: *osm2pgsql
table: (SELECT way, tunnel, highway, CASE WHEN railway = 'spur' THEN 'rail' ELSE railway END AS railway, CASE WHEN railway = 'spur' THEN 'spur' WHEN service IN ('spur', 'yard', 'siding', 'crossover') THEN 'spur' ELSE service END AS service FROM planet_osm_line WHERE railway IS NOT NULL AND route IS NULL AND highway IS NULL ORDER BY z_order, ST_Length(way)) AS lines
- id: turning-circles-fills
name: turning-circles-fills
srs: *srs
Datasource:
<<: *osm2pgsql
table: (SELECT p.way as way, l.highway AS int_tc_type FROM planet_osm_point p JOIN planet_osm_line l ON ST_DWithin(p.way, l.way, 0.1) WHERE p.highway = 'turning_circle' AND l.highway in ('tertiary', 'unclassified', 'residential', 'service')) as turning_circle
- id: parking-fills
name: parking-fills
srs: *srs
Datasource:
<<: *osm2pgsql
table: (SELECT way, amenity, access FROM planet_osm_polygon ORDER BY z_order, way_area DESC) AS parking
- id: highway-fills
name: highway-fills
srs: *srs
Datasource:
<<: *osm2pgsql
table: (SELECT way, highway, tunnel, bicycle, CASE WHEN highway LIKE '%_link' THEN true ELSE false END AS link FROM planet_osm_line WHERE highway IS NOT NULL ORDER BY FLOOR(z_order / 10.0), link DESC, z_order) AS lines
- id: aeroway-line-fills
name: aeroway-line-fills
class: aeroway-fills
srs: *srs
Datasource:
<<: *osm2pgsql
table: (SELECT way, aeroway FROM planet_osm_line WHERE aeroway IS NOT NULL ORDER BY z_order) AS lines
- id: aeroway-area-fills
name: aeroway-area-fills
class: aeroway-fills
srs: *srs
Datasource:
<<: *osm2pgsql
table: (SELECT way, aeroway FROM planet_osm_polygon WHERE aeroway IS NOT NULL ORDER BY z_order) AS areas