From bea4174b3780c9785aaa79baf396ec6b6b137db1 Mon Sep 17 00:00:00 2001 From: Paul Bienkowski Date: Sun, 12 Mar 2023 12:40:57 +0100 Subject: [PATCH] Do not generate roads and events for tiles at low zoom levels --- tile-generator/layers/obs_events/layer.sql | 1 + tile-generator/layers/obs_roads/layer.sql | 1 + 2 files changed, 2 insertions(+) diff --git a/tile-generator/layers/obs_events/layer.sql b/tile-generator/layers/obs_events/layer.sql index 574d67c..ffac876 100644 --- a/tile-generator/layers/obs_events/layer.sql +++ b/tile-generator/layers/obs_events/layer.sql @@ -15,6 +15,7 @@ RETURNS TABLE(event_id bigint, geometry geometry, distance_overtaker float, dist FULL OUTER JOIN road ON road.way_id = overtaking_event.way_id JOIN track on track.id = overtaking_event.track_id WHERE ST_Transform(overtaking_event.geometry, 3857) && bbox + AND zoom_level >= 10 AND (user_id is NULL OR user_id = track.author_id) AND time BETWEEN COALESCE(min_time, '1900-01-01'::timestamp) AND COALESCE(max_time, '2100-01-01'::timestamp); diff --git a/tile-generator/layers/obs_roads/layer.sql b/tile-generator/layers/obs_roads/layer.sql index 2073150..c381590 100644 --- a/tile-generator/layers/obs_roads/layer.sql +++ b/tile-generator/layers/obs_roads/layer.sql @@ -67,6 +67,7 @@ RETURNS TABLE( ) e on (e.way_id = road.way_id and (road.directionality != 0 or e.direction_reversed = r.rev)) WHERE road.geometry && bbox + AND zoom_level >= 10 GROUP BY road.name, road.way_id,