Add German names (name_de), unify English names (name_en)
This commit is contained in:
@@ -3,8 +3,11 @@
|
||||
-- etldoc: label="layer_poi | <z14_> z14+" ] ;
|
||||
|
||||
CREATE OR REPLACE FUNCTION layer_poi(bbox geometry, zoom_level integer, pixel_width numeric)
|
||||
RETURNS TABLE(osm_id bigint, geometry geometry, name text, name_en text, class text, subclass text, "rank" int) AS $$
|
||||
SELECT osm_id, geometry, NULLIF(name, '') AS name, NULLIF(name_en, '') AS name_en, poi_class(subclass) AS class, subclass,
|
||||
RETURNS TABLE(osm_id bigint, geometry geometry, name text, name_en text, name_de text, class text, subclass text, "rank" int) AS $$
|
||||
SELECT osm_id, geometry, NULLIF(name, '') AS name,
|
||||
COALESCE(NULLIF(name_en, ''), name) AS name_en,
|
||||
COALESCE(NULLIF(name_de, ''), name, name_en) AS name_de,
|
||||
poi_class(subclass) AS class, subclass,
|
||||
row_number() OVER (
|
||||
PARTITION BY LabelGrid(geometry, 100 * pixel_width)
|
||||
ORDER BY CASE WHEN name = '' THEN 2000 ELSE poi_class_rank(poi_class(subclass)) END ASC
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
|
||||
# imposm3 mapping file for https://github.com/osm2vectortiles/imposm3
|
||||
# Warning: this is not the official imposm3
|
||||
# imposm3 mapping file for https://github.com/osm2vectortiles/imposm3
|
||||
# Warning: this is not the official imposm3
|
||||
|
||||
# aerialway values , see http://taginfo.openstreetmap.org/keys/aerialway#values
|
||||
def_poi_mapping_aerialway: &poi_mapping_aerialway
|
||||
@@ -306,6 +306,9 @@ tables:
|
||||
- name: name_en
|
||||
key: name:en
|
||||
type: string
|
||||
- name: name_de
|
||||
key: name:de
|
||||
type: string
|
||||
- name: subclass
|
||||
type: mapping_value
|
||||
mapping:
|
||||
@@ -336,6 +339,9 @@ tables:
|
||||
- name: name_en
|
||||
key: name:en
|
||||
type: string
|
||||
- name: name_de
|
||||
key: name:de
|
||||
type: string
|
||||
- name: subclass
|
||||
type: mapping_value
|
||||
mapping:
|
||||
@@ -349,4 +355,4 @@ tables:
|
||||
shop: *poi_mapping_shop
|
||||
sport: *poi_mapping_sport
|
||||
tourism: *poi_mapping_tourism
|
||||
waterway: *poi_mapping_waterway
|
||||
waterway: *poi_mapping_waterway
|
||||
|
||||
@@ -31,9 +31,9 @@ layer:
|
||||
datasource:
|
||||
geometry_field: geometry
|
||||
srid: 900913
|
||||
query: (SELECT geometry, name, name_en, class, subclass, rank FROM layer_poi(!bbox!, z(!scale_denominator!), !pixel_width!)) AS t
|
||||
query: (SELECT geometry, name, name_en, name_de, class, subclass, rank FROM layer_poi(!bbox!, z(!scale_denominator!), !pixel_width!)) AS t
|
||||
schema:
|
||||
- ./poi_polygon_update.sql
|
||||
- ./poi_polygon_update.sql
|
||||
- ./class.sql
|
||||
- ./layer.sql
|
||||
datasources:
|
||||
|
||||
Reference in New Issue
Block a user