Merge pull request #5333 from quincylvania/traffic-sign-presets

Adds presets for Traffic Sign, Speed Limit Sign, and City Limit Sign
This commit is contained in:
Bryan Housel
2018-09-27 22:07:33 -04:00
committed by GitHub
14 changed files with 273 additions and 1 deletions
+43
View File
@@ -1730,6 +1730,19 @@ en:
traffic_calming:
# traffic_calming=*
label: Type
traffic_sign:
# traffic_sign=*
label: Traffic Sign
traffic_sign/direction:
# 'traffic_sign:direction=*'
label: Direction
options:
# 'traffic_sign:direction=backward'
backward: Backward
# 'traffic_sign:direction=both'
both: Both / All
# 'traffic_sign:direction=forward'
forward: Forward
traffic_signals:
# traffic_signals=*
label: Type
@@ -6084,6 +6097,36 @@ en:
name: Speed Table
# 'terms: flat top,hump,speed,slow'
terms: '<translate with synonyms or related terms for ''Speed Table'', separated by commas>'
traffic_sign:
# traffic_sign=*
name: Traffic Sign
# 'terms: road,highway'
terms: '<translate with synonyms or related terms for ''Traffic Sign'', separated by commas>'
traffic_sign/city_limit:
# traffic_sign=city_limit
name: City Limit Sign
# 'terms: town,village,hamlet,boundary,edge,border,road,highway'
terms: '<translate with synonyms or related terms for ''City Limit Sign'', separated by commas>'
traffic_sign/city_limit_vertex:
# traffic_sign=city_limit
name: City Limit Sign
# 'terms: town,village,hamlet,boundary,edge,border,road,highway'
terms: '<translate with synonyms or related terms for ''City Limit Sign'', separated by commas>'
traffic_sign/maxspeed:
# traffic_sign=maxspeed
name: Speed Limit Sign
# 'terms: max speed,maximum speed,road,highway'
terms: '<translate with synonyms or related terms for ''Speed Limit Sign'', separated by commas>'
traffic_sign/maxspeed_vertex:
# traffic_sign=maxspeed
name: Speed Limit Sign
# 'terms: max speed,maximum speed,road,highway'
terms: '<translate with synonyms or related terms for ''Speed Limit Sign'', separated by commas>'
traffic_sign_vertex:
# traffic_sign=*
name: Traffic Sign
# 'terms: road,highway'
terms: '<translate with synonyms or related terms for ''Traffic Sign'', separated by commas>'
type/boundary:
# type=boundary
name: Boundary
+2
View File
@@ -301,6 +301,8 @@
"tracktype": {"key": "tracktype", "type": "combo", "label": "Track Type", "placeholder": "Solid, Mostly Solid, Soft...", "strings": {"options": {"grade1": "Solid: paved or heavily compacted hardcore surface", "grade2": "Mostly Solid: gravel/rock with some soft material mixed in", "grade3": "Even mixture of hard and soft materials", "grade4": "Mostly Soft: soil/sand/grass with some hard material mixed in", "grade5": "Soft: soil/sand/grass"}}},
"trade": {"key": "trade", "type": "typeCombo", "label": "Type"},
"traffic_calming": {"key": "traffic_calming", "type": "typeCombo", "label": "Type"},
"traffic_sign": {"key": "traffic_sign", "type": "typeCombo", "label": "Traffic Sign"},
"traffic_sign/direction": {"key": "traffic_sign:direction", "type": "combo", "label": "Direction", "strings": {"options": {"forward": "Forward", "backward": "Backward", "both": "Both / All"}}},
"traffic_signals": {"key": "traffic_signals", "type": "combo", "label": "Type", "default": "signal"},
"traffic_signals/direction": {"key": "traffic_signals:direction", "type": "combo", "label": "Direction", "strings": {"options": {"forward": "Forward", "backward": "Backward", "both": "Both / All"}}},
"trail_visibility": {"key": "trail_visibility", "type": "combo", "label": "Trail Visibility", "placeholder": "Excellent, Good, Bad...", "strings": {"options": {"excellent": "Excellent: unambiguous path or markers everywhere", "good": "Good: markers visible, sometimes require searching", "intermediate": "Intermediate: few markers, path mostly visible", "bad": "Bad: no markers, path sometimes invisible/pathless", "horrible": "Horrible: often pathless, some orientation skills required", "no": "No: pathless, excellent orientation skills required"}}},
+5
View File
@@ -0,0 +1,5 @@
{
"key": "traffic_sign",
"type": "typeCombo",
"label": "Traffic Sign"
}
@@ -0,0 +1,12 @@
{
"key": "traffic_sign:direction",
"type": "combo",
"label": "Direction",
"strings": {
"options": {
"forward": "Forward",
"backward": "Backward",
"both": "Both / All"
}
}
}
+6
View File
@@ -927,6 +927,12 @@
"traffic_calming/island": {"icon": "temaki-diamond", "geometry": ["vertex"], "terms": ["circle", "roundabout", "slow"], "tags": {"traffic_calming": "island"}, "name": "Traffic Island"},
"traffic_calming/rumble_strip": {"icon": "temaki-diamond", "fields": ["direction_vertex"], "geometry": ["vertex", "line"], "terms": ["audible lines", "sleeper lines", "growlers"], "tags": {"traffic_calming": "rumble_strip"}, "name": "Rumble Strip"},
"traffic_calming/table": {"icon": "temaki-diamond", "fields": ["surface"], "geometry": ["vertex"], "tags": {"traffic_calming": "table"}, "terms": ["flat top", "hump", "speed", "slow"], "name": "Speed Table"},
"traffic_sign_vertex": {"icon": "maki-square-stroked", "fields": ["traffic_sign", "traffic_sign/direction"], "geometry": ["vertex"], "tags": {"traffic_sign": "*"}, "terms": ["road", "highway"], "name": "Traffic Sign"},
"traffic_sign": {"icon": "maki-square-stroked", "fields": ["traffic_sign", "direction"], "geometry": ["point"], "tags": {"traffic_sign": "*"}, "terms": ["road", "highway"], "name": "Traffic Sign"},
"traffic_sign/city_limit_vertex": {"icon": "maki-square-stroked", "fields": ["traffic_sign", "traffic_sign/direction", "name"], "geometry": ["vertex"], "tags": {"traffic_sign": "city_limit"}, "terms": ["town", "village", "hamlet", "boundary", "edge", "border", "road", "highway"], "name": "City Limit Sign"},
"traffic_sign/city_limit": {"icon": "maki-square-stroked", "fields": ["traffic_sign", "direction", "name"], "geometry": ["point"], "tags": {"traffic_sign": "city_limit"}, "terms": ["town", "village", "hamlet", "boundary", "edge", "border", "road", "highway"], "name": "City Limit Sign"},
"traffic_sign/maxspeed_vertex": {"icon": "maki-square-stroked", "fields": ["traffic_sign", "traffic_sign/direction", "maxspeed"], "geometry": ["vertex"], "tags": {"traffic_sign": "maxspeed"}, "terms": ["max speed", "maximum speed", "road", "highway"], "name": "Speed Limit Sign"},
"traffic_sign/maxspeed": {"icon": "maki-square-stroked", "fields": ["traffic_sign", "direction", "maxspeed"], "geometry": ["point"], "tags": {"traffic_sign": "maxspeed"}, "terms": ["max speed", "maximum speed", "road", "highway"], "name": "Speed Limit Sign"},
"type/multipolygon": {"icon": "iD-multipolygon", "geometry": ["area", "relation"], "tags": {"type": "multipolygon"}, "removeTags": {}, "name": "Multipolygon", "searchable": false, "matchScore": 0.1},
"type/boundary": {"icon": "iD-boundary", "fields": ["name", "boundary"], "geometry": ["relation"], "tags": {"type": "boundary"}, "name": "Boundary"},
"type/boundary/administrative": {"icon": "iD-boundary", "fields": ["name", "admin_level"], "geometry": ["relation"], "tags": {"type": "boundary", "boundary": "administrative"}, "reference": {"key": "boundary", "value": "administrative"}, "name": "Administrative Boundary"},
+18
View File
@@ -0,0 +1,18 @@
{
"icon": "maki-square-stroked",
"fields": [
"traffic_sign",
"direction"
],
"geometry": [
"point"
],
"tags": {
"traffic_sign": "*"
},
"terms": [
"road",
"highway"
],
"name": "Traffic Sign"
}
@@ -0,0 +1,25 @@
{
"icon": "maki-square-stroked",
"fields": [
"traffic_sign",
"direction",
"name"
],
"geometry": [
"point"
],
"tags": {
"traffic_sign": "city_limit"
},
"terms": [
"town",
"village",
"hamlet",
"boundary",
"edge",
"border",
"road",
"highway"
],
"name": "City Limit Sign"
}
@@ -0,0 +1,25 @@
{
"icon": "maki-square-stroked",
"fields": [
"traffic_sign",
"traffic_sign/direction",
"name"
],
"geometry": [
"vertex"
],
"tags": {
"traffic_sign": "city_limit"
},
"terms": [
"town",
"village",
"hamlet",
"boundary",
"edge",
"border",
"road",
"highway"
],
"name": "City Limit Sign"
}
@@ -0,0 +1,21 @@
{
"icon": "maki-square-stroked",
"fields": [
"traffic_sign",
"direction",
"maxspeed"
],
"geometry": [
"point"
],
"tags": {
"traffic_sign": "maxspeed"
},
"terms": [
"max speed",
"maximum speed",
"road",
"highway"
],
"name": "Speed Limit Sign"
}
@@ -0,0 +1,21 @@
{
"icon": "maki-square-stroked",
"fields": [
"traffic_sign",
"traffic_sign/direction",
"maxspeed"
],
"geometry": [
"vertex"
],
"tags": {
"traffic_sign": "maxspeed"
},
"terms": [
"max speed",
"maximum speed",
"road",
"highway"
],
"name": "Speed Limit Sign"
}
@@ -0,0 +1,18 @@
{
"icon": "maki-square-stroked",
"fields": [
"traffic_sign",
"traffic_sign/direction"
],
"geometry": [
"vertex"
],
"tags": {
"traffic_sign": "*"
},
"terms": [
"road",
"highway"
],
"name": "Traffic Sign"
}
+35
View File
@@ -6080,6 +6080,26 @@
"object_types": ["node", "way"],
"icon_url": "https://raw.githubusercontent.com/bhousel/temaki/master/icons/diamond.svg?sanitize=true"
},
{
"key": "traffic_sign",
"description": "Traffic Sign",
"object_types": ["node"],
"icon_url": "https://raw.githubusercontent.com/mapbox/maki/master/icons/square-stroked-15.svg?sanitize=true"
},
{
"key": "traffic_sign",
"value": "city_limit",
"description": "City Limit Sign",
"object_types": ["node"],
"icon_url": "https://raw.githubusercontent.com/mapbox/maki/master/icons/square-stroked-15.svg?sanitize=true"
},
{
"key": "traffic_sign",
"value": "maxspeed",
"description": "Speed Limit Sign",
"object_types": ["node"],
"icon_url": "https://raw.githubusercontent.com/mapbox/maki/master/icons/square-stroked-15.svg?sanitize=true"
},
{
"key": "type",
"value": "multipolygon",
@@ -7343,6 +7363,21 @@
{"key": "tracktype", "value": "grade4", "description": "Track Type"},
{"key": "tracktype", "value": "grade5", "description": "Track Type"},
{"key": "trade", "description": "Type"},
{
"key": "traffic_sign:direction",
"value": "forward",
"description": "Direction"
},
{
"key": "traffic_sign:direction",
"value": "backward",
"description": "Direction"
},
{
"key": "traffic_sign:direction",
"value": "both",
"description": "Direction"
},
{"key": "traffic_signals", "description": "Type"},
{
"key": "traffic_signals:direction",
+35
View File
@@ -2903,6 +2903,17 @@
"traffic_calming": {
"label": "Type"
},
"traffic_sign": {
"label": "Traffic Sign"
},
"traffic_sign/direction": {
"label": "Direction",
"options": {
"forward": "Forward",
"backward": "Backward",
"both": "Both / All"
}
},
"traffic_signals": {
"label": "Type"
},
@@ -6753,6 +6764,30 @@
"name": "Speed Table",
"terms": "flat top,hump,speed,slow"
},
"traffic_sign_vertex": {
"name": "Traffic Sign",
"terms": "road,highway"
},
"traffic_sign": {
"name": "Traffic Sign",
"terms": "road,highway"
},
"traffic_sign/city_limit_vertex": {
"name": "City Limit Sign",
"terms": "town,village,hamlet,boundary,edge,border,road,highway"
},
"traffic_sign/city_limit": {
"name": "City Limit Sign",
"terms": "town,village,hamlet,boundary,edge,border,road,highway"
},
"traffic_sign/maxspeed_vertex": {
"name": "Speed Limit Sign",
"terms": "max speed,maximum speed,road,highway"
},
"traffic_sign/maxspeed": {
"name": "Speed Limit Sign",
"terms": "max speed,maximum speed,road,highway"
},
"type/multipolygon": {
"name": "Multipolygon",
"terms": ""
+7 -1
View File
@@ -49,8 +49,14 @@ export function uiFieldMaxspeed(field, context) {
.on('change', change)
.on('blur', change);
var childNodes = context.graph().childNodes(context.entity(entity.id)),
var loc;
if (entity.type === 'node') {
loc = entity.loc;
}
else {
var childNodes = context.graph().childNodes(context.entity(entity.id));
loc = childNodes[~~(childNodes.length/2)].loc;
}
isImperial = _some(dataImperial.features, function(f) {
return _some(f.geometry.coordinates, function(d) {