Bugfix, missed second invocation of poi_class. Should find a proper place to precalculate subtype
This commit is contained in:
parent
52c91af85c
commit
3dd9ccb551
@ -56,7 +56,25 @@ SELECT osm_id_hash AS osm_id,
|
||||
CASE WHEN indoor = TRUE THEN 1 END AS indoor,
|
||||
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
|
||||
ORDER BY
|
||||
CASE
|
||||
WHEN name = ''
|
||||
THEN 2000
|
||||
ELSE poi_class_rank(poi_class(
|
||||
subclass,
|
||||
mapping_key,
|
||||
CASE
|
||||
WHEN subclass = 'information'
|
||||
THEN NULLIF(information, '')
|
||||
WHEN subclass = 'place_of_worship'
|
||||
THEN NULLIF(religion, '')
|
||||
WHEN subclass = 'pitch'
|
||||
THEN NULLIF(sport, '')
|
||||
WHEN subclass = 'generator' AND mapping_key = 'power'
|
||||
THEN NULLIF(source, '')
|
||||
ELSE subclass
|
||||
END
|
||||
)) END ASC
|
||||
)::int AS "rank"
|
||||
FROM (
|
||||
-- etldoc: osm_poi_point -> layer_poi:z12
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user