-
Notifications
You must be signed in to change notification settings - Fork 2
/
natural-earth-countries.toml
92 lines (80 loc) · 2.41 KB
/
natural-earth-countries.toml
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
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
# t-rex configuration
[service.mvt]
viewer = true
[[datasource]]
dbconn = "postgresql://pi@%2Frun%2Fpostgresql/naturalearth4"
name = "pg"
default = true
[grid]
predefined = "web_mercator"
[[tileset]]
name = "ne_countries"
attribution = "Natural Earth v4"
extent = [-179.97277, -83.05457, 179.99366, 83.23559]
minzoom = 0
maxzoom = 6
[[tileset.layer]]
name = "country"
geometry_field = "wkb_geometry"
geometry_type = "MULTIPOLYGON"
srid = 3857
buffer_size = 3
simplify = true
[[tileset.layer.query]]
#sql = """SELECT wkb_geometry, adm0_a3, mapcolor7 FROM ne_50m_admin_0_countries WHERE min_zoom::integer <= !zoom! AND wkb_geometry && !bbox!"""
sql = """SELECT wkb_geometry, adm0_a3, mapcolor7 FROM ne_10m_admin_0_countries WHERE min_zoom::integer <= !zoom! AND wkb_geometry && !bbox!"""
[[tileset.layer]]
name = "country-name"
geometry_field = "wkb_geometry"
geometry_type = "POINT"
srid = 3857
buffer_size = 0
[[tileset.layer.query]]
sql = """SELECT wkb_geometry, abbrev, name FROM ne_10m_admin_0_country_points WHERE wkb_geometry && !bbox!"""
[[tileset.layer]]
name = "geo-lines"
geometry_field = "wkb_geometry"
geometry_type = "MULTILINESTRING"
srid = 3857
buffer_size = 0
simplify = false
[[tileset.layer.query]]
# ne_50m_geographic_lines
minzoom = 1
maxzoom = 4
sql = """SELECT wkb_geometry, name FROM ne_50m_geographic_lines WHERE wkb_geometry && !bbox!"""
[[tileset.layer.query]]
# ne_10m_geographic_lines
minzoom = 5
sql = """SELECT wkb_geometry, name FROM ne_10m_geographic_lines WHERE wkb_geometry && !bbox!"""
[[tileset.layer]]
name = "land-border-country"
geometry_field = "wkb_geometry"
geometry_type = "MULTILINESTRING"
fid_field = "ogc_fid"
srid = 3857
buffer_size = 0
simplify = true
[[tileset.layer.query]]
# ne_10m_admin_0_boundary_lines_land
sql = """SELECT wkb_geometry FROM ne_10m_admin_0_boundary_lines_land WHERE min_zoom::integer <= !zoom! AND wkb_geometry && !bbox!"""
[[tileset.layer]]
name = "state"
geometry_field = "wkb_geometry"
geometry_type = "MULTILINESTRING"
srid = 3857
buffer_size = 0
simplify = true
[[tileset.layer.query]]
sql = """SELECT wkb_geometry, adm0_a3 FROM ne_10m_admin_1_states_provinces_lines WHERE min_zoom::integer <= !zoom! AND wkb_geometry && !bbox!"""
[cache.file]
base = "/tmp/mvtcache"
baseurl = "http://example.com/tiles"
[webserver]
# Bind address. Use 0.0.0.0 to listen on all adresses.
bind = "127.0.0.1"
port = 6767
#cache_control_max_age = 43200
[[webserver.static]]
path = "/map"
dir = "./maps/"