This PR adds indigenous lands to the `boundary` layer by adding new area features for these objects, along with generalization up to z4. It borrows heavily from the technical processing chain of the `park` layer. I added new `class`, `name`, and `name:xx` attributes to the boundary layer, in order to support the new area features. Should we (or someone extending this schema) come up with new objects to place in the boundary layer in the future, `class` would support additional categories.
95 lines
4.0 KiB
YAML
95 lines
4.0 KiB
YAML
layer:
|
|
id: "place"
|
|
requires:
|
|
tables:
|
|
- ne_10m_admin_1_states_provinces
|
|
- ne_10m_admin_0_countries
|
|
- ne_10m_populated_places
|
|
requires:
|
|
layers:
|
|
- boundary
|
|
description: |
|
|
The place layer consists out of [countries](http://wiki.openstreetmap.org/wiki/Tag:place%3Dcountry),
|
|
[states](http://wiki.openstreetmap.org/wiki/Tag:place%3Dstate), [cities](http://wiki.openstreetmap.org/wiki/Key:place)
|
|
and [islands](https://wiki.openstreetmap.org/wiki/Tag:place%3Disland).
|
|
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: The OSM [`name`](http://wiki.openstreetmap.org/wiki/Key:name) value of the place. Language-specific values are in `name:xx`.
|
|
name_en: English name `name:en` if available, otherwise `name`. This is deprecated and will be removed in a future release in favor of `name:en`.
|
|
name_de: German name `name:de` if available, otherwise `name` or `name:en`. This is deprecated and will be removed in a future release in favor of `name:de`.
|
|
capital:
|
|
description: |
|
|
The **capital** field marks the
|
|
[`admin_level`](http://wiki.openstreetmap.org/wiki/Tag:boundary%3Dadministrative#admin_level)
|
|
of the boundary the place is a capital of.
|
|
values: [2, 3, 4, 5, 6]
|
|
class:
|
|
description: |
|
|
Original value of the
|
|
[`place`](http://wiki.openstreetmap.org/wiki/Key:place) tag.
|
|
Distinguish between continents, countries, states, islands and
|
|
places like settlements or smaller entities.
|
|
Use **class** to separately style the different places and build
|
|
a text hierarchy according to their importance. For places derived
|
|
from boundaries, the original value of the
|
|
[`boundary`](http://wiki.openstreetmap.org/wiki/Key:boundary) tag.
|
|
values:
|
|
- continent
|
|
- country
|
|
- state
|
|
- province
|
|
- city
|
|
- town
|
|
- village
|
|
- hamlet
|
|
- borough
|
|
- suburb
|
|
- quarter
|
|
- neighbourhood
|
|
- isolated_dwelling
|
|
- island
|
|
- aboriginal_lands
|
|
iso_a2:
|
|
description: |
|
|
Two-letter country code [ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2). Available only for `class=country`.
|
|
Original value of the
|
|
[`country_code_iso3166_1_alpha_2`](http://wiki.openstreetmap.org/wiki/Tag:place%3Dcountry) tag.
|
|
rank:
|
|
description: |
|
|
Countries, states and the most important cities all have a
|
|
**rank** to boost their importance on the map.
|
|
The **rank** field for countries 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).
|
|
You can use the **rank** to limit density of labels or improve
|
|
the 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`.
|
|
buffer_size: 256
|
|
datasource:
|
|
geometry_field: geometry
|
|
key_field: osm_id
|
|
key_field_as_attribute: no
|
|
query: (SELECT osm_id, geometry, name, name_en, name_de, {name_languages}, class, rank, capital, iso_a2 FROM layer_place(!bbox!, z(!scale_denominator!), !pixel_width!)) AS t
|
|
schema:
|
|
- ./types.sql
|
|
- ./capital.sql
|
|
- ./city.sql
|
|
- ./area_rank.sql
|
|
- ./update_continent_point.sql
|
|
- ./update_country_point.sql
|
|
- ./update_island_polygon.sql
|
|
- ./update_island_point.sql
|
|
- ./update_state_point.sql
|
|
- ./update_city_point.sql
|
|
- ./place.sql
|
|
datasources:
|
|
- type: imposm3
|
|
mapping_file: ./mapping.yaml
|