Merge branch 'master' into feature/changed-place-layer
Conflicts: layers/place/mapping.yaml
This commit is contained in:
@@ -1,29 +0,0 @@
|
||||
# place
|
||||
|
||||
The place layer consists out of [countries](http://wiki.openstreetmap.org/wiki/Tag:place%3Dcountry),
|
||||
[states](http://wiki.openstreetmap.org/wiki/Tag:place%3Dstate) and [cities](http://wiki.openstreetmap.org/wiki/Key:place).
|
||||
Apart from the roads this is also one of the more important layers to create a beautiful map.
|
||||
We suggest you use different font styles and sizes to create a text hierarchy.
|
||||
|
||||
## Fields
|
||||
|
||||
- **name_en**: The english `name:en` value if available.
|
||||
- **name**: The OSM [`name`](http://wiki.openstreetmap.org/wiki/Key:name) value of the POI.
|
||||
- **rank**: Countries, states and the most important cities all have a `rank` to boost their importance on the map.
|
||||
The `rank` field for counries and states ranges from `1` to `6` while the `rank` field for
|
||||
cities ranges from `1` to `10` for the most important cities and continues from `10` serially based
|
||||
on the local importance of the city (derived from population and city class).
|
||||
Use the `rank` field to build a text hierarchy.
|
||||
The rank value is a combination of the Natural Earth `scalerank`, `labelrank` and `datarank` values for countries
|
||||
and states and for cities consists out of a shifted Natural Earth `scalerank` combined with a local rank
|
||||
within a grid for cities that do not have a Natural Earth `scalerank`.
|
||||
- **class**: Distinguish between `country`, `state` and other city classes like
|
||||
`city`, `town`, `village`, `hamlet`, `suburb`, `neighbourhood` or `isolated_dwelling`.
|
||||
Use this to separately style the different places according to their importance (usually country and state different
|
||||
than cities).
|
||||
|
||||
## Mapping
|
||||
|
||||

|
||||
|
||||
|
||||
@@ -9,7 +9,7 @@ RETURNS TABLE(osm_id bigint, geometry geometry, name text, name_en text, place c
|
||||
FROM osm_city_point
|
||||
WHERE geometry && bbox
|
||||
AND ((zoom_level = 2 AND "rank" = 1)
|
||||
OR (zoom_level BETWEEN 3 AND 7 AND "rank" <= zoom_level)
|
||||
OR (zoom_level BETWEEN 3 AND 7 AND "rank" <= zoom_level + 1)
|
||||
)
|
||||
UNION ALL
|
||||
SELECT osm_id, geometry, name,
|
||||
|
||||
Binary file not shown.
|
Before Width: | Height: | Size: 27 KiB |
@@ -6,10 +6,43 @@ name_en_field: &name_en
|
||||
name: name_en
|
||||
key: name:en
|
||||
type: string
|
||||
name_fr_field: &name_fr
|
||||
name: name_fr
|
||||
key: name:fr
|
||||
type: string
|
||||
name_de_field: &name_de
|
||||
name: name_de
|
||||
key: name:de
|
||||
type: string
|
||||
name_es_field: &name_es
|
||||
name: name_es
|
||||
key: name:es
|
||||
type: string
|
||||
name_pt_field: &name_pt
|
||||
name: name_pt
|
||||
key: name:pt
|
||||
type: string
|
||||
name_ru_field: &name_ru
|
||||
name: name_ru
|
||||
key: name:ru
|
||||
type: string
|
||||
name_zh_field: &name_zh
|
||||
name: name_zh
|
||||
key: name:zh
|
||||
type: string
|
||||
name_ar_field: &name_ar
|
||||
name: name_ar
|
||||
key: name:ar
|
||||
type: string
|
||||
name_ja_field: &name_ja
|
||||
name: name_ja
|
||||
key: name:ja
|
||||
type: string
|
||||
rank_field: &rank
|
||||
name: rank
|
||||
key: rank
|
||||
type: integer
|
||||
|
||||
tables:
|
||||
|
||||
# etldoc: imposm3 -> osm_continent_point
|
||||
@@ -39,6 +72,14 @@ tables:
|
||||
type: geometry
|
||||
- *name
|
||||
- *name_en
|
||||
- *name_de
|
||||
- *name_fr
|
||||
- *name_es
|
||||
- *name_pt
|
||||
- *name_ru
|
||||
- *name_zh
|
||||
- *name_ar
|
||||
- *name_ja
|
||||
- *rank
|
||||
filters:
|
||||
exclude_tags:
|
||||
@@ -47,6 +88,32 @@ tables:
|
||||
place:
|
||||
- country
|
||||
|
||||
# etldoc: imposm3 -> osm_island_point
|
||||
island_point:
|
||||
type: point
|
||||
fields:
|
||||
- name: osm_id
|
||||
type: id
|
||||
- name: geometry
|
||||
type: geometry
|
||||
- *name
|
||||
- *name_en
|
||||
- *name_de
|
||||
- *name_fr
|
||||
- *name_es
|
||||
- *name_pt
|
||||
- *name_ru
|
||||
- *name_zh
|
||||
- *name_ar
|
||||
- *name_ja
|
||||
- *rank
|
||||
filters:
|
||||
exclude_tags:
|
||||
- [ "name", "__nil__" ]
|
||||
mapping:
|
||||
place:
|
||||
- island
|
||||
|
||||
# etldoc: imposm3 -> osm_state_point
|
||||
state_point:
|
||||
type: point
|
||||
@@ -57,6 +124,14 @@ tables:
|
||||
type: geometry
|
||||
- *name
|
||||
- *name_en
|
||||
- *name_de
|
||||
- *name_fr
|
||||
- *name_es
|
||||
- *name_pt
|
||||
- *name_ru
|
||||
- *name_zh
|
||||
- *name_ar
|
||||
- *name_ja
|
||||
- name: is_in_country
|
||||
key: is_in:country
|
||||
type: string
|
||||
@@ -84,6 +159,14 @@ tables:
|
||||
type: geometry
|
||||
- *name
|
||||
- *name_en
|
||||
- *name_de
|
||||
- *name_fr
|
||||
- *name_es
|
||||
- *name_pt
|
||||
- *name_ru
|
||||
- *name_zh
|
||||
- *name_ar
|
||||
- *name_ja
|
||||
- name: place
|
||||
key: place
|
||||
type: string
|
||||
|
||||
Reference in New Issue
Block a user