Skip to content

Commit

Permalink
Merge pull request #443 from OpenHistoricalMap/staging
Browse files Browse the repository at this point in the history
Fix tegola layers config columns
  • Loading branch information
Rub21 authored Dec 20, 2024
2 parents 8bfa47a + c01d00b commit ac8ed93
Show file tree
Hide file tree
Showing 11 changed files with 160 additions and 161 deletions.
2 changes: 1 addition & 1 deletion images/tiler-cache/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM ghcr.io/openhistoricalmap/tiler-server:0.0.1-0.dev.git.1951.hc772955
FROM ghcr.io/openhistoricalmap/tiler-server:0.0.1-0.dev.git.1964.h8703c77

RUN apk update && apk add --no-cache \
proj \
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,11 @@ sql = """
SELECT
ST_AsMVTGeom(geometry, !BBOX!) AS geometry,
ABS(osm_id) AS osm_id,
admin_level,
name,
type,
start_date,
end_date,
admin_level,
NULLIF(name, '') AS name,
NULLIF(type, '') AS type,
NULLIF(start_date, '') AS start_date,
NULLIF(end_date, '') AS end_date,
isodatetodecimaldate(pad_date(start_date, 'start'), FALSE) AS start_decdate,
isodatetodecimaldate(pad_date(end_date, 'end'), FALSE) AS end_decdate,
{{LENGUAGES}}
Expand All @@ -31,11 +31,11 @@ sql = """
SELECT
ST_AsMVTGeom(geometry, !BBOX!) AS geometry,
ABS(osm_id) AS osm_id,
admin_level,
name,
type,
start_date,
end_date,
admin_level,
NULLIF(name, '') AS name,
NULLIF(type, '') AS type,
NULLIF(start_date, '') AS start_date,
NULLIF(end_date, '') AS end_date,
isodatetodecimaldate(pad_date(start_date, 'start'), FALSE) AS start_decdate,
isodatetodecimaldate(pad_date(end_date, 'end'), FALSE) AS end_decdate,
{{LENGUAGES}}
Expand All @@ -55,11 +55,11 @@ sql = """
SELECT
ST_AsMVTGeom(geometry, !BBOX!) AS geometry,
ABS(osm_id) AS osm_id,
admin_level,
name,
type,
start_date,
end_date,
admin_level,
NULLIF(name, '') AS name,
NULLIF(type, '') AS type,
NULLIF(start_date, '') AS start_date,
NULLIF(end_date, '') AS end_date,
isodatetodecimaldate(pad_date(start_date, 'start'), FALSE) AS start_decdate,
isodatetodecimaldate(pad_date(end_date, 'end'), FALSE) AS end_decdate,
{{LENGUAGES}}
Expand All @@ -79,11 +79,11 @@ sql = """
SELECT
ST_AsMVTGeom(geometry, !BBOX!) AS geometry,
ABS(osm_id) AS osm_id,
admin_level,
name,
type,
start_date,
end_date,
admin_level,
NULLIF(name, '') AS name,
NULLIF(type, '') AS type,
NULLIF(start_date, '') AS start_date,
NULLIF(end_date, '') AS end_date,
isodatetodecimaldate(pad_date(start_date, 'start'), FALSE) AS start_decdate,
isodatetodecimaldate(pad_date(end_date, 'end'), FALSE) AS end_decdate,
{{LENGUAGES}}
Expand All @@ -103,11 +103,11 @@ sql = """
SELECT
ST_AsMVTGeom(geometry, !BBOX!) AS geometry,
ABS(osm_id) AS osm_id,
admin_level,
name,
type,
start_date,
end_date,
admin_level,
NULLIF(name, '') AS name,
NULLIF(type, '') AS type,
NULLIF(start_date, '') AS start_date,
NULLIF(end_date, '') AS end_date,
isodatetodecimaldate(pad_date(start_date, 'start'), FALSE) AS start_decdate,
isodatetodecimaldate(pad_date(end_date, 'end'), FALSE) AS end_decdate,
{{LENGUAGES}}
Expand All @@ -118,7 +118,6 @@ WHERE
AND geometry && !BBOX!
"""


[[providers.layers]]
name = "admin_boundaries_centroid_z13_15"
geometry_fieldname = "geometry"
Expand All @@ -128,11 +127,11 @@ sql = """
SELECT
ST_AsMVTGeom(geometry, !BBOX!) AS geometry,
ABS(osm_id) AS osm_id,
admin_level,
name,
type,
start_date,
end_date,
admin_level,
NULLIF(name, '') AS name,
NULLIF(type, '') AS type,
NULLIF(start_date, '') AS start_date,
NULLIF(end_date, '') AS end_date,
isodatetodecimaldate(pad_date(start_date, 'start'), FALSE) AS start_decdate,
isodatetodecimaldate(pad_date(end_date, 'end'), FALSE) AS end_decdate,
{{LENGUAGES}}
Expand All @@ -152,11 +151,11 @@ sql = """
SELECT
ST_AsMVTGeom(geometry, !BBOX!) AS geometry,
ABS(osm_id) AS osm_id,
admin_level,
name,
type,
start_date,
end_date,
admin_level,
NULLIF(name, '') AS name,
NULLIF(type, '') AS type,
NULLIF(start_date, '') AS start_date,
NULLIF(end_date, '') AS end_date,
isodatetodecimaldate(pad_date(start_date, 'start'), FALSE) AS start_decdate,
isodatetodecimaldate(pad_date(end_date, 'end'), FALSE) AS end_decdate,
{{LENGUAGES}}
Expand All @@ -165,4 +164,4 @@ FROM
WHERE
has_label = 0
AND geometry && !BBOX!
"""
"""
56 changes: 28 additions & 28 deletions images/tiler-server/config/providers/admin_boundaries_lines.toml
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,10 @@ SELECT
ST_AsMVTGeom(geometry, !BBOX!) AS geometry,
ABS(osm_id) AS osm_id,
admin_level,
name,
type,
start_date,
end_date,
NULLIF(name, '') AS name,
NULLIF(type, '') AS type,
NULLIF(start_date, '') AS start_date,
NULLIF(end_date, '') AS end_date,
isodatetodecimaldate(pad_date(start_date, 'start'), FALSE) AS start_decdate,
isodatetodecimaldate(pad_date(end_date, 'end'), FALSE) AS end_decdate,
{{LENGUAGES}}
Expand All @@ -31,10 +31,10 @@ SELECT
ST_AsMVTGeom(geometry, !BBOX!) AS geometry,
ABS(osm_id) AS osm_id,
admin_level,
name,
type,
start_date,
end_date,
NULLIF(name, '') AS name,
NULLIF(type, '') AS type,
NULLIF(start_date, '') AS start_date,
NULLIF(end_date, '') AS end_date,
isodatetodecimaldate(pad_date(start_date, 'start'), FALSE) AS start_decdate,
isodatetodecimaldate(pad_date(end_date, 'end'), FALSE) AS end_decdate,
{{LENGUAGES}}
Expand All @@ -55,10 +55,10 @@ SELECT
ST_AsMVTGeom(geometry, !BBOX!) AS geometry,
ABS(osm_id) AS osm_id,
admin_level,
name,
type,
start_date,
end_date,
NULLIF(name, '') AS name,
NULLIF(type, '') AS type,
NULLIF(start_date, '') AS start_date,
NULLIF(end_date, '') AS end_date,
isodatetodecimaldate(pad_date(start_date, 'start'), FALSE) AS start_decdate,
isodatetodecimaldate(pad_date(end_date, 'end'), FALSE) AS end_decdate,
{{LENGUAGES}}
Expand All @@ -78,10 +78,10 @@ SELECT
ST_AsMVTGeom(geometry, !BBOX!) AS geometry,
ABS(osm_id) AS osm_id,
admin_level,
name,
type,
start_date,
end_date,
NULLIF(name, '') AS name,
NULLIF(type, '') AS type,
NULLIF(start_date, '') AS start_date,
NULLIF(end_date, '') AS end_date,
isodatetodecimaldate(pad_date(start_date, 'start'), FALSE) AS start_decdate,
isodatetodecimaldate(pad_date(end_date, 'end'), FALSE) AS end_decdate,
{{LENGUAGES}}
Expand All @@ -101,10 +101,10 @@ SELECT
ST_AsMVTGeom(geometry, !BBOX!) AS geometry,
ABS(osm_id) AS osm_id,
admin_level,
name,
type,
start_date,
end_date,
NULLIF(name, '') AS name,
NULLIF(type, '') AS type,
NULLIF(start_date, '') AS start_date,
NULLIF(end_date, '') AS end_date,
isodatetodecimaldate(pad_date(start_date, 'start'), FALSE) AS start_decdate,
isodatetodecimaldate(pad_date(end_date, 'end'), FALSE) AS end_decdate,
{{LENGUAGES}}
Expand All @@ -124,10 +124,10 @@ SELECT
ST_AsMVTGeom(geometry, !BBOX!) AS geometry,
ABS(osm_id) AS osm_id,
admin_level,
name,
type,
start_date,
end_date,
NULLIF(name, '') AS name,
NULLIF(type, '') AS type,
NULLIF(start_date, '') AS start_date,
NULLIF(end_date, '') AS end_date,
isodatetodecimaldate(pad_date(start_date, 'start'), FALSE) AS start_decdate,
isodatetodecimaldate(pad_date(end_date, 'end'), FALSE) AS end_decdate,
{{LENGUAGES}}
Expand All @@ -147,10 +147,10 @@ SELECT
ST_AsMVTGeom(geometry, !BBOX!) AS geometry,
ABS(osm_id) AS osm_id,
admin_level,
name,
type,
start_date,
end_date,
NULLIF(name, '') AS name,
NULLIF(type, '') AS type,
NULLIF(start_date, '') AS start_date,
NULLIF(end_date, '') AS end_date,
isodatetodecimaldate(pad_date(start_date, 'start'), FALSE) AS start_decdate,
isodatetodecimaldate(pad_date(end_date, 'end'), FALSE) AS end_decdate,
{{LENGUAGES}}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,8 @@ SELECT
name,
type,
maritime,
start_date,
end_date,
NULLIF(start_date, '') AS start_date,
NULLIF(end_date, '') AS end_date,
isodatetodecimaldate(pad_date(start_date, 'start'), FALSE) AS start_decdate,
isodatetodecimaldate(pad_date(end_date, 'end'), FALSE) AS end_decdate,
{{LENGUAGES}}
Expand All @@ -59,8 +59,8 @@ SELECT
name,
type,
maritime,
start_date,
end_date,
NULLIF(start_date, '') AS start_date,
NULLIF(end_date, '') AS end_date,
isodatetodecimaldate(pad_date(start_date, 'start'), FALSE) AS start_decdate,
isodatetodecimaldate(pad_date(end_date, 'end'), FALSE) AS end_decdate,
{{LENGUAGES}}
Expand Down
4 changes: 2 additions & 2 deletions images/tiler-server/config/providers/route_lines.toml
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,8 @@ SELECT
interval,
duration,
tourism,
start_date,
end_date,
NULLIF(start_date, '') AS start_date,
NULLIF(end_date, '') AS end_date,
isodatetodecimaldate(pad_date(start_date, 'start'), FALSE) AS start_decdate,
isodatetodecimaldate(pad_date(end_date, 'end'), FALSE) AS end_decdate,
{{LENGUAGES}}
Expand Down
Loading

0 comments on commit ac8ed93

Please sign in to comment.