Various bugfixes and improvements to UK_addresses and GRB theme

This commit is contained in:
Pieter Vander Vennet 2021-10-27 20:19:45 +02:00
parent bec7ed6da6
commit 8acf85cc55
16 changed files with 290 additions and 82 deletions

View file

@ -20,13 +20,99 @@
"startZoom": 14,
"widenFactor": 2,
"socialImage": "",
"overpassMaxZoom": 18,
"osmApiTileSize": 17,
"layers": [
{
"id": "OSM-buildings",
"name": "All OSM-buildings",
"source": {
"osmTags": "building~*",
"maxCacheAge": 0
},
"minzoom": 18,
"width": {
"render": "2"
},
"color": {
"render": "#00c",
"mappings": [
{
"if": "building=house",
"then": "#a00"
},
{
"if": "building=shed",
"then": "#563e02"
},
{
"if": {
"or": ["building=garage","building=garages"]
},
"then": "#f9bfbb"
},
{
"if": "building=yes",
"then": "#0774f2"
}
]
},
"title": "OSM-gebouw",
"tagRenderings": [
"all_tags"
]
},
{
"id": "All OSM objects",
"name": "All OSM Objects",
"source": {
"osmTags":{
"and": [
"id~*",
"landuse=",
"place=",
"disused:power=",
"power=",
"type!=boundary",
"boundary=",
{
"or": [
"level=",
"level=0"
]
},
{
"or": [
"layer=0",
"layer="
]
}
]
},
"maxCacheAge": 0
},
"minzoom": 18,
"color": {
"render": "#00c"
},
"width": {
"render": "1"
},
"title": {
"render": {
"*": "OSM-Object"
}
},
"tagRenderings": [
"all_tags"
]
},
{
"id": "osm-fixmes",
"name": {
"nl": "Fixmes op gebouwen"
},
"minzoom": 12,
"minzoom": 21,
"source": {
"maxCacheAge": 0,
"osmTags": {
@ -232,9 +318,29 @@
"name": "GRB geometries",
"title": "GRB outline",
"minzoom": 19,
"calculatedTags": [
"_overlaps_with=feat.overlapWith('OSM-buildings').filter(f => f.overlap > 1 && feat.properties._surface - f.overlap < 5)[0]",
"_osm_obj:source:ref=JSON.parse(feat.properties._overlaps_with).feat.properties['source:geometry:ref']",
"_osm_obj:source:date=JSON.parse(feat.properties._overlaps_with).feat.properties['source:geometry:date']",
"_imported_osm_object_found= feat.properties['_osm_obj:source:ref'] == feat.properties['source:geometry:entity'] + '/' + feat.properties['source:geometry:oidn']",
"_grb_date=feat.properties['source:geometry:date'].replace(/\\//g,'-')",
"_imported_osm_still_fresh= feat.properties['_osm_obj:source:date'] == feat.properties._grb_date"
],
"tagRenderings": [
"all_tags"
]
],
"color": {
"render": "#00a",
"mappings": [
{
"if": {
"and": ["_imported_osm_object_found=true","_imported_osm_still_fresh=true"]
},
"then": "#0f0"
}
]
}
}
],
"hideFromOverview": true,

View file

@ -1,4 +1,34 @@
[
{
"path": "Commemorative_plaque_on_Elizabeth_House_-_geograph.org.uk_-_2693028.jpg",
"license": "CC-BY-SA 2.0 Unported",
"authors": [
"Basher Eyre"
],
"sources": [
"https://commons.wikimedia.org/wiki/File:Commemorative_plaque_on_Elizabeth_House_-_geograph.org.uk_-_2693028.jpg"
]
},
{
"path": "Plaque,_Raphoe_House_-_geograph.org.uk_-_1925685.jpg",
"license": "CC-BY-SA 2.0",
"authors": [
"Kenneth Allen"
],
"sources": [
"https://commons.wikimedia.org/wiki/File:Plaque,_Raphoe_House_-_geograph.org.uk_-_1925685.jpg"
]
},
{
"path": "Plaque,_Séamus_Roddy_House_-_geograph.org.uk_-_2000318.jpg",
"license": "CC-BY-SA 2.0 Unported",
"authors": [
"Kenneth Allen"
],
"sources": [
"https://commons.wikimedia.org/wiki/File:Plaque,_S%C3%A9amus_Roddy_House_-_geograph.org.uk_-_2000318.jpg"
]
},
{
"path": "housenumber_add.svg",
"license": "CC0",

View file

@ -27,6 +27,9 @@
"widenFactor": 1.01,
"socialImage": "",
"hideFromOverview": true,
"enableShareScreen": false,
"enableMoreQuests": false,
"clustering": {
"minNeededFeatures": 25,
"maxZoom": 16
@ -52,11 +55,12 @@
"#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,
"isOsmCache": false
"geoJsonZoomLevel": 18,
"isOsmCache": false,
"maxCacheAge": 0
},
"name": "Addresses to check",
"minzoom": 14,
"minzoom": 18,
"wayHandling": 1,
"icon": {
"render": "./assets/themes/uk_addresses/housenumber_unknown.svg",
@ -123,6 +127,7 @@
},
"minzoom": 18,
"source": {
"maxCacheAge": 0,
"osmTags": {
"or": [
"addr:housenumber~*",
@ -188,6 +193,33 @@
}
]
},
{
"id": "uk_addresses_housename",
"question": "What is the name of this house?<br/>This is normally indicated on a plaque.<br><div class='subtle'>Do NOT add names of inhabitants!</div>",
"render": "This house is named <b>{addr:housename}</b>",
"freeform": {
"key": "addr:housename",
"addExtraTags": [
"nohousename="
]
},
"mappings": [
{
"if": "nohousename=yes",
"then": "This building has no housename"
},
{
"if": {
"and": [
"addr:housename=",
"nohousenumber!=yes"
]
},
"then": "This building has no housename",
"hideInAnswer": true
}
]
},
{
"id": "uk_addresses_street",
"render": {
@ -219,10 +251,40 @@
}
],
"condition": {
"and": [
"nohousenumber!~yes"
"or": [
"nohousenumber!=yes",
"nohousename!=yes"
]
}
},
{
"id": "fixme",
"render": "<b>Fixme description</b>{render}",
"question": {
"en": "What should be fixed here? Please explain"
},
"freeform": {
"key": "fixme"
},
"mappings": [
{
"if": "fixme=",
"then": "No fixme - write something here to explain complicated cases"
}
]
},
"questions",
{
"id": "address-sign-image",
"render": {
"en": "{image_carousel(image:address)}<br/>{image_upload(image:address, Add image of the address)}"
}
},
{
"id": "general_images",
"render": {
"en": "{image_carousel()}"
}
}
],
"icon": {
@ -245,7 +307,7 @@
]
},
"width": {
"render": "8"
"render": "1"
},
"iconSize": {
"render": "40,40,center"
@ -274,6 +336,7 @@
"id": "named_streets",
"minzoom": 18,
"source": {
"maxCacheAge": 0,
"osmTags": {
"and": [
"highway~*",