diff --git a/images/tiler-server/config/providers/admin_boundaries_centroids.toml b/images/tiler-server/config/providers/admin_boundaries_centroids.toml index 56101be2..bd237660 100644 --- a/images/tiler-server/config/providers/admin_boundaries_centroids.toml +++ b/images/tiler-server/config/providers/admin_boundaries_centroids.toml @@ -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, + NULLIF(admin_level, '') AS 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}} @@ -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, + NULLIF(admin_level, '') AS 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}} @@ -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, + NULLIF(admin_level, '') AS 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}} @@ -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, + NULLIF(admin_level, '') AS 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}} @@ -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, + NULLIF(admin_level, '') AS 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}} @@ -118,7 +118,6 @@ WHERE AND geometry && !BBOX! """ - [[providers.layers]] name = "admin_boundaries_centroid_z13_15" geometry_fieldname = "geometry" @@ -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, + NULLIF(admin_level, '') AS 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}} @@ -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, + NULLIF(admin_level, '') AS 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}} @@ -165,4 +164,4 @@ FROM WHERE has_label = 0 AND geometry && !BBOX! -""" \ No newline at end of file +""" diff --git a/images/tiler-server/config/providers/admin_boundaries_lines.toml b/images/tiler-server/config/providers/admin_boundaries_lines.toml index dfc680cd..bf19e45c 100644 --- a/images/tiler-server/config/providers/admin_boundaries_lines.toml +++ b/images/tiler-server/config/providers/admin_boundaries_lines.toml @@ -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, + NULLIF(admin_level, '') AS 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}} @@ -30,11 +30,11 @@ sql = """ SELECT ST_AsMVTGeom(geometry, !BBOX!) AS geometry, ABS(osm_id) AS osm_id, - admin_level, - name, - type, - start_date, - end_date, + NULLIF(admin_level, '') AS 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}} @@ -54,11 +54,11 @@ sql = """ SELECT ST_AsMVTGeom(geometry, !BBOX!) AS geometry, ABS(osm_id) AS osm_id, - admin_level, - name, - type, - start_date, - end_date, + NULLIF(admin_level, '') AS 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}} @@ -77,11 +77,11 @@ sql = """ SELECT ST_AsMVTGeom(geometry, !BBOX!) AS geometry, ABS(osm_id) AS osm_id, - admin_level, - name, - type, - start_date, - end_date, + NULLIF(admin_level, '') AS 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}} @@ -100,11 +100,11 @@ sql = """ SELECT ST_AsMVTGeom(geometry, !BBOX!) AS geometry, ABS(osm_id) AS osm_id, - admin_level, - name, - type, - start_date, - end_date, + NULLIF(admin_level, '') AS 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}} @@ -123,11 +123,11 @@ sql = """ SELECT ST_AsMVTGeom(geometry, !BBOX!) AS geometry, ABS(osm_id) AS osm_id, - admin_level, - name, - type, - start_date, - end_date, + NULLIF(admin_level, '') AS 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}} @@ -146,11 +146,11 @@ sql = """ SELECT ST_AsMVTGeom(geometry, !BBOX!) AS geometry, ABS(osm_id) AS osm_id, - admin_level, - name, - type, - start_date, - end_date, + NULLIF(admin_level, '') AS 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}} diff --git a/images/tiler-server/config/providers/admin_boundaries_maritime.toml b/images/tiler-server/config/providers/admin_boundaries_maritime.toml index 5de4577a..ac42f1b5 100644 --- a/images/tiler-server/config/providers/admin_boundaries_maritime.toml +++ b/images/tiler-server/config/providers/admin_boundaries_maritime.toml @@ -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}} @@ -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}} diff --git a/images/tiler-server/config/providers/route_lines.toml b/images/tiler-server/config/providers/route_lines.toml index bfab752a..3b5cf487 100644 --- a/images/tiler-server/config/providers/route_lines.toml +++ b/images/tiler-server/config/providers/route_lines.toml @@ -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}} diff --git a/images/tiler-server/config/providers/transport_lines.toml b/images/tiler-server/config/providers/transport_lines.toml index ac6f6e1a..bd481324 100644 --- a/images/tiler-server/config/providers/transport_lines.toml +++ b/images/tiler-server/config/providers/transport_lines.toml @@ -7,17 +7,17 @@ sql = """ SELECT ST_AsMVTGeom(geometry, !BBOX!) AS geometry, ABS(osm_id) AS osm_id, - type, - tunnel, - bridge, - ref, - service, - name, - electrified, - highspeed, - usage, - start_date, - end_date, + NULLIF(type, '') AS type, + NULLIF(tunnel, '') AS tunnel, + NULLIF(bridge, '') AS bridge, + NULLIF(ref, '') AS ref, + NULLIF(service, '') AS service, + NULLIF(name, '') AS name, + NULLIF(electrified, '') AS electrified, + NULLIF(highspeed, '') AS highspeed, + NULLIF(usage, '') AS usage, + 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}} @@ -36,16 +36,16 @@ sql = """ SELECT ST_AsMVTGeom(geometry, !BBOX!) AS geometry, ABS(osm_id) AS osm_id, - ref, - class, - type, - service, - name, - electrified, - highspeed, - usage, - start_date, - end_date, + NULLIF(ref, '') AS ref, + NULLIF(class, '') AS class, + NULLIF(type, '') AS type, + NULLIF(service, '') AS service, + NULLIF(name, '') AS name, + NULLIF(electrified, '') AS electrified, + NULLIF(highspeed, '') AS highspeed, + NULLIF(usage, '') AS usage, + 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}} @@ -64,16 +64,16 @@ sql = """ SELECT ST_AsMVTGeom(geometry, !BBOX!) AS geometry, ABS(osm_id) AS osm_id, - ref, - class, - type, - service, - name, - electrified, - highspeed, - usage, - start_date, - end_date, + NULLIF(ref, '') AS ref, + NULLIF(class, '') AS class, + NULLIF(type, '') AS type, + NULLIF(service, '') AS service, + NULLIF(name, '') AS name, + NULLIF(electrified, '') AS electrified, + NULLIF(highspeed, '') AS highspeed, + NULLIF(usage, '') AS usage, + 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}} @@ -92,16 +92,16 @@ sql = """ SELECT ST_AsMVTGeom(geometry, !BBOX!) AS geometry, ABS(osm_id) AS osm_id, - ref, - class, - type, - service, - name, - electrified, - highspeed, - usage, - start_date, - end_date, + NULLIF(ref, '') AS ref, + NULLIF(class, '') AS class, + NULLIF(type, '') AS type, + NULLIF(service, '') AS service, + NULLIF(name, '') AS name, + NULLIF(electrified, '') AS electrified, + NULLIF(highspeed, '') AS highspeed, + NULLIF(usage, '') AS usage, + 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}} @@ -120,16 +120,16 @@ sql = """ SELECT ST_AsMVTGeom(geometry, !BBOX!) AS geometry, ABS(osm_id) AS osm_id, - ref, - class, - type, - service, - name, - electrified, - highspeed, - usage, - start_date, - end_date, + NULLIF(ref, '') AS ref, + NULLIF(class, '') AS class, + NULLIF(type, '') AS type, + NULLIF(service, '') AS service, + NULLIF(name, '') AS name, + NULLIF(electrified, '') AS electrified, + NULLIF(highspeed, '') AS highspeed, + NULLIF(usage, '') AS usage, + 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}} diff --git a/images/tiler-server/config/providers/water_areas.centroids.toml b/images/tiler-server/config/providers/water_areas.centroids.toml index e503606a..71e1c025 100644 --- a/images/tiler-server/config/providers/water_areas.centroids.toml +++ b/images/tiler-server/config/providers/water_areas.centroids.toml @@ -10,8 +10,8 @@ SELECT name, type, area, - 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}} @@ -33,8 +33,8 @@ SELECT name, type, area, - 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}} @@ -57,8 +57,8 @@ SELECT name, type, area, - 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}} @@ -81,8 +81,8 @@ SELECT name, type, area, - 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}} @@ -104,8 +104,8 @@ SELECT name, type, area, - 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}} @@ -129,8 +129,8 @@ SELECT name, type, area, - 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}} diff --git a/images/tiler-server/config/providers/water_areas.toml b/images/tiler-server/config/providers/water_areas.toml index 4e632dd0..1f9f355e 100644 --- a/images/tiler-server/config/providers/water_areas.toml +++ b/images/tiler-server/config/providers/water_areas.toml @@ -10,8 +10,8 @@ SELECT name, type, area, - 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}} @@ -33,8 +33,8 @@ SELECT name, type, area, - 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}} @@ -57,8 +57,8 @@ SELECT name, type, area, - 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}} @@ -80,8 +80,8 @@ SELECT name, type, area, - 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}} @@ -103,8 +103,8 @@ SELECT name, type, area, - 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}} @@ -126,8 +126,8 @@ SELECT name, type, area, - 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}} @@ -149,8 +149,8 @@ SELECT name, type, area, - 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}} diff --git a/images/tiler-server/config/providers/water_lines.toml b/images/tiler-server/config/providers/water_lines.toml index 387c030f..2d442526 100644 --- a/images/tiler-server/config/providers/water_lines.toml +++ b/images/tiler-server/config/providers/water_lines.toml @@ -10,8 +10,8 @@ SELECT name, type, bridge, - 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}} @@ -33,8 +33,8 @@ SELECT name, type, bridge, - 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}} @@ -56,8 +56,8 @@ SELECT name, type, bridge, - 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}} @@ -79,8 +79,8 @@ SELECT name, type, bridge, - 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}}