kopia lustrzana https://github.com/openmaptiles/openmaptiles
Allow big POIs at low zoom
rodzic
edb42f2db3
commit
9b9f1d58e9
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
Ładowanie…
Reference in New Issue