kopia lustrzana https://github.com/openmaptiles/openmaptiles
Distinguish type of information point (POI)
rodzic
d300dbca48
commit
1c2ce970fd
|
@ -5,10 +5,15 @@
|
|||
CREATE OR REPLACE FUNCTION layer_poi(bbox geometry, zoom_level integer, pixel_width numeric)
|
||||
RETURNS TABLE(osm_id bigint, geometry geometry, name text, name_en text, name_de text, tags hstore, class text, subclass text, "rank" int) AS $$
|
||||
SELECT osm_id, geometry, NULLIF(name, '') AS name,
|
||||
COALESCE(NULLIF(name_en, ''), name) AS name_en,
|
||||
COALESCE(NULLIF(name_de, ''), name, name_en) AS name_de,
|
||||
tags,
|
||||
poi_class(subclass, mapping_key) AS class, subclass,
|
||||
COALESCE(NULLIF(name_en, ''), name) AS name_en,
|
||||
COALESCE(NULLIF(name_de, ''), name, name_en) AS name_de,
|
||||
tags,
|
||||
poi_class(subclass, mapping_key) AS class,
|
||||
CASE
|
||||
WHEN subclass = 'information'
|
||||
THEN NULLIF(information, '')
|
||||
ELSE subclass
|
||||
END AS subclass,
|
||||
row_number() OVER (
|
||||
PARTITION BY LabelGrid(geometry, 100 * pixel_width)
|
||||
ORDER BY CASE WHEN name = '' THEN 2000 ELSE poi_class_rank(poi_class(subclass, mapping_key)) END ASC
|
||||
|
|
|
@ -330,6 +330,9 @@ tables:
|
|||
- name: funicular
|
||||
key: funicular
|
||||
type: string
|
||||
- name: information
|
||||
key: information
|
||||
type: string
|
||||
mapping:
|
||||
aerialway: *poi_mapping_aerialway
|
||||
amenity: *poi_mapping_amenity
|
||||
|
@ -374,6 +377,9 @@ tables:
|
|||
- name: funicular
|
||||
key: funicular
|
||||
type: string
|
||||
- name: information
|
||||
key: information
|
||||
type: string
|
||||
mapping:
|
||||
aerialway: *poi_mapping_aerialway
|
||||
amenity: *poi_mapping_amenity
|
||||
|
|
|
@ -23,7 +23,8 @@ layer:
|
|||
[`railway`](http://wiki.openstreetmap.org/wiki/Key:railway),
|
||||
[`station`](http://wiki.openstreetmap.org/wiki/Key:station),
|
||||
[`sport`](http://wiki.openstreetmap.org/wiki/Key:sport),
|
||||
[`tourism`](http://wiki.openstreetmap.org/wiki/Key:tourism)
|
||||
[`tourism`](http://wiki.openstreetmap.org/wiki/Key:tourism),
|
||||
[`information`](http://wiki.openstreetmap.org/wiki/Key:information)
|
||||
or [`shop`](http://wiki.openstreetmap.org/wiki/Key:shop)
|
||||
tag. Use this to do more precise styling.
|
||||
rank: |
|
||||
|
|
Ładowanie…
Reference in New Issue