restrict to admin_level 6

Only compute the regions layer at the required admin level 6 (kreise/kreisfreie Städte)- we're not using other levels yet and this speeds it up notably.
This commit is contained in:
gluap 2023-03-25 17:43:32 +01:00 committed by GitHub
parent b6cf59a09d
commit a7566fb6b3
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -20,6 +20,7 @@ RETURNS TABLE(
WHERE
zoom_level >= 4 AND
zoom_level <= 12 AND
region.admin_level = 6 AND
ST_Transform(region.geometry, 3857) && bbox
GROUP BY region.relation_id, region.name, region.geometry, region.admin_level