kopia lustrzana https://github.com/onthegomap/planetiler
fix: implement boundaries closer to shortbread spec (#1217)
* fix: implement boundaries closer to the spec * clairify why admin_points has different values via a code comment * make sure that quarters are includedpull/1216/head
rodzic
5587af9a45
commit
9bc17f6827
|
@ -901,6 +901,26 @@ examples:
|
|||
tags:
|
||||
maritime: true
|
||||
admin_level: 2
|
||||
disputed: false
|
||||
|
||||
- name: 'country coastline'
|
||||
input:
|
||||
source: osm
|
||||
geometry: line
|
||||
# TODO from relation
|
||||
tags:
|
||||
boundary: administrative
|
||||
admin_level: '2'
|
||||
natural: coastline
|
||||
output:
|
||||
layer: boundaries
|
||||
geometry: line
|
||||
min_zoom: 0
|
||||
min_size: 0
|
||||
tags:
|
||||
maritime: true
|
||||
admin_level: 2
|
||||
disputed: false
|
||||
|
||||
- name: 'state boundary'
|
||||
input:
|
||||
|
@ -918,6 +938,7 @@ examples:
|
|||
tags:
|
||||
maritime: false
|
||||
admin_level: 4
|
||||
disputed: false
|
||||
|
||||
# TODO take min admin level
|
||||
|
||||
|
|
|
@ -168,8 +168,20 @@ layers:
|
|||
attributes:
|
||||
- key: maritime
|
||||
type: boolean
|
||||
value: true
|
||||
include_when:
|
||||
maritime: __any__
|
||||
natural: coastline
|
||||
else: false
|
||||
- key: admin_level
|
||||
type: integer
|
||||
- key: disputed
|
||||
value: true
|
||||
include_when:
|
||||
disputed: yes
|
||||
# TODO: member of a relation with boundary=disputed and (admin_level unset or between 2 and 4)
|
||||
# see https://github.com/shortbread-tiles/shortbread-docs/issues/43
|
||||
else: false
|
||||
|
||||
- id: boundary_labels
|
||||
features:
|
||||
|
@ -178,6 +190,7 @@ layers:
|
|||
min_zoom:
|
||||
default_value: 5
|
||||
overrides:
|
||||
# WAY_AREA is in ha
|
||||
2: '${ feature.tags.has("ADMIN_LEVEL", "2") && double(feature.tags.WAY_AREA) >= 2e8 }'
|
||||
3: '${ double(feature.tags.WAY_AREA) >= 7e7 }'
|
||||
4: '${ double(feature.tags.WAY_AREA) >= 1e7 }'
|
||||
|
@ -207,6 +220,7 @@ layers:
|
|||
- village
|
||||
- hamlet
|
||||
- suburb
|
||||
- quarter
|
||||
- neighbourhood
|
||||
- isolated_dwelling
|
||||
- farm
|
||||
|
@ -260,6 +274,8 @@ layers:
|
|||
if: { place: town }
|
||||
- value: 1000
|
||||
if: { place: suburb }
|
||||
- value: 500
|
||||
if: { place: quarter }
|
||||
- value: 100
|
||||
if: { place: [ village, neighborhood ] }
|
||||
- value: 50
|
||||
|
|
Ładowanie…
Reference in New Issue