diff --git a/assets/themes/grb_import/grb.json b/assets/themes/grb_import/grb.json
index 2a11d0fc8a..8e8a2491d0 100644
--- a/assets/themes/grb_import/grb.json
+++ b/assets/themes/grb_import/grb.json
@@ -38,7 +38,7 @@
"point"
],
"icon": {
- "render": "./assets/themes/grb_import/robot.svg"
+ "render": "./assets/svg/robot.svg"
},
"iconSize": "15,15,center"
}
@@ -350,6 +350,7 @@
"all_tags"
]
},
+ "address",
{
"builtin": "crab_address",
"override": {
@@ -464,7 +465,7 @@
"title": "GRB outline",
"calculatedTags": [
"_overlaps_with_buildings=feat.overlapWith('OSM-buildings')",
- "_overlap_with=feat.get('_overlaps_with_buildings').filter(f => f.overlap > 1 && (feat.get('_surface') < 20 || f.overlap / feat.get('_surface')) > 0.5)[0] ?? ''",
+ "_overlaps_with=feat.get('_overlaps_with_buildings').filter(f => f.overlap > 1 /* square meter */ )[0] ?? ''",
"_overlap_absolute=feat.get('_overlaps_with')?.overlap",
"_overlap_percentage=Math.round(100 * feat.get('_overlap_absolute') / feat.get('_surface')) ",
"_osm_obj:source:ref=feat.get('_overlaps_with')?.feat?.properties['source:geometry:ref']",
@@ -479,18 +480,17 @@
"_imported_osm_still_fresh= feat.properties['_osm_obj:source:date'] == feat.properties._grb_date",
"_target_building_type=feat.properties['_osm_obj:building'] === 'yes' ? feat.properties.building : (feat.properties['_osm_obj:building'] ?? feat.properties.building)",
"_building:min_level= feat.properties['fixme']?.startsWith('verdieping, correct the building tag, add building:level and building:min_level before upload in JOSM!') ? '1' : ''",
- "_overlaps_with_other_features=feat.overlapWith('generic_osm_object').map(f => \"\" + f.feat.properties.id + \"\").join(', ')"
+ "_intersects_with_other_features=feat.intersectionsWith('generic_osm_object').map(f => \"\" + f.feat.properties.id + \"\").join(', ')"
],
"tagRenderings": [
{
"id": "Import-button",
"render": "{import_way_button(OSM-buildings,building=$building;man_made=$man_made; source:geometry:date=$_grb_date; source:geometry:ref=$_grb_ref; addr:street=$addr:street; addr:housenumber=$addr:housenumber; building:min_level=$_building:min_level, Upload this building to OpenStreetMap,,_is_part_of_building=true,1,_moveable=true)}",
"mappings": [
- {
- "if": "_overlaps_with_other_features~*",
- "then": "This GRB building overlaps with the following features: {_overlaps_with_other_features}.
Fix the overlap and try again"
+ {"#": "Hide import button if intersection with other objects are detected",
+ "if": "_intersects_with_other_features~*",
+ "then": "This GRB building intersects with the following features: {_intersects_with_other_features}.
Fix the overlap and try again"
},
-
{
"if": {
"and": [
@@ -534,6 +534,7 @@
"if": "_osm_obj:addr:housenumber~*",
"then": "The overlapping building only has a housenumber known: {_osm_obj:addr:housenumber}"
},
+
{
"if": "_osm_obj:id=",
"then": "No overlapping OpenStreetMap-building found"
@@ -608,6 +609,10 @@
"icon": {
"render": "./assets/themes/grb_import/housenumber_blank.svg",
"mappings": [
+ {
+ "if": "_intersects_with_other_features~*",
+ "then": "./assets/themes/grb_import/warning.svg"
+ },
{
"if": "addr:housenumber=",
"then": ""
diff --git a/assets/themes/grb_import/license_info.json b/assets/themes/grb_import/license_info.json
index 8ea1617ec5..a6cdd3da52 100644
--- a/assets/themes/grb_import/license_info.json
+++ b/assets/themes/grb_import/license_info.json
@@ -6,5 +6,15 @@
"Pieter Vander Vennet"
],
"sources": []
+ },
+ {
+ "path": "warning.svg",
+ "license": "CC0",
+ "authors": [
+ "penubag"
+ ],
+ "sources": [
+ "https://commons.wikimedia.org/wiki/File:Ambox_warning_pn.svg"
+ ]
}
]
\ No newline at end of file
diff --git a/assets/themes/grb_import/warning.svg b/assets/themes/grb_import/warning.svg
new file mode 100644
index 0000000000..20121c65a8
--- /dev/null
+++ b/assets/themes/grb_import/warning.svg
@@ -0,0 +1,24 @@
+
+