Multilinguality (#279)
Improve multilinguality: names in 57 languages, name:latin, name:nonlatin, name_int. Fixes #211 #252 #80. See #279 for more info.
This commit is contained in:
@@ -4,10 +4,11 @@
|
||||
|
||||
-- etldoc: osm_city_point -> layer_city:z2_14
|
||||
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, name_de text, place city_place, "rank" int, capital int) AS $$
|
||||
RETURNS TABLE(osm_id bigint, geometry geometry, name text, name_en text, name_de text, tags hstore, place city_place, "rank" int, capital int) AS $$
|
||||
SELECT osm_id, geometry, name,
|
||||
COALESCE(NULLIF(name_en, ''), name) AS name_en,
|
||||
COALESCE(NULLIF(name_de, ''), name, name_en) AS name_de,
|
||||
tags,
|
||||
place, "rank", normalize_capital_level(capital) AS capital
|
||||
FROM osm_city_point
|
||||
WHERE geometry && bbox
|
||||
@@ -18,6 +19,7 @@ RETURNS TABLE(osm_id bigint, geometry geometry, name text, name_en text, name_de
|
||||
SELECT osm_id, geometry, name,
|
||||
COALESCE(NULLIF(name_en, ''), name) AS name_en,
|
||||
COALESCE(NULLIF(name_de, ''), name, name_en) AS name_de,
|
||||
tags,
|
||||
place,
|
||||
COALESCE("rank", gridrank + 10),
|
||||
normalize_capital_level(capital) AS capital
|
||||
@@ -25,6 +27,7 @@ RETURNS TABLE(osm_id bigint, geometry geometry, name text, name_en text, name_de
|
||||
SELECT osm_id, geometry, name,
|
||||
COALESCE(NULLIF(name_en, ''), name) AS name_en,
|
||||
COALESCE(NULLIF(name_de, ''), name, name_en) AS name_de,
|
||||
tags,
|
||||
place, "rank", capital,
|
||||
row_number() OVER (
|
||||
PARTITION BY LabelGrid(geometry, 128 * pixel_width)
|
||||
|
||||
Reference in New Issue
Block a user