Distinguish type of information point (POI)
This commit is contained in:
parent
d300dbca48
commit
1c2ce970fd
@ -5,10 +5,15 @@
|
|||||||
CREATE OR REPLACE FUNCTION layer_poi(bbox geometry, zoom_level integer, pixel_width numeric)
|
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 $$
|
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,
|
SELECT osm_id, geometry, NULLIF(name, '') AS name,
|
||||||
COALESCE(NULLIF(name_en, ''), name) AS name_en,
|
COALESCE(NULLIF(name_en, ''), name) AS name_en,
|
||||||
COALESCE(NULLIF(name_de, ''), name, name_en) AS name_de,
|
COALESCE(NULLIF(name_de, ''), name, name_en) AS name_de,
|
||||||
tags,
|
tags,
|
||||||
poi_class(subclass, mapping_key) AS class, subclass,
|
poi_class(subclass, mapping_key) AS class,
|
||||||
|
CASE
|
||||||
|
WHEN subclass = 'information'
|
||||||
|
THEN NULLIF(information, '')
|
||||||
|
ELSE subclass
|
||||||
|
END AS subclass,
|
||||||
row_number() OVER (
|
row_number() OVER (
|
||||||
PARTITION BY LabelGrid(geometry, 100 * pixel_width)
|
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
|
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
|
- name: funicular
|
||||||
key: funicular
|
key: funicular
|
||||||
type: string
|
type: string
|
||||||
|
- name: information
|
||||||
|
key: information
|
||||||
|
type: string
|
||||||
mapping:
|
mapping:
|
||||||
aerialway: *poi_mapping_aerialway
|
aerialway: *poi_mapping_aerialway
|
||||||
amenity: *poi_mapping_amenity
|
amenity: *poi_mapping_amenity
|
||||||
@ -374,6 +377,9 @@ tables:
|
|||||||
- name: funicular
|
- name: funicular
|
||||||
key: funicular
|
key: funicular
|
||||||
type: string
|
type: string
|
||||||
|
- name: information
|
||||||
|
key: information
|
||||||
|
type: string
|
||||||
mapping:
|
mapping:
|
||||||
aerialway: *poi_mapping_aerialway
|
aerialway: *poi_mapping_aerialway
|
||||||
amenity: *poi_mapping_amenity
|
amenity: *poi_mapping_amenity
|
||||||
|
|||||||
@ -23,7 +23,8 @@ layer:
|
|||||||
[`railway`](http://wiki.openstreetmap.org/wiki/Key:railway),
|
[`railway`](http://wiki.openstreetmap.org/wiki/Key:railway),
|
||||||
[`station`](http://wiki.openstreetmap.org/wiki/Key:station),
|
[`station`](http://wiki.openstreetmap.org/wiki/Key:station),
|
||||||
[`sport`](http://wiki.openstreetmap.org/wiki/Key:sport),
|
[`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)
|
or [`shop`](http://wiki.openstreetmap.org/wiki/Key:shop)
|
||||||
tag. Use this to do more precise styling.
|
tag. Use this to do more precise styling.
|
||||||
rank: |
|
rank: |
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user