Clarify etldoc for place layer
This commit is contained in:
parent
ee9d4348e0
commit
3f5b1371e9
@ -1,10 +1,10 @@
|
|||||||
|
|
||||||
-- etldoc: layer_city[shape=record fillcolor=lightpink, style="rounded,filled",
|
-- etldoc: layer_city[shape=record fillcolor=lightpink, style="rounded,filled",
|
||||||
-- etldoc: label="layer_city | <z2_7> z2-z7 | <z8_14_> z8_z14_ " ] ;
|
-- etldoc: label="layer_city | <z2_14> z2-z14" ] ;
|
||||||
|
|
||||||
|
-- etldoc: osm_city_point -> layer_city:z2_14
|
||||||
CREATE OR REPLACE FUNCTION layer_city(bbox geometry, zoom_level int, pixel_width numeric)
|
CREATE OR REPLACE FUNCTION layer_city(bbox geometry, zoom_level int, pixel_width numeric)
|
||||||
RETURNS TABLE(osm_id bigint, geometry geometry, name text, name_en text, place city_place, "rank" int, capital int) AS $$
|
RETURNS TABLE(osm_id bigint, geometry geometry, name text, name_en text, place city_place, "rank" int, capital int) AS $$
|
||||||
-- etldoc: osm_city_point -> layer_city:z2_7
|
|
||||||
SELECT osm_id, geometry, name, COALESCE(NULLIF(name_en, ''), name) AS name_en, place, "rank", normalize_capital_level(capital) AS capital
|
SELECT osm_id, geometry, name, COALESCE(NULLIF(name_en, ''), name) AS name_en, place, "rank", normalize_capital_level(capital) AS capital
|
||||||
FROM osm_city_point
|
FROM osm_city_point
|
||||||
WHERE geometry && bbox
|
WHERE geometry && bbox
|
||||||
@ -26,7 +26,6 @@ RETURNS TABLE(osm_id bigint, geometry geometry, name text, name_en text, place c
|
|||||||
population DESC NULLS LAST,
|
population DESC NULLS LAST,
|
||||||
length(name) ASC
|
length(name) ASC
|
||||||
)::int AS gridrank
|
)::int AS gridrank
|
||||||
-- etldoc: osm_city_point -> layer_city:z8_14_
|
|
||||||
FROM osm_city_point
|
FROM osm_city_point
|
||||||
WHERE geometry && bbox
|
WHERE geometry && bbox
|
||||||
AND ((zoom_level = 8 AND place <= 'town'::city_place
|
AND ((zoom_level = 8 AND place <= 'town'::city_place
|
||||||
|
|||||||
@ -47,7 +47,7 @@ tables:
|
|||||||
place:
|
place:
|
||||||
- country
|
- country
|
||||||
|
|
||||||
# etldoc: imposm3 -> osm_state_point
|
# etldoc: imposm3 -> osm_state_point
|
||||||
state_point:
|
state_point:
|
||||||
type: point
|
type: point
|
||||||
fields:
|
fields:
|
||||||
@ -74,7 +74,7 @@ tables:
|
|||||||
place:
|
place:
|
||||||
- state
|
- state
|
||||||
|
|
||||||
# etldoc: imposm3 -> osm_city_point
|
# etldoc: imposm3 -> osm_city_point
|
||||||
city_point:
|
city_point:
|
||||||
type: point
|
type: point
|
||||||
fields:
|
fields:
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user