Allow big POIs at low zoom

pull/1479/head
Brian Sperlongano 2023-01-17 22:27:14 -05:00
rodzic edb42f2db3
commit 9b9f1d58e9
2 zmienionych plików z 12 dodań i 1 usunięć

Wyświetl plik

@ -327,6 +327,8 @@ def_poi_fields: &poi_fields
type: id
- name: geometry
type: geometry
- name: area
type: area
- name: name
key: name
type: string

Wyświetl plik

@ -91,7 +91,16 @@ FROM (
END AS osm_id_hash
FROM osm_poi_polygon
WHERE geometry && bbox
AND zoom_level >= 14
AND (
zoom_level >= 14 OR
zoom_level >= 10 AND
POWER(4,zoom_level)
-- Compute percentage of the earth's surface covered by this feature (approximately)
-- The constant below is 111,842^2 * 180 * 180, where 111,842 is the length of one degree of latitude at the equator in meters.
* area / (405279708033600 * COS(ST_Y(ST_Transform(geometry,4326))*PI()/180))
-- Match features that are at least 10% of a tile at this zoom
> 0.10
)
) AS poi_union
ORDER BY "rank"
$$ LANGUAGE SQL STABLE