-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtrex.toml
78 lines (70 loc) · 1.8 KB
/
trex.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
# t-rex configuration
[service.mvt]
viewer = true
[datasource]
type = "postgis"
url = "postgresql://ubuntu:-ubuntu-@localhost/vtile"
[grid]
# Predefined grids: web_mercator, wgs84
predefined = "web_mercator"
[[tileset]]
name = "lines"
extent = [-5.05458, 41.90090, 9.45420, 51.08534]
[[tileset.layer]]
name = "lines"
table_name = "lines"
geometry_field = "geom"
geometry_type = "MULTILINESTRING"
srid = 3857
#fid_field = "id"
buffer_size = 0
simplify = true
query_limit = 1000
[[tileset.layer.query]]
sql = """SELECT geom,"id","name","code","operator","network","mode","colour" FROM lines100 WHERE geom && !bbox!"""
[[tileset.layer.query]]
minzoom = 14
maxzoom = 16
sql = """SELECT geom,"id","name","code","operator","network","mode","colour" FROM lines50 WHERE geom && !bbox!"""
[[tileset.layer.query]]
minzoom = 16
maxzoom = 22
sql = """SELECT geom,"id","name","code","operator","network","mode","colour" FROM lines10 WHERE geom && !bbox!"""
[[tileset]]
name = "admin_level_poly"
[[tileset.layer]]
name = "admin_level_poly"
table_name = "import.osm_admin_poly"
geometry_field = "geometry"
geometry_type = "POLYGON"
srid = 3857
#fid_field = "id"
buffer_size = 0
simplify = true
query_limit = 1000
[[tileset]]
name = "poc_nantes"
[[tileset.layer]]
name = "poc_nantes"
table_name = "tan_group"
geometry_field = "geom"
geometry_type = "MULTILINESTRING"
srid = 3857
#fid_field = "id"
buffer_size = 0
simplify = true
query_limit = 1000
[[tileset.layer.query]]
sql = """select d.*, g.count, array_position(codes, d.code) as offset_order
from tan_group g left join tan_detail d
on g.geom = d.geom
WHERE g.geom && !bbox!"""
#[cache.file]
#base = "/srv/mvtcache"
#baseurl = "http://example.com/tiles"
[webserver]
# Bind address. Use 0.0.0.0 to listen on all adresses.
bind = "0.0.0.0"
port = 6767
threads = 4
#cache_control_max_age = 43200