{ "id": "bag", "title": { "nl": "BAG import helper", "en": "BAG import helper", "de": "BAG-Importhilfe", "fr": "Facilitateur d'import BAG", "nb_NO": "BAG-importhjelper", "ca": "Assistent d'importació del BAG", "es": "Ayudante de importación BAG" }, "shortDescription": { "nl": "BAG import helper tool", "en": "BAG import helper tool", "de": "BAG-Import-Hilfswerkzeug", "fr": "Outil de facilitation d'import BAG", "ca": "Ferramenta d'ajuda per a importar el BAG", "es": "Herramienta de ayuda a la importación BAG" }, "description": { "nl": "Dit thema helpt het importeren van BAG data", "en": "This theme helps with importing data from BAG", "cs": "Toto téma pomáhá s importem dat ze systému BAG", "de": "Dieses Thema hilft beim Importieren von BAG-Daten", "fr": "Ce thème aide à l'importation de données depuis BAG", "ca": "Aquest tema ajuda amb la importació de dades del BAG", "zgh": "ⵉⵜⵜⴰⵡⵙ ⵉⵎⵔⵙⵉ ⴰⴷ ⴳ ⵡⴰⵎⵎⴰⵥ ⵏ ⵜⵎⵓⵛⴰ ⵙⴳ BAG", "es": "Este tema ayuda a importar datos de BAG" }, "credits": "Wouter van der Wal", "icon": "./assets/themes/bag/logo.svg", "startLat": 53.1726, "startLon": 7.04545, "startZoom": 9, "layers": [ { "id": "osm:buildings", "name": "OSM Buildings", "title": "OSM Building", "description": "Layer showing buildings that are in OpenStreetMap", "source": { "osmTags": "building~*", "maxCacheAge": 0 }, "minzoom": 19, "calculatedTags": [ "_surface:strict:=feat.get('_surface')" ], "mapRendering": [ { "width": { "render": "2", "mappings": [ { "if": "fixme~*", "then": "5" } ] }, "color": { "render": "#00c", "mappings": [ { "if": "fixme~*", "then": "#ff00ff" }, { "if": "building=house", "then": "#a00" }, { "if": "building=shed", "then": "#563e02" }, { "if": { "or": [ "building=garage", "building=garages" ] }, "then": "#f9bfbb" }, { "if": "building=yes", "then": "#0774f2" } ] } } ], "tagRenderings": [ { "id": "Reference", "render": { "en": "The reference in BAG is {ref:bag}", "de": "Die Referenz in BAG ist {ref:bag}", "nl": "De referentie in BAG is {ref:bag}", "fr": "La référence dans le BAG est {ref:bag}", "ca": "La referència al BAG és {ref:bag}", "zgh": "ⵜⴳⴰ ⵜⵙⴰⵖⵓⵍⵜ ⴳ BAG {ref:bag}", "es": "La referencia de BAG es {ref:bag}" }, "mappings": [ { "if": "ref:bag=", "then": { "en": "This building has no reference in the BAG", "cs": "Tato budova nemá v BAG žádný odkaz", "de": "Dieses Gebäude hat keinen Verweis im BAG", "nl": "Dit gebouw heeft geen referentie in de BAG", "fr": "Ce bâtiment n'a pas de référence dans le BAG", "ca": "Aquest edifici no té referència al BAG", "zgh": "ⵜⵓⵚⴽⴰ ⴰⴷ ⵓⵔ ⵖⵓⵔⵙ ⵜⴰⵙⴰⵖⵓⵍⵜ ⴳ BAG", "es": "Este edificio no tiene referencia en el BAG" } } ] }, { "id": "Building type", "freeform": { "key": "building", "type": "string", "addExtraTags": [ "construction=" ] }, "render": "This building is a {building}", "question": "What kind of building is this?" } ] }, { "id": "osm:adresses", "name": "OSM Adresses", "title": "OSM Adress", "description": "Layer showing adresses that are in OpenStreetMap", "source": { "osmTags": { "and": [ "source=BAG", "addr:city~*", "addr:housenumber~*", "addr:postcode~*", "addr:street~*" ] }, "maxCacheAge": 0 }, "minzoom": 19, "mapRendering": [ { "label": { "render": "
{addr:housenumber}
", "condition": "addr:housenumber~*" }, "location": [ "point", "centroid" ] }, { "width": { "render": 1 } } ] }, { "id": "bag:pand", "name": "BAG Buildings", "title": "BAG Building", "description": { "en": "Buildings from BAG register", "de": "Gebäude aus dem BAG-Register", "nl": "Gebouw uit de BAG", "fr": "Bâtiments du registre BAG", "ca": "Edificis del registre BAG", "zgh": "ⵜⵓⵚⴽⴰⵡⵉⵏ ⵙⴳ ⵡⴰⵔⵔⴰ ⵏ BAG", "es": "Edificios del registro BAG" }, "source": { "geoJson": "https://service.pdok.nl/lv/bag/wfs/v2_0?request=GetFeature&service=WFS&version=2.0.0&outputFormat=application%2Fjson%3B%20subtype%3Dgeojson&typeName=bag%3Apand&bbox={x_min}%2C{y_min}%2C{x_max}%2C{y_max}%2CCRS84&srsName=EPSG%3A4326", "geoJsonZoomLevel": 18, "osmTags": "identificatie~*", "maxCacheAge": 0 }, "minzoom": 19, "calculatedTags": [ "_overlaps_with_buildings=feat.overlapWith('osm:buildings').filter(f => f.feat.properties.id.indexOf('-') < 0)", "_overlaps_with=feat.get('_overlaps_with_buildings').find(f => f.overlap > 1 /* square meter */ )", "_overlaps_with_properties=feat.get('_overlaps_with')?.feat?.properties", "_overlap_percentage=Math.round(100 * (feat.get('_overlaps_with')?.overlap / feat.get('_overlaps_with_properties')['_surface:strict']))", "_reverse_overlap_percentage=Math.round(100 * (feat.get('_overlaps_with')?.overlap / feat.get('_surface')))", "_bag_obj:in_construction=feat.properties.status.startsWith('Bouwvergunning verleend') || feat.properties.status.startsWith('Bouw gestart')", "_bag_obj:construction=(feat.properties.gebruiksdoel == 'woonfunctie') ? ((Number(feat.properties.aantal_verblijfsobjecten) == 1) ? 'house' : 'apartments') : 'yes'", "_bag_obj:building=(feat.properties.status.startsWith('Bouwvergunning verleend') || feat.properties.status.startsWith('Bouw gestart')) ? 'construction' : feat.properties['_bag_obj:construction']", "_bag_obj:ref:bag=Number(feat.properties.identificatie)", "_bag_obj:source:date=new Date().toISOString().split('T')[0]", "_bag_obj:start_date=feat.properties.bouwjaar", "_osm_obj:id=feat.get('_overlaps_with_properties')?.id", "_osm_obj:building=feat.get('_overlaps_with_properties')?.building", "_imported_osm_object_found:=Number(feat.properties.identificatie)==Number(feat.get('_overlaps_with_properties')['ref:bag'])" ], "mapRendering": [ { "width": { "render": 5, "mappings": [ { "if": "_imported_osm_object_found=true", "then": "1" } ] }, "color": { "render": "#00a", "mappings": [ { "if": "_imported_osm_object_found=true", "then": "#0f0" } ] } } ], "tagRenderings": [ { "id": "Import button", "render": "{import_way_button(osm:buildings, building=$_bag_obj:building; ref:bag=$_bag_obj:ref:bag; source=BAG; source:date=$_bag_obj:source:date; start_date=$_bag_obj:start_date, Upload this building to OpenStreetMap)}", "mappings": [ { "#": "Something went wrong calculating the tags - don't show an import button", "if": { "or": [ "_bag_obj:building=", "_bag_obj:ref:bag=" ] }, "then": { "en": "Didn't calculate the correct values yet. Refresh this page", "de": "Richtige Werte noch nicht berechnet. Aktualisieren Sie diese Seite", "nl": "Correcte waarden nog niet berekend. Herlaad deze pagina", "fr": "Les valeurs correctes n'ont pas encore été calculées. Rafraichissez la page", "ca": "El valors correctes encara no s'ha calculat. Refresca la pàgina", "cs": "Zatím nebyly vypočteny správné hodnoty. Aktualizujte stránku", "nb_NO": "Har ikke regnet ut riktige verdier enda. Gjenoppfrisk siden.", "es": "Aún no se han calculado los valores correctos. Actualice esta página" } }, { "if": "_overlaps_with!=", "then": "{conflate_button(osm:buildings, building=$_bag_obj:building; ref:bag=$_bag_obj:ref:bag; source=BAG; source:date=$_bag_obj:source:date; start_date=$_bag_obj:start_date, Replace the geometry in OpenStreetMap, , _osm_obj:id)}" }, { "if": { "and": [ "_bag_obj:building~*", "_bag_obj:ref:bag~*", "_bag_obj:in_construction=true" ] }, "then": "{import_way_button(osm:buildings, building=$_bag_obj:building; construction=$_bag_obj:construction; ref:bag=$_bag_obj:ref:bag; source=BAG; source:date=$_bag_obj:source:date; start_date=$_bag_obj:start_date, Upload this building to OpenStreetMap)}" } ] }, { "id": "Reference", "render": { "en": "The reference in BAG is {_bag_obj:ref:bag}", "de": "Die Referenz in BAG ist {_bag_obj:ref:bag}", "nl": "De referentie in BAG is {_bag_obj:ref:bag}", "fr": "La référence dans BAG est {_bag_obj:ref:bag}", "ca": "La referència a BAG és {_bag_obj:ref:bag}", "es": "La referencia en BAG es {_bag_obj:ref:bag}" } }, { "id": "Build year", "render": { "en": "This building was built in {_bag_obj:start_date}", "de": "Dieses Gebäude wurde gebaut in {_bag_obj:start_date}", "pt_BR": "Esta construção é de {_bag_obj:start_date}", "nl": "Dit gebouw is gebouwd in {_bag_obj:start_date}", "fr": "Le bâtiment a été construit en {_bag_obj:start_date}", "ca": "L’edifici va ser construït al {_bag_obj:start_date}4", "es": "El edificio fue construido en {_bag_obj:start_date}", "cs": "Tato budova byla postavena v {_bag_obj:start_date}", "nb_NO": "Bygning oppført {_bag_obj:start_date}" }, "mappings": [ { "if": "_bag_obj:in_construction=true", "then": { "en": "The building was started in {_bag_obj:start_date}", "de": "Der Bau wurde in {_bag_obj:start_date} begonnen", "nl": "De bouw van dit gebouw is gestart in {_bag_obj:start_date}", "fr": "Le bâtiment a été commencé en {_bag_obj:start_date}", "ca": "L’edifici es va començar al {_bag_obj:start_date}", "cs": "Stavba byla zahájena v {_bag_obj:start_date}", "nb_NO": "Oppføring startet {_bag_obj:start_date}", "es": "Este edificio se empezó a construir en {_bag_obj:start_date}" } } ] }, { "id": "Building type", "render": { "en": "The building type is a {_bag_obj:building}", "de": "Der Gebäudetyp ist ein {_bag_obj:building}", "nl": "Het gebouwtype is {_bag_obj:building}", "fr": "Le type de bâtiment est {_bag_obj:building}", "ca": "El tipus d'edifici és {_bag_obj:building}", "cs": "Typ budovy je {_bag_obj:building}.", "nb_NO": "Dette er en bygning av typen {_bag_obj:building}", "es": "El edificio es de tipo {_bag_obj:building}" }, "mappings": [ { "if": "_bag_obj:in_construction=true", "then": { "en": "The building type will be a {_bag_obj:construction}", "de": "Der Gebäudetyp ist ein {_bag_obj:construction}", "nl": "Het gebouwtype wordt {_bag_obj:construction}", "fr": "Le type de bâtiment sera {_bag_obj:construction}", "ca": "El tipus d'edifici serà {_bag_obj:construction}", "cs": "Typ budovy bude {_bag_obj:construction}", "es": "El tipo de edificio será un {_bag_obj:construction}" } } ] }, { "id": "Overlapping building", "render": "
The overlapping osm:buildings is a {_osm_obj:building} and covers {_overlap_percentage}% of the BAG building.
The BAG-building covers {_reverse_overlap_percentage}% of the OSM building

BAG geometry:

{minimap(21, id):height:10rem;border-radius:1rem;overflow:hidden}

OSM geometry:

{minimap(21,_osm_obj:id):height:10rem;border-radius:1rem;overflow:hidden}
", "condition": "_overlaps_with!=" }, { "id": "Building status", "render": "The current building status is {status}" }, { "id": "Buidling function", "render": "The current function of the building is {gebruiksdoel}" } ] }, { "id": "bag:verblijfsobject", "name": "BAG Addresses", "title": "BAG Address", "description": "Address information from the BAG register", "source": { "geoJson": "https://service.pdok.nl/lv/bag/wfs/v2_0?request=GetFeature&service=WFS&version=2.0.0&outputFormat=application%2Fjson%3B%20subtype%3Dgeojson&typeName=bag%3Averblijfsobject&bbox={x_min}%2C{y_min}%2C{x_max}%2C{y_max}%2CCRS84&srsName=EPSG%3A4326", "geoJsonZoomLevel": 19, "osmTags": "identificatie~*", "maxCacheAge": 0 }, "minzoom": 19, "calculatedTags": [ "_closed_osm_addr:=feat.closest('osm:adresses').properties", "_bag_obj:addr:housenumber=`${feat.properties.huisnummer}${feat.properties.huisletter}${(feat.properties.toevoeging != '') ? '-' : ''}${feat.properties.toevoeging}`", "_bag_obj:ref:bag=Number(feat.properties.identificatie)", "_bag_obj:source:date=new Date().toISOString().split('T')[0]", "_osm_obj:addr:city:=feat.get('_closed_osm_addr')['addr:city']", "_osm_obj:addr:housenumber:=feat.get('_closed_osm_addr')['addr:housenumber']", "_osm_obj:addr:postcode:=feat.get('_closed_osm_addr')['addr:postcode']", "_osm_obj:addr:street:=feat.get('_closed_osm_addr')['addr:street']", "_imported_osm_object_found:=(feat.properties.woonplaats==feat.get('_closed_osm_addr')['addr:city'])&&(feat.get('_bag_obj:addr:housenumber')==feat.get('_closed_osm_addr')['addr:housenumber'])&&(feat.properties.postcode==feat.get('_closed_osm_addr')['addr:postcode'])&&(feat.properties.openbare_ruimte==feat.get('_closed_osm_addr')['addr:street'])" ], "mapRendering": [ { "label": { "render": "
{_bag_obj:addr:housenumber}
", "mappings": [ { "if": "_imported_osm_object_found=true", "then": "
{_bag_obj:addr:housenumber}
" } ] }, "location": [ "point", "centroid" ] }, { "width": { "render": 1 } } ], "tagRenderings": [ { "id": "Import button", "render": "{import_button(osm:adresses, addr:city=$woonplaats; addr:housenumber=$_bag_obj:addr:housenumber; addr:postcode=$postcode; addr:street=$openbare_ruimte; ref:bag=$_bag_obj:ref:bag; source=BAG; source:date=$_bag_obj:source:date, Upload this adress to OpenStreetMap)}", "condition": "_imported_osm_object_found=false" }, { "id": "Address", "render": "{openbare_ruimte} {_bag_obj:addr:housenumber}, {woonplaats} {postcode}" } ] } ], "hideFromOverview": true }