openmaptiles/layers/aerodrome_label/aerodrome_label.yaml
Brian Sperlongano 6ef138635d
Fix negative feature IDs (#1185)
This PR removes the possibility of negative feature IDs for the `aerodrome_label` layer by defining the feature as the absolute value of the OSM id (imposm maps relations with negative numbers).  There is a very unlikely  scenario in which a relation and a way have the same ID (and are also in the same tile), however, unique IDs are not a strict requirement of MVT.

Noted in:
https://github.com/openmaptiles/openmaptiles/pull/1176#issuecomment-902503655

Positive feature ID for Quonset State Airport, which is mapped as a relation:
![image](https://user-images.githubusercontent.com/3254090/130232322-c797d491-ece9-4889-9695-ffb6f3ac011f.png)
2021-08-20 16:40:02 +02:00

51 lines
1.9 KiB
YAML

layer:
id: aerodrome_label
description: |
[Aerodrome labels](http://wiki.openstreetmap.org/wiki/Tag:aeroway%3Daerodrome)
buffer_size: 64
srs: +proj=merc +a=6378137 +b=6378137 +lat_ts=0.0 +lon_0=0.0 +x_0=0.0 +y_0=0.0 +k=1.0 +units=m +nadgrids=@null +wktext +no_defs +over
fields:
name: The OSM [`name`](http://wiki.openstreetmap.org/wiki/Key:name) value of the aerodrome.
name_en: English name `name:en` if available, otherwise `name`.
name_de: German name `name:de` if available, otherwise `name` or `name:en`.
class:
description: |
Distinguish between more and less important aerodromes.
Class is derived from the value of
[`aerodrome`](http://wiki.openstreetmap.org/wiki/Proposed_features/Aerodrome)
and `aerodrome:type` tags.
values:
international:
aerodrome: 'international'
aerodrome_type: 'international'
public:
aerodrome: 'public'
aerodrome_type: ['%public%', 'civil']
regional:
aerodrome: 'regional'
aerodrome_type: 'regional'
military:
aerodrome: 'military'
aerodrome_type: '%military%'
military: 'airfield'
private:
aerodrome: 'private'
aerodrome_type: 'private'
other:
iata: 3-character code issued by the IATA.
icao: 4-letter code issued by the ICAO.
ele: Elevation (`ele`) in meters.
ele_ft: Elevation (`ele`) in feets.
datasource:
geometry_field: geometry
key_field: id
key_field_as_attribute: no
srid: 900913
query: (SELECT id, geometry, name, name_en, name_de, {name_languages}, class, iata, icao, ele, ele_ft FROM layer_aerodrome_label(!bbox!, z(!scale_denominator!))) AS t
schema:
- ./update_aerodrome_label_point.sql
- ./aerodrome_label.sql
datasources:
- type: imposm3
mapping_file: ./mapping.yaml