Add support for more Osmose error types

- Missing parking access
- Malformed opening hours tagging
- Objects detected by Mapillary that aren't mapped
- Traffic sign information detected by Mapillary that isn't mapped

Mapillary errors add example code for special error type handling as
they don't need to request further details and can use piecewise
translation strings
This commit is contained in:
SilentSpike
2019-12-29 17:27:41 +00:00
parent b24b041335
commit 5afdfc527b
7 changed files with 129 additions and 16 deletions
+10
View File
@@ -169,6 +169,16 @@
color: #DCB000;
}
.osmose.category-3161,
.osmose.category-3250 {
color: #2D9359;
}
.osmose.category-8300,
.osmose.category-8360 {
color: #3DE736;
}
/* Custom Map Data (geojson, gpx, kml, vector tile) */
.layer-mapdata {
pointer-events: none;
+24 -1
View File
@@ -862,7 +862,30 @@ en:
description: '{0} and {1} overlap.'
1280-1:
title: 'Incorrect Speed Camera'
description: 'Speed camera should be on the highway or part of an "enforcement" relation.'
description: '{0} should be on the highway or part of an "enforcement" relation.'
3161:
title: 'Missing Parking Access'
description: 'There is no highway leading to {0}.'
3250-32501:
title: 'Invalid Opening Hours'
description: '{0} has an invalid value for the "opening_hours" tag.'
8300:
title: 'Traffic Sign Suggestion'
description: 'Traffic signs detected by Mapillary suggest there may be an unmapped {0} nearby.'
parts:
20: 'max height limit'
21: 'max weight limit'
32: 'roundabout'
34: 'set of speed bumps'
8360:
title: 'Missing Street Object'
description: 'Object detection by Mapillary suggests there may be an unmapped {0} nearby.'
parts:
1: 'bench'
2: 'type of bicycle parking'
3: 'surveillance camera'
4: 'fire hydrant'
5: 'set of traffic signals'
improveOSM:
title: ImproveOSM Detection
geometry_types:
+46 -10
View File
@@ -34,7 +34,7 @@
}
},
"osmose": {
"items": ["0", "1040", "1050", "1070", "1150", "1280"],
"items": ["0", "1040", "1050", "1070", "1150", "1280", "3161", "3250", "8300", "8360"],
"errorTypes": {
"0-1": {
"icon": "maki-home"
@@ -51,15 +51,6 @@
"1050-1050": {
"icon": "maki-circle-stroked"
},
"1150-1": {
"icon": "far-clone"
},
"1150-2": {
"icon": "far-clone"
},
"1150-3": {
"icon": "far-clone"
},
"1070-1": {
"icon": "maki-home"
},
@@ -75,8 +66,53 @@
"1070-10": {
"icon": "maki-cross"
},
"1150-1": {
"icon": "far-clone"
},
"1150-2": {
"icon": "far-clone"
},
"1150-3": {
"icon": "far-clone"
},
"1280-1": {
"icon": "maki-attraction"
},
"3161-1": {
"icon": "maki-parking"
},
"3161-2": {
"icon": "maki-parking"
},
"3250-32501": {
"icon": "maki-watch"
},
"8300-20": {
"icon": "temaki-height_restrictor"
},
"8300-21": {
"icon": "fas-weight-hanging"
},
"8300-32": {
"icon": "maki-circle-stroked"
},
"8300-34": {
"icon": "temaki-diamond"
},
"8360-1": {
"icon": "temaki-bench"
},
"8360-2": {
"icon": "maki-bicycle"
},
"8360-3": {
"icon": "temaki-security_camera"
},
"8360-4": {
"icon": "temaki-fire_hydrant"
},
"8360-5": {
"icon": "temaki-traffic_signals"
}
}
}
+30 -1
View File
@@ -1046,6 +1046,31 @@
"title": "Overlapping Similar Areas",
"description": "{0} and {1} overlap."
},
"3161": {
"title": "Missing Parking Access",
"description": "There is no highway leading to {0}."
},
"8300": {
"title": "Traffic Sign Suggestion",
"description": "Traffic signs detected by Mapillary suggest there may be an unmapped {0} nearby.",
"parts": {
"20": "max height limit",
"21": "max weight limit",
"32": "roundabout",
"34": "set of speed bumps"
}
},
"8360": {
"title": "Missing Street Object",
"description": "Object detection by Mapillary suggests there may be an unmapped {0} nearby.",
"parts": {
"1": "bench",
"2": "type of bicycle parking",
"3": "surveillance camera",
"4": "fire hydrant",
"5": "set of traffic signals"
}
},
"0-3": {
"title": "Suspiciously Small Building",
"description": "{0} is a suspisciously small building."
@@ -1077,7 +1102,11 @@
},
"1280-1": {
"title": "Incorrect Speed Camera",
"description": "Speed camera should be on the highway or part of an \"enforcement\" relation."
"description": "{0} should be on the highway or part of an \"enforcement\" relation."
},
"3250-32501": {
"title": "Invalid Opening Hours",
"description": "{0} has an invalid value for the \"opening_hours\" tag."
}
}
},
+16 -3
View File
@@ -3,6 +3,7 @@ import RBush from 'rbush';
import { dispatch as d3_dispatch } from 'd3-dispatch';
import { json as d3_json } from 'd3-fetch';
import { dataEn } from '../../data';
import { geoExtent, geoVecAdd } from '../geo';
import { qaError } from '../osm';
import { utilRebind, utilTiler, utilQsString } from '../util';
@@ -92,7 +93,6 @@ export default {
loadErrors: function(projection) {
var params = {
level: '1,2,3',
item: services.osmose.items.join() // only interested in certain errors
};
@@ -137,10 +137,23 @@ export default {
service: 'osmose',
error_type: type,
// Extra details needed for this service
identifier: props.issue_id, // this is used to post changes to the error
item: props.item // category of the issue for styling
identifier: props.issue_id, // needed to query and update the error
item: props.item, // category of the issue for styling
class: props.class
});
// Special handling for some error types
// Setting elems here prevents UI error detail requests
var parts = dataEn.QA.osmose.error_types[d.item].parts;
switch (d.item) {
case 8300:
case 8360:
// todo: possible to add link to open mapillay photo overlay?
d.replacements = [parts[d.class]];
d.elems = [];
break;
}
_erCache.data[d.id] = d;
_erCache.rtree.insert(encodeErrorRtree(d));
}
+2 -1
View File
@@ -70,7 +70,8 @@ function buildData() {
'fas-long-arrow-alt-right': {},
'fas-th-list': {},
'fas-user-cog': {},
'far-clone': {}
'far-clone': {},
'fas-weight-hanging': {}
};
// The Noun Project icons used
+1
View File
@@ -0,0 +1 @@
<svg aria-hidden="true" focusable="false" data-prefix="fas" data-icon="weight-hanging" class="svg-inline--fa fa-weight-hanging fa-w-16" role="img" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512"><path fill="currentColor" d="M510.28 445.86l-73.03-292.13c-3.8-15.19-16.44-25.72-30.87-25.72h-60.25c3.57-10.05 5.88-20.72 5.88-32 0-53.02-42.98-96-96-96s-96 42.98-96 96c0 11.28 2.3 21.95 5.88 32h-60.25c-14.43 0-27.08 10.54-30.87 25.72L1.72 445.86C-6.61 479.17 16.38 512 48.03 512h415.95c31.64 0 54.63-32.83 46.3-66.14zM256 128c-17.64 0-32-14.36-32-32s14.36-32 32-32 32 14.36 32 32-14.36 32-32 32z"></path></svg>

After

Width:  |  Height:  |  Size: 615 B