Merge branch 'develop' into d3-6

This commit is contained in:
Quincy Morgan
2020-10-13 13:38:09 -04:00
19 changed files with 789 additions and 703 deletions
+5
View File
@@ -6661,6 +6661,11 @@ en:
name: Communication Tower
# 'terms: antenna,broadcast tower,cell phone tower,cell tower,communication mast,communication tower,guyed tower,mobile phone tower,radio mast,radio tower,television tower,transmission mast,transmission tower,tv tower'
terms: '<translate with synonyms or related terms for ''Communication Tower'', separated by commas>'
man_made/tower/cooling:
# 'man_made=tower, tower:type=cooling'
name: Cooling Tower
# 'terms: power plant'
terms: '<translate with synonyms or related terms for ''Cooling Tower'', separated by commas>'
man_made/tower/defensive:
# 'man_made=tower, tower:type=defensive'
name: Fortified Tower
+6 -2
View File
@@ -378,14 +378,18 @@ For combo fields, spaces are replaced with underscores in the tag value if `snak
For combo fields, case-sensitive field values are allowed if `caseSensitive` is `true`. The default is `false`.
##### `min_value`
##### `minValue`
For number fields, the lowest valid value. There is no default.
##### `max_value`
##### `maxValue`
For number fields, the greatest valid value. There is no default.
##### `increment`
For number fields, the amount the stepper control increases or decreases the value. The default is `1`.
##### `prerequisiteTag`
An object defining the tags the feature needs before this field will be displayed. It may have this property:
+2 -2
View File
@@ -131,10 +131,10 @@
"diplomatic/services": {"key": "diplomatic:services:", "type": "multiCombo", "label": "Services"},
"direction_cardinal": {"key": "direction", "type": "combo", "label": "Direction", "strings": {"options": {"N": "North", "E": "East", "S": "South", "W": "West", "NE": "Northeast", "SE": "Southeast", "SW": "Southwest", "NW": "Northwest", "NNE": "North-northeast", "ENE": "East-northeast", "ESE": "East-southeast", "SSE": "South-southeast", "SSW": "South-southwest", "WSW": "West-southwest", "WNW": "West-northwest", "NNW": "North-northwest"}}},
"direction_clock": {"key": "direction", "type": "combo", "label": "Direction", "strings": {"options": {"clockwise": "Clockwise", "anticlockwise": "Counterclockwise"}}},
"direction_point": {"key": "direction", "type": "number", "label": "Direction (Degrees Clockwise)", "placeholder": "45, 90, 180, 270", "geometry": ["point"]},
"direction_point": {"key": "direction", "type": "number", "label": "Direction (Degrees Clockwise)", "placeholder": "45, 90, 180, 270", "increment": 5, "geometry": ["point"]},
"direction_vertex_dual": {"key": "direction", "type": "combo", "label": "Direction Affected", "strings": {"options": {"forward": "Forward", "backward": "Backward"}}},
"direction_vertex": {"key": "direction", "type": "combo", "label": "Direction Affected", "strings": {"options": {"forward": "Forward", "backward": "Backward", "both": "Both / All"}}},
"direction": {"key": "direction", "type": "number", "label": "Direction (Degrees Clockwise)", "placeholder": "45, 90, 180, 270"},
"direction": {"key": "direction", "type": "number", "label": "Direction (Degrees Clockwise)", "increment": 5, "placeholder": "45, 90, 180, 270"},
"dispensing": {"key": "dispensing", "type": "check", "label": "Dispenses Prescriptions", "default": "yes"},
"display": {"key": "display", "type": "combo", "label": "Display", "options": ["analog", "digital", "sundial", "unorthodox"]},
"distance": {"key": "distance", "type": "text", "label": "Distance", "terms": ["length", "mileage"]},
+1
View File
@@ -2,5 +2,6 @@
"key": "direction",
"type": "number",
"label": "Direction (Degrees Clockwise)",
"increment": 5,
"placeholder": "45, 90, 180, 270"
}
+1
View File
@@ -3,6 +3,7 @@
"type": "number",
"label": "Direction (Degrees Clockwise)",
"placeholder": "45, 90, 180, 270",
"increment": 5,
"geometry": [
"point"
]
+2 -1
View File
@@ -808,6 +808,7 @@
"man_made/tower": {"icon": "temaki-tower", "fields": ["tower/type", "tower/construction", "height", "building_area"], "moreFields": ["architect", "gnis/feature_id"], "geometry": ["point", "area"], "tags": {"man_made": "tower"}, "name": "Tower"},
"man_made/tower/bell_tower": {"icon": "fas-bell", "moreFields": ["{man_made/tower}", "opening_hours", "opening_hours/covid19"], "geometry": ["point", "area"], "terms": ["belfry", "bell gable", "campanile", "church tower", "klockstapel"], "tags": {"man_made": "tower", "tower:type": "bell_tower"}, "reference": {"key": "tower:type", "value": "bell_tower"}, "name": "Bell Tower"},
"man_made/tower/communication": {"icon": "temaki-tower_communication", "fields": ["{man_made/tower}", "communication_multi", "mimics"], "moreFields": ["{man_made/tower}", "mimics"], "geometry": ["point", "area"], "terms": ["antenna", "broadcast tower", "cell phone tower", "cell tower", "communication mast", "communication tower", "guyed tower", "mobile phone tower", "radio mast", "radio tower", "television tower", "transmission mast", "transmission tower", "tv tower"], "tags": {"man_made": "tower", "tower:type": "communication"}, "reference": {"key": "tower:type", "value": "communication"}, "name": "Communication Tower"},
"man_made/tower/cooling": {"icon": "temaki-cooling_tower", "fields": ["ref", "operator", "material", "building_area", "height"], "moreFields": ["layer"], "geometry": ["area"], "terms": ["power plant"], "tags": {"man_made": "tower", "tower:type": "cooling"}, "reference": {"key": "tower:type", "value": "cooling"}, "name": "Cooling Tower"},
"man_made/tower/defensive": {"icon": "maki-castle", "geometry": ["point", "area"], "tags": {"man_made": "tower", "tower:type": "defensive"}, "reference": {"key": "tower:type", "value": "defensive"}, "terms": ["Defensive Tower", "Castle Tower"], "name": "Fortified Tower"},
"man_made/tower/minaret": {"icon": "temaki-domed_tower", "geometry": ["point", "area"], "terms": ["Islam", "mosque", "Muezzin", "Muslim"], "tags": {"man_made": "tower", "tower:type": "minaret"}, "reference": {"key": "tower:type", "value": "minaret"}, "name": "Minaret"},
"man_made/tower/observation": {"icon": "temaki-tower", "moreFields": ["{man_made/tower}", "opening_hours", "opening_hours/covid19"], "geometry": ["point", "area"], "terms": ["lookout tower", "fire tower"], "tags": {"man_made": "tower", "tower:type": "observation"}, "reference": {"key": "tower:type", "value": "observation"}, "name": "Observation Tower"},
@@ -1347,7 +1348,7 @@
"waterway/sanitary_dump_station": {"icon": "temaki-waste", "fields": ["name", "operator", "access_simple", "fee", "payment_multi_fee", "charge_fee", "water_point"], "moreFields": ["opening_hours", "opening_hours/covid19", "seamark/type"], "geometry": ["point", "vertex", "area"], "terms": ["Boat", "Watercraft", "Sanitary", "Dump Station", "Pumpout", "Pump out", "Elsan", "CDP", "CTDP", "Chemical Toilet"], "tags": {"waterway": "sanitary_dump_station"}, "name": "Marine Toilet Disposal"},
"waterway/stream_intermittent": {"icon": "iD-waterway-stream", "fields": ["{waterway/stream}"], "moreFields": ["{waterway/stream}"], "geometry": ["line"], "terms": ["arroyo", "beck", "branch", "brook", "burn", "course", "creek", "drift", "flood", "flow", "gully", "run", "runnel", "rush", "spate", "spritz", "tributary", "wadi", "wash", "watercourse"], "tags": {"waterway": "stream", "intermittent": "yes"}, "reference": {"key": "waterway", "value": "stream"}, "name": "Intermittent Stream"},
"waterway/stream": {"icon": "iD-waterway-stream", "fields": ["name", "structure_waterway", "width", "intermittent"], "moreFields": ["covered", "fishing", "gnis/feature_id", "salt", "tidal"], "geometry": ["line"], "terms": ["beck", "branch", "brook", "burn", "course", "creek", "current", "drift", "flood", "flow", "freshet", "race", "rill", "rindle", "rivulet", "run", "runnel", "rush", "spate", "spritz", "surge", "tide", "torrent", "tributary", "watercourse"], "tags": {"waterway": "stream"}, "name": "Stream"},
"waterway/tidal_channel": {"icon": "iD-waterway-stream", "fields": ["name", "structure_waterway", "width", "salt", "tidal", "intermittent"], "moreFields": ["covered", "fishing", "gnis/feature_id"], "geometry": ["line"], "terms": ["coastal", "pill", "intertidal", "mangroves", "marine", "salt marsh", "tidal creek", "tidal flat", "tidal inlet", "waterway"], "tags": {"waterway": "tidal_channel"}, "addTags": {"waterway": "tidal_channel", "tidal": "yes"}, "name": "Tidal Channel"},
"waterway/tidal_channel": {"icon": "iD-waterway-stream", "fields": ["name", "structure_waterway", "width", "salt", "tidal", "intermittent"], "moreFields": ["covered", "fishing", "gnis/feature_id"], "geometry": ["line"], "terms": ["coastal", "pill", "intertidal", "mangroves", "marine", "salt marsh", "tidal creek", "tidal flat", "tidal inlet", "waterway"], "tags": {"waterway": "tidal_channel"}, "name": "Tidal Channel"},
"waterway/water_point": {"icon": "maki-drinking-water", "fields": ["{amenity/water_point}"], "moreFields": ["{amenity/water_point}"], "geometry": ["point", "vertex", "area"], "tags": {"waterway": "water_point"}, "terms": ["water faucet", "water point", "water tap", "water source", "water spigot"], "name": "Marine Drinking Water"},
"waterway/waterfall": {"icon": "maki-waterfall", "fields": ["name", "height", "width", "intermittent"], "moreFields": ["gnis/feature_id"], "geometry": ["vertex"], "terms": ["fall"], "tags": {"waterway": "waterfall"}, "name": "Waterfall"},
"waterway/weir": {"icon": "maki-dam", "fields": ["name", "operator", "height", "material"], "moreFields": ["gnis/feature_id", "seamark/type"], "geometry": ["vertex", "line"], "terms": ["low-head dam", "low-rise dam", "wier"], "tags": {"waterway": "weir"}, "name": "Weir"},
@@ -0,0 +1,28 @@
{
"icon": "temaki-cooling_tower",
"fields": [
"ref",
"operator",
"material",
"building_area",
"height"
],
"moreFields": [
"layer"
],
"geometry": [
"area"
],
"terms": [
"power plant"
],
"tags": {
"man_made": "tower",
"tower:type": "cooling"
},
"reference": {
"key": "tower:type",
"value": "cooling"
},
"name": "Cooling Tower"
}
@@ -31,9 +31,5 @@
"tags": {
"waterway": "tidal_channel"
},
"addTags": {
"waterway": "tidal_channel",
"tidal": "yes"
},
"name": "Tidal Channel"
}
+5
View File
@@ -148,6 +148,11 @@
"description": "Maximum field value (number fields only)",
"type": "integer"
},
"increment": {
"description": "The amount the stepper control should add or subtract (number fields only)",
"minimum": 1,
"type": "integer"
},
"prerequisiteTag": {
"description": "Tagging constraint for showing this field in the editor",
"type": {
+1
View File
@@ -786,6 +786,7 @@
{"key": "man_made", "value": "torii", "description": "🄿 Torii", "object_types": ["node", "way"], "icon_url": "https://cdn.jsdelivr.net/gh/ideditor/temaki/icons/shinto.svg"},
{"key": "man_made", "value": "tower", "description": "🄿 Tower", "object_types": ["node", "area"], "icon_url": "https://cdn.jsdelivr.net/gh/ideditor/temaki/icons/tower.svg"},
{"key": "tower:type", "value": "bell_tower", "description": "🄿 Bell Tower", "object_types": ["node", "area"], "icon_url": "https://cdn.jsdelivr.net/gh/openstreetmap/iD@develop/svg/fontawesome/fas-bell.svg"},
{"key": "tower:type", "value": "cooling", "description": "🄿 Cooling Tower", "object_types": ["area"], "icon_url": "https://cdn.jsdelivr.net/gh/ideditor/temaki/icons/cooling_tower.svg"},
{"key": "tower:type", "value": "defensive", "description": "🄿 Fortified Tower", "object_types": ["node", "area"], "icon_url": "https://cdn.jsdelivr.net/gh/mapbox/maki/icons/castle-15.svg"},
{"key": "tower:type", "value": "minaret", "description": "🄿 Minaret", "object_types": ["node", "area"], "icon_url": "https://cdn.jsdelivr.net/gh/ideditor/temaki/icons/domed_tower.svg"},
{"key": "tower:type", "value": "observation", "description": "🄿 Observation Tower", "object_types": ["node", "area"], "icon_url": "https://cdn.jsdelivr.net/gh/ideditor/temaki/icons/tower.svg"},
+4
View File
@@ -8552,6 +8552,10 @@
"name": "Communication Tower",
"terms": "antenna,broadcast tower,cell phone tower,cell tower,communication mast,communication tower,guyed tower,mobile phone tower,radio mast,radio tower,television tower,transmission mast,transmission tower,tv tower"
},
"man_made/tower/cooling": {
"name": "Cooling Tower",
"terms": "power plant"
},
"man_made/tower/defensive": {
"name": "Fortified Tower",
"terms": "Defensive Tower,Castle Tower"
+687 -686
View File
File diff suppressed because one or more lines are too long
+34 -1
View File
@@ -120,16 +120,49 @@ export function actionSplit(nodeIds, newWayIds) {
nodesB = wayA.nodes.slice(idx);
}
var lengthA = totalLengthBetweenNodes(graph, nodesA);
var lengthB = totalLengthBetweenNodes(graph, nodesB);
if (_keepHistoryOn === 'longest' &&
totalLengthBetweenNodes(graph, nodesB) > totalLengthBetweenNodes(graph, nodesA)) {
lengthB > lengthA) {
// keep the history on the longer way, regardless of the node count
wayA = wayA.update({ nodes: nodesB });
wayB = wayB.update({ nodes: nodesA });
var temp = lengthA;
lengthA = lengthB;
lengthB = temp;
} else {
wayA = wayA.update({ nodes: nodesA });
wayB = wayB.update({ nodes: nodesB });
}
if (wayA.tags.step_count) {
// divide up the the step count proportionally between the two ways
var stepCount = parseFloat(wayA.tags.step_count);
if (stepCount &&
// ensure a number
isFinite(stepCount) &&
// ensure positive
stepCount > 0 &&
// ensure integer
Math.round(stepCount) === stepCount) {
var tagsA = Object.assign({}, wayA.tags);
var tagsB = Object.assign({}, wayB.tags);
var ratioA = lengthA / (lengthA + lengthB);
var countA = Math.round(stepCount * ratioA);
tagsA.step_count = countA.toString();
tagsB.step_count = (stepCount - countA).toString();
wayA = wayA.update({ tags: tagsA });
wayB = wayB.update({ tags: tagsB });
}
}
graph = graph.replace(wayA);
graph = graph.replace(wayB);
+1
View File
@@ -7,6 +7,7 @@ export function actionUpgradeTags(entityId, oldTags, replaceTags) {
var semiIndex;
for (var oldTagKey in oldTags) {
if (!(oldTagKey in tags)) continue;
// wildcard match
if (oldTags[oldTagKey] === '*') {
// note the value since we might need to transfer it
+1
View File
@@ -34,6 +34,7 @@ export function presetField(fieldID, field) {
_this.terms = () => _this.t('terms', { 'default': _this.originalTerms })
.toLowerCase().trim().split(/\s*,+\s*/);
_this.increment = _this.type === 'number' ? (_this.increment || 1) : undefined;
return _this;
}
+4 -2
View File
@@ -75,13 +75,15 @@ export function uiFieldText(field, context) {
input.attr('type', 'text');
var inc = field.increment;
var buttons = wrap.selectAll('.increment, .decrement')
.data(rtl ? [1, -1] : [-1, 1]);
.data(rtl ? [inc, -inc] : [-inc, inc]);
buttons.enter()
.append('button')
.attr('class', function(d) {
var which = (d === 1 ? 'increment' : 'decrement');
var which = (d > 0 ? 'increment' : 'decrement');
return 'form-field-button ' + which;
})
.merge(buttons)
+2
View File
@@ -24,6 +24,7 @@ export function uiStatus(context) {
selection
.html(t.html('osm_api_status.message.rateLimit'))
.append('a')
.attr('href', '#')
.attr('class', 'api-status-login')
.attr('target', '_blank')
.call(svgIcon('#iD-icon-out-link', 'inline'))
@@ -48,6 +49,7 @@ export function uiStatus(context) {
selection
.html(t.html('osm_api_status.message.error') + ' ')
.append('a')
.attr('href', '#')
// let the user manually retry their connection directly
.html(t.html('osm_api_status.retry'))
.on('click.retry', function(d3_event) {
+1 -1
View File
@@ -32,7 +32,7 @@ export function uiSuccess(context) {
let ociFeatures = {};
Object.values(ociResources).forEach(resource => {
const feature = loco.resolveLocationSet(resource.locationSet);
const feature = loco.resolveLocationSet(resource.locationSet).feature;
let ociFeature = ociFeatures[feature.id];
if (!ociFeature) {
ociFeature = JSON.parse(JSON.stringify(feature)); // deep clone
+4 -4
View File
@@ -42,7 +42,7 @@
},
"dependencies": {
"@ideditor/country-coder": "^3.2.0",
"@ideditor/location-conflation": "~0.3.0",
"@ideditor/location-conflation": "~0.5.0",
"@mapbox/sexagesimal": "1.2.0",
"@mapbox/togeojson": "0.16.0",
"@mapbox/vector-tile": "^1.3.1",
@@ -79,7 +79,7 @@
"@rollup/plugin-commonjs": "^15.0.0",
"@rollup/plugin-json": "^4.0.1",
"@rollup/plugin-node-resolve": "~8.1.0",
"autoprefixer": "^9.8.4",
"autoprefixer": "^10.0.1",
"btoa": "^1.2.1",
"chai": "^4.1.0",
"cldr-core": "36.0.0",
@@ -108,7 +108,7 @@
"phantomjs-prebuilt": "~2.1.11",
"postcss": "^8.1.1",
"postcss-selector-prepend": "^0.5.0",
"rollup": "~2.23.0",
"rollup": "~2.29.0",
"rollup-plugin-includepaths": "~0.2.3",
"rollup-plugin-progress": "^1.1.1",
"rollup-plugin-visualizer": "~4.1.1",
@@ -119,7 +119,7 @@
"smash": "0.0",
"static-server": "^2.2.1",
"svg-sprite": "1.5.0",
"uglify-js": "~3.10.0"
"uglify-js": "~3.11.2"
},
"engines": {
"node": ">=10"