mapcomplete/assets/themes/uk_addresses/uk_addresses.json
2022-06-03 01:42:59 +02:00

597 lines
No EOL
20 KiB
JSON

{
"id": "uk_addresses",
"title": {
"en": "Addresses in Great Britain",
"de": "Adressen in Großbritannien",
"it": "Indirizzi UK",
"id": "Alamat Inggris"
},
"mustHaveLanguage": [
"en"
],
"shortDescription": {
"en": "Help to build an open dataset of addresses in Great Britain",
"de": "Helfen Sie beim Aufbau eines offenen Datensatzes britischer Adressen",
"it": "Aiuta a costruire un dataset libero per gli indirizzi nel Regno Unito"
},
"description": {
"en": "Help us collect addresses and make them freely available. Each address contributed will be added to OpenStreetMap so you will need to create an account and log in before you start. Please do not copy addresses from the internet or other sources subject to copyright. This website works well on mobile so a good option is to contibute the addresses closest to you."
},
"maintainer": "Pieter Vander Vennet, Rob Nickerson, Russ Garrett",
"icon": "./assets/themes/uk_addresses/housenumber_unknown.svg",
"version": "2021-09-17",
"startLat": 53.21261,
"startLon": -1.47216,
"startZoom": 7,
"widenFactor": 1.01,
"hideFromOverview": true,
"clustering": {
"minNeededFeatures": 25,
"maxZoom": 16
},
"tileLayerSources": [
{
"id": "property-boundaries",
"source": "https://tiles.osmuk.org/PropertyBoundaries/{z}/{x}/{y}.png",
"isOverlay": true,
"minZoom": 18,
"maxZoom": 20,
"defaultState": false,
"name": {
"en": "Property boundaries by osmuk.org",
"de": "Grenzverläufe gemäß osmuk.org"
}
}
],
"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('address').length > 0"
],
"mapRendering": [
{
"width": 2,
"color": {
"render": "#00f",
"mappings": [
{
"if": "_has_address=true",
"then": "#0f0"
}
]
}
}
],
"shownByDefault": false,
"name": {
"en": "Inspire polygons"
}
},
{
"id": "to_import",
"source": {
"geoJson": "https://osm-uk-addresses.russss.dev/addresses/{z}/{x}/{y}.json",
"osmTags": {
"and": [
"urpn_count~*",
"id!~node/.*"
]
},
"geoJsonZoomLevel": 16,
"isOsmCache": false
},
"name": "Addresses to check",
"minzoom": 18,
"title": {
"render": {
"en": "This address needs adding"
}
},
"tagRenderings": [
{
"id": "uk_addresses_explanation",
"render": {
"en": "We think there should be an address here. Please click below to add it."
}
},
{
"id": "uk_addresses_embedding_outline",
"render": "<b>Warning: </b>This point lies within a building or area for which we already have an address. You should only add this address if it is different. <br>The number and street name we have for the <a href='#{_embedding_object:id}' target='blank'>existing address</a> is <b>{_embedding_object:addr:housenumber} {_embedding_object:addr:street}</b>",
"mappings": [
{
"if": "_embedding_object:id=true",
"then": {
"en": "<b>Warning: </b>The property boundary containing this point already contains at least one recorded address. You should only add this address if it is different."
}
},
{
"if": "_embedding_object:id=false",
"then": {
"en": "We checked our data and found no other address within the same property boundary. If you know the details for this address, please add it."
}
}
],
"condition": "_embedding_object:id~*"
},
{
"id": "uk_addresses_import_button",
"render": {
"special": {
"type": "import_button",
"targetLayer": "address",
"tags": "urpn_count=$urpn_count;ref:GB:uprn=$ref:GB:uprn$",
"text": "Add this address",
"icon": "./assets/themes/uk_addresses/housenumber_add.svg",
"location_picker": "none"
}
}
}
],
"calculatedTags": [
"_embedding_object=feat.overlapWith('address')[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_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": [
{
"id": "to_handle",
"options": [
{
"default": true,
"question": "Only show non-matched objects",
"osmTags": {
"and": [
"_imported=",
{
"or": [
"_embedding_object:id=",
"_embedding_object:id=false"
]
}
]
}
}
]
}
],
"mapRendering": [
{
"icon": {
"render": "./assets/themes/uk_addresses/housenumber_unknown.svg",
"mappings": [
{
"if": {
"and": [
"_embedding_object:id~*",
"_embedding_object:id!=false"
]
},
"then": "./assets/themes/uk_addresses/housenumber_unknown_small.svg"
},
{
"if": "_imported=yes",
"then": "./assets/themes/uk_addresses/housenumber_unknown_small.svg"
}
]
},
"iconSize": {
"render": "40,40,center"
},
"location": [
"point",
"centroid"
]
}
],
"description": "Alamat"
},
{
"id": "address",
"name": {
"en": "Known addresses in OSM"
},
"minzoom": 18,
"source": {
"osmTags": {
"or": [
"addr:unit~*",
"addr:flats~*",
"addr:housename~*",
"addr:housenumber~*",
"addr:place~*",
"addr:substreet~*",
"addr:street~*",
"addr:parentstreet~*",
"addr:suburb~*",
"addr:city~*",
"addr:postcode~*",
"fixme:addr~*",
"urpn_count~*"
]
}
},
"title": {
"render": {
"en": "Review and update the address"
}
},
"description": {
"en": "Addresses",
"nl": "Adressen",
"de": "Adressen",
"ru": "Адреса",
"zh_Hant": "地址",
"hu": "Címek"
},
"calculatedTags": [
"_closest_3_street_names=feat.closestn('named_streets',3, 'name').map(f => f.feat.properties.name)",
"_closest_street:0:name=JSON.parse(feat.properties._closest_3_street_names)[0]",
"_closest_street:1:name=JSON.parse(feat.properties._closest_3_street_names)[1]",
"_closest_street:2:name=JSON.parse(feat.properties._closest_3_street_names)[2]"
],
"tagRenderings": [
"questions",
{
"id": "preview",
"render": {
"en": "<div>The envelope below shows the address that we have recorded. You can change this by answering any remaining questions above, or by clicking the pencil icons below. We do not need you to provide a recipient's name or any of the parts shown in <span style='color: #4e7ce8'>[blue]</span>.</div><div style='background: #f1d592; min-height: 270px; border-radius: 2px; padding: 1rem 1rem 2rem 7rem; margin: 1rem; box-shadow: 0 2px 5px 0px rgba(0,0,0,.6)' class='flex flex-col'><img src='./assets/themes/uk_addresses/stamp-outline.png' class='self-end w-16'/><div>{addr:unit} {addr:housename}</div><div>{addr:housenumber} {addr:street}</div><div>{addr:parentstreet}</div><div style='color: #4e7ce8'>[Suburb]</div><div style='color: #4e7ce8'>[Town]</div><div style='color: #4e7ce8'>[Postal code]</div></div>"
},
"mappings": [
{
"#": "ignore-image-in-then",
"if": "addr:substreet~*",
"then": "<div>The envelope below shows the address that we have recorded. You can change this by answering any remaining questions above, or by clicking the pencil icons below. We do not need you to provide a recipient's name or any of the parts shown in <span style='color: #4e7ce8'>[blue]</span>.</div><div style='background: #f1d592; min-height: 270px; border-radius: 2px; padding: 1rem 1rem 2rem 7rem; margin: 1rem; box-shadow: 0 2px 5px 0px rgba(0,0,0,.6)' class='flex flex-col'><img src='./assets/themes/uk_addresses/stamp-outline.png' class='self-end w-16'/><div>{addr:unit} {addr:housename}</div><div>{addr:housenumber} {addr:substreet}</div><div>{addr:street}</div><div>{addr:parentstreet}</div><div style='color: #4e7ce8'>[Suburb]</div><div style='color: #4e7ce8'>[Town]</div><div style='color: #4e7ce8'>[Postal code]</div></div>"
}
]
},
{
"id": "uk_addresses_unit",
"render": "<b>{addr:unit}</b>",
"question": {
"en": "What is the sub-unit for this address? <div class='subtle'>Some named building or large complexes are split into sub-units (e.g. \"1\", \"Flat 2\", \"Unit C\")</div>"
},
"freeform": {
"key": "addr:unit"
},
"mappings": [
{
"if": "not:addr:unit=yes",
"then": "There is no sub-unit within this address",
"addExtraTags": [
"addr:unit="
]
},
{
"if": "addr:unit=",
"then": "<div class='subtle'>Sub-unit (e.g. \"1\", \"Flat 2\", \"Unit C\")</div>",
"hideInAnswer": true
}
],
"condition": {
"or": [
"addr:housenumber~*",
"addr:housename~*",
"addr:substreet~*"
]
}
},
{
"id": "uk_addresses_housename",
"question": "What is the house or building name for this address?<div class='subtle'>As shown on a sign (e.g. \"Rose Cottage\", \"Broadcasting House\", \"Acme Corp HQ\"). Please do NOT add names of the people who live here!</div>",
"render": "<b>{addr:housename}</b>",
"freeform": {
"key": "addr:housename",
"addExtraTags": [
"nohousename="
]
},
"mappings": [
{
"if": {
"and": [
"nohousename=yes",
"addr:housename="
]
},
"then": "This building has no housename"
},
{
"#": "By adding nohousenumber!=yes, this option will trigger when first added, but will be untriggered if a housenumber is added, resulting in the question poping up!",
"if": {
"and": [
"addr:housename=",
"nohousenumber!=yes"
]
},
"then": "<div class='subtle'>House or building name</div>",
"hideInAnswer": true
}
]
},
{
"id": "uk_addresses_housenumber",
"render": "<b>{addr:housenumber}</b>",
"question": {
"en": "What is the house or building number for this address?"
},
"freeform": {
"key": "addr:housenumber",
"addExtraTags": [
"nohousenumber="
]
},
"mappings": [
{
"if": "nohousenumber=yes",
"then": {
"en": "This building has no house number",
"nl": "Dit gebouw heeft geen huisnummer",
"de": "Dieses Gebäude hat keine Hausnummer"
},
"addExtraTags": [
"addr:housenumber="
]
}
]
},
{
"id": "uk_addresses_placename",
"question": {
"en": "What is the place or locality for this address?<div class='subtle'>This is additional information that appears before (or instead of) a street name in the address (e.g. \"The Cross\", \"West Business Park\", \"Castle Mews\")</div>"
},
"render": {
"en": "<b>{addr:substreet}</b>"
},
"freeform": {
"key": "addr:substreet",
"addExtraTags": [
"addr:parentstreet:={addr:street}",
"addr:street="
]
},
"mappings": [
{
"if": "not:addr:substreet=yes",
"then": {
"en": "No extra place name is given or needed"
},
"addExtraTags": [
"addr:substreet="
]
},
{
"if": "addr:substreet=",
"then": {
"en": "<div class='subtle'>Place (e.g. \"Castle Mews\", \"West Business Park\")</div>"
},
"hideInAnswer": true
}
],
"condition": "addr:parentstreet="
},
{
"id": "uk_addresses_placename_with_parent",
"question": {
"en": "What is the place or locality for this address?<div class='subtle'>This is additional information that appears before (or instead of) a street name in the address (e.g. \"The Cross\", \"West Business Park\", \"Castle Mews\")</div>"
},
"render": {
"en": "<b>{addr:substreet}</b>"
},
"freeform": {
"key": "addr:substreet",
"addExtraTags": [
"addr:street="
]
},
"mappings": [
{
"if": "not:addr:substreet=yes",
"then": {
"en": "No extra place name is given or needed"
},
"addExtraTags": [
"addr:substreet="
]
},
{
"if": "addr:substreet=",
"then": {
"en": "<div class='subtle'>Place (e.g. \"Castle Mews\", \"West Business Park\")</div>"
},
"hideInAnswer": true
}
],
"condition": {
"or": [
{
"and": [
"addr:parentstreet~*",
"addr:street="
]
},
{
"and": [
"addr:parentstreet~*",
"addr:street~*",
"addr:substreet~*"
]
}
]
}
},
{
"id": "uk_addresses_street",
"render": "<b>{addr:street}</b>",
"question": {
"en": "What is the street name for this address?"
},
"freeform": {
"key": "addr:street"
},
"mappings": [
{
"if": "addr:street:={_closest_street:0:name}",
"then": "<b>{_closest_street:0:name}</b>",
"hideInAnswer": "_closest_street:0:name="
},
{
"if": "addr:street:={_closest_street:1:name}",
"then": "<b>{_closest_street:1:name}</b>",
"hideInAnswer": "_closest_street:1:name="
},
{
"if": "addr:street:={_closest_street:2:name}",
"then": "<b>{_closest_street:2:name}</b>",
"hideInAnswer": "_closest_street:2:name="
}
],
"condition": {
"or": [
"addr:street~*",
"addr:substreet="
]
}
},
{
"id": "uk_addresses_parentstreet",
"render": "<b>{addr:parentstreet}</b>",
"question": {
"en": "What is the parent street name for this address?<div class='subtle'>This street name will appear after the place name or first street name in the address</div>"
},
"freeform": {
"key": "addr:parentstreet"
},
"mappings": [
{
"if": "not:addr:parentstreet=yes",
"then": "No parent street name is needed within this address",
"addExtraTags": [
"addr:parentstreet="
]
},
{
"if": "addr:parentstreet:={_closest_street:0:name}",
"then": "<b>{_closest_street:0:name}</b>",
"hideInAnswer": "_closest_street:0:name="
},
{
"if": "addr:parentstreet:={_closest_street:1:name}",
"then": "<b>{_closest_street:1:name}</b>",
"hideInAnswer": "_closest_street:1:name="
},
{
"if": "addr:parentstreet:={_closest_street:2:name}",
"then": "<b>{_closest_street:2:name}</b>",
"hideInAnswer": "_closest_street:2:name="
},
{
"if": "addr:parentstreet=",
"then": {
"en": "<div class='subtle'>Parent street name</div>"
},
"hideInAnswer": true
}
],
"condition": {
"or": [
"addr:parentstreet~*",
"addr:substreet~*"
]
}
},
{
"id": "fixme",
"render": "This address is complicated. We have recorded the following description: {fixme:addr}",
"question": {
"en": "Please explain what the address is so that someone else can look at it"
},
"freeform": {
"key": "fixme:addr"
},
"mappings": [
{
"if": "fixme:addr=",
"then": "Complicated address? Please click the pencil and write some text to describe the situation. You can also add a photo below if that helps",
"hideInAnswer": true
}
]
},
{
"id": "address-sign-image",
"render": {
"en": "{image_carousel(image:address)}<br/>{image_upload(image:address, Too complex? Add a photo of the address)}"
}
}
],
"mapRendering": [
{
"label": {
"render": "<div style='margin-top: -42px; color: white' class='rounded-full p-1 font-bold relative'>{addr:housenumber}</div>",
"condition": "addr:housenumber~*"
},
"iconSize": "50,50,center",
"icon": {
"render": "./assets/layers/address/housenumber_blank.svg",
"mappings": [
{
"if": {
"or": [
{
"and": [
"addr:housenumber=",
"nohousenumber!=yes"
]
},
"addr:street="
]
},
"then": "./assets/themes/uk_addresses/housenumber_unknown.svg"
}
]
},
"location": [
"point",
"centroid"
]
},
{
"color": {
"render": "#00f",
"mappings": [
{
"if": {
"or": [
{
"and": [
"addr:housenumber=",
"nohousenumber!=yes"
]
},
"addr:street="
]
},
"then": "#ff0"
}
]
},
"width": {
"render": "3"
}
}
]
},
"named_streets"
],
"enableShareScreen": false,
"enableMoreQuests": false
}