Skip to content

Commit

Permalink
Update water lines - start from zoom 6
Browse files Browse the repository at this point in the history
  • Loading branch information
Rub21 committed Mar 25, 2024
1 parent b354009 commit e636c1d
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 32 deletions.
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -11,4 +11,5 @@ values.dev.yaml
secrets
tegola
envs/.env.tiler
envs/.env.web
envs/.env.web
config.toml
7 changes: 1 addition & 6 deletions images/tiler-server/config/config.template.toml
Original file line number Diff line number Diff line change
Expand Up @@ -256,11 +256,6 @@ center = [-74.275329586789, -12.153492567373, 8.0]
max_zoom = 20

# Water Lines
[[maps.layers]]
name = "water_lines"
provider_layer = "osm.water_lines_gen0_5-5"
min_zoom = 5
max_zoom = 5

[[maps.layers]]
name = "water_lines"
Expand Down Expand Up @@ -288,7 +283,7 @@ center = [-74.275329586789, -12.153492567373, 8.0]

[[maps.layers]]
name = "water_lines"
provider_layer = "osm.water_lines_gen1"
provider_layer = "osm.water_lines_gen1_10-11"
min_zoom = 10
max_zoom = 11

Expand Down
27 changes: 2 additions & 25 deletions images/tiler-server/config/providers/water_lines.toml
Original file line number Diff line number Diff line change
@@ -1,28 +1,5 @@
# Simplification for geometries

[[providers.layers]]
geometry_fieldname = "geometry"
geometry_type = "linestring"
id_fieldname = "osm_id"
name = "water_lines_gen0_5-5"
sql = """
SELECT
ST_AsMVTGeom(ST_Simplify(geometry, 2000), !BBOX!) AS geometry,
ABS(osm_id) AS osm_id,
name,
type,
tags->'bridge' AS bridge,
tags->'start_date' AS start_date,
tags->'end_date' AS end_date,
isodatetodecimaldate(pad_date(tags->'start_date', 'start'), FALSE) AS start_decdate,
isodatetodecimaldate(pad_date(tags->'end_date', 'end'), FALSE) AS end_decdate
FROM
osm_water_lines_gen0
WHERE
type IN ('river', 'canal')
AND geometry && !BBOX!
"""

[[providers.layers]]
geometry_fieldname = "geometry"
geometry_type = "linestring"
Expand Down Expand Up @@ -120,10 +97,10 @@ WHERE
geometry_fieldname = "geometry"
geometry_type = "linestring"
id_fieldname = "osm_id"
name = "water_lines_gen1"
name = "water_lines_gen1_10-11"
sql = """
SELECT
ST_AsMVTGeom(geometry, !BBOX!) AS geometry,
ST_AsMVTGeom(ST_Simplify(geometry, 20), !BBOX!) AS geometry,
ABS(osm_id) AS osm_id,
name,
type,
Expand Down

0 comments on commit e636c1d

Please sign in to comment.