UK-themes: add inspire polygons to detect addresses with, various small fixes
This commit is contained in:
parent
be3ac93eca
commit
2c46645581
7 changed files with 71 additions and 23 deletions
|
@ -51,10 +51,37 @@
|
|||
}
|
||||
],
|
||||
"layers": [
|
||||
{
|
||||
"id": "raw_inspire_polygons",
|
||||
"source": {
|
||||
"geoJson": "https://osm-uk-addresses.russss.dev/inspire/{z}/{x}/{y}.json",
|
||||
"osmTags": "inspireid~*",
|
||||
"geoJsonZoomLevel": 18,
|
||||
"isOsmCache": false
|
||||
},
|
||||
"minzoom": 18,
|
||||
"calculatedTags": [
|
||||
"_has_address=feat.overlapWith('addresses').length > 0"
|
||||
],
|
||||
"#mapRendering": [
|
||||
{
|
||||
"width": 2,
|
||||
"color": {
|
||||
"render": "#00f",
|
||||
"mappings": [
|
||||
{
|
||||
"if": "_has_address=true",
|
||||
"then": "#0f0"
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
],
|
||||
"mapRendering": []
|
||||
},
|
||||
{
|
||||
"id": "to_import",
|
||||
"source": {
|
||||
"#geoJson": "https://raw.githubusercontent.com/pietervdvn/MapComplete/develop/assets/themes/uk_addresses/islington_small_piece.geojson",
|
||||
"geoJson": "https://osm-uk-addresses.russss.dev/addresses/{z}/{x}/{y}.json",
|
||||
"osmTags": "inspireid~*",
|
||||
"geoJsonZoomLevel": 16,
|
||||
|
@ -73,18 +100,26 @@
|
|||
{
|
||||
"id": "uk_addresses_embedding_outline",
|
||||
"render": "An outline embedding this point with an address already exists in OpenStreetMap.<br>This <a href='https://openstreetmap.org/{_embedding_object:id}' target='blank'>object</a> has address <b>{_embedding_object:addr:street} {_embedding_object:addr:housenumber}</b>",
|
||||
"mappings": [{
|
||||
"if": "_embedding_object:id=true",
|
||||
"then": "The INSPIRE-polygon containing this point has at least one address contained"
|
||||
},{
|
||||
"if": "_embedding_object:id=false",
|
||||
"then": "The INSPIRE-polygon containing this point has <b>no</b> addresses contained"
|
||||
}],
|
||||
"condition": "_embedding_object:id~*"
|
||||
},
|
||||
{
|
||||
"id": "uk_addresses_import_button",
|
||||
"render": "{import_button(ref:inspireid=$inspireid, Add this address, ./assets/themes/uk_addresses/housenumber_add.svg)}"
|
||||
"render": "{import_button(addresses,ref:inspireid=$inspireid, Add this address, ./assets/themes/uk_addresses/housenumber_add.svg)}"
|
||||
}
|
||||
],
|
||||
"calculatedTags": [
|
||||
"_embedding_object=feat.overlapWith('addresses')[0]?.feat?.properties ?? null",
|
||||
"_embedding_object:addr:housenumber=JSON.parse(feat.properties._embedding_object)?.['addr:housenumber']",
|
||||
"_embedding_object:addr:street=JSON.parse(feat.properties._embedding_object)?.['addr:street']",
|
||||
"_embedding_object:id=JSON.parse(feat.properties._embedding_object)?.id"
|
||||
"_embedding_inspire_polygon_has_address=feat.overlapWith('raw_inspire_polygons')[0]?.feat?.properties?._has_address",
|
||||
"_embedding_object:id=feat.get('_embedding_object')?.id ?? feat.properties._embedding_inspire_polygon_has_address"
|
||||
],
|
||||
"filter": [
|
||||
{
|
||||
|
@ -95,7 +130,12 @@
|
|||
"osmTags": {
|
||||
"and": [
|
||||
"_imported=",
|
||||
"_embedding_object:id="
|
||||
{
|
||||
"or": [
|
||||
"_embedding_object:id=",
|
||||
"_embedding_object:id=false"
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
|
@ -108,7 +148,12 @@
|
|||
"render": "./assets/themes/uk_addresses/housenumber_unknown.svg",
|
||||
"mappings": [
|
||||
{
|
||||
"if": "_embedding_object:id~*",
|
||||
"if": {
|
||||
"and": [
|
||||
"_embedding_object:id~*",
|
||||
"_embedding_object:id!=false"
|
||||
]
|
||||
},
|
||||
"then": "./assets/themes/uk_addresses/housenumber_unknown_small.svg"
|
||||
},
|
||||
{
|
||||
|
@ -302,11 +347,6 @@
|
|||
}
|
||||
},
|
||||
"mapRendering": [
|
||||
{
|
||||
"location": [
|
||||
"point"
|
||||
]
|
||||
},
|
||||
{
|
||||
"color": {
|
||||
"render": "#ccc"
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue