Compare commits
2 Commits
52c91af85c
...
c121c69a66
| Author | SHA1 | Date | |
|---|---|---|---|
| c121c69a66 | |||
| 3dd9ccb551 |
@ -57,6 +57,7 @@ SELECT CASE class
|
|||||||
WHEN 'water_tower' then 900
|
WHEN 'water_tower' then 900
|
||||||
WHEN 'communications_tower' then 900
|
WHEN 'communications_tower' then 900
|
||||||
WHEN 'wind_turbine' then 900
|
WHEN 'wind_turbine' then 900
|
||||||
|
WHEN 'shelter' then 3000
|
||||||
ELSE 1000
|
ELSE 1000
|
||||||
END;
|
END;
|
||||||
$$ LANGUAGE SQL IMMUTABLE
|
$$ LANGUAGE SQL IMMUTABLE
|
||||||
|
|||||||
@ -56,7 +56,25 @@ SELECT osm_id_hash AS osm_id,
|
|||||||
CASE WHEN indoor = TRUE THEN 1 END AS indoor,
|
CASE WHEN indoor = TRUE THEN 1 END AS indoor,
|
||||||
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,
|
||||||
|
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"
|
)::int AS "rank"
|
||||||
FROM (
|
FROM (
|
||||||
-- etldoc: osm_poi_point -> layer_poi:z12
|
-- etldoc: osm_poi_point -> layer_poi:z12
|
||||||
|
|||||||
@ -134,7 +134,7 @@ layer:
|
|||||||
__AND__:
|
__AND__:
|
||||||
subclass: ['generator']
|
subclass: ['generator']
|
||||||
subtype: ['wind']
|
subtype: ['wind']
|
||||||
mapping_key: 'aerialway'
|
mapping_key: ['power']
|
||||||
communications_tower:
|
communications_tower:
|
||||||
subclass: ['communications_tower']
|
subclass: ['communications_tower']
|
||||||
water_tower:
|
water_tower:
|
||||||
|
|||||||
2
test.sh
2
test.sh
@ -31,7 +31,7 @@ make download-${SOURCE} area="${AREA}"
|
|||||||
|
|
||||||
# Import (yes we're doing import borders twice, it crashes on first run, oddly enough)
|
# Import (yes we're doing import borders twice, it crashes on first run, oddly enough)
|
||||||
make import-osm
|
make import-osm
|
||||||
make import-borders
|
make import-borders || true
|
||||||
make import-borders
|
make import-borders
|
||||||
make import-wikidata
|
make import-wikidata
|
||||||
make import-sql
|
make import-sql
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user