Distinguish type of information point (POI)

This commit is contained in:
jirik 2017-11-09 10:31:37 +01:00 committed by Jiri Kozel
parent d300dbca48
commit 1c2ce970fd
3 changed files with 17 additions and 5 deletions

View File

@ -8,7 +8,12 @@ RETURNS TABLE(osm_id bigint, geometry geometry, name text, name_en text, name_de
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

View File

@ -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

View File

@ -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: |