From 86d727491d2a3e8542ebf80aaa748851510b8c03 Mon Sep 17 00:00:00 2001 From: Quincy Morgan Date: Mon, 24 Sep 2018 22:16:34 -0700 Subject: [PATCH 01/56] Adds the Lowered Kerb preset --- data/presets.yaml | 5 ++++ data/presets/presets.json | 1 + .../presets/presets/barrier/kerb/lowered.json | 27 +++++++++++++++++++ data/taginfo.json | 7 +++++ dist/locales/en.json | 4 +++ 5 files changed, 44 insertions(+) create mode 100644 data/presets/presets/barrier/kerb/lowered.json diff --git a/data/presets.yaml b/data/presets.yaml index f9649c76e..affa1aab5 100644 --- a/data/presets.yaml +++ b/data/presets.yaml @@ -2788,6 +2788,11 @@ en: # barrier=kerb name: Kerb terms: '' + barrier/kerb/lowered: + # 'barrier=kerb, kerb=lowered' + name: Lowered Kerb + # 'terms: curb cut,curb ramp,kerb ramp,dropped kerb,pram ramp' + terms: '' barrier/kissing_gate: # barrier=kissing_gate name: Kissing Gate diff --git a/data/presets/presets.json b/data/presets/presets.json index 1279817ff..682a559cd 100644 --- a/data/presets/presets.json +++ b/data/presets/presets.json @@ -201,6 +201,7 @@ "barrier/gate": {"icon": "maki-barrier", "fields": ["access"], "geometry": ["vertex", "line"], "tags": {"barrier": "gate"}, "name": "Gate"}, "barrier/hedge": {"fields": ["height"], "geometry": ["line", "area"], "tags": {"barrier": "hedge"}, "name": "Hedge", "matchScore": 0.25}, "barrier/kerb": {"icon": "maki-wheelchair", "fields": ["kerb", "tactile_paving"], "geometry": ["vertex", "line"], "tags": {"barrier": "kerb"}, "name": "Kerb"}, + "barrier/kerb/lowered": {"icon": "maki-wheelchair", "fields": ["kerb", "tactile_paving"], "geometry": ["vertex", "line"], "tags": {"barrier": "kerb", "kerb": "lowered"}, "reference": {"key": "kerb", "value": "lowered"}, "terms": ["curb cut", "curb ramp", "kerb ramp", "dropped kerb", "pram ramp"], "name": "Lowered Kerb"}, "barrier/kissing_gate": {"icon": "maki-barrier", "fields": ["access"], "geometry": ["vertex"], "tags": {"barrier": "kissing_gate"}, "name": "Kissing Gate"}, "barrier/lift_gate": {"icon": "maki-roadblock", "fields": ["access"], "geometry": ["vertex", "line"], "tags": {"barrier": "lift_gate"}, "name": "Lift Gate"}, "barrier/retaining_wall": {"fields": ["height"], "geometry": ["line", "area"], "tags": {"barrier": "retaining_wall"}, "name": "Retaining Wall"}, diff --git a/data/presets/presets/barrier/kerb/lowered.json b/data/presets/presets/barrier/kerb/lowered.json new file mode 100644 index 000000000..98a3b9a56 --- /dev/null +++ b/data/presets/presets/barrier/kerb/lowered.json @@ -0,0 +1,27 @@ +{ + "icon": "maki-wheelchair", + "fields": [ + "kerb", + "tactile_paving" + ], + "geometry": [ + "vertex", + "line" + ], + "tags": { + "barrier": "kerb", + "kerb": "lowered" + }, + "reference": { + "key": "kerb", + "value": "lowered" + }, + "terms": [ + "curb cut", + "curb ramp", + "kerb ramp", + "dropped kerb", + "pram ramp" + ], + "name": "Lowered Kerb" +} diff --git a/data/taginfo.json b/data/taginfo.json index 82ac1505c..e8b1f12e2 100644 --- a/data/taginfo.json +++ b/data/taginfo.json @@ -1367,6 +1367,13 @@ "object_types": ["node", "way"], "icon_url": "https://raw.githubusercontent.com/mapbox/maki/master/icons/wheelchair-15.svg?sanitize=true" }, + { + "key": "kerb", + "value": "lowered", + "description": "Lowered Kerb", + "object_types": ["node", "way"], + "icon_url": "https://raw.githubusercontent.com/mapbox/maki/master/icons/wheelchair-15.svg?sanitize=true" + }, { "key": "barrier", "value": "kissing_gate", diff --git a/dist/locales/en.json b/dist/locales/en.json index 568d3977e..b57e0d4b9 100644 --- a/dist/locales/en.json +++ b/dist/locales/en.json @@ -3849,6 +3849,10 @@ "name": "Kerb", "terms": "" }, + "barrier/kerb/lowered": { + "name": "Lowered Kerb", + "terms": "curb cut,curb ramp,kerb ramp,dropped kerb,pram ramp" + }, "barrier/kissing_gate": { "name": "Kissing Gate", "terms": "" From 3815342506e02783c1c3abed131212c4c5184f0a Mon Sep 17 00:00:00 2001 From: Quincy Morgan Date: Tue, 25 Sep 2018 17:40:29 -0700 Subject: [PATCH 02/56] Changes the capitalization of the Tree Row preset name from "Tree row" to "Tree Row" --- data/presets.yaml | 4 ++-- data/presets/presets.json | 2 +- data/presets/presets/natural/tree_row.json | 2 +- data/taginfo.json | 2 +- dist/locales/en.json | 2 +- 5 files changed, 6 insertions(+), 6 deletions(-) diff --git a/data/presets.yaml b/data/presets.yaml index f9649c76e..34dd09057 100644 --- a/data/presets.yaml +++ b/data/presets.yaml @@ -4563,8 +4563,8 @@ en: terms: '' natural/tree_row: # natural=tree_row - name: Tree row - terms: '' + name: Tree Row + terms: '' natural/volcano: # natural=volcano name: Volcano diff --git a/data/presets/presets.json b/data/presets/presets.json index 1279817ff..8b8f6ec6c 100644 --- a/data/presets/presets.json +++ b/data/presets/presets.json @@ -593,7 +593,7 @@ "natural/scree": {"geometry": ["area"], "tags": {"natural": "scree"}, "terms": ["loose rocks"], "name": "Scree"}, "natural/scrub": {"geometry": ["area"], "tags": {"natural": "scrub"}, "terms": ["bush", "shrubs"], "name": "Scrub"}, "natural/spring": {"icon": "maki-water", "fields": ["name", "intermittent"], "geometry": ["point", "vertex"], "tags": {"natural": "spring"}, "terms": [], "name": "Spring"}, - "natural/tree_row": {"icon": "maki-park", "fields": ["leaf_type", "leaf_cycle", "denotation"], "geometry": ["line"], "tags": {"natural": "tree_row"}, "terms": [], "name": "Tree row"}, + "natural/tree_row": {"icon": "maki-park", "fields": ["leaf_type", "leaf_cycle", "denotation"], "geometry": ["line"], "tags": {"natural": "tree_row"}, "terms": [], "name": "Tree Row"}, "natural/tree": {"icon": "maki-park", "fields": ["leaf_type_singular", "leaf_cycle_singular", "denotation"], "geometry": ["point", "vertex"], "tags": {"natural": "tree"}, "terms": [], "name": "Tree"}, "natural/volcano": {"icon": "maki-volcano", "fields": ["name", "elevation", "volcano/status", "volcano/type"], "geometry": ["point", "vertex"], "tags": {"natural": "volcano"}, "terms": ["mountain", "crater"], "name": "Volcano"}, "natural/water": {"icon": "maki-water", "fields": ["water"], "geometry": ["area"], "tags": {"natural": "water"}, "name": "Water"}, diff --git a/data/presets/presets/natural/tree_row.json b/data/presets/presets/natural/tree_row.json index 9d14f6618..8b1bb1f6e 100644 --- a/data/presets/presets/natural/tree_row.json +++ b/data/presets/presets/natural/tree_row.json @@ -12,5 +12,5 @@ "natural": "tree_row" }, "terms": [], - "name": "Tree row" + "name": "Tree Row" } diff --git a/data/taginfo.json b/data/taginfo.json index 82ac1505c..f2b65942c 100644 --- a/data/taginfo.json +++ b/data/taginfo.json @@ -3990,7 +3990,7 @@ { "key": "natural", "value": "tree_row", - "description": "Tree row", + "description": "Tree Row", "object_types": ["way"], "icon_url": "https://raw.githubusercontent.com/mapbox/maki/master/icons/park-15.svg?sanitize=true" }, diff --git a/dist/locales/en.json b/dist/locales/en.json index 568d3977e..a301d9183 100644 --- a/dist/locales/en.json +++ b/dist/locales/en.json @@ -5418,7 +5418,7 @@ "terms": "" }, "natural/tree_row": { - "name": "Tree row", + "name": "Tree Row", "terms": "" }, "natural/tree": { From cd8be8b5b449fa77a55e2fa4f314f19fb1810144 Mon Sep 17 00:00:00 2001 From: Quincy Morgan Date: Wed, 26 Sep 2018 19:35:44 -0700 Subject: [PATCH 03/56] Adds presets for Traffic Sign, Speed Limit Sign, and City Limit Sign, each with point/vertex variants to account for different direction fields Makes the maxspeed field compatible with node entities --- data/presets.yaml | 33 +++++++++++++++++++ data/presets/fields.json | 1 + data/presets/fields/traffic_sign.json | 5 +++ data/presets/presets.json | 6 ++++ data/presets/presets/traffic_sign.json | 18 ++++++++++ .../presets/traffic_sign/city_limit.json | 25 ++++++++++++++ .../traffic_sign/city_limit_vertex.json | 25 ++++++++++++++ .../presets/traffic_sign/maxspeed.json | 21 ++++++++++++ .../presets/traffic_sign/maxspeed_vertex.json | 21 ++++++++++++ data/presets/presets/traffic_sign_vertex.json | 18 ++++++++++ data/taginfo.json | 20 +++++++++++ dist/locales/en.json | 27 +++++++++++++++ modules/ui/fields/maxspeed.js | 8 ++++- 13 files changed, 227 insertions(+), 1 deletion(-) create mode 100644 data/presets/fields/traffic_sign.json create mode 100644 data/presets/presets/traffic_sign.json create mode 100644 data/presets/presets/traffic_sign/city_limit.json create mode 100644 data/presets/presets/traffic_sign/city_limit_vertex.json create mode 100644 data/presets/presets/traffic_sign/maxspeed.json create mode 100644 data/presets/presets/traffic_sign/maxspeed_vertex.json create mode 100644 data/presets/presets/traffic_sign_vertex.json diff --git a/data/presets.yaml b/data/presets.yaml index f9649c76e..934fa7784 100644 --- a/data/presets.yaml +++ b/data/presets.yaml @@ -1730,6 +1730,9 @@ en: traffic_calming: # traffic_calming=* label: Type + traffic_sign: + # traffic_sign=* + label: Traffic Sign traffic_signals: # traffic_signals=* label: Type @@ -6079,6 +6082,36 @@ en: name: Speed Table # 'terms: flat top,hump,speed,slow' terms: '' + traffic_sign: + # traffic_sign=* + name: Traffic Sign + # 'terms: road,highway' + terms: '' + traffic_sign/city_limit: + # traffic_sign=city_limit + name: City Limit Sign + # 'terms: town,village,hamlet,boundary,edge,border,road,highway' + terms: '' + traffic_sign/city_limit_vertex: + # traffic_sign=city_limit + name: City Limit Sign + # 'terms: town,village,hamlet,boundary,edge,border,road,highway' + terms: '' + traffic_sign/maxspeed: + # traffic_sign=maxspeed + name: Speed Limit Sign + # 'terms: max speed,maximum speed,road,highway' + terms: '' + traffic_sign/maxspeed_vertex: + # traffic_sign=maxspeed + name: Speed Limit Sign + # 'terms: max speed,maximum speed,road,highway' + terms: '' + traffic_sign_vertex: + # traffic_sign=* + name: Traffic Sign + # 'terms: road,highway' + terms: '' type/boundary: # type=boundary name: Boundary diff --git a/data/presets/fields.json b/data/presets/fields.json index 4a809e965..db1fd4660 100644 --- a/data/presets/fields.json +++ b/data/presets/fields.json @@ -301,6 +301,7 @@ "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_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"}}}, diff --git a/data/presets/fields/traffic_sign.json b/data/presets/fields/traffic_sign.json new file mode 100644 index 000000000..99b255e55 --- /dev/null +++ b/data/presets/fields/traffic_sign.json @@ -0,0 +1,5 @@ +{ + "key": "traffic_sign", + "type": "typeCombo", + "label": "Traffic Sign" +} diff --git a/data/presets/presets.json b/data/presets/presets.json index 1279817ff..de376a149 100644 --- a/data/presets/presets.json +++ b/data/presets/presets.json @@ -926,6 +926,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", "direction_vertex"], "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", "direction_vertex", "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", "direction_vertex", "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"}, diff --git a/data/presets/presets/traffic_sign.json b/data/presets/presets/traffic_sign.json new file mode 100644 index 000000000..444e77e13 --- /dev/null +++ b/data/presets/presets/traffic_sign.json @@ -0,0 +1,18 @@ +{ + "icon": "maki-square-stroked", + "fields": [ + "traffic_sign", + "direction" + ], + "geometry": [ + "point" + ], + "tags": { + "traffic_sign": "*" + }, + "terms": [ + "road", + "highway" + ], + "name": "Traffic Sign" +} diff --git a/data/presets/presets/traffic_sign/city_limit.json b/data/presets/presets/traffic_sign/city_limit.json new file mode 100644 index 000000000..bf32228f6 --- /dev/null +++ b/data/presets/presets/traffic_sign/city_limit.json @@ -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" +} diff --git a/data/presets/presets/traffic_sign/city_limit_vertex.json b/data/presets/presets/traffic_sign/city_limit_vertex.json new file mode 100644 index 000000000..89984f740 --- /dev/null +++ b/data/presets/presets/traffic_sign/city_limit_vertex.json @@ -0,0 +1,25 @@ +{ + "icon": "maki-square-stroked", + "fields": [ + "traffic_sign", + "direction_vertex", + "name" + ], + "geometry": [ + "vertex" + ], + "tags": { + "traffic_sign": "city_limit" + }, + "terms": [ + "town", + "village", + "hamlet", + "boundary", + "edge", + "border", + "road", + "highway" + ], + "name": "City Limit Sign" +} diff --git a/data/presets/presets/traffic_sign/maxspeed.json b/data/presets/presets/traffic_sign/maxspeed.json new file mode 100644 index 000000000..1845a779d --- /dev/null +++ b/data/presets/presets/traffic_sign/maxspeed.json @@ -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" +} diff --git a/data/presets/presets/traffic_sign/maxspeed_vertex.json b/data/presets/presets/traffic_sign/maxspeed_vertex.json new file mode 100644 index 000000000..ecc5cb71b --- /dev/null +++ b/data/presets/presets/traffic_sign/maxspeed_vertex.json @@ -0,0 +1,21 @@ +{ + "icon": "maki-square-stroked", + "fields": [ + "traffic_sign", + "direction_vertex", + "maxspeed" + ], + "geometry": [ + "vertex" + ], + "tags": { + "traffic_sign": "maxspeed" + }, + "terms": [ + "max speed", + "maximum speed", + "road", + "highway" + ], + "name": "Speed Limit Sign" +} diff --git a/data/presets/presets/traffic_sign_vertex.json b/data/presets/presets/traffic_sign_vertex.json new file mode 100644 index 000000000..8c1841a40 --- /dev/null +++ b/data/presets/presets/traffic_sign_vertex.json @@ -0,0 +1,18 @@ +{ + "icon": "maki-square-stroked", + "fields": [ + "traffic_sign", + "direction_vertex" + ], + "geometry": [ + "vertex" + ], + "tags": { + "traffic_sign": "*" + }, + "terms": [ + "road", + "highway" + ], + "name": "Traffic Sign" +} diff --git a/data/taginfo.json b/data/taginfo.json index 82ac1505c..eadb71c0f 100644 --- a/data/taginfo.json +++ b/data/taginfo.json @@ -6073,6 +6073,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", diff --git a/dist/locales/en.json b/dist/locales/en.json index 568d3977e..153ff053c 100644 --- a/dist/locales/en.json +++ b/dist/locales/en.json @@ -2903,6 +2903,9 @@ "traffic_calming": { "label": "Type" }, + "traffic_sign": { + "label": "Traffic Sign" + }, "traffic_signals": { "label": "Type" }, @@ -6749,6 +6752,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": "" diff --git a/modules/ui/fields/maxspeed.js b/modules/ui/fields/maxspeed.js index fb0e5c2ed..92f9ef7c1 100644 --- a/modules/ui/fields/maxspeed.js +++ b/modules/ui/fields/maxspeed.js @@ -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) { From 73c471c6124e8ef0c7f13fbe0d044c9ad4cb4b16 Mon Sep 17 00:00:00 2001 From: Quincy Morgan Date: Thu, 27 Sep 2018 17:08:31 -0700 Subject: [PATCH 04/56] Adds the traffic_sign/direction field Replaces the direction_vertex field in the vertex Traffic Sign presets with the traffic_sign/direction field --- data/presets.yaml | 10 ++++++++++ data/presets/fields.json | 1 + data/presets/fields/traffic_sign/direction.json | 12 ++++++++++++ data/presets/presets.json | 6 +++--- .../presets/traffic_sign/city_limit_vertex.json | 2 +- .../presets/traffic_sign/maxspeed_vertex.json | 2 +- data/presets/presets/traffic_sign_vertex.json | 2 +- data/taginfo.json | 15 +++++++++++++++ dist/locales/en.json | 8 ++++++++ 9 files changed, 52 insertions(+), 6 deletions(-) create mode 100644 data/presets/fields/traffic_sign/direction.json diff --git a/data/presets.yaml b/data/presets.yaml index 934fa7784..1780a064e 100644 --- a/data/presets.yaml +++ b/data/presets.yaml @@ -1733,6 +1733,16 @@ en: 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 diff --git a/data/presets/fields.json b/data/presets/fields.json index db1fd4660..aeb7fc9da 100644 --- a/data/presets/fields.json +++ b/data/presets/fields.json @@ -302,6 +302,7 @@ "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"}}}, diff --git a/data/presets/fields/traffic_sign/direction.json b/data/presets/fields/traffic_sign/direction.json new file mode 100644 index 000000000..8b5ab49a5 --- /dev/null +++ b/data/presets/fields/traffic_sign/direction.json @@ -0,0 +1,12 @@ +{ + "key": "traffic_sign:direction", + "type": "combo", + "label": "Direction", + "strings": { + "options": { + "forward": "Forward", + "backward": "Backward", + "both": "Both / All" + } + } +} diff --git a/data/presets/presets.json b/data/presets/presets.json index de376a149..17c47a991 100644 --- a/data/presets/presets.json +++ b/data/presets/presets.json @@ -926,11 +926,11 @@ "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", "direction_vertex"], "geometry": ["vertex"], "tags": {"traffic_sign": "*"}, "terms": ["road", "highway"], "name": "Traffic Sign"}, + "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", "direction_vertex", "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_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", "direction_vertex", "maxspeed"], "geometry": ["vertex"], "tags": {"traffic_sign": "maxspeed"}, "terms": ["max speed", "maximum speed", "road", "highway"], "name": "Speed 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"}, diff --git a/data/presets/presets/traffic_sign/city_limit_vertex.json b/data/presets/presets/traffic_sign/city_limit_vertex.json index 89984f740..11c71e054 100644 --- a/data/presets/presets/traffic_sign/city_limit_vertex.json +++ b/data/presets/presets/traffic_sign/city_limit_vertex.json @@ -2,7 +2,7 @@ "icon": "maki-square-stroked", "fields": [ "traffic_sign", - "direction_vertex", + "traffic_sign/direction", "name" ], "geometry": [ diff --git a/data/presets/presets/traffic_sign/maxspeed_vertex.json b/data/presets/presets/traffic_sign/maxspeed_vertex.json index ecc5cb71b..667d3c7d9 100644 --- a/data/presets/presets/traffic_sign/maxspeed_vertex.json +++ b/data/presets/presets/traffic_sign/maxspeed_vertex.json @@ -2,7 +2,7 @@ "icon": "maki-square-stroked", "fields": [ "traffic_sign", - "direction_vertex", + "traffic_sign/direction", "maxspeed" ], "geometry": [ diff --git a/data/presets/presets/traffic_sign_vertex.json b/data/presets/presets/traffic_sign_vertex.json index 8c1841a40..67edd21d8 100644 --- a/data/presets/presets/traffic_sign_vertex.json +++ b/data/presets/presets/traffic_sign_vertex.json @@ -2,7 +2,7 @@ "icon": "maki-square-stroked", "fields": [ "traffic_sign", - "direction_vertex" + "traffic_sign/direction" ], "geometry": [ "vertex" diff --git a/data/taginfo.json b/data/taginfo.json index eadb71c0f..98f84a59c 100644 --- a/data/taginfo.json +++ b/data/taginfo.json @@ -7356,6 +7356,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", diff --git a/dist/locales/en.json b/dist/locales/en.json index 153ff053c..b28d499ad 100644 --- a/dist/locales/en.json +++ b/dist/locales/en.json @@ -2906,6 +2906,14 @@ "traffic_sign": { "label": "Traffic Sign" }, + "traffic_sign/direction": { + "label": "Direction", + "options": { + "forward": "Forward", + "backward": "Backward", + "both": "Both / All" + } + }, "traffic_signals": { "label": "Type" }, From f3f0aa1f4607cdc9e91685e8660cfa551ba9d56e Mon Sep 17 00:00:00 2001 From: "greenkeeper[bot]" Date: Wed, 26 Sep 2018 14:42:13 +0000 Subject: [PATCH 05/56] fix(package): update marked to version 0.5.1 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 97fe96919..3c267e3f4 100644 --- a/package.json +++ b/package.json @@ -38,7 +38,7 @@ "diacritics": "1.3.0", "fast-json-stable-stringify": "2.0.0", "lodash-es": "4.17.11", - "marked": "0.5.0", + "marked": "0.5.1", "martinez-polygon-clipping": "0.5.0", "node-diff3": "1.0.0", "osm-auth": "1.0.2", From 8df3acc085cb861266e001cbee3010a87aff926f Mon Sep 17 00:00:00 2001 From: Tobias Date: Sat, 29 Sep 2018 16:51:35 +0200 Subject: [PATCH 06/56] changelog: fix typo I guess https://github.com/openstreetmap/iD/search?q=embarkment&type=Code is a typo, since the preset is https://github.com/openstreetmap/iD/blob/master/data/presets/presets/embankment.json and the wiki page as well https://wiki.openstreetmap.org/wiki/DE:Key:embankment --- CHANGELOG.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index ad6c2d608..fcf63d129 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2954,7 +2954,7 @@ _Map traffic signals, stop signs, benches, crossings, street lamps, fountains, t * Trim tag keys, and prevent duplicate tag keys (#2043) * Fix inline tag help for fields that handle multiple tags * Add 'width', 'length', 'lit' for appropriate presets (cycleways, sidewalks, sports pitch, etc) -* Render embarkment/cutting with dashed casing +* Render embankment/cutting with dashed casing * Rendering fixes for buildings, tunnels * Add population field for various place presets * Improvements to circularize action (#2194) From 84ceed809e98ee5cea8b0929da56b7589d8c306d Mon Sep 17 00:00:00 2001 From: Sally Hale Date: Sun, 30 Sep 2018 18:27:09 +0100 Subject: [PATCH 07/56] Changed Baseball Diamond to Baseball Field, left Diamond in the search terms, added field to serch terms --- data/presets.yaml | 4 ++-- data/presets/presets.json | 1 + data/presets/presets/leisure/pitch/baseball.json | 2 +- data/taginfo.json | 2 +- dist/locales/en-GB.json | 2 +- dist/locales/en.json | 2 +- dist/locales/pt.json | 2 +- dist/locales/uk.json | 2 +- dist/locales/yue.json | 2 +- dist/locales/zh-HK.json | 2 +- 10 files changed, 11 insertions(+), 10 deletions(-) diff --git a/data/presets.yaml b/data/presets.yaml index e7875d38c..a0b49d869 100644 --- a/data/presets.yaml +++ b/data/presets.yaml @@ -4190,8 +4190,8 @@ en: terms: '' leisure/pitch/baseball: # 'leisure=pitch, sport=baseball' - name: Baseball Diamond - terms: '' + name: Baseball Field + terms: '' leisure/pitch/basketball: # 'leisure=pitch, sport=basketball' name: Basketball Court diff --git a/data/presets/presets.json b/data/presets/presets.json index f027b0342..d11604c03 100644 --- a/data/presets/presets.json +++ b/data/presets/presets.json @@ -510,6 +510,7 @@ "leisure/pitch/american_football": {"icon": "maki-america-football", "fields": ["name", "surface", "lit"], "geometry": ["point", "area"], "tags": {"leisure": "pitch", "sport": "american_football"}, "reference": {"key": "sport", "value": "american_football"}, "terms": [], "name": "American Football Field"}, "leisure/pitch/badminton": {"icon": "maki-tennis", "fields": ["name", "surface", "lit", "access_simple"], "geometry": ["point", "area"], "tags": {"leisure": "pitch", "sport": "badminton"}, "reference": {"key": "sport", "value": "badminton"}, "terms": [], "name": "Badminton Court"}, "leisure/pitch/baseball": {"icon": "maki-baseball", "fields": ["name", "lit"], "geometry": ["point", "area"], "tags": {"leisure": "pitch", "sport": "baseball"}, "reference": {"key": "sport", "value": "baseball"}, "terms": [], "name": "Baseball Diamond"}, + "leisure/pitch/baseball": {"icon": "maki-baseball", "fields": ["name", "lit"], "geometry": ["point", "area"], "tags": {"leisure": "pitch", "sport": "baseball"}, "reference": {"key": "sport", "value": "baseball"}, "terms": [], "name": "Baseball Field"}, "leisure/pitch/basketball": {"icon": "maki-basketball", "fields": ["name", "surface", "hoops", "lit", "access_simple"], "geometry": ["point", "area"], "tags": {"leisure": "pitch", "sport": "basketball"}, "reference": {"key": "sport", "value": "basketball"}, "terms": [], "name": "Basketball Court"}, "leisure/pitch/beachvolleyball": {"icon": "maki-basketball", "fields": ["name", "surface", "lit"], "geometry": ["point", "area"], "tags": {"leisure": "pitch", "sport": "beachvolleyball"}, "addTags": {"leisure": "pitch", "sport": "beachvolleyball", "surface": "sand"}, "removeTags": {"leisure": "pitch", "sport": "beachvolleyball", "surface": "sand"}, "reference": {"key": "sport", "value": "beachvolleyball"}, "terms": ["volleyball"], "name": "Beach Volleyball Court"}, "leisure/pitch/boules": {"icon": "maki-pitch", "fields": ["name", "boules", "surface", "lit"], "geometry": ["point", "area"], "tags": {"leisure": "pitch", "sport": "boules"}, "reference": {"key": "sport", "value": "boules"}, "terms": ["bocce", "lyonnaise", "pétanque"], "name": "Boules/Bocce Court"}, diff --git a/data/presets/presets/leisure/pitch/baseball.json b/data/presets/presets/leisure/pitch/baseball.json index aa36e6b63..0f38eb520 100644 --- a/data/presets/presets/leisure/pitch/baseball.json +++ b/data/presets/presets/leisure/pitch/baseball.json @@ -17,5 +17,5 @@ "value": "baseball" }, "terms": [], - "name": "Baseball Diamond" + "name": "Baseball Field" } diff --git a/data/taginfo.json b/data/taginfo.json index 3190e9d4e..cf1790704 100644 --- a/data/taginfo.json +++ b/data/taginfo.json @@ -3433,7 +3433,7 @@ { "key": "sport", "value": "baseball", - "description": "Baseball Diamond", + "description": "Baseball Field", "object_types": ["node", "area"], "icon_url": "https://raw.githubusercontent.com/mapbox/maki/master/icons/baseball-15.svg?sanitize=true" }, diff --git a/dist/locales/en-GB.json b/dist/locales/en-GB.json index b0107b5da..de2770100 100644 --- a/dist/locales/en-GB.json +++ b/dist/locales/en-GB.json @@ -4258,7 +4258,7 @@ "name": "American Football Field" }, "leisure/pitch/baseball": { - "name": "Baseball Diamond" + "name": "Baseball Field" }, "leisure/pitch/basketball": { "name": "Basketball Court" diff --git a/dist/locales/en.json b/dist/locales/en.json index c8c1b2ff3..ed7d0202c 100644 --- a/dist/locales/en.json +++ b/dist/locales/en.json @@ -5093,7 +5093,7 @@ "terms": "" }, "leisure/pitch/baseball": { - "name": "Baseball Diamond", + "name": "Baseball Field", "terms": "" }, "leisure/pitch/basketball": { diff --git a/dist/locales/pt.json b/dist/locales/pt.json index 51ca5b503..98d0cbd87 100644 --- a/dist/locales/pt.json +++ b/dist/locales/pt.json @@ -4661,7 +4661,7 @@ }, "leisure/pitch/baseball": { "name": "Campo de basebol", - "terms": "Baisebol, Beisebol, Baizebol, Beizebol, Baseball Diamond" + "terms": "Baisebol, Beisebol, Baizebol, Beizebol, Baseball Field" }, "leisure/pitch/basketball": { "name": "Campo de basquetebol", diff --git a/dist/locales/uk.json b/dist/locales/uk.json index 5ab7b7356..4b941dc83 100644 --- a/dist/locales/uk.json +++ b/dist/locales/uk.json @@ -4855,7 +4855,7 @@ }, "leisure/pitch/baseball": { "name": "Бейсбольний майданчик", - "terms": "Baseball Diamond, tqcjkmybq vfqlfyxbr, бейсбольний майданчик, бейсбол" + "terms": "Baseball Field, tqcjkmybq vfqlfyxbr, бейсбольний майданчик, бейсбол" }, "leisure/pitch/basketball": { "name": "Баскетбольний майданчик", diff --git a/dist/locales/yue.json b/dist/locales/yue.json index ecbe25766..8c8a123fb 100644 --- a/dist/locales/yue.json +++ b/dist/locales/yue.json @@ -2345,7 +2345,7 @@ }, "leisure/pitch/baseball": { "name": "棒球場", - "terms": "Baseball Diamond,棒球場" + "terms": "Baseball Field,棒球場" }, "leisure/pitch/basketball": { "name": "籃球場", diff --git a/dist/locales/zh-HK.json b/dist/locales/zh-HK.json index 50b0c6a4f..248bc37f4 100644 --- a/dist/locales/zh-HK.json +++ b/dist/locales/zh-HK.json @@ -4165,7 +4165,7 @@ }, "leisure/pitch/baseball": { "name": "棒球場", - "terms": "Baseball Diamond,棒球場" + "terms": "Baseball Field,棒球場" }, "leisure/pitch/basketball": { "name": "籃球場", From 4cc4825a0cf1d1e4a27c9288f6a47bd1da98eaee Mon Sep 17 00:00:00 2001 From: programistka Date: Sun, 30 Sep 2018 20:48:05 +0200 Subject: [PATCH 08/56] Add Multilevel Car Parking preset --- .../presets/amenity/parking/multi-storey.json | 34 +++++++++++++++++++ 1 file changed, 34 insertions(+) create mode 100644 data/presets/presets/amenity/parking/multi-storey.json diff --git a/data/presets/presets/amenity/parking/multi-storey.json b/data/presets/presets/amenity/parking/multi-storey.json new file mode 100644 index 000000000..6e1fd256a --- /dev/null +++ b/data/presets/presets/amenity/parking/multi-storey.json @@ -0,0 +1,34 @@ +{ + "icon": "maki-parking-garage", + "fields": ["name", "building", "levels", "height", "address"], + "geometry": ["area"], + "terms": [ + "multistorey car park", + "parking garage", + "parkade", + "parking structure", + "parking ramp", + "parking deck", + "parking building", + "indoor parking" + ], + "tags": { + "amenity": "parking", + "parking": "multi-storey" + }, + "addTags": { + "building": "parking", + "amenity": "parking", + "parking": "multi-storey" + }, + "removeTags": { + "building": "parking", + "amenity": "parking", + "parking": "multi-storey" + }, + "reference": { + "key": "parking", + "value": "multi-storey" + }, + "name": "Multilevel Car Parking" +} From 7c0fd1a76f7f2428f57640f4b3357d24ac7d242e Mon Sep 17 00:00:00 2001 From: Storm Heg Date: Sun, 30 Sep 2018 21:11:27 +0200 Subject: [PATCH 09/56] Add Carport preset --- data/presets/presets/building/carport.json | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100644 data/presets/presets/building/carport.json diff --git a/data/presets/presets/building/carport.json b/data/presets/presets/building/carport.json new file mode 100644 index 000000000..06aa5a79c --- /dev/null +++ b/data/presets/presets/building/carport.json @@ -0,0 +1,21 @@ +{ + "icon": "fas-warehouse", + "fields": [ + "height", + "capacity" + ], + "geometry": [ + "area" + ], + "tags": { + "building": "carport" + }, + "matchScore": 0.5, + "terms": [ + "covered parking space", + "garage", + "car", + "porch" + ], + "name": "Carport" +} From b209a79bad52ee996c0c6fdde779e4e3e541150d Mon Sep 17 00:00:00 2001 From: programistka Date: Sun, 30 Sep 2018 21:24:47 +0200 Subject: [PATCH 10/56] Other settings --- data/presets.yaml | 5 +++++ data/presets/presets.json | 1 + data/taginfo.json | 8 +++++++- dist/locales/en.json | 32 ++++++++++++++++++++++++++++++++ 4 files changed, 45 insertions(+), 1 deletion(-) diff --git a/data/presets.yaml b/data/presets.yaml index e7875d38c..9d4e5c868 100644 --- a/data/presets.yaml +++ b/data/presets.yaml @@ -2325,6 +2325,11 @@ en: # amenity=parking name: Car Parking terms: '' + amenity/parking/multi-storey: + # 'amenity=parking, parking=multi-storey' + name: Multilevel Car Parking + # 'terms: multistorey car park,parking garage,parkade,parking structure,parking ramp,parking deck,parking building,indoor parking' + terms: '' amenity/parking_entrance: # amenity=parking_entrance name: Parking Garage Entrance/Exit diff --git a/data/presets/presets.json b/data/presets/presets.json index f027b0342..a7c9171dd 100644 --- a/data/presets/presets.json +++ b/data/presets/presets.json @@ -104,6 +104,7 @@ "amenity/parking_entrance": {"icon": "maki-entrance-alt1", "fields": ["access_simple", "ref"], "geometry": ["vertex"], "tags": {"amenity": "parking_entrance"}, "name": "Parking Garage Entrance/Exit"}, "amenity/parking_space": {"fields": ["capacity"], "geometry": ["point", "vertex", "area"], "terms": [], "tags": {"amenity": "parking_space"}, "matchScore": 0.95, "name": "Parking Space"}, "amenity/parking": {"icon": "maki-parking", "fields": ["name", "operator", "parking", "capacity", "fee", "access_simple", "supervised", "park_ride", "surface", "maxstay"], "geometry": ["point", "vertex", "area"], "tags": {"amenity": "parking"}, "terms": [], "name": "Car Parking"}, + "amenity/parking/multi-storey": {"icon": "maki-parking-garage", "fields": ["name", "building", "levels", "height", "address"], "geometry": ["area"], "terms": ["multistorey car park", "parking garage", "parkade", "parking structure", "parking ramp", "parking deck", "parking building", "indoor parking"], "tags": {"amenity": "parking", "parking": "multi-storey"}, "addTags": {"building": "parking", "amenity": "parking", "parking": "multi-storey"}, "removeTags": {"building": "parking", "amenity": "parking", "parking": "multi-storey"}, "reference": {"key": "parking", "value": "multi-storey"}, "name": "Multilevel Car Parking"}, "amenity/pharmacy": {"icon": "maki-pharmacy", "fields": ["name", "operator", "address", "building_area", "drive_through", "opening_hours", "payment_multi", "dispensing"], "geometry": ["point", "area"], "tags": {"amenity": "pharmacy"}, "addTags": {"amenity": "pharmacy", "healthcare": "pharmacy"}, "removeTags": {"amenity": "pharmacy", "healthcare": "pharmacy"}, "reference": {"key": "amenity", "value": "pharmacy"}, "terms": ["apothecary", "drug*", "med*", "prescription"], "name": "Pharmacy"}, "amenity/place_of_worship": {"icon": "maki-place-of-worship", "fields": ["name", "religion", "denomination", "address", "building_area", "service_times"], "geometry": ["point", "area"], "terms": ["abbey", "basilica", "bethel", "cathedral", "chancel", "chantry", "chapel", "church", "fold", "house of God", "house of prayer", "house of worship", "minster", "mission", "mosque", "oratory", "parish", "sacellum", "sanctuary", "shrine", "synagogue", "tabernacle", "temple"], "tags": {"amenity": "place_of_worship"}, "name": "Place of Worship"}, "amenity/place_of_worship/buddhist": {"icon": "maki-buddhism", "fields": ["name", "denomination", "building_area", "address", "service_times"], "geometry": ["point", "area"], "terms": ["stupa", "vihara", "monastery", "temple", "pagoda", "zendo", "dojo"], "tags": {"amenity": "place_of_worship", "religion": "buddhist"}, "reference": {"key": "amenity", "value": "place_of_worship"}, "name": "Buddhist Temple"}, diff --git a/data/taginfo.json b/data/taginfo.json index 3190e9d4e..aa7bd4c1a 100644 --- a/data/taginfo.json +++ b/data/taginfo.json @@ -700,6 +700,13 @@ "object_types": ["node", "area"], "icon_url": "https://raw.githubusercontent.com/mapbox/maki/master/icons/parking-15.svg?sanitize=true" }, + { + "key": "parking", + "value": "multi-storey", + "description": "Multilevel Car Parking, Type", + "object_types": ["area"], + "icon_url": "https://raw.githubusercontent.com/mapbox/maki/master/icons/parking-garage-15.svg?sanitize=true" + }, { "key": "amenity", "value": "pharmacy", @@ -6951,7 +6958,6 @@ {"key": "par", "description": "Par"}, {"key": "park_ride", "description": "Park and Ride"}, {"key": "parking", "value": "surface", "description": "Type"}, - {"key": "parking", "value": "multi-storey", "description": "Type"}, {"key": "parking", "value": "underground", "description": "Type"}, {"key": "parking", "value": "sheds", "description": "Type"}, {"key": "parking", "value": "carports", "description": "Type"}, diff --git a/dist/locales/en.json b/dist/locales/en.json index c8c1b2ff3..a0d0447e4 100644 --- a/dist/locales/en.json +++ b/dist/locales/en.json @@ -3472,6 +3472,10 @@ "name": "Car Parking", "terms": "" }, + "amenity/parking/multi-storey": { + "name": "Multilevel Car Parking", + "terms": "multistorey car park,parking garage,parkade,parking structure,parking ramp,parking deck,parking building,indoor parking" + }, "amenity/pharmacy": { "name": "Pharmacy", "terms": "apothecary,drug*,med*,prescription" @@ -7192,6 +7196,34 @@ "description": "Orthofoto layer provided by basemap.at. \"Successor\" of geoimage.at imagery.", "name": "basemap.at Orthofoto" }, + "eufar-balaton": { + "attribution": { + "text": "EUFAR Balaton ortofotó 2010" + }, + "description": "1940 geo-tagged photography from Balaton Limnological Institute.", + "name": "EUFAR Balaton orthophotos" + }, + "finds.jp_KBN_2500": { + "attribution": { + "text": "GSI KIBAN 2500" + }, + "description": "GSI Kiban 2500 via finds.jp. Good for tracing, but a bit older.", + "name": "Japan GSI KIBAN 2500" + }, + "gsi.go.jp": { + "attribution": { + "text": "GSI Japan" + }, + "description": "Japan GSI ortho Imagery. Usually better than bing, but a bit older.", + "name": "Japan GSI ortho Imagery" + }, + "gsi.go.jp_std_map": { + "attribution": { + "text": "GSI Japan" + }, + "description": "Japan GSI Standard Map. Widely covered.", + "name": "Japan GSI Standard Map" + }, "hike_n_bike": { "attribution": { "text": "© OpenStreetMap contributors" From 406a3b4869534d94cb6f2acf84300af1d33e61e9 Mon Sep 17 00:00:00 2001 From: programistka Date: Sun, 30 Sep 2018 21:33:34 +0200 Subject: [PATCH 11/56] Add Picnic Shelter preset --- data/presets.yaml | 5 +++ data/presets/presets.json | 1 + .../amenity/shelter/picnic_shelter.json | 15 +++++++++ data/taginfo.json | 7 ++++ dist/locales/en.json | 32 +++++++++++++++++++ 5 files changed, 60 insertions(+) create mode 100644 data/presets/presets/amenity/shelter/picnic_shelter.json diff --git a/data/presets.yaml b/data/presets.yaml index e7875d38c..c9869f28d 100644 --- a/data/presets.yaml +++ b/data/presets.yaml @@ -2472,6 +2472,11 @@ en: # 'amenity=shelter, shelter_type=lean_to' name: Lean-To terms: '' + amenity/shelter/picnic_shelter: + # 'amenity=shelter, shelter_type=picnic_shelter' + name: Picnic Shelter + # 'terms: pavilion' + terms: '' amenity/shower: # amenity=shower name: Shower diff --git a/data/presets/presets.json b/data/presets/presets.json index f027b0342..b0d93cab5 100644 --- a/data/presets/presets.json +++ b/data/presets/presets.json @@ -131,6 +131,7 @@ "amenity/shelter": {"icon": "maki-shelter", "fields": ["name", "shelter_type", "building_area", "bench", "bin"], "geometry": ["point", "vertex", "area"], "terms": ["lean-to", "gazebo", "picnic"], "tags": {"amenity": "shelter"}, "name": "Shelter"}, "amenity/shelter/gazebo": {"icon": "maki-shelter", "fields": ["name", "building_area", "bench", "lit"], "geometry": ["point", "area"], "tags": {"amenity": "shelter", "shelter_type": "gazebo"}, "name": "Gazebo"}, "amenity/shelter/lean_to": {"icon": "maki-shelter", "fields": ["name", "operator", "building_area"], "geometry": ["point", "area"], "tags": {"amenity": "shelter", "shelter_type": "lean_to"}, "name": "Lean-To"}, + "amenity/shelter/picnic_shelter": {"icon": "maki-shelter", "fields": ["name", "shelter_type", "building_area", "lit", "bin"], "geometry": ["point", "area"], "tags": {"amenity": "shelter", "shelter_type": "picnic_shelter"}, "reference": {"key": "shelter_type", "value": "picnic_shelter"}, "terms": ["pavilion"], "name": "Picnic Shelter"}, "amenity/shower": {"icon": "temaki-shower", "fields": ["operator", "opening_hours", "fee", "supervised", "building_area", "access_simple"], "geometry": ["point", "vertex", "area"], "terms": ["rain closet"], "tags": {"amenity": "shower"}, "name": "Shower"}, "amenity/smoking_area": {"icon": "fas-smoking", "fields": ["name", "shelter", "bin", "bench", "opening_hours"], "geometry": ["point", "vertex", "area"], "terms": [], "tags": {"amenity": "smoking_area"}, "name": "Smoking Area"}, "amenity/social_facility": {"icon": "temaki-social_facility", "fields": ["name", "operator", "address", "building_area", "social_facility", "social_facility_for", "opening_hours", "wheelchair"], "geometry": ["point", "area"], "terms": [], "tags": {"amenity": "social_facility"}, "name": "Social Facility"}, diff --git a/data/presets/presets/amenity/shelter/picnic_shelter.json b/data/presets/presets/amenity/shelter/picnic_shelter.json new file mode 100644 index 000000000..2b7e08374 --- /dev/null +++ b/data/presets/presets/amenity/shelter/picnic_shelter.json @@ -0,0 +1,15 @@ +{ + "icon": "maki-shelter", + "fields": ["name", "shelter_type", "building_area", "lit", "bin"], + "geometry": ["point", "area"], + "tags": { + "amenity": "shelter", + "shelter_type": "picnic_shelter" + }, + "reference": { + "key": "shelter_type", + "value": "picnic_shelter" + }, + "terms": ["pavilion"], + "name": "Picnic Shelter" +} diff --git a/data/taginfo.json b/data/taginfo.json index 3190e9d4e..b8a18f287 100644 --- a/data/taginfo.json +++ b/data/taginfo.json @@ -889,6 +889,13 @@ "object_types": ["node", "area"], "icon_url": "https://raw.githubusercontent.com/mapbox/maki/master/icons/shelter-15.svg?sanitize=true" }, + { + "key": "shelter_type", + "value": "picnic_shelter", + "description": "Picnic Shelter", + "object_types": ["node", "area"], + "icon_url": "https://raw.githubusercontent.com/mapbox/maki/master/icons/shelter-15.svg?sanitize=true" + }, { "key": "amenity", "value": "shower", diff --git a/dist/locales/en.json b/dist/locales/en.json index c8c1b2ff3..a06e9cec8 100644 --- a/dist/locales/en.json +++ b/dist/locales/en.json @@ -3580,6 +3580,10 @@ "name": "Lean-To", "terms": "" }, + "amenity/shelter/picnic_shelter": { + "name": "Picnic Shelter", + "terms": "pavilion" + }, "amenity/shower": { "name": "Shower", "terms": "rain closet" @@ -7192,6 +7196,34 @@ "description": "Orthofoto layer provided by basemap.at. \"Successor\" of geoimage.at imagery.", "name": "basemap.at Orthofoto" }, + "eufar-balaton": { + "attribution": { + "text": "EUFAR Balaton ortofotó 2010" + }, + "description": "1940 geo-tagged photography from Balaton Limnological Institute.", + "name": "EUFAR Balaton orthophotos" + }, + "finds.jp_KBN_2500": { + "attribution": { + "text": "GSI KIBAN 2500" + }, + "description": "GSI Kiban 2500 via finds.jp. Good for tracing, but a bit older.", + "name": "Japan GSI KIBAN 2500" + }, + "gsi.go.jp": { + "attribution": { + "text": "GSI Japan" + }, + "description": "Japan GSI ortho Imagery. Usually better than bing, but a bit older.", + "name": "Japan GSI ortho Imagery" + }, + "gsi.go.jp_std_map": { + "attribution": { + "text": "GSI Japan" + }, + "description": "Japan GSI Standard Map. Widely covered.", + "name": "Japan GSI Standard Map" + }, "hike_n_bike": { "attribution": { "text": "© OpenStreetMap contributors" From 67153dc51832f088b93588cc7bb586be96a9e209 Mon Sep 17 00:00:00 2001 From: Henry Ho Date: Sun, 30 Sep 2018 17:32:27 -0700 Subject: [PATCH 12/56] - Add design tag values preset to high-voltage tower - Add power term to tower - Add design to fields for tower --- data/presets/fields/design.json | 5 +++++ data/presets/presets/power/tower.json | 4 ++++ 2 files changed, 9 insertions(+) create mode 100644 data/presets/fields/design.json diff --git a/data/presets/fields/design.json b/data/presets/fields/design.json new file mode 100644 index 000000000..921ca575d --- /dev/null +++ b/data/presets/fields/design.json @@ -0,0 +1,5 @@ +{ + "key": "design", + "type": "combo", + "label": "Design" +} \ No newline at end of file diff --git a/data/presets/presets/power/tower.json b/data/presets/presets/power/tower.json index 09ce2afe4..77c5277fe 100644 --- a/data/presets/presets/power/tower.json +++ b/data/presets/presets/power/tower.json @@ -1,10 +1,14 @@ { "fields": [ + "design", "ref" ], "geometry": [ "vertex" ], + "terms": [ + "power" + ], "tags": { "power": "tower" }, From 08d330f2dfe7624a8d818f19b6174ceefdb25b56 Mon Sep 17 00:00:00 2001 From: Henry Ho Date: Sun, 30 Sep 2018 21:44:14 -0700 Subject: [PATCH 13/56] Added build generated files --- data/presets.yaml | 4 ++++ data/presets/fields.json | 1 + data/presets/presets.json | 2 +- data/taginfo.json | 1 + dist/locales/en.json | 33 ++++++++++++++++++++++++++++++++- 5 files changed, 39 insertions(+), 2 deletions(-) diff --git a/data/presets.yaml b/data/presets.yaml index e7875d38c..f75c15cc9 100644 --- a/data/presets.yaml +++ b/data/presets.yaml @@ -431,6 +431,9 @@ en: description: # description=* label: Description + design: + # design=* + label: Design devices: # devices=* label: Devices @@ -4978,6 +4981,7 @@ en: power/tower: # power=tower name: High-Voltage Tower + # 'terms: power' terms: '' power/transformer: # power=transformer diff --git a/data/presets/fields.json b/data/presets/fields.json index aeb7fc9da..8216e6f17 100644 --- a/data/presets/fields.json +++ b/data/presets/fields.json @@ -74,6 +74,7 @@ "denomination": {"key": "denomination", "type": "combo", "label": "Denomination"}, "denotation": {"key": "denotation", "type": "combo", "label": "Denotation"}, "description": {"key": "description", "type": "textarea", "label": "Description", "universal": true}, + "design": {"key": "design", "type": "combo", "label": "Design"}, "devices": {"key": "devices", "type": "number", "minValue": 0, "label": "Devices", "placeholder": "1, 2, 3..."}, "diaper": {"key": "diaper", "type": "combo", "label": "Diaper Changing Available", "options": ["yes", "no", "room", "1", "2", "3", "4", "5"]}, "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"}}}, diff --git a/data/presets/presets.json b/data/presets/presets.json index f027b0342..04d29d04c 100644 --- a/data/presets/presets.json +++ b/data/presets/presets.json @@ -684,7 +684,7 @@ "power/pole": {"fields": ["ref"], "geometry": ["point", "vertex"], "tags": {"power": "pole"}, "name": "Power Pole"}, "power/substation": {"icon": "temaki-power", "fields": ["substation", "operator", "building", "ref"], "geometry": ["point", "area"], "tags": {"power": "substation"}, "name": "Substation"}, "power/switch": {"icon": "temaki-power", "fields": ["switch", "operator", "location", "cables", "voltage", "ref"], "geometry": ["point", "vertex", "area"], "tags": {"power": "switch"}, "name": "Power Switch"}, - "power/tower": {"fields": ["ref"], "geometry": ["vertex"], "tags": {"power": "tower"}, "name": "High-Voltage Tower"}, + "power/tower": {"fields": ["design", "ref"], "geometry": ["vertex"], "terms": ["power"], "tags": {"power": "tower"}, "name": "High-Voltage Tower"}, "power/transformer": {"icon": "temaki-power", "fields": ["transformer", "operator", "location", "rating", "devices", "phases", "frequency", "voltage/primary", "voltage/secondary", "voltage/tertiary", "windings", "windings/configuration", "ref"], "geometry": ["point", "vertex", "area"], "tags": {"power": "transformer"}, "name": "Transformer"}, "public_transport/linear_platform_aerialway": {"icon": "iD-highway-footway", "fields": ["name", "ref_platform", "network", "operator", "surface", "lit", "bench", "shelter"], "geometry": ["line"], "tags": {"public_transport": "platform", "aerialway": "yes"}, "reference": {"key": "public_transport", "value": "platform"}, "terms": ["aerialway", "cable car", "platform", "public transit", "public transportation", "transit", "transportation"], "name": "Aerialway Stop / Platform"}, "public_transport/linear_platform_bus": {"icon": "iD-highway-footway", "fields": ["name", "ref_platform", "network", "operator", "surface", "lit", "bench", "shelter", "passenger_information_display"], "geometry": ["line"], "tags": {"public_transport": "platform", "bus": "yes"}, "addTags": {"public_transport": "platform", "bus": "yes", "highway": "bus_stop"}, "removeTags": {"public_transport": "platform", "bus": "yes", "highway": "bus_stop"}, "reference": {"key": "public_transport", "value": "platform"}, "terms": ["bus", "platform", "public transit", "public transportation", "transit", "transportation"], "name": "Bus Stop / Platform"}, diff --git a/data/taginfo.json b/data/taginfo.json index 3190e9d4e..8a78e477b 100644 --- a/data/taginfo.json +++ b/data/taginfo.json @@ -6628,6 +6628,7 @@ {"key": "denomination", "description": "Denomination"}, {"key": "denotation", "description": "Denotation"}, {"key": "description", "description": "Description"}, + {"key": "design", "description": "Design"}, {"key": "devices", "description": "Devices"}, {"key": "diaper", "description": "Diaper Changing Available"}, {"key": "direction", "value": "N", "description": "Direction"}, diff --git a/dist/locales/en.json b/dist/locales/en.json index c8c1b2ff3..be9c75ea2 100644 --- a/dist/locales/en.json +++ b/dist/locales/en.json @@ -1836,6 +1836,9 @@ "description": { "label": "Description" }, + "design": { + "label": "Design" + }, "devices": { "label": "Devices", "placeholder": "1, 2, 3..." @@ -5794,7 +5797,7 @@ }, "power/tower": { "name": "High-Voltage Tower", - "terms": "" + "terms": "power" }, "power/transformer": { "name": "Transformer", @@ -7192,6 +7195,34 @@ "description": "Orthofoto layer provided by basemap.at. \"Successor\" of geoimage.at imagery.", "name": "basemap.at Orthofoto" }, + "eufar-balaton": { + "attribution": { + "text": "EUFAR Balaton ortofotó 2010" + }, + "description": "1940 geo-tagged photography from Balaton Limnological Institute.", + "name": "EUFAR Balaton orthophotos" + }, + "finds.jp_KBN_2500": { + "attribution": { + "text": "GSI KIBAN 2500" + }, + "description": "GSI Kiban 2500 via finds.jp. Good for tracing, but a bit older.", + "name": "Japan GSI KIBAN 2500" + }, + "gsi.go.jp": { + "attribution": { + "text": "GSI Japan" + }, + "description": "Japan GSI ortho Imagery. Usually better than bing, but a bit older.", + "name": "Japan GSI ortho Imagery" + }, + "gsi.go.jp_std_map": { + "attribution": { + "text": "GSI Japan" + }, + "description": "Japan GSI Standard Map. Widely covered.", + "name": "Japan GSI Standard Map" + }, "hike_n_bike": { "attribution": { "text": "© OpenStreetMap contributors" From 269fd357c9d57a24d0fec87759880a55180c6582 Mon Sep 17 00:00:00 2001 From: enighter Date: Mon, 1 Oct 2018 14:42:58 +0800 Subject: [PATCH 14/56] Add Transit Shelter preset --- data/presets.yaml | 5 +++ data/presets/presets.json | 1 + .../amenity/shelter/public_transport.json | 28 ++++++++++++++++ data/taginfo.json | 7 ++++ dist/locales/en.json | 32 +++++++++++++++++++ 5 files changed, 73 insertions(+) create mode 100644 data/presets/presets/amenity/shelter/public_transport.json diff --git a/data/presets.yaml b/data/presets.yaml index e7875d38c..a2d65f4c8 100644 --- a/data/presets.yaml +++ b/data/presets.yaml @@ -2472,6 +2472,11 @@ en: # 'amenity=shelter, shelter_type=lean_to' name: Lean-To terms: '' + amenity/shelter/public_transport: + # 'amenity=shelter, shelter_type=public_transport' + name: Transit Shelter + # 'terms: bus stop,metro stop,waiting' + terms: '' amenity/shower: # amenity=shower name: Shower diff --git a/data/presets/presets.json b/data/presets/presets.json index f027b0342..8c16f5443 100644 --- a/data/presets/presets.json +++ b/data/presets/presets.json @@ -131,6 +131,7 @@ "amenity/shelter": {"icon": "maki-shelter", "fields": ["name", "shelter_type", "building_area", "bench", "bin"], "geometry": ["point", "vertex", "area"], "terms": ["lean-to", "gazebo", "picnic"], "tags": {"amenity": "shelter"}, "name": "Shelter"}, "amenity/shelter/gazebo": {"icon": "maki-shelter", "fields": ["name", "building_area", "bench", "lit"], "geometry": ["point", "area"], "tags": {"amenity": "shelter", "shelter_type": "gazebo"}, "name": "Gazebo"}, "amenity/shelter/lean_to": {"icon": "maki-shelter", "fields": ["name", "operator", "building_area"], "geometry": ["point", "area"], "tags": {"amenity": "shelter", "shelter_type": "lean_to"}, "name": "Lean-To"}, + "amenity/shelter/public_transport": {"icon": "maki-shelter", "fields": ["name", "shelter_type", "building_area", "bench", "lit"], "geometry": ["point", "area"], "terms": ["bus stop", "metro stop", "waiting"], "tags": {"amenity": "shelter", "shelter_type": "public_transport"}, "reference": {"key": "shelter_type", "value": "public_transport"}, "name": "Transit Shelter"}, "amenity/shower": {"icon": "temaki-shower", "fields": ["operator", "opening_hours", "fee", "supervised", "building_area", "access_simple"], "geometry": ["point", "vertex", "area"], "terms": ["rain closet"], "tags": {"amenity": "shower"}, "name": "Shower"}, "amenity/smoking_area": {"icon": "fas-smoking", "fields": ["name", "shelter", "bin", "bench", "opening_hours"], "geometry": ["point", "vertex", "area"], "terms": [], "tags": {"amenity": "smoking_area"}, "name": "Smoking Area"}, "amenity/social_facility": {"icon": "temaki-social_facility", "fields": ["name", "operator", "address", "building_area", "social_facility", "social_facility_for", "opening_hours", "wheelchair"], "geometry": ["point", "area"], "terms": [], "tags": {"amenity": "social_facility"}, "name": "Social Facility"}, diff --git a/data/presets/presets/amenity/shelter/public_transport.json b/data/presets/presets/amenity/shelter/public_transport.json new file mode 100644 index 000000000..e7ee477f8 --- /dev/null +++ b/data/presets/presets/amenity/shelter/public_transport.json @@ -0,0 +1,28 @@ +{ + "icon": "maki-shelter", + "fields": [ + "name", + "shelter_type", + "building_area", + "bench", + "lit" + ], + "geometry": [ + "point", + "area" + ], + "terms": [ + "bus stop", + "metro stop", + "waiting" + ], + "tags": { + "amenity": "shelter", + "shelter_type": "public_transport" + }, + "reference": { + "key": "shelter_type", + "value": "public_transport" + }, + "name": "Transit Shelter" +} diff --git a/data/taginfo.json b/data/taginfo.json index 3190e9d4e..7555cc029 100644 --- a/data/taginfo.json +++ b/data/taginfo.json @@ -889,6 +889,13 @@ "object_types": ["node", "area"], "icon_url": "https://raw.githubusercontent.com/mapbox/maki/master/icons/shelter-15.svg?sanitize=true" }, + { + "key": "shelter_type", + "value": "public_transport", + "description": "Transit Shelter", + "object_types": ["node", "area"], + "icon_url": "https://raw.githubusercontent.com/mapbox/maki/master/icons/shelter-15.svg?sanitize=true" + }, { "key": "amenity", "value": "shower", diff --git a/dist/locales/en.json b/dist/locales/en.json index c8c1b2ff3..440d390b1 100644 --- a/dist/locales/en.json +++ b/dist/locales/en.json @@ -3580,6 +3580,10 @@ "name": "Lean-To", "terms": "" }, + "amenity/shelter/public_transport": { + "name": "Transit Shelter", + "terms": "bus stop,metro stop,waiting" + }, "amenity/shower": { "name": "Shower", "terms": "rain closet" @@ -7192,6 +7196,34 @@ "description": "Orthofoto layer provided by basemap.at. \"Successor\" of geoimage.at imagery.", "name": "basemap.at Orthofoto" }, + "eufar-balaton": { + "attribution": { + "text": "EUFAR Balaton ortofotó 2010" + }, + "description": "1940 geo-tagged photography from Balaton Limnological Institute.", + "name": "EUFAR Balaton orthophotos" + }, + "finds.jp_KBN_2500": { + "attribution": { + "text": "GSI KIBAN 2500" + }, + "description": "GSI Kiban 2500 via finds.jp. Good for tracing, but a bit older.", + "name": "Japan GSI KIBAN 2500" + }, + "gsi.go.jp": { + "attribution": { + "text": "GSI Japan" + }, + "description": "Japan GSI ortho Imagery. Usually better than bing, but a bit older.", + "name": "Japan GSI ortho Imagery" + }, + "gsi.go.jp_std_map": { + "attribution": { + "text": "GSI Japan" + }, + "description": "Japan GSI Standard Map. Widely covered.", + "name": "Japan GSI Standard Map" + }, "hike_n_bike": { "attribution": { "text": "© OpenStreetMap contributors" From 6739f39413e3048eb725c8ba69db1e4e28503a17 Mon Sep 17 00:00:00 2001 From: enighter Date: Mon, 1 Oct 2018 15:26:02 +0800 Subject: [PATCH 15/56] Add Amphitheatre preset --- data/presets.yaml | 5 +++ data/presets/presets.json | 1 + .../presets/amenity/theatre/type/amphi.json | 23 +++++++++++++ data/taginfo.json | 7 ++++ dist/locales/en.json | 32 +++++++++++++++++++ 5 files changed, 68 insertions(+) create mode 100644 data/presets/presets/amenity/theatre/type/amphi.json diff --git a/data/presets.yaml b/data/presets.yaml index e7875d38c..e6cd879a2 100644 --- a/data/presets.yaml +++ b/data/presets.yaml @@ -2527,6 +2527,11 @@ en: name: Theater # 'terms: theatre,performance,play,musical' terms: '' + amenity/theatre/type/amphi: + # 'amenity=theatre, theatre:type=amphi' + name: Amphitheatre + # 'terms: open air,outdoor,greek,ampi' + terms: '' amenity/toilets: # amenity=toilets name: Toilets diff --git a/data/presets/presets.json b/data/presets/presets.json index f027b0342..095092d4f 100644 --- a/data/presets/presets.json +++ b/data/presets/presets.json @@ -142,6 +142,7 @@ "amenity/taxi": {"icon": "fas-taxi", "fields": ["name", "operator", "capacity"], "geometry": ["point", "vertex", "area"], "terms": ["cab"], "tags": {"amenity": "taxi"}, "name": "Taxi Stand"}, "amenity/telephone": {"icon": "maki-telephone", "fields": ["operator", "phone", "fee", "payment_multi", "covered", "indoor", "booth"], "geometry": ["point", "vertex"], "tags": {"amenity": "telephone"}, "terms": ["phone"], "name": "Telephone"}, "amenity/theatre": {"icon": "maki-theatre", "fields": ["name", "operator", "address", "building_area"], "geometry": ["point", "area"], "terms": ["theatre", "performance", "play", "musical"], "tags": {"amenity": "theatre"}, "name": "Theater"}, + "amenity/theatre/type/amphi": {"icon": "maki-theatre", "fields": ["name", "operator", "address", "lit"], "geometry": ["point", "area"], "terms": ["open air", "outdoor", "greek", "ampi"], "tags": {"amenity": "theatre", "theatre:type": "amphi"}, "name": "Amphitheatre"}, "amenity/toilets": {"icon": "maki-toilet", "fields": ["toilets/disposal", "operator", "building_area", "access_simple", "gender", "fee", "diaper"], "geometry": ["point", "vertex", "area"], "terms": ["bathroom", "restroom", "outhouse", "privy", "head", "lavatory", "latrine", "water closet", "WC", "W.C."], "tags": {"amenity": "toilets"}, "name": "Toilets"}, "amenity/townhall": {"icon": "maki-town-hall", "fields": ["name", "operator", "address", "building_area"], "geometry": ["point", "area"], "terms": ["village", "city", "government", "courthouse", "municipal"], "tags": {"amenity": "townhall"}, "name": "Town Hall"}, "amenity/university": {"icon": "maki-college", "fields": ["name", "operator", "address", "internet_access", "internet_access/ssid"], "geometry": ["point", "area"], "terms": ["college"], "tags": {"amenity": "university"}, "name": "University Grounds"}, diff --git a/data/presets/presets/amenity/theatre/type/amphi.json b/data/presets/presets/amenity/theatre/type/amphi.json new file mode 100644 index 000000000..6d18e1e5f --- /dev/null +++ b/data/presets/presets/amenity/theatre/type/amphi.json @@ -0,0 +1,23 @@ +{ + "icon": "maki-theatre", + "fields": [ + "name", + "operator", + "address", + "lit" + ], + "geometry": [ + "point", "area" + ], + "terms": [ + "open air", + "outdoor", + "greek", + "ampi" + ], + "tags": { + "amenity": "theatre", + "theatre:type": "amphi" + }, + "name": "Amphitheatre" +} diff --git a/data/taginfo.json b/data/taginfo.json index 3190e9d4e..6f6000e79 100644 --- a/data/taginfo.json +++ b/data/taginfo.json @@ -959,6 +959,13 @@ "object_types": ["node", "area"], "icon_url": "https://raw.githubusercontent.com/mapbox/maki/master/icons/theatre-15.svg?sanitize=true" }, + { + "key": "theatre:type", + "value": "amphi", + "description": "Amphitheatre", + "object_types": ["node", "area"], + "icon_url": "https://raw.githubusercontent.com/mapbox/maki/master/icons/theatre-15.svg?sanitize=true" + }, { "key": "amenity", "value": "toilets", diff --git a/dist/locales/en.json b/dist/locales/en.json index c8c1b2ff3..e494d7c11 100644 --- a/dist/locales/en.json +++ b/dist/locales/en.json @@ -3624,6 +3624,10 @@ "name": "Theater", "terms": "theatre,performance,play,musical" }, + "amenity/theatre/type/amphi": { + "name": "Amphitheatre", + "terms": "open air,outdoor,greek,ampi" + }, "amenity/toilets": { "name": "Toilets", "terms": "bathroom,restroom,outhouse,privy,head,lavatory,latrine,water closet,WC,W.C." @@ -7192,6 +7196,34 @@ "description": "Orthofoto layer provided by basemap.at. \"Successor\" of geoimage.at imagery.", "name": "basemap.at Orthofoto" }, + "eufar-balaton": { + "attribution": { + "text": "EUFAR Balaton ortofotó 2010" + }, + "description": "1940 geo-tagged photography from Balaton Limnological Institute.", + "name": "EUFAR Balaton orthophotos" + }, + "finds.jp_KBN_2500": { + "attribution": { + "text": "GSI KIBAN 2500" + }, + "description": "GSI Kiban 2500 via finds.jp. Good for tracing, but a bit older.", + "name": "Japan GSI KIBAN 2500" + }, + "gsi.go.jp": { + "attribution": { + "text": "GSI Japan" + }, + "description": "Japan GSI ortho Imagery. Usually better than bing, but a bit older.", + "name": "Japan GSI ortho Imagery" + }, + "gsi.go.jp_std_map": { + "attribution": { + "text": "GSI Japan" + }, + "description": "Japan GSI Standard Map. Widely covered.", + "name": "Japan GSI Standard Map" + }, "hike_n_bike": { "attribution": { "text": "© OpenStreetMap contributors" From 9c80932816b3ee04d8ff71eef0e30cae6f766678 Mon Sep 17 00:00:00 2001 From: Sally Hale Date: Mon, 1 Oct 2018 11:45:26 +0100 Subject: [PATCH 16/56] Added softball preset --- .../presets/leisure/pitch/softball.json | 24 +++++++++++++++++++ 1 file changed, 24 insertions(+) create mode 100644 data/presets/presets/leisure/pitch/softball.json diff --git a/data/presets/presets/leisure/pitch/softball.json b/data/presets/presets/leisure/pitch/softball.json new file mode 100644 index 000000000..2f0af2c14 --- /dev/null +++ b/data/presets/presets/leisure/pitch/softball.json @@ -0,0 +1,24 @@ +{ + "icon": "maki-baseball", + "fields": [ + "name", + "lit" + ], + "geometry": [ + "point", + "area" + ], + "tags": { + "leisure": "pitch", + "sport": "softball" + }, + "reference": { + "key": "sport", + "value": "softball" + }, + "terms": [ + "softball", + "diamond" + ], + "name": "Softball Field" +} \ No newline at end of file From 531e9762034702622fe4b2863b1a71fedfaf8b6f Mon Sep 17 00:00:00 2001 From: Bryan Housel Date: Mon, 1 Oct 2018 08:31:47 -0400 Subject: [PATCH 17/56] npm run build for new presets --- data/presets.yaml | 10 ++++++++++ data/presets/presets.json | 3 ++- data/taginfo.json | 14 ++++++++++++++ dist/locales/en.json | 8 ++++++++ 4 files changed, 34 insertions(+), 1 deletion(-) diff --git a/data/presets.yaml b/data/presets.yaml index e65d3cbce..252d9f2c1 100644 --- a/data/presets.yaml +++ b/data/presets.yaml @@ -2875,6 +2875,11 @@ en: # building=cabin name: Cabin terms: '' + building/carport: + # building=carport + name: Carport + # 'terms: covered parking space,garage,car,porch' + terms: '' building/cathedral: # building=cathedral name: Cathedral Building @@ -4249,6 +4254,11 @@ en: name: Soccer Field # 'terms: football' terms: '' + leisure/pitch/softball: + # 'leisure=pitch, sport=softball' + name: Softball Field + # 'terms: softball,diamond' + terms: '' leisure/pitch/table_tennis: # 'leisure=pitch, sport=table_tennis' name: Ping Pong Table diff --git a/data/presets/presets.json b/data/presets/presets.json index 06a5024b2..821699937 100644 --- a/data/presets/presets.json +++ b/data/presets/presets.json @@ -220,6 +220,7 @@ "building/boathouse": {"icon": "maki-harbor", "fields": ["name", "levels", "height", "address"], "geometry": ["area"], "tags": {"building": "boathouse"}, "matchScore": 0.5, "terms": [], "name": "Boathouse"}, "building/bungalow": {"icon": "maki-home", "fields": ["name", "address", "levels", "height"], "geometry": ["area"], "tags": {"building": "bungalow"}, "terms": ["home", "detached"], "matchScore": 0.5, "name": "Bungalow"}, "building/cabin": {"icon": "maki-home", "fields": ["name", "address", "levels", "height"], "geometry": ["area"], "tags": {"building": "cabin"}, "matchScore": 0.5, "name": "Cabin"}, + "building/carport": {"icon": "fas-warehouse", "fields": ["height", "capacity"], "geometry": ["area"], "tags": {"building": "carport"}, "matchScore": 0.5, "terms": ["covered parking space", "garage", "car", "porch"], "name": "Carport"}, "building/cathedral": {"icon": "maki-place-of-worship", "fields": ["name", "address", "levels", "height"], "geometry": ["area"], "tags": {"building": "cathedral"}, "matchScore": 0.5, "name": "Cathedral Building"}, "building/chapel": {"icon": "maki-place-of-worship", "fields": ["name", "address", "levels", "height"], "geometry": ["area"], "tags": {"building": "chapel"}, "matchScore": 0.5, "name": "Chapel Building"}, "building/church": {"icon": "maki-place-of-worship", "fields": ["name", "address", "levels", "height"], "geometry": ["area"], "tags": {"building": "church"}, "matchScore": 0.5, "name": "Church Building"}, @@ -511,7 +512,6 @@ "leisure/pitch": {"icon": "maki-pitch", "fields": ["name", "sport", "surface", "lit"], "geometry": ["point", "area"], "tags": {"leisure": "pitch"}, "terms": ["field"], "name": "Sport Pitch"}, "leisure/pitch/american_football": {"icon": "maki-america-football", "fields": ["name", "surface", "lit"], "geometry": ["point", "area"], "tags": {"leisure": "pitch", "sport": "american_football"}, "reference": {"key": "sport", "value": "american_football"}, "terms": [], "name": "American Football Field"}, "leisure/pitch/badminton": {"icon": "maki-tennis", "fields": ["name", "surface", "lit", "access_simple"], "geometry": ["point", "area"], "tags": {"leisure": "pitch", "sport": "badminton"}, "reference": {"key": "sport", "value": "badminton"}, "terms": [], "name": "Badminton Court"}, - "leisure/pitch/baseball": {"icon": "maki-baseball", "fields": ["name", "lit"], "geometry": ["point", "area"], "tags": {"leisure": "pitch", "sport": "baseball"}, "reference": {"key": "sport", "value": "baseball"}, "terms": [], "name": "Baseball Diamond"}, "leisure/pitch/baseball": {"icon": "maki-baseball", "fields": ["name", "lit"], "geometry": ["point", "area"], "tags": {"leisure": "pitch", "sport": "baseball"}, "reference": {"key": "sport", "value": "baseball"}, "terms": [], "name": "Baseball Field"}, "leisure/pitch/basketball": {"icon": "maki-basketball", "fields": ["name", "surface", "hoops", "lit", "access_simple"], "geometry": ["point", "area"], "tags": {"leisure": "pitch", "sport": "basketball"}, "reference": {"key": "sport", "value": "basketball"}, "terms": [], "name": "Basketball Court"}, "leisure/pitch/beachvolleyball": {"icon": "maki-basketball", "fields": ["name", "surface", "lit"], "geometry": ["point", "area"], "tags": {"leisure": "pitch", "sport": "beachvolleyball"}, "addTags": {"leisure": "pitch", "sport": "beachvolleyball", "surface": "sand"}, "removeTags": {"leisure": "pitch", "sport": "beachvolleyball", "surface": "sand"}, "reference": {"key": "sport", "value": "beachvolleyball"}, "terms": ["volleyball"], "name": "Beach Volleyball Court"}, @@ -523,6 +523,7 @@ "leisure/pitch/rugby_union": {"icon": "maki-america-football", "fields": ["name", "surface", "lit"], "geometry": ["point", "area"], "tags": {"leisure": "pitch", "sport": "rugby_union"}, "reference": {"key": "sport", "value": "rugby_union"}, "terms": [], "name": "Rugby Union Field"}, "leisure/pitch/skateboard": {"icon": "maki-pitch", "fields": ["name", "surface", "lit"], "geometry": ["point", "area"], "tags": {"leisure": "pitch", "sport": "skateboard"}, "reference": {"key": "sport", "value": "skateboard"}, "terms": [], "name": "Skate Park"}, "leisure/pitch/soccer": {"icon": "maki-soccer", "fields": ["name", "surface", "lit"], "geometry": ["point", "area"], "tags": {"leisure": "pitch", "sport": "soccer"}, "reference": {"key": "sport", "value": "soccer"}, "terms": ["football"], "name": "Soccer Field"}, + "leisure/pitch/softball": {"icon": "maki-baseball", "fields": ["name", "lit"], "geometry": ["point", "area"], "tags": {"leisure": "pitch", "sport": "softball"}, "reference": {"key": "sport", "value": "softball"}, "terms": ["softball", "diamond"], "name": "Softball Field"}, "leisure/pitch/table_tennis": {"icon": "maki-tennis", "fields": ["name", "lit", "access_simple"], "geometry": ["point", "area"], "tags": {"leisure": "pitch", "sport": "table_tennis"}, "reference": {"key": "sport", "value": "table_tennis"}, "terms": ["table tennis", "ping pong"], "name": "Ping Pong Table"}, "leisure/pitch/tennis": {"icon": "maki-tennis", "fields": ["name", "surface", "lit", "access_simple"], "geometry": ["point", "area"], "tags": {"leisure": "pitch", "sport": "tennis"}, "reference": {"key": "sport", "value": "tennis"}, "terms": [], "name": "Tennis Court"}, "leisure/pitch/volleyball": {"icon": "maki-basketball", "fields": ["name", "surface", "lit"], "geometry": ["point", "area"], "tags": {"leisure": "pitch", "sport": "volleyball"}, "reference": {"key": "sport", "value": "volleyball"}, "terms": [], "name": "Volleyball Court"}, diff --git a/data/taginfo.json b/data/taginfo.json index 694bc6281..69055bca0 100644 --- a/data/taginfo.json +++ b/data/taginfo.json @@ -1496,6 +1496,13 @@ "object_types": ["area"], "icon_url": "https://raw.githubusercontent.com/mapbox/maki/master/icons/home-15.svg?sanitize=true" }, + { + "key": "building", + "value": "carport", + "description": "Carport", + "object_types": ["area"], + "icon_url": "https://raw.githubusercontent.com/openstreetmap/iD/master/svg/fontawesome/fas-warehouse.svg?sanitize=true" + }, { "key": "building", "value": "cathedral", @@ -3521,6 +3528,13 @@ "object_types": ["node", "area"], "icon_url": "https://raw.githubusercontent.com/mapbox/maki/master/icons/soccer-15.svg?sanitize=true" }, + { + "key": "sport", + "value": "softball", + "description": "Softball Field", + "object_types": ["node", "area"], + "icon_url": "https://raw.githubusercontent.com/mapbox/maki/master/icons/baseball-15.svg?sanitize=true" + }, { "key": "sport", "value": "table_tennis", diff --git a/dist/locales/en.json b/dist/locales/en.json index 9e8f55edf..57269705c 100644 --- a/dist/locales/en.json +++ b/dist/locales/en.json @@ -3939,6 +3939,10 @@ "name": "Cabin", "terms": "" }, + "building/carport": { + "name": "Carport", + "terms": "covered parking space,garage,car,porch" + }, "building/cathedral": { "name": "Cathedral Building", "terms": "" @@ -5147,6 +5151,10 @@ "name": "Soccer Field", "terms": "football" }, + "leisure/pitch/softball": { + "name": "Softball Field", + "terms": "softball,diamond" + }, "leisure/pitch/table_tennis": { "name": "Ping Pong Table", "terms": "table tennis,ping pong" From 9ab8c35ca14b3ee15415b1e2d277d502801c0efc Mon Sep 17 00:00:00 2001 From: Nadya Febiana Djojosantoso Date: Mon, 1 Oct 2018 06:46:36 -0700 Subject: [PATCH 18/56] Add bridge support type field --- data/presets/fields/bridge/support.json | 5 +++++ 1 file changed, 5 insertions(+) create mode 100644 data/presets/fields/bridge/support.json diff --git a/data/presets/fields/bridge/support.json b/data/presets/fields/bridge/support.json new file mode 100644 index 000000000..7d7563c04 --- /dev/null +++ b/data/presets/fields/bridge/support.json @@ -0,0 +1,5 @@ +{ + "key": "bridge:support", + "type": "combo", + "label": "Type" +} From 4c4cd55e838702ec8e2ed33f1ec6941fee203ee9 Mon Sep 17 00:00:00 2001 From: Nadya Febiana Djojosantoso Date: Mon, 1 Oct 2018 06:48:24 -0700 Subject: [PATCH 19/56] Add bridge support preset --- data/presets/presets/bridge/support.json | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100644 data/presets/presets/bridge/support.json diff --git a/data/presets/presets/bridge/support.json b/data/presets/presets/bridge/support.json new file mode 100644 index 000000000..464badee1 --- /dev/null +++ b/data/presets/presets/bridge/support.json @@ -0,0 +1,15 @@ +{ + "icon": "fas-archway", + "fields": [ + "bridge/support" + ], + "geometry": [ + "point", + "vertex", + "area" + ], + "tags": { + "bridge:support": "*" + }, + "name": "Bridge Support" +} From ffd3de5aaaf64c7e42ec591adf4ad9fc323d429f Mon Sep 17 00:00:00 2001 From: Nadya Febiana Djojosantoso Date: Mon, 1 Oct 2018 06:49:19 -0700 Subject: [PATCH 20/56] Add bridge pier preset --- data/presets/presets/bridge/support/pier.json | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100644 data/presets/presets/bridge/support/pier.json diff --git a/data/presets/presets/bridge/support/pier.json b/data/presets/presets/bridge/support/pier.json new file mode 100644 index 000000000..194027440 --- /dev/null +++ b/data/presets/presets/bridge/support/pier.json @@ -0,0 +1,15 @@ +{ + "icon": "fas-archway", + "fields": [ + "bridge/support" + ], + "geometry": [ + "point", + "vertex", + "area" + ], + "tags": { + "bridge:support": "pier" + }, + "name": "Bridge Pier" +} From dd46dae9ad53d68fb90ae4f5af9e3a95ed60200e Mon Sep 17 00:00:00 2001 From: Nadya Febiana Djojosantoso Date: Mon, 1 Oct 2018 07:18:10 -0700 Subject: [PATCH 21/56] Include build files for bridge:support presets --- data/presets.yaml | 11 +++++++++++ data/presets/fields.json | 1 + data/presets/presets.json | 2 ++ data/taginfo.json | 13 +++++++++++++ dist/locales/en.json | 11 +++++++++++ 5 files changed, 38 insertions(+) diff --git a/data/presets.yaml b/data/presets.yaml index e44e808a8..12a1ad0b3 100644 --- a/data/presets.yaml +++ b/data/presets.yaml @@ -266,6 +266,9 @@ en: label: Type # bridge field placeholder placeholder: Default + bridge/support: + # 'bridge:support=*' + label: Type building: # building=* label: Building @@ -2857,6 +2860,14 @@ en: # boundary=administrative name: Administrative Boundary terms: '' + bridge/support: + # 'bridge:support=*' + name: Bridge Support + terms: '' + bridge/support/pier: + # 'bridge:support=pier' + name: Bridge Pier + terms: '' building: # building=* name: Building diff --git a/data/presets/fields.json b/data/presets/fields.json index 8216e6f17..ef606e2b2 100644 --- a/data/presets/fields.json +++ b/data/presets/fields.json @@ -39,6 +39,7 @@ "brand": {"key": "brand", "type": "text", "label": "Brand"}, "brewery": {"key": "brewery", "type": "semiCombo", "label": "Draft Beers"}, "bridge": {"key": "bridge", "type": "typeCombo", "label": "Type", "placeholder": "Default"}, + "bridge/support": {"key": "bridge:support", "type": "combo", "label": "Type"}, "building_area": {"key": "building", "type": "combo", "default": "yes", "geometry": "area", "label": "Building"}, "building": {"key": "building", "type": "combo", "label": "Building"}, "bunker_type": {"key": "bunker_type", "type": "combo", "label": "Type"}, diff --git a/data/presets/presets.json b/data/presets/presets.json index d50ccff81..b980f4a28 100644 --- a/data/presets/presets.json +++ b/data/presets/presets.json @@ -213,6 +213,8 @@ "barrier/toll_booth": {"icon": "maki-roadblock", "fields": ["access", "building_area"], "geometry": ["vertex", "area"], "tags": {"barrier": "toll_booth"}, "name": "Toll Booth"}, "barrier/wall": {"icon": "maki-barrier", "fields": ["wall", "height"], "geometry": ["line", "area"], "tags": {"barrier": "wall"}, "name": "Wall", "matchScore": 0.25}, "boundary/administrative": {"name": "Administrative Boundary", "geometry": ["line"], "tags": {"boundary": "administrative"}, "fields": ["name", "admin_level"]}, + "bridge/support": {"icon": "fas-archway", "fields": ["bridge/support"], "geometry": ["point", "vertex", "area"], "tags": {"bridge:support": "*"}, "name": "Bridge Support"}, + "bridge/support/pier": {"icon": "fas-archway", "fields": ["bridge/support"], "geometry": ["point", "vertex", "area"], "tags": {"bridge:support": "pier"}, "name": "Bridge Pier"}, "building": {"icon": "maki-home", "fields": ["name", "building", "levels", "height", "address"], "geometry": ["point", "area"], "tags": {"building": "*"}, "matchScore": 0.6, "terms": [], "name": "Building"}, "building/bunker": {"fields": ["name", "address", "levels", "height"], "geometry": ["area"], "tags": {"building": "bunker"}, "matchScore": 0.5, "name": "Bunker", "searchable": false}, "building/entrance": {"icon": "maki-entrance-alt1", "geometry": ["vertex"], "tags": {"building": "entrance"}, "name": "Entrance/Exit", "searchable": false}, diff --git a/data/taginfo.json b/data/taginfo.json index 355401102..c5e62af93 100644 --- a/data/taginfo.json +++ b/data/taginfo.json @@ -1449,6 +1449,19 @@ "description": "Administrative Boundary", "object_types": ["way"] }, + { + "key": "bridge:support", + "description": "Bridge Support, Type", + "object_types": ["node", "area"], + "icon_url": "https://raw.githubusercontent.com/openstreetmap/iD/master/svg/fontawesome/fas-archway.svg?sanitize=true" + }, + { + "key": "bridge:support", + "value": "pier", + "description": "Bridge Pier", + "object_types": ["node", "area"], + "icon_url": "https://raw.githubusercontent.com/openstreetmap/iD/master/svg/fontawesome/fas-archway.svg?sanitize=true" + }, { "key": "building", "description": "Building", diff --git a/dist/locales/en.json b/dist/locales/en.json index 3f2809e9d..f8b240dc2 100644 --- a/dist/locales/en.json +++ b/dist/locales/en.json @@ -1680,6 +1680,9 @@ "label": "Type", "placeholder": "Default" }, + "bridge/support": { + "label": "Type" + }, "building_area": { "label": "Building" }, @@ -3911,6 +3914,14 @@ "name": "Administrative Boundary", "terms": "" }, + "bridge/support": { + "name": "Bridge Support", + "terms": "" + }, + "bridge/support/pier": { + "name": "Bridge Pier", + "terms": "" + }, "building": { "name": "Building", "terms": "" From f9ce3bc2365abb2eebf0230f534044c6afdd3578 Mon Sep 17 00:00:00 2001 From: Michael Pu Date: Mon, 1 Oct 2018 19:28:57 -0400 Subject: [PATCH 22/56] Add conveying field --- data/presets/fields/conveying.json | 13 +++++++++++++ 1 file changed, 13 insertions(+) create mode 100644 data/presets/fields/conveying.json diff --git a/data/presets/fields/conveying.json b/data/presets/fields/conveying.json new file mode 100644 index 000000000..09d0b41a2 --- /dev/null +++ b/data/presets/fields/conveying.json @@ -0,0 +1,13 @@ +{ + "key": "conveying", + "type": "typeCombo", + "label": "Movement Direction", + "strings": { + "options": { + "forward": "Forward", + "backward": "Backward", + "reversible": "Reversible" + } + } + +} From 9676d59e8e8f6836214d02fac46f1b82d6cebc5b Mon Sep 17 00:00:00 2001 From: Michael Pu Date: Mon, 1 Oct 2018 21:21:20 -0400 Subject: [PATCH 23/56] Add escalator and moving walkway presets --- .../highway/steps/conveying/escalator.json | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100644 data/presets/presets/highway/steps/conveying/escalator.json diff --git a/data/presets/presets/highway/steps/conveying/escalator.json b/data/presets/presets/highway/steps/conveying/escalator.json new file mode 100644 index 000000000..327f824db --- /dev/null +++ b/data/presets/presets/highway/steps/conveying/escalator.json @@ -0,0 +1,19 @@ +{ + "icon": "maki-entrance", + "fields": [ + "name", "incline_steps", "conveying", "access_simple", "lit", "surface", "width", "handrail", "step_count" + ], + "geometry": [ + "line" + ], + "terms": [ + "moving staircase", + "moving stairway", + "people mover" + ], + "tags": { + "highway": "steps", + "conveying": "*" + }, + "name": "Escalator" +} \ No newline at end of file From 981910ea081892661aae97bac90b7710b6290455 Mon Sep 17 00:00:00 2001 From: Michael Pu Date: Mon, 1 Oct 2018 21:26:14 -0400 Subject: [PATCH 24/56] Include build files --- data/presets.yaml | 20 ++++++++++++++++ data/presets/fields.json | 1 + data/presets/presets.json | 2 ++ .../footway/conveying/moving-walkway.json | 23 +++++++++++++++++++ data/taginfo.json | 21 +++++++++++++++++ dist/locales/en.json | 16 +++++++++++++ 6 files changed, 83 insertions(+) create mode 100644 data/presets/presets/footway/conveying/moving-walkway.json diff --git a/data/presets.yaml b/data/presets.yaml index 12a1ad0b3..8c270ec2a 100644 --- a/data/presets.yaml +++ b/data/presets.yaml @@ -340,6 +340,16 @@ en: content: # content=* label: Content + conveying: + # conveying=* + label: Movement Direction + options: + # conveying=backward + backward: Backward + # conveying=forward + forward: Forward + # conveying=reversible + reversible: Reversible country: # country=* label: Country @@ -3378,6 +3388,11 @@ en: name: Entrance/Exit # 'terms: entrance,exit,door' terms: '' + footway/conveying/moving-walkway: + # 'highway=footway, conveying=*' + name: Moving Walkway + # 'terms: moving sidewalk,autwalk,skywalk,travolator,travelator,travellator,conveyor' + terms: '' footway/crossing: # 'highway=footway, footway=crossing' name: Street Crossing @@ -3713,6 +3728,11 @@ en: name: Steps # 'terms: stairs,staircase' terms: '' + highway/steps/conveying/escalator: + # 'highway=steps, conveying=*' + name: Escalator + # 'terms: moving staircase,moving stairway,people mover' + terms: '' highway/stop: # highway=stop name: Stop Sign diff --git a/data/presets/fields.json b/data/presets/fields.json index ef606e2b2..8c2246978 100644 --- a/data/presets/fields.json +++ b/data/presets/fields.json @@ -58,6 +58,7 @@ "construction": {"key": "construction", "type": "combo", "label": "Type"}, "contact/webcam": {"key": "contact:webcam", "type": "url", "icon": "website", "label": "Webcam URL", "placeholder": "http://example.com/"}, "content": {"key": "content", "type": "combo", "label": "Content", "options": ["silage", "water", "oil", "fuel", "slurry", "gas", "manure", "sewage"]}, + "conveying": {"key": "conveying", "type": "typeCombo", "label": "Movement Direction", "strings": {"options": {"forward": "Forward", "backward": "Backward", "reversible": "Reversible"}}}, "country": {"key": "country", "type": "combo", "label": "Country"}, "covered": {"key": "covered", "type": "check", "label": "Covered"}, "craft": {"key": "craft", "type": "typeCombo", "label": "Type"}, diff --git a/data/presets/presets.json b/data/presets/presets.json index b980f4a28..9ad1bb3f3 100644 --- a/data/presets/presets.json +++ b/data/presets/presets.json @@ -335,6 +335,7 @@ "emergency/siren": {"icon": "fas-volume-up", "fields": ["siren/purpose", "siren/type", "ref", "operator"], "geometry": ["point", "vertex"], "terms": ["air raid", "loud", "noise", "storm", "tornado", "warning"], "tags": {"emergency": "siren"}, "name": "Siren"}, "emergency/water_tank": {"icon": "maki-water", "fields": ["name", "ref", "operator"], "geometry": ["point", "vertex"], "terms": ["water tank", "cistern", "reservoir"], "tags": {"emergency": "water_tank"}, "name": "Emergency Water Tank"}, "entrance": {"icon": "maki-entrance-alt1", "geometry": ["vertex"], "terms": ["entrance", "exit", "door"], "tags": {"entrance": "*"}, "fields": ["entrance", "access_simple", "address"], "name": "Entrance/Exit"}, + "footway/conveying/moving-walkway": {"icon": "temaki-pedestrian", "fields": ["name", "conveying", "access_simple", "lit", "surface", "width"], "geometry": ["line"], "terms": ["moving sidewalk", "autwalk", "skywalk", "travolator", "travelator", "travellator", "conveyor"], "tags": {"highway": "footway", "conveying": "*"}, "name": "Moving Walkway"}, "footway/crossing-raised": {"fields": ["crossing", "access", "surface", "kerb", "tactile_paving"], "geometry": ["line"], "tags": {"highway": "footway", "footway": "crossing", "traffic_calming": "table"}, "reference": {"key": "traffic_calming", "value": "table"}, "terms": ["flat top", "hump", "speed", "slow"], "name": "Raised Street Crossing"}, "footway/crossing": {"fields": ["crossing", "access", "surface", "kerb", "tactile_paving"], "geometry": ["line"], "tags": {"highway": "footway", "footway": "crossing"}, "reference": {"key": "footway", "value": "crossing"}, "terms": [], "name": "Street Crossing"}, "footway/crosswalk-raised": {"icon": "iD-highway-footway", "fields": ["crossing", "access", "surface", "kerb", "tactile_paving"], "geometry": ["line"], "tags": {"highway": "footway", "footway": "crossing", "crossing": "zebra", "traffic_calming": "table"}, "reference": {"key": "traffic_calming", "value": "table"}, "terms": ["zebra crossing", "flat top", "hump", "speed", "slow"], "name": "Raised Pedestrian Crosswalk"}, @@ -406,6 +407,7 @@ "highway/services": {"icon": "maki-car", "fields": ["name"], "geometry": ["point", "vertex", "area"], "tags": {"highway": "services"}, "terms": ["services", "travel plaza", "service station"], "name": "Service Area"}, "highway/speed_camera": {"icon": "maki-attraction", "geometry": ["point", "vertex"], "fields": ["direction", "ref"], "tags": {"highway": "speed_camera"}, "terms": [], "name": "Speed Camera"}, "highway/steps": {"icon": "iD-highway-steps", "fields": ["surface", "lit", "width", "incline_steps", "handrail", "step_count"], "geometry": ["line"], "tags": {"highway": "steps"}, "terms": ["stairs", "staircase"], "name": "Steps"}, + "highway/steps/conveying/escalator": {"icon": "maki-entrance", "fields": ["name", "incline_steps", "conveying", "access_simple", "lit", "surface", "width", "handrail", "step_count"], "geometry": ["line"], "terms": ["moving staircase", "moving stairway", "people mover"], "tags": {"highway": "steps", "conveying": "*"}, "name": "Escalator"}, "highway/stop": {"icon": "temaki-stop", "fields": ["stop", "direction_vertex"], "geometry": ["vertex"], "tags": {"highway": "stop"}, "terms": ["stop", "halt", "sign"], "name": "Stop Sign"}, "highway/street_lamp": {"icon": "temaki-bulb", "geometry": ["point", "vertex"], "tags": {"highway": "street_lamp"}, "fields": ["lamp_type", "direction", "ref"], "terms": ["streetlight", "street light", "lamp", "light", "gaslight"], "name": "Street Lamp"}, "highway/tertiary_link": {"icon": "iD-highway-tertiary-link", "fields": ["name", "oneway", "maxspeed", "maxspeed/advisory", "lanes", "surface", "structure", "maxheight", "ref_road_number", "cycleway", "access"], "geometry": ["line"], "tags": {"highway": "tertiary_link"}, "terms": ["on ramp", "off ramp", "ramp", "road", "street"], "name": "Tertiary Link"}, diff --git a/data/presets/presets/footway/conveying/moving-walkway.json b/data/presets/presets/footway/conveying/moving-walkway.json new file mode 100644 index 000000000..b9b3d4684 --- /dev/null +++ b/data/presets/presets/footway/conveying/moving-walkway.json @@ -0,0 +1,23 @@ +{ + "icon": "temaki-pedestrian", + "fields": [ + "name", "conveying", "access_simple", "lit", "surface", "width" + ], + "geometry": [ + "line" + ], + "terms": [ + "moving sidewalk", + "autwalk", + "skywalk", + "travolator", + "travelator", + "travellator", + "conveyor" + ], + "tags": { + "highway": "footway", + "conveying": "*" + }, + "name": "Moving Walkway" +} \ No newline at end of file diff --git a/data/taginfo.json b/data/taginfo.json index c5e62af93..c632cb502 100644 --- a/data/taginfo.json +++ b/data/taginfo.json @@ -2290,6 +2290,12 @@ "object_types": ["node"], "icon_url": "https://raw.githubusercontent.com/mapbox/maki/master/icons/entrance-alt1-15.svg?sanitize=true" }, + { + "key": "conveying", + "description": "Moving Walkway, Escalator", + "object_types": ["way"], + "icon_url": "https://raw.githubusercontent.com/bhousel/temaki/master/icons/pedestrian.svg?sanitize=true" + }, { "key": "traffic_calming", "value": "table", @@ -6624,6 +6630,21 @@ {"key": "construction", "description": "Type"}, {"key": "contact:webcam", "description": "Webcam URL"}, {"key": "content", "description": "Content"}, + { + "key": "conveying", + "value": "forward", + "description": "Movement Direction" + }, + { + "key": "conveying", + "value": "backward", + "description": "Movement Direction" + }, + { + "key": "conveying", + "value": "reversible", + "description": "Movement Direction" + }, {"key": "country", "description": "Country"}, {"key": "covered", "description": "Covered"}, {"key": "crane:type", "value": "portal_crane", "description": "Crane Type"}, diff --git a/dist/locales/en.json b/dist/locales/en.json index f8b240dc2..29fa63e46 100644 --- a/dist/locales/en.json +++ b/dist/locales/en.json @@ -1747,6 +1747,14 @@ "content": { "label": "Content" }, + "conveying": { + "label": "Movement Direction", + "options": { + "forward": "Forward", + "backward": "Backward", + "reversible": "Reversible" + } + }, "country": { "label": "Country" }, @@ -4402,6 +4410,10 @@ "name": "Entrance/Exit", "terms": "entrance,exit,door" }, + "footway/conveying/moving-walkway": { + "name": "Moving Walkway", + "terms": "moving sidewalk,autwalk,skywalk,travolator,travelator,travellator,conveyor" + }, "footway/crossing-raised": { "name": "Raised Street Crossing", "terms": "flat top,hump,speed,slow" @@ -4686,6 +4698,10 @@ "name": "Steps", "terms": "stairs,staircase" }, + "highway/steps/conveying/escalator": { + "name": "Escalator", + "terms": "moving staircase,moving stairway,people mover" + }, "highway/stop": { "name": "Stop Sign", "terms": "stop,halt,sign" From 32774136cbfbfd6ba80955e5a2bf7ea586af884e Mon Sep 17 00:00:00 2001 From: Bryan Housel Date: Tue, 2 Oct 2018 14:37:22 -0400 Subject: [PATCH 25/56] Adjust icon for moving walkway --- data/presets/presets.json | 4 ++-- .../presets/footway/conveying/moving-walkway.json | 12 ++++++++---- .../presets/highway/steps/conveying/escalator.json | 13 ++++++++++--- data/taginfo.json | 2 +- 4 files changed, 21 insertions(+), 10 deletions(-) diff --git a/data/presets/presets.json b/data/presets/presets.json index 9ad1bb3f3..500c02e46 100644 --- a/data/presets/presets.json +++ b/data/presets/presets.json @@ -335,7 +335,7 @@ "emergency/siren": {"icon": "fas-volume-up", "fields": ["siren/purpose", "siren/type", "ref", "operator"], "geometry": ["point", "vertex"], "terms": ["air raid", "loud", "noise", "storm", "tornado", "warning"], "tags": {"emergency": "siren"}, "name": "Siren"}, "emergency/water_tank": {"icon": "maki-water", "fields": ["name", "ref", "operator"], "geometry": ["point", "vertex"], "terms": ["water tank", "cistern", "reservoir"], "tags": {"emergency": "water_tank"}, "name": "Emergency Water Tank"}, "entrance": {"icon": "maki-entrance-alt1", "geometry": ["vertex"], "terms": ["entrance", "exit", "door"], "tags": {"entrance": "*"}, "fields": ["entrance", "access_simple", "address"], "name": "Entrance/Exit"}, - "footway/conveying/moving-walkway": {"icon": "temaki-pedestrian", "fields": ["name", "conveying", "access_simple", "lit", "surface", "width"], "geometry": ["line"], "terms": ["moving sidewalk", "autwalk", "skywalk", "travolator", "travelator", "travellator", "conveyor"], "tags": {"highway": "footway", "conveying": "*"}, "name": "Moving Walkway"}, + "footway/conveying/moving-walkway": {"icon": "iD-highway-footway", "fields": ["name", "conveying", "access_simple", "lit", "width"], "geometry": ["line"], "terms": ["moving sidewalk", "autwalk", "skywalk", "travolator", "travelator", "travellator", "conveyor"], "tags": {"highway": "footway", "conveying": "*"}, "name": "Moving Walkway"}, "footway/crossing-raised": {"fields": ["crossing", "access", "surface", "kerb", "tactile_paving"], "geometry": ["line"], "tags": {"highway": "footway", "footway": "crossing", "traffic_calming": "table"}, "reference": {"key": "traffic_calming", "value": "table"}, "terms": ["flat top", "hump", "speed", "slow"], "name": "Raised Street Crossing"}, "footway/crossing": {"fields": ["crossing", "access", "surface", "kerb", "tactile_paving"], "geometry": ["line"], "tags": {"highway": "footway", "footway": "crossing"}, "reference": {"key": "footway", "value": "crossing"}, "terms": [], "name": "Street Crossing"}, "footway/crosswalk-raised": {"icon": "iD-highway-footway", "fields": ["crossing", "access", "surface", "kerb", "tactile_paving"], "geometry": ["line"], "tags": {"highway": "footway", "footway": "crossing", "crossing": "zebra", "traffic_calming": "table"}, "reference": {"key": "traffic_calming", "value": "table"}, "terms": ["zebra crossing", "flat top", "hump", "speed", "slow"], "name": "Raised Pedestrian Crosswalk"}, @@ -407,7 +407,7 @@ "highway/services": {"icon": "maki-car", "fields": ["name"], "geometry": ["point", "vertex", "area"], "tags": {"highway": "services"}, "terms": ["services", "travel plaza", "service station"], "name": "Service Area"}, "highway/speed_camera": {"icon": "maki-attraction", "geometry": ["point", "vertex"], "fields": ["direction", "ref"], "tags": {"highway": "speed_camera"}, "terms": [], "name": "Speed Camera"}, "highway/steps": {"icon": "iD-highway-steps", "fields": ["surface", "lit", "width", "incline_steps", "handrail", "step_count"], "geometry": ["line"], "tags": {"highway": "steps"}, "terms": ["stairs", "staircase"], "name": "Steps"}, - "highway/steps/conveying/escalator": {"icon": "maki-entrance", "fields": ["name", "incline_steps", "conveying", "access_simple", "lit", "surface", "width", "handrail", "step_count"], "geometry": ["line"], "terms": ["moving staircase", "moving stairway", "people mover"], "tags": {"highway": "steps", "conveying": "*"}, "name": "Escalator"}, + "highway/steps/conveying/escalator": {"icon": "maki-entrance", "fields": ["name", "incline_steps", "conveying", "access_simple", "lit", "width", "handrail", "step_count"], "geometry": ["line"], "terms": ["moving staircase", "moving stairway", "people mover"], "tags": {"highway": "steps", "conveying": "*"}, "name": "Escalator"}, "highway/stop": {"icon": "temaki-stop", "fields": ["stop", "direction_vertex"], "geometry": ["vertex"], "tags": {"highway": "stop"}, "terms": ["stop", "halt", "sign"], "name": "Stop Sign"}, "highway/street_lamp": {"icon": "temaki-bulb", "geometry": ["point", "vertex"], "tags": {"highway": "street_lamp"}, "fields": ["lamp_type", "direction", "ref"], "terms": ["streetlight", "street light", "lamp", "light", "gaslight"], "name": "Street Lamp"}, "highway/tertiary_link": {"icon": "iD-highway-tertiary-link", "fields": ["name", "oneway", "maxspeed", "maxspeed/advisory", "lanes", "surface", "structure", "maxheight", "ref_road_number", "cycleway", "access"], "geometry": ["line"], "tags": {"highway": "tertiary_link"}, "terms": ["on ramp", "off ramp", "ramp", "road", "street"], "name": "Tertiary Link"}, diff --git a/data/presets/presets/footway/conveying/moving-walkway.json b/data/presets/presets/footway/conveying/moving-walkway.json index b9b3d4684..508fc2f3d 100644 --- a/data/presets/presets/footway/conveying/moving-walkway.json +++ b/data/presets/presets/footway/conveying/moving-walkway.json @@ -1,13 +1,17 @@ { - "icon": "temaki-pedestrian", + "icon": "iD-highway-footway", "fields": [ - "name", "conveying", "access_simple", "lit", "surface", "width" + "name", + "conveying", + "access_simple", + "lit", + "width" ], "geometry": [ "line" ], "terms": [ - "moving sidewalk", + "moving sidewalk", "autwalk", "skywalk", "travolator", @@ -20,4 +24,4 @@ "conveying": "*" }, "name": "Moving Walkway" -} \ No newline at end of file +} diff --git a/data/presets/presets/highway/steps/conveying/escalator.json b/data/presets/presets/highway/steps/conveying/escalator.json index 327f824db..e138240f0 100644 --- a/data/presets/presets/highway/steps/conveying/escalator.json +++ b/data/presets/presets/highway/steps/conveying/escalator.json @@ -1,13 +1,20 @@ { "icon": "maki-entrance", "fields": [ - "name", "incline_steps", "conveying", "access_simple", "lit", "surface", "width", "handrail", "step_count" + "name", + "incline_steps", + "conveying", + "access_simple", + "lit", + "width", + "handrail", + "step_count" ], "geometry": [ "line" ], "terms": [ - "moving staircase", + "moving staircase", "moving stairway", "people mover" ], @@ -16,4 +23,4 @@ "conveying": "*" }, "name": "Escalator" -} \ No newline at end of file +} diff --git a/data/taginfo.json b/data/taginfo.json index c632cb502..b7b7adf34 100644 --- a/data/taginfo.json +++ b/data/taginfo.json @@ -2294,7 +2294,7 @@ "key": "conveying", "description": "Moving Walkway, Escalator", "object_types": ["way"], - "icon_url": "https://raw.githubusercontent.com/bhousel/temaki/master/icons/pedestrian.svg?sanitize=true" + "icon_url": "https://raw.githubusercontent.com/openstreetmap/iD/master/svg/iD-sprite/presets/highway-footway.svg?sanitize=true" }, { "key": "traffic_calming", From 27f31433c6d55dab6e3265cbf282fdfeee746333 Mon Sep 17 00:00:00 2001 From: Bryan Housel Date: Tue, 2 Oct 2018 14:45:53 -0400 Subject: [PATCH 26/56] Move footway presets under highway folder, simplify conveying --- data/presets.yaml | 56 ++++++++-------- data/presets/categories.json | 4 +- data/presets/categories/path.json | 4 +- data/presets/presets.json | 12 ++-- .../footway/conveying.json} | 0 .../footway/crossing-raised.json | 0 .../{ => highway}/footway/crossing.json | 0 .../footway/crosswalk-raised.json | 0 .../{ => highway}/footway/crosswalk.json | 0 .../{ => highway}/footway/sidewalk.json | 0 .../escalator.json => conveying.json} | 0 data/taginfo.json | 64 +++++++++---------- dist/locales/en.json | 48 +++++++------- 13 files changed, 94 insertions(+), 94 deletions(-) rename data/presets/presets/{footway/conveying/moving-walkway.json => highway/footway/conveying.json} (100%) rename data/presets/presets/{ => highway}/footway/crossing-raised.json (100%) rename data/presets/presets/{ => highway}/footway/crossing.json (100%) rename data/presets/presets/{ => highway}/footway/crosswalk-raised.json (100%) rename data/presets/presets/{ => highway}/footway/crosswalk.json (100%) rename data/presets/presets/{ => highway}/footway/sidewalk.json (100%) rename data/presets/presets/highway/steps/{conveying/escalator.json => conveying.json} (100%) diff --git a/data/presets.yaml b/data/presets.yaml index 8c270ec2a..5f767b231 100644 --- a/data/presets.yaml +++ b/data/presets.yaml @@ -3388,34 +3388,6 @@ en: name: Entrance/Exit # 'terms: entrance,exit,door' terms: '' - footway/conveying/moving-walkway: - # 'highway=footway, conveying=*' - name: Moving Walkway - # 'terms: moving sidewalk,autwalk,skywalk,travolator,travelator,travellator,conveyor' - terms: '' - footway/crossing: - # 'highway=footway, footway=crossing' - name: Street Crossing - terms: '' - footway/crossing-raised: - # 'highway=footway, footway=crossing, traffic_calming=table' - name: Raised Street Crossing - # 'terms: flat top,hump,speed,slow' - terms: '' - footway/crosswalk: - # 'highway=footway, footway=crossing, crossing=zebra' - name: Pedestrian Crosswalk - # 'terms: zebra crossing' - terms: '' - footway/crosswalk-raised: - # 'highway=footway, footway=crossing, crossing=zebra, traffic_calming=table' - name: Raised Pedestrian Crosswalk - # 'terms: zebra crossing,flat top,hump,speed,slow' - terms: '' - footway/sidewalk: - # 'highway=footway, footway=sidewalk' - name: Sidewalk - terms: '' ford: # ford=yes name: Ford @@ -3596,6 +3568,34 @@ en: name: Foot Path # 'terms: hike,hiking,trackway,trail,walk' terms: '' + highway/footway/conveying/moving-walkway: + # 'highway=footway, conveying=*' + name: Moving Walkway + # 'terms: moving sidewalk,autwalk,skywalk,travolator,travelator,travellator,conveyor' + terms: '' + highway/footway/crossing: + # 'highway=footway, footway=crossing' + name: Street Crossing + terms: '' + highway/footway/crossing-raised: + # 'highway=footway, footway=crossing, traffic_calming=table' + name: Raised Street Crossing + # 'terms: flat top,hump,speed,slow' + terms: '' + highway/footway/crosswalk: + # 'highway=footway, footway=crossing, crossing=zebra' + name: Pedestrian Crosswalk + # 'terms: zebra crossing' + terms: '' + highway/footway/crosswalk-raised: + # 'highway=footway, footway=crossing, crossing=zebra, traffic_calming=table' + name: Raised Pedestrian Crosswalk + # 'terms: zebra crossing,flat top,hump,speed,slow' + terms: '' + highway/footway/sidewalk: + # 'highway=footway, footway=sidewalk' + name: Sidewalk + terms: '' highway/give_way: # highway=give_way name: Yield Sign diff --git a/data/presets/categories.json b/data/presets/categories.json index 60653e374..7a3c8bce9 100644 --- a/data/presets/categories.json +++ b/data/presets/categories.json @@ -100,8 +100,8 @@ "geometry": "line", "name": "Path Features", "members": [ - "footway/crosswalk", - "footway/sidewalk", + "highway/footway/crosswalk", + "highway/footway/sidewalk", "highway/steps", "highway/path", "highway/footway", diff --git a/data/presets/categories/path.json b/data/presets/categories/path.json index 53756b194..3bc83a9a1 100644 --- a/data/presets/categories/path.json +++ b/data/presets/categories/path.json @@ -3,8 +3,8 @@ "geometry": "line", "name": "Path Features", "members": [ - "footway/crosswalk", - "footway/sidewalk", + "highway/footway/crosswalk", + "highway/footway/sidewalk", "highway/steps", "highway/path", "highway/footway", diff --git a/data/presets/presets.json b/data/presets/presets.json index 500c02e46..b041c56ae 100644 --- a/data/presets/presets.json +++ b/data/presets/presets.json @@ -335,12 +335,6 @@ "emergency/siren": {"icon": "fas-volume-up", "fields": ["siren/purpose", "siren/type", "ref", "operator"], "geometry": ["point", "vertex"], "terms": ["air raid", "loud", "noise", "storm", "tornado", "warning"], "tags": {"emergency": "siren"}, "name": "Siren"}, "emergency/water_tank": {"icon": "maki-water", "fields": ["name", "ref", "operator"], "geometry": ["point", "vertex"], "terms": ["water tank", "cistern", "reservoir"], "tags": {"emergency": "water_tank"}, "name": "Emergency Water Tank"}, "entrance": {"icon": "maki-entrance-alt1", "geometry": ["vertex"], "terms": ["entrance", "exit", "door"], "tags": {"entrance": "*"}, "fields": ["entrance", "access_simple", "address"], "name": "Entrance/Exit"}, - "footway/conveying/moving-walkway": {"icon": "iD-highway-footway", "fields": ["name", "conveying", "access_simple", "lit", "width"], "geometry": ["line"], "terms": ["moving sidewalk", "autwalk", "skywalk", "travolator", "travelator", "travellator", "conveyor"], "tags": {"highway": "footway", "conveying": "*"}, "name": "Moving Walkway"}, - "footway/crossing-raised": {"fields": ["crossing", "access", "surface", "kerb", "tactile_paving"], "geometry": ["line"], "tags": {"highway": "footway", "footway": "crossing", "traffic_calming": "table"}, "reference": {"key": "traffic_calming", "value": "table"}, "terms": ["flat top", "hump", "speed", "slow"], "name": "Raised Street Crossing"}, - "footway/crossing": {"fields": ["crossing", "access", "surface", "kerb", "tactile_paving"], "geometry": ["line"], "tags": {"highway": "footway", "footway": "crossing"}, "reference": {"key": "footway", "value": "crossing"}, "terms": [], "name": "Street Crossing"}, - "footway/crosswalk-raised": {"icon": "iD-highway-footway", "fields": ["crossing", "access", "surface", "kerb", "tactile_paving"], "geometry": ["line"], "tags": {"highway": "footway", "footway": "crossing", "crossing": "zebra", "traffic_calming": "table"}, "reference": {"key": "traffic_calming", "value": "table"}, "terms": ["zebra crossing", "flat top", "hump", "speed", "slow"], "name": "Raised Pedestrian Crosswalk"}, - "footway/crosswalk": {"icon": "iD-highway-footway", "fields": ["crossing", "access", "surface", "kerb", "tactile_paving"], "geometry": ["line"], "tags": {"highway": "footway", "footway": "crossing", "crossing": "zebra"}, "reference": {"key": "footway", "value": "crossing"}, "terms": ["zebra crossing"], "name": "Pedestrian Crosswalk"}, - "footway/sidewalk": {"icon": "iD-highway-footway", "fields": ["surface", "lit", "width", "structure", "access"], "geometry": ["line"], "tags": {"highway": "footway", "footway": "sidewalk"}, "reference": {"key": "footway", "value": "sidewalk"}, "terms": [], "name": "Sidewalk"}, "ford": {"geometry": ["vertex"], "tags": {"ford": "yes"}, "name": "Ford"}, "golf/bunker": {"icon": "maki-golf", "fields": ["name"], "geometry": ["area"], "tags": {"golf": "bunker", "natural": "sand"}, "terms": ["hazard", "bunker"], "reference": {"key": "golf", "value": "bunker"}, "name": "Sand Trap"}, "golf/fairway": {"icon": "maki-golf", "fields": ["name"], "geometry": ["area"], "tags": {"golf": "fairway", "landuse": "grass"}, "reference": {"key": "golf", "value": "fairway"}, "name": "Fairway"}, @@ -379,6 +373,12 @@ "highway/cycleway": {"icon": "iD-highway-cycleway", "fields": ["name", "oneway", "surface", "lit", "width", "structure", "access"], "geometry": ["line"], "tags": {"highway": "cycleway"}, "terms": ["bike"], "name": "Cycle Path"}, "highway/elevator": {"icon": "temaki-elevator", "fields": ["access_simple", "opening_hours", "maxweight", "ref"], "geometry": ["vertex"], "tags": {"highway": "elevator"}, "terms": ["lift"], "name": "Elevator"}, "highway/footway": {"icon": "iD-highway-footway", "fields": ["name", "surface", "lit", "width", "structure", "access"], "geometry": ["line"], "terms": ["hike", "hiking", "trackway", "trail", "walk"], "tags": {"highway": "footway"}, "name": "Foot Path"}, + "highway/footway/conveying/moving-walkway": {"icon": "iD-highway-footway", "fields": ["name", "conveying", "access_simple", "lit", "width"], "geometry": ["line"], "terms": ["moving sidewalk", "autwalk", "skywalk", "travolator", "travelator", "travellator", "conveyor"], "tags": {"highway": "footway", "conveying": "*"}, "name": "Moving Walkway"}, + "highway/footway/crossing-raised": {"fields": ["crossing", "access", "surface", "kerb", "tactile_paving"], "geometry": ["line"], "tags": {"highway": "footway", "footway": "crossing", "traffic_calming": "table"}, "reference": {"key": "traffic_calming", "value": "table"}, "terms": ["flat top", "hump", "speed", "slow"], "name": "Raised Street Crossing"}, + "highway/footway/crossing": {"fields": ["crossing", "access", "surface", "kerb", "tactile_paving"], "geometry": ["line"], "tags": {"highway": "footway", "footway": "crossing"}, "reference": {"key": "footway", "value": "crossing"}, "terms": [], "name": "Street Crossing"}, + "highway/footway/crosswalk-raised": {"icon": "iD-highway-footway", "fields": ["crossing", "access", "surface", "kerb", "tactile_paving"], "geometry": ["line"], "tags": {"highway": "footway", "footway": "crossing", "crossing": "zebra", "traffic_calming": "table"}, "reference": {"key": "traffic_calming", "value": "table"}, "terms": ["zebra crossing", "flat top", "hump", "speed", "slow"], "name": "Raised Pedestrian Crosswalk"}, + "highway/footway/crosswalk": {"icon": "iD-highway-footway", "fields": ["crossing", "access", "surface", "kerb", "tactile_paving"], "geometry": ["line"], "tags": {"highway": "footway", "footway": "crossing", "crossing": "zebra"}, "reference": {"key": "footway", "value": "crossing"}, "terms": ["zebra crossing"], "name": "Pedestrian Crosswalk"}, + "highway/footway/sidewalk": {"icon": "iD-highway-footway", "fields": ["surface", "lit", "width", "structure", "access"], "geometry": ["line"], "tags": {"highway": "footway", "footway": "sidewalk"}, "reference": {"key": "footway", "value": "sidewalk"}, "terms": [], "name": "Sidewalk"}, "highway/give_way": {"icon": "temaki-yield", "fields": ["direction_vertex"], "geometry": ["vertex"], "tags": {"highway": "give_way"}, "terms": ["give way", "yield", "sign"], "name": "Yield Sign"}, "highway/living_street": {"icon": "iD-highway-living-street", "fields": ["name", "oneway", "maxspeed", "lanes", "surface", "structure", "maxheight", "access", "cycleway"], "geometry": ["line"], "tags": {"highway": "living_street"}, "name": "Living Street"}, "highway/milestone": {"icon": "temaki-milestone", "geometry": ["point", "vertex"], "fields": ["distance", "direction_vertex"], "tags": {"highway": "milestone"}, "terms": ["milestone", "marker"], "name": "Highway Milestone"}, diff --git a/data/presets/presets/footway/conveying/moving-walkway.json b/data/presets/presets/highway/footway/conveying.json similarity index 100% rename from data/presets/presets/footway/conveying/moving-walkway.json rename to data/presets/presets/highway/footway/conveying.json diff --git a/data/presets/presets/footway/crossing-raised.json b/data/presets/presets/highway/footway/crossing-raised.json similarity index 100% rename from data/presets/presets/footway/crossing-raised.json rename to data/presets/presets/highway/footway/crossing-raised.json diff --git a/data/presets/presets/footway/crossing.json b/data/presets/presets/highway/footway/crossing.json similarity index 100% rename from data/presets/presets/footway/crossing.json rename to data/presets/presets/highway/footway/crossing.json diff --git a/data/presets/presets/footway/crosswalk-raised.json b/data/presets/presets/highway/footway/crosswalk-raised.json similarity index 100% rename from data/presets/presets/footway/crosswalk-raised.json rename to data/presets/presets/highway/footway/crosswalk-raised.json diff --git a/data/presets/presets/footway/crosswalk.json b/data/presets/presets/highway/footway/crosswalk.json similarity index 100% rename from data/presets/presets/footway/crosswalk.json rename to data/presets/presets/highway/footway/crosswalk.json diff --git a/data/presets/presets/footway/sidewalk.json b/data/presets/presets/highway/footway/sidewalk.json similarity index 100% rename from data/presets/presets/footway/sidewalk.json rename to data/presets/presets/highway/footway/sidewalk.json diff --git a/data/presets/presets/highway/steps/conveying/escalator.json b/data/presets/presets/highway/steps/conveying.json similarity index 100% rename from data/presets/presets/highway/steps/conveying/escalator.json rename to data/presets/presets/highway/steps/conveying.json diff --git a/data/taginfo.json b/data/taginfo.json index b7b7adf34..9713915ed 100644 --- a/data/taginfo.json +++ b/data/taginfo.json @@ -2290,38 +2290,6 @@ "object_types": ["node"], "icon_url": "https://raw.githubusercontent.com/mapbox/maki/master/icons/entrance-alt1-15.svg?sanitize=true" }, - { - "key": "conveying", - "description": "Moving Walkway, Escalator", - "object_types": ["way"], - "icon_url": "https://raw.githubusercontent.com/openstreetmap/iD/master/svg/iD-sprite/presets/highway-footway.svg?sanitize=true" - }, - { - "key": "traffic_calming", - "value": "table", - "description": "Raised Street Crossing, Raised Pedestrian Crosswalk, Speed Table", - "object_types": ["way"] - }, - { - "key": "footway", - "value": "crossing", - "description": "Street Crossing", - "object_types": ["way"] - }, - { - "key": "crossing", - "value": "zebra", - "description": "Pedestrian Crosswalk", - "object_types": ["way"], - "icon_url": "https://raw.githubusercontent.com/openstreetmap/iD/master/svg/iD-sprite/presets/highway-footway.svg?sanitize=true" - }, - { - "key": "footway", - "value": "sidewalk", - "description": "Sidewalk", - "object_types": ["way"], - "icon_url": "https://raw.githubusercontent.com/openstreetmap/iD/master/svg/iD-sprite/presets/highway-footway.svg?sanitize=true" - }, { "key": "ford", "value": "yes", @@ -2516,12 +2484,25 @@ "object_types": ["way"], "icon_url": "https://raw.githubusercontent.com/openstreetmap/iD/master/svg/iD-sprite/presets/highway-footway.svg?sanitize=true" }, + { + "key": "traffic_calming", + "value": "table", + "description": "Raised Street Crossing, Raised Pedestrian Crosswalk, Speed Table", + "object_types": ["node"] + }, { "key": "highway", "value": "crossing", "description": "Street Crossing", "object_types": ["node"] }, + { + "key": "crossing", + "value": "zebra", + "description": "Pedestrian Crosswalk", + "object_types": ["node"], + "icon_url": "https://raw.githubusercontent.com/bhousel/temaki/master/icons/pedestrian.svg?sanitize=true" + }, { "key": "highway", "value": "cycleway", @@ -2543,6 +2524,25 @@ "object_types": ["way"], "icon_url": "https://raw.githubusercontent.com/openstreetmap/iD/master/svg/iD-sprite/presets/highway-footway.svg?sanitize=true" }, + { + "key": "conveying", + "description": "Moving Walkway, Escalator", + "object_types": ["way"], + "icon_url": "https://raw.githubusercontent.com/openstreetmap/iD/master/svg/iD-sprite/presets/highway-footway.svg?sanitize=true" + }, + { + "key": "footway", + "value": "crossing", + "description": "Street Crossing", + "object_types": ["way"] + }, + { + "key": "footway", + "value": "sidewalk", + "description": "Sidewalk", + "object_types": ["way"], + "icon_url": "https://raw.githubusercontent.com/openstreetmap/iD/master/svg/iD-sprite/presets/highway-footway.svg?sanitize=true" + }, { "key": "highway", "value": "give_way", diff --git a/dist/locales/en.json b/dist/locales/en.json index 29fa63e46..79538ab8a 100644 --- a/dist/locales/en.json +++ b/dist/locales/en.json @@ -4410,30 +4410,6 @@ "name": "Entrance/Exit", "terms": "entrance,exit,door" }, - "footway/conveying/moving-walkway": { - "name": "Moving Walkway", - "terms": "moving sidewalk,autwalk,skywalk,travolator,travelator,travellator,conveyor" - }, - "footway/crossing-raised": { - "name": "Raised Street Crossing", - "terms": "flat top,hump,speed,slow" - }, - "footway/crossing": { - "name": "Street Crossing", - "terms": "" - }, - "footway/crosswalk-raised": { - "name": "Raised Pedestrian Crosswalk", - "terms": "zebra crossing,flat top,hump,speed,slow" - }, - "footway/crosswalk": { - "name": "Pedestrian Crosswalk", - "terms": "zebra crossing" - }, - "footway/sidewalk": { - "name": "Sidewalk", - "terms": "" - }, "ford": { "name": "Ford", "terms": "" @@ -4586,6 +4562,30 @@ "name": "Foot Path", "terms": "hike,hiking,trackway,trail,walk" }, + "highway/footway/conveying/moving-walkway": { + "name": "Moving Walkway", + "terms": "moving sidewalk,autwalk,skywalk,travolator,travelator,travellator,conveyor" + }, + "highway/footway/crossing-raised": { + "name": "Raised Street Crossing", + "terms": "flat top,hump,speed,slow" + }, + "highway/footway/crossing": { + "name": "Street Crossing", + "terms": "" + }, + "highway/footway/crosswalk-raised": { + "name": "Raised Pedestrian Crosswalk", + "terms": "zebra crossing,flat top,hump,speed,slow" + }, + "highway/footway/crosswalk": { + "name": "Pedestrian Crosswalk", + "terms": "zebra crossing" + }, + "highway/footway/sidewalk": { + "name": "Sidewalk", + "terms": "" + }, "highway/give_way": { "name": "Yield Sign", "terms": "give way,yield,sign" From 1ffca3ce85d630539c7ebb11454a91770bd76536 Mon Sep 17 00:00:00 2001 From: Bryan Housel Date: Tue, 2 Oct 2018 17:01:04 -0400 Subject: [PATCH 27/56] Switch crossing presets to "marked"/"unmarked", retain "zebra" as unsearchable --- data/intro_graph.json | 68 +++++++-------- data/presets.yaml | 83 +++++++++++-------- data/presets/categories.json | 2 +- data/presets/categories/path.json | 2 +- data/presets/defaults.json | 4 +- data/presets/presets.json | 26 +++--- .../_zebra-raised.json} | 5 +- .../{crosswalk.json => crossing/_zebra.json} | 7 +- .../marked-raised.json} | 7 +- .../presets/highway/crossing/marked.json | 25 ++++++ .../highway/crossing/unmarked-raised.json | 35 ++++++++ .../{crossing.json => crossing/unmarked.json} | 10 ++- ...osswalk-raised.json => _zebra-raised.json} | 5 +- .../footway/{crosswalk.json => _zebra.json} | 7 +- ...rossing-raised.json => marked-raised.json} | 7 +- .../footway/{crossing.json => marked.json} | 12 ++- .../presets/highway/footway/sidewalk.json | 5 +- .../highway/footway/unmarked-raised.json | 40 +++++++++ .../presets/highway/footway/unmarked.json | 32 +++++++ data/taginfo.json | 38 +++++---- dist/locales/en.json | 72 +++++++++------- test/spec/actions/merge_nodes.js | 4 +- test/spec/core/difference.js | 4 +- 23 files changed, 356 insertions(+), 144 deletions(-) rename data/presets/presets/highway/{crosswalk-raised.json => crossing/_zebra-raised.json} (80%) rename data/presets/presets/highway/{crosswalk.json => crossing/_zebra.json} (72%) rename data/presets/presets/highway/{crossing-raised.json => crossing/marked-raised.json} (68%) create mode 100644 data/presets/presets/highway/crossing/marked.json create mode 100644 data/presets/presets/highway/crossing/unmarked-raised.json rename data/presets/presets/highway/{crossing.json => crossing/unmarked.json} (57%) rename data/presets/presets/highway/footway/{crosswalk-raised.json => _zebra-raised.json} (82%) rename data/presets/presets/highway/footway/{crosswalk.json => _zebra.json} (76%) rename data/presets/presets/highway/footway/{crossing-raised.json => marked-raised.json} (71%) rename data/presets/presets/highway/footway/{crossing.json => marked.json} (57%) create mode 100644 data/presets/presets/highway/footway/unmarked-raised.json create mode 100644 data/presets/presets/highway/footway/unmarked.json diff --git a/data/intro_graph.json b/data/intro_graph.json index 51fce20fa..1a6132042 100644 --- a/data/intro_graph.json +++ b/data/intro_graph.json @@ -209,7 +209,7 @@ "id": "n1026", "loc": [-85.634762, 41.946056], "tags": { - "crossing": "zebra", + "crossing": "marked", "highway": "crossing" } }, @@ -221,7 +221,7 @@ "id": "n1028", "loc": [-85.634622, 41.946175], "tags": { - "crossing": "zebra", + "crossing": "marked", "highway": "crossing" } }, @@ -6503,7 +6503,7 @@ "id": "n2411", "loc": [-85.63456, 41.945731], "tags": { - "crossing": "zebra", + "crossing": "marked", "highway": "crossing" } }, @@ -8823,7 +8823,7 @@ "id": "n293", "loc": [-85.635816, 41.942673], "tags": { - "crossing": "zebra", + "crossing": "marked", "highway": "crossing" } }, @@ -9484,7 +9484,7 @@ "id": "n308", "loc": [-85.63577, 41.940183], "tags": { - "crossing": "zebra", + "crossing": "marked", "highway": "crossing" } }, @@ -11846,7 +11846,7 @@ "id": "n363", "loc": [-85.632915, 41.943981], "tags": { - "crossing": "zebra", + "crossing": "marked", "highway": "crossing" } }, @@ -11894,7 +11894,7 @@ "id": "n364", "loc": [-85.632724, 41.943969], "tags": { - "crossing": "zebra", + "crossing": "marked", "highway": "crossing" } }, @@ -11986,7 +11986,7 @@ "id": "n366", "loc": [-85.632684, 41.944109], "tags": { - "crossing": "zebra", + "crossing": "marked", "highway": "crossing" } }, @@ -12078,7 +12078,7 @@ "id": "n368", "loc": [-85.63287, 41.944135], "tags": { - "crossing": "zebra", + "crossing": "marked", "highway": "crossing" } }, @@ -15592,7 +15592,7 @@ "id": "n4463", "loc": [-85.620103, 41.950884], "tags": { - "crossing": "zebra", + "crossing": "marked", "highway": "crossing" } }, @@ -16955,7 +16955,7 @@ "id": "n4686", "loc": [-85.635883, 41.94012], "tags": { - "crossing": "zebra", + "crossing": "marked", "highway": "crossing" } }, @@ -16967,7 +16967,7 @@ "id": "n4688", "loc": [-85.635768, 41.940051], "tags": { - "crossing": "zebra", + "crossing": "marked", "highway": "crossing" } }, @@ -16983,7 +16983,7 @@ "id": "n4690", "loc": [-85.635661, 41.940107], "tags": { - "crossing": "zebra", + "crossing": "marked", "highway": "crossing" } }, @@ -19230,7 +19230,7 @@ "id": "n602", "loc": [-85.637038, 41.942543], "tags": { - "crossing": "zebra", + "crossing": "marked", "highway": "crossing" } }, @@ -19762,7 +19762,7 @@ "id": "n720", "loc": [-85.634363, 41.945548], "tags": { - "crossing": "zebra", + "crossing": "marked", "highway": "crossing" } }, @@ -19790,7 +19790,7 @@ "id": "n726", "loc": [-85.633568, 41.944829], "tags": { - "crossing": "zebra", + "crossing": "marked", "highway": "crossing" } }, @@ -19814,7 +19814,7 @@ "id": "n730", "loc": [-85.634344, 41.945699], "tags": { - "crossing": "zebra", + "crossing": "marked", "highway": "crossing" } }, @@ -21430,7 +21430,7 @@ "id": "w129", "nodes": ["n309", "n602", "n603"], "tags": { - "crossing": "zebra", + "crossing": "marked", "footway": "crossing", "highway": "footway" } @@ -21694,7 +21694,7 @@ "id": "w159", "nodes": ["n714", "n720", "n721"], "tags": { - "crossing": "zebra", + "crossing": "marked", "footway": "crossing", "highway": "footway" } @@ -21718,7 +21718,7 @@ "id": "w161", "nodes": ["n713", "n726", "n722"], "tags": { - "crossing": "zebra", + "crossing": "marked", "footway": "crossing", "highway": "footway" } @@ -21727,7 +21727,7 @@ "id": "w162", "nodes": ["n727", "n2411", "n728"], "tags": { - "crossing": "zebra", + "crossing": "marked", "footway": "crossing", "highway": "footway" } @@ -21736,7 +21736,7 @@ "id": "w163", "nodes": ["n729", "n730", "n731"], "tags": { - "crossing": "zebra", + "crossing": "marked", "footway": "crossing", "highway": "footway" } @@ -22211,7 +22211,7 @@ "id": "w219", "nodes": ["n719", "n1026", "n1027"], "tags": { - "crossing": "zebra", + "crossing": "marked", "footway": "crossing", "highway": "footway" } @@ -22227,7 +22227,7 @@ "id": "w220", "nodes": ["n1027", "n1028", "n1019"], "tags": { - "crossing": "zebra", + "crossing": "marked", "footway": "crossing", "highway": "footway" } @@ -26143,7 +26143,7 @@ "id": "w58", "nodes": ["n240", "n293", "n294"], "tags": { - "crossing": "zebra", + "crossing": "marked", "footway": "crossing", "highway": "footway" } @@ -26329,7 +26329,7 @@ "id": "w60", "nodes": ["n239", "n308", "n307"], "tags": { - "crossing": "zebra", + "crossing": "marked", "footway": "crossing", "highway": "footway" } @@ -28338,7 +28338,7 @@ "id": "w770", "nodes": ["n4462", "n4463", "n4464"], "tags": { - "crossing": "zebra", + "crossing": "marked", "footway": "crossing", "highway": "footway" } @@ -28505,7 +28505,7 @@ "id": "w79", "nodes": ["n362", "n363", "n334"], "tags": { - "crossing": "zebra", + "crossing": "marked", "footway": "crossing", "highway": "footway" } @@ -28601,7 +28601,7 @@ "id": "w80", "nodes": ["n334", "n364", "n365"], "tags": { - "crossing": "zebra", + "crossing": "marked", "footway": "crossing", "highway": "footway" } @@ -28685,7 +28685,7 @@ "id": "w81", "nodes": ["n365", "n366", "n367"], "tags": { - "crossing": "zebra", + "crossing": "marked", "footway": "crossing", "highway": "footway" } @@ -28738,7 +28738,7 @@ "id": "w816", "nodes": ["n239", "n4686", "n4687"], "tags": { - "crossing": "zebra", + "crossing": "marked", "footway": "crossing", "highway": "footway" } @@ -28747,7 +28747,7 @@ "id": "w817", "nodes": ["n4687", "n4688", "n4689"], "tags": { - "crossing": "zebra", + "crossing": "marked", "footway": "crossing", "highway": "footway" } @@ -28756,7 +28756,7 @@ "id": "w818", "nodes": ["n4689", "n4690", "n307"], "tags": { - "crossing": "zebra", + "crossing": "marked", "footway": "crossing", "highway": "footway" } @@ -28772,7 +28772,7 @@ "id": "w82", "nodes": ["n724", "n368", "n369"], "tags": { - "crossing": "zebra", + "crossing": "marked", "footway": "crossing", "highway": "footway" } diff --git a/data/presets.yaml b/data/presets.yaml index 5f767b231..baa149787 100644 --- a/data/presets.yaml +++ b/data/presets.yaml @@ -3534,25 +3534,31 @@ en: name: Indoor Corridor # 'terms: gallery,hall,hallway,indoor,passage,passageway' terms: '' - highway/crossing: + highway/crossing/marked: + # 'highway=crossing, crossing=marked' + name: Marked Crosswalk + # 'terms: zebra crossing,marked crossing,crosswalk' + terms: '' + highway/crossing/marked-raised: + # 'highway=crossing, crossing=marked, traffic_calming=table' + name: Marked Crosswalk (Raised) + # 'terms: zebra crossing,marked crossing,crosswalk,flat top,hump,speed,slow' + terms: '' + highway/crossing/unmarked: # highway=crossing - name: Street Crossing - terms: '' - highway/crossing-raised: + name: Unmarked Crossing + terms: '' + highway/crossing/unmarked-raised: # 'highway=crossing, traffic_calming=table' - name: Raised Street Crossing + name: Unmarked Crossing (Raised) # 'terms: flat top,hump,speed,slow' - terms: '' - highway/crosswalk: + terms: '' + highway/crossing/zebra: # 'highway=crossing, crossing=zebra' - name: Pedestrian Crosswalk - # 'terms: zebra crossing' - terms: '' - highway/crosswalk-raised: + name: Marked Crosswalk + highway/crossing/zebra-raised: # 'highway=crossing, crossing=zebra, traffic_calming=table' - name: Raised Pedestrian Crosswalk - # 'terms: zebra crossing,flat top,hump,speed,slow' - terms: '' + name: Marked Crosswalk (Raised) highway/cycleway: # highway=cycleway name: Cycle Path @@ -3568,34 +3574,41 @@ en: name: Foot Path # 'terms: hike,hiking,trackway,trail,walk' terms: '' - highway/footway/conveying/moving-walkway: + highway/footway/conveying: # 'highway=footway, conveying=*' name: Moving Walkway # 'terms: moving sidewalk,autwalk,skywalk,travolator,travelator,travellator,conveyor' terms: '' - highway/footway/crossing: - # 'highway=footway, footway=crossing' - name: Street Crossing - terms: '' - highway/footway/crossing-raised: - # 'highway=footway, footway=crossing, traffic_calming=table' - name: Raised Street Crossing - # 'terms: flat top,hump,speed,slow' - terms: '' - highway/footway/crosswalk: - # 'highway=footway, footway=crossing, crossing=zebra' - name: Pedestrian Crosswalk - # 'terms: zebra crossing' - terms: '' - highway/footway/crosswalk-raised: - # 'highway=footway, footway=crossing, crossing=zebra, traffic_calming=table' - name: Raised Pedestrian Crosswalk - # 'terms: zebra crossing,flat top,hump,speed,slow' - terms: '' + highway/footway/marked: + # 'highway=footway, footway=crossing, crossing=marked' + name: Marked Crosswalk + # 'terms: zebra crossing,marked crossing,crosswalk' + terms: '' + highway/footway/marked-raised: + # 'highway=footway, footway=crossing, crossing=marked, traffic_calming=table' + name: Marked Crosswalk (Raised) + # 'terms: zebra crossing,marked crossing,crosswalk,flat top,hump,speed,slow' + terms: '' highway/footway/sidewalk: # 'highway=footway, footway=sidewalk' name: Sidewalk + # 'terms: pavement,sidepath' terms: '' + highway/footway/unmarked: + # 'highway=footway, footway=crossing' + name: Unmarked Crossing + terms: '' + highway/footway/unmarked-raised: + # 'highway=footway, footway=crossing, traffic_calming=table' + name: Unmarked Crossing (Raised) + # 'terms: flat top,hump,speed,slow' + terms: '' + highway/footway/zebra: + # 'highway=footway, footway=crossing, crossing=zebra' + name: Marked Crosswalk + highway/footway/zebra-raised: + # 'highway=footway, footway=crossing, crossing=zebra, traffic_calming=table' + name: Marked Crosswalk (Raised) highway/give_way: # highway=give_way name: Yield Sign @@ -3728,7 +3741,7 @@ en: name: Steps # 'terms: stairs,staircase' terms: '' - highway/steps/conveying/escalator: + highway/steps/conveying: # 'highway=steps, conveying=*' name: Escalator # 'terms: moving staircase,moving stairway,people mover' diff --git a/data/presets/categories.json b/data/presets/categories.json index 7a3c8bce9..af19ba230 100644 --- a/data/presets/categories.json +++ b/data/presets/categories.json @@ -100,7 +100,7 @@ "geometry": "line", "name": "Path Features", "members": [ - "highway/footway/crosswalk", + "highway/footway/marked", "highway/footway/sidewalk", "highway/steps", "highway/path", diff --git a/data/presets/categories/path.json b/data/presets/categories/path.json index 3bc83a9a1..275e726f3 100644 --- a/data/presets/categories/path.json +++ b/data/presets/categories/path.json @@ -3,7 +3,7 @@ "geometry": "line", "name": "Path Features", "members": [ - "highway/footway/crosswalk", + "highway/footway/marked", "highway/footway/sidewalk", "highway/steps", "highway/path", diff --git a/data/presets/defaults.json b/data/presets/defaults.json index 6feaec2eb..b0c9e52ef 100644 --- a/data/presets/defaults.json +++ b/data/presets/defaults.json @@ -36,8 +36,8 @@ "point" ], "vertex": [ - "highway/crosswalk", - "highway/crossing", + "highway/crossing/marked", + "highway/crossing/unmarked", "railway/level_crossing", "highway/traffic_signals", "highway/turning_circle", diff --git a/data/presets/presets.json b/data/presets/presets.json index b041c56ae..c3196ce4e 100644 --- a/data/presets/presets.json +++ b/data/presets/presets.json @@ -366,19 +366,23 @@ "highway/bridleway": {"fields": ["name", "surface", "width", "structure", "access"], "icon": "iD-highway-bridleway", "geometry": ["line"], "tags": {"highway": "bridleway"}, "terms": ["bridleway", "equestrian", "horse", "trail"], "name": "Bridle Path"}, "highway/bus_guideway": {"icon": "iD-highway-bus-guideway", "fields": ["name", "operator", "oneway"], "geometry": ["line"], "tags": {"highway": "bus_guideway"}, "addTags": {"highway": "bus_guideway", "access": "no", "bus": "designated"}, "removeTags": {"highway": "bus_guideway", "access": "no", "bus": "designated"}, "terms": [], "name": "Bus Guideway"}, "highway/corridor": {"icon": "iD-highway-footway", "fields": ["name", "width", "level", "access_simple"], "geometry": ["line"], "tags": {"highway": "corridor"}, "terms": ["gallery", "hall", "hallway", "indoor", "passage", "passageway"], "name": "Indoor Corridor"}, - "highway/crossing-raised": {"fields": ["crossing", "kerb", "tactile_paving"], "geometry": ["vertex"], "tags": {"highway": "crossing", "traffic_calming": "table"}, "reference": {"key": "traffic_calming", "value": "table"}, "terms": ["flat top", "hump", "speed", "slow"], "name": "Raised Street Crossing"}, - "highway/crossing": {"fields": ["crossing", "kerb", "tactile_paving"], "geometry": ["vertex"], "tags": {"highway": "crossing"}, "reference": {"key": "highway", "value": "crossing"}, "terms": [], "name": "Street Crossing"}, - "highway/crosswalk-raised": {"icon": "temaki-pedestrian", "fields": ["crossing", "kerb", "tactile_paving"], "geometry": ["vertex"], "tags": {"highway": "crossing", "crossing": "zebra", "traffic_calming": "table"}, "reference": {"key": "traffic_calming", "value": "table"}, "terms": ["zebra crossing", "flat top", "hump", "speed", "slow"], "name": "Raised Pedestrian Crosswalk"}, - "highway/crosswalk": {"icon": "temaki-pedestrian", "fields": ["crossing", "kerb", "tactile_paving"], "geometry": ["vertex"], "tags": {"highway": "crossing", "crossing": "zebra"}, "reference": {"key": "highway", "value": "crossing"}, "terms": ["zebra crossing"], "name": "Pedestrian Crosswalk"}, + "highway/crossing/zebra-raised": {"icon": "temaki-pedestrian", "fields": ["crossing", "kerb", "tactile_paving"], "geometry": ["vertex"], "tags": {"highway": "crossing", "crossing": "zebra", "traffic_calming": "table"}, "reference": {"key": "traffic_calming", "value": "table"}, "terms": ["zebra crossing", "marked crossing", "crosswalk", "flat top", "hump", "speed", "slow"], "name": "Marked Crosswalk (Raised)", "searchable": false}, + "highway/crossing/zebra": {"icon": "temaki-pedestrian", "fields": ["crossing", "kerb", "tactile_paving"], "geometry": ["vertex"], "tags": {"highway": "crossing", "crossing": "zebra"}, "reference": {"key": "highway", "value": "crossing"}, "terms": ["zebra crossing", "marked crossing", "crosswalk"], "name": "Marked Crosswalk", "searchable": false}, + "highway/crossing/marked-raised": {"icon": "temaki-pedestrian", "fields": ["crossing", "kerb", "tactile_paving"], "geometry": ["vertex"], "tags": {"highway": "crossing", "crossing": "marked", "traffic_calming": "table"}, "reference": {"key": "traffic_calming", "value": "table"}, "terms": ["zebra crossing", "marked crossing", "crosswalk", "flat top", "hump", "speed", "slow"], "name": "Marked Crosswalk (Raised)"}, + "highway/crossing/marked": {"icon": "temaki-pedestrian", "fields": ["crossing", "kerb", "tactile_paving"], "geometry": ["vertex"], "tags": {"highway": "crossing", "crossing": "marked"}, "reference": {"key": "highway", "value": "crossing"}, "terms": ["zebra crossing", "marked crossing", "crosswalk"], "name": "Marked Crosswalk"}, + "highway/crossing/unmarked-raised": {"fields": ["crossing", "kerb", "tactile_paving"], "geometry": ["vertex"], "addTags": {"highway": "crossing", "crossing": "unmarked", "traffic_calming": "table"}, "removeTags": {"highway": "crossing", "crossing": "unmarked", "traffic_calming": "table"}, "tags": {"highway": "crossing", "traffic_calming": "table"}, "reference": {"key": "traffic_calming", "value": "table"}, "terms": ["flat top", "hump", "speed", "slow"], "name": "Unmarked Crossing (Raised)"}, + "highway/crossing/unmarked": {"fields": ["crossing", "kerb", "tactile_paving"], "geometry": ["vertex"], "addTags": {"highway": "crossing", "crossing": "unmarked"}, "removeTags": {"highway": "crossing", "crossing": "unmarked"}, "tags": {"highway": "crossing"}, "reference": {"key": "highway", "value": "crossing"}, "terms": [], "name": "Unmarked Crossing"}, "highway/cycleway": {"icon": "iD-highway-cycleway", "fields": ["name", "oneway", "surface", "lit", "width", "structure", "access"], "geometry": ["line"], "tags": {"highway": "cycleway"}, "terms": ["bike"], "name": "Cycle Path"}, "highway/elevator": {"icon": "temaki-elevator", "fields": ["access_simple", "opening_hours", "maxweight", "ref"], "geometry": ["vertex"], "tags": {"highway": "elevator"}, "terms": ["lift"], "name": "Elevator"}, "highway/footway": {"icon": "iD-highway-footway", "fields": ["name", "surface", "lit", "width", "structure", "access"], "geometry": ["line"], "terms": ["hike", "hiking", "trackway", "trail", "walk"], "tags": {"highway": "footway"}, "name": "Foot Path"}, - "highway/footway/conveying/moving-walkway": {"icon": "iD-highway-footway", "fields": ["name", "conveying", "access_simple", "lit", "width"], "geometry": ["line"], "terms": ["moving sidewalk", "autwalk", "skywalk", "travolator", "travelator", "travellator", "conveyor"], "tags": {"highway": "footway", "conveying": "*"}, "name": "Moving Walkway"}, - "highway/footway/crossing-raised": {"fields": ["crossing", "access", "surface", "kerb", "tactile_paving"], "geometry": ["line"], "tags": {"highway": "footway", "footway": "crossing", "traffic_calming": "table"}, "reference": {"key": "traffic_calming", "value": "table"}, "terms": ["flat top", "hump", "speed", "slow"], "name": "Raised Street Crossing"}, - "highway/footway/crossing": {"fields": ["crossing", "access", "surface", "kerb", "tactile_paving"], "geometry": ["line"], "tags": {"highway": "footway", "footway": "crossing"}, "reference": {"key": "footway", "value": "crossing"}, "terms": [], "name": "Street Crossing"}, - "highway/footway/crosswalk-raised": {"icon": "iD-highway-footway", "fields": ["crossing", "access", "surface", "kerb", "tactile_paving"], "geometry": ["line"], "tags": {"highway": "footway", "footway": "crossing", "crossing": "zebra", "traffic_calming": "table"}, "reference": {"key": "traffic_calming", "value": "table"}, "terms": ["zebra crossing", "flat top", "hump", "speed", "slow"], "name": "Raised Pedestrian Crosswalk"}, - "highway/footway/crosswalk": {"icon": "iD-highway-footway", "fields": ["crossing", "access", "surface", "kerb", "tactile_paving"], "geometry": ["line"], "tags": {"highway": "footway", "footway": "crossing", "crossing": "zebra"}, "reference": {"key": "footway", "value": "crossing"}, "terms": ["zebra crossing"], "name": "Pedestrian Crosswalk"}, - "highway/footway/sidewalk": {"icon": "iD-highway-footway", "fields": ["surface", "lit", "width", "structure", "access"], "geometry": ["line"], "tags": {"highway": "footway", "footway": "sidewalk"}, "reference": {"key": "footway", "value": "sidewalk"}, "terms": [], "name": "Sidewalk"}, + "highway/footway/zebra-raised": {"icon": "iD-highway-footway", "fields": ["crossing", "access", "surface", "kerb", "tactile_paving"], "geometry": ["line"], "tags": {"highway": "footway", "footway": "crossing", "crossing": "zebra", "traffic_calming": "table"}, "reference": {"key": "traffic_calming", "value": "table"}, "terms": ["zebra crossing", "marked crossing", "crosswalk", "flat top", "hump", "speed", "slow"], "name": "Marked Crosswalk (Raised)", "searchable": false}, + "highway/footway/zebra": {"icon": "iD-highway-footway", "fields": ["crossing", "access", "surface", "kerb", "tactile_paving"], "geometry": ["line"], "tags": {"highway": "footway", "footway": "crossing", "crossing": "zebra"}, "reference": {"key": "footway", "value": "crossing"}, "terms": ["zebra crossing", "marked crossing", "crosswalk"], "name": "Marked Crosswalk", "searchable": false}, + "highway/footway/conveying": {"icon": "iD-highway-footway", "fields": ["name", "conveying", "access_simple", "lit", "width"], "geometry": ["line"], "terms": ["moving sidewalk", "autwalk", "skywalk", "travolator", "travelator", "travellator", "conveyor"], "tags": {"highway": "footway", "conveying": "*"}, "name": "Moving Walkway"}, + "highway/footway/marked-raised": {"icon": "iD-highway-footway", "fields": ["crossing", "access", "surface", "kerb", "tactile_paving"], "geometry": ["line"], "tags": {"highway": "footway", "footway": "crossing", "crossing": "marked", "traffic_calming": "table"}, "reference": {"key": "traffic_calming", "value": "table"}, "terms": ["zebra crossing", "marked crossing", "crosswalk", "flat top", "hump", "speed", "slow"], "name": "Marked Crosswalk (Raised)"}, + "highway/footway/marked": {"icon": "iD-highway-footway", "fields": ["crossing", "access", "surface", "kerb", "tactile_paving"], "geometry": ["line"], "tags": {"highway": "footway", "footway": "crossing", "crossing": "marked"}, "reference": {"key": "footway", "value": "crossing"}, "terms": ["zebra crossing", "marked crossing", "crosswalk"], "name": "Marked Crosswalk"}, + "highway/footway/sidewalk": {"icon": "iD-highway-footway", "fields": ["surface", "lit", "width", "structure", "access"], "geometry": ["line"], "tags": {"highway": "footway", "footway": "sidewalk"}, "reference": {"key": "footway", "value": "sidewalk"}, "terms": ["pavement", "sidepath"], "name": "Sidewalk"}, + "highway/footway/unmarked-raised": {"fields": ["crossing", "access", "surface", "kerb", "tactile_paving"], "geometry": ["line"], "addTags": {"highway": "footway", "footway": "crossing", "crossing": "unmarked", "traffic_calming": "table"}, "removeTags": {"highway": "footway", "footway": "crossing", "crossing": "unmarked", "traffic_calming": "table"}, "tags": {"highway": "footway", "footway": "crossing", "traffic_calming": "table"}, "reference": {"key": "traffic_calming", "value": "table"}, "terms": ["flat top", "hump", "speed", "slow"], "name": "Unmarked Crossing (Raised)"}, + "highway/footway/unmarked": {"fields": ["crossing", "access", "surface", "kerb", "tactile_paving"], "geometry": ["line"], "addTags": {"highway": "footway", "footway": "crossing", "crossing": "unmarked"}, "removeTags": {"highway": "footway", "footway": "crossing", "crossing": "unmarked"}, "tags": {"highway": "footway", "footway": "crossing"}, "reference": {"key": "footway", "value": "crossing"}, "terms": [], "name": "Unmarked Crossing"}, "highway/give_way": {"icon": "temaki-yield", "fields": ["direction_vertex"], "geometry": ["vertex"], "tags": {"highway": "give_way"}, "terms": ["give way", "yield", "sign"], "name": "Yield Sign"}, "highway/living_street": {"icon": "iD-highway-living-street", "fields": ["name", "oneway", "maxspeed", "lanes", "surface", "structure", "maxheight", "access", "cycleway"], "geometry": ["line"], "tags": {"highway": "living_street"}, "name": "Living Street"}, "highway/milestone": {"icon": "temaki-milestone", "geometry": ["point", "vertex"], "fields": ["distance", "direction_vertex"], "tags": {"highway": "milestone"}, "terms": ["milestone", "marker"], "name": "Highway Milestone"}, @@ -407,7 +411,7 @@ "highway/services": {"icon": "maki-car", "fields": ["name"], "geometry": ["point", "vertex", "area"], "tags": {"highway": "services"}, "terms": ["services", "travel plaza", "service station"], "name": "Service Area"}, "highway/speed_camera": {"icon": "maki-attraction", "geometry": ["point", "vertex"], "fields": ["direction", "ref"], "tags": {"highway": "speed_camera"}, "terms": [], "name": "Speed Camera"}, "highway/steps": {"icon": "iD-highway-steps", "fields": ["surface", "lit", "width", "incline_steps", "handrail", "step_count"], "geometry": ["line"], "tags": {"highway": "steps"}, "terms": ["stairs", "staircase"], "name": "Steps"}, - "highway/steps/conveying/escalator": {"icon": "maki-entrance", "fields": ["name", "incline_steps", "conveying", "access_simple", "lit", "width", "handrail", "step_count"], "geometry": ["line"], "terms": ["moving staircase", "moving stairway", "people mover"], "tags": {"highway": "steps", "conveying": "*"}, "name": "Escalator"}, + "highway/steps/conveying": {"icon": "maki-entrance", "fields": ["name", "incline_steps", "conveying", "access_simple", "lit", "width", "handrail", "step_count"], "geometry": ["line"], "terms": ["moving staircase", "moving stairway", "people mover"], "tags": {"highway": "steps", "conveying": "*"}, "name": "Escalator"}, "highway/stop": {"icon": "temaki-stop", "fields": ["stop", "direction_vertex"], "geometry": ["vertex"], "tags": {"highway": "stop"}, "terms": ["stop", "halt", "sign"], "name": "Stop Sign"}, "highway/street_lamp": {"icon": "temaki-bulb", "geometry": ["point", "vertex"], "tags": {"highway": "street_lamp"}, "fields": ["lamp_type", "direction", "ref"], "terms": ["streetlight", "street light", "lamp", "light", "gaslight"], "name": "Street Lamp"}, "highway/tertiary_link": {"icon": "iD-highway-tertiary-link", "fields": ["name", "oneway", "maxspeed", "maxspeed/advisory", "lanes", "surface", "structure", "maxheight", "ref_road_number", "cycleway", "access"], "geometry": ["line"], "tags": {"highway": "tertiary_link"}, "terms": ["on ramp", "off ramp", "ramp", "road", "street"], "name": "Tertiary Link"}, diff --git a/data/presets/presets/highway/crosswalk-raised.json b/data/presets/presets/highway/crossing/_zebra-raised.json similarity index 80% rename from data/presets/presets/highway/crosswalk-raised.json rename to data/presets/presets/highway/crossing/_zebra-raised.json index 452d61a6c..3b47aa2b4 100644 --- a/data/presets/presets/highway/crosswalk-raised.json +++ b/data/presets/presets/highway/crossing/_zebra-raised.json @@ -19,10 +19,13 @@ }, "terms": [ "zebra crossing", + "marked crossing", + "crosswalk", "flat top", "hump", "speed", "slow" ], - "name": "Raised Pedestrian Crosswalk" + "name": "Marked Crosswalk (Raised)", + "searchable": false } diff --git a/data/presets/presets/highway/crosswalk.json b/data/presets/presets/highway/crossing/_zebra.json similarity index 72% rename from data/presets/presets/highway/crosswalk.json rename to data/presets/presets/highway/crossing/_zebra.json index f59394d4d..dfbee0997 100644 --- a/data/presets/presets/highway/crosswalk.json +++ b/data/presets/presets/highway/crossing/_zebra.json @@ -17,7 +17,10 @@ "value": "crossing" }, "terms": [ - "zebra crossing" + "zebra crossing", + "marked crossing", + "crosswalk" ], - "name": "Pedestrian Crosswalk" + "name": "Marked Crosswalk", + "searchable": false } diff --git a/data/presets/presets/highway/crossing-raised.json b/data/presets/presets/highway/crossing/marked-raised.json similarity index 68% rename from data/presets/presets/highway/crossing-raised.json rename to data/presets/presets/highway/crossing/marked-raised.json index 1b57fa04e..76316a821 100644 --- a/data/presets/presets/highway/crossing-raised.json +++ b/data/presets/presets/highway/crossing/marked-raised.json @@ -1,4 +1,5 @@ { + "icon": "temaki-pedestrian", "fields": [ "crossing", "kerb", @@ -9,6 +10,7 @@ ], "tags": { "highway": "crossing", + "crossing": "marked", "traffic_calming": "table" }, "reference": { @@ -16,10 +18,13 @@ "value": "table" }, "terms": [ + "zebra crossing", + "marked crossing", + "crosswalk", "flat top", "hump", "speed", "slow" ], - "name": "Raised Street Crossing" + "name": "Marked Crosswalk (Raised)" } diff --git a/data/presets/presets/highway/crossing/marked.json b/data/presets/presets/highway/crossing/marked.json new file mode 100644 index 000000000..a61b71302 --- /dev/null +++ b/data/presets/presets/highway/crossing/marked.json @@ -0,0 +1,25 @@ +{ + "icon": "temaki-pedestrian", + "fields": [ + "crossing", + "kerb", + "tactile_paving" + ], + "geometry": [ + "vertex" + ], + "tags": { + "highway": "crossing", + "crossing": "marked" + }, + "reference": { + "key": "highway", + "value": "crossing" + }, + "terms": [ + "zebra crossing", + "marked crossing", + "crosswalk" + ], + "name": "Marked Crosswalk" +} diff --git a/data/presets/presets/highway/crossing/unmarked-raised.json b/data/presets/presets/highway/crossing/unmarked-raised.json new file mode 100644 index 000000000..9783c1c08 --- /dev/null +++ b/data/presets/presets/highway/crossing/unmarked-raised.json @@ -0,0 +1,35 @@ +{ + "fields": [ + "crossing", + "kerb", + "tactile_paving" + ], + "geometry": [ + "vertex" + ], + "addTags": { + "highway": "crossing", + "crossing": "unmarked", + "traffic_calming": "table" + }, + "removeTags": { + "highway": "crossing", + "crossing": "unmarked", + "traffic_calming": "table" + }, + "tags": { + "highway": "crossing", + "traffic_calming": "table" + }, + "reference": { + "key": "traffic_calming", + "value": "table" + }, + "terms": [ + "flat top", + "hump", + "speed", + "slow" + ], + "name": "Unmarked Crossing (Raised)" +} diff --git a/data/presets/presets/highway/crossing.json b/data/presets/presets/highway/crossing/unmarked.json similarity index 57% rename from data/presets/presets/highway/crossing.json rename to data/presets/presets/highway/crossing/unmarked.json index 08c81d23e..54dd7df43 100644 --- a/data/presets/presets/highway/crossing.json +++ b/data/presets/presets/highway/crossing/unmarked.json @@ -7,6 +7,14 @@ "geometry": [ "vertex" ], + "addTags": { + "highway": "crossing", + "crossing": "unmarked" + }, + "removeTags": { + "highway": "crossing", + "crossing": "unmarked" + }, "tags": { "highway": "crossing" }, @@ -15,5 +23,5 @@ "value": "crossing" }, "terms": [], - "name": "Street Crossing" + "name": "Unmarked Crossing" } diff --git a/data/presets/presets/highway/footway/crosswalk-raised.json b/data/presets/presets/highway/footway/_zebra-raised.json similarity index 82% rename from data/presets/presets/highway/footway/crosswalk-raised.json rename to data/presets/presets/highway/footway/_zebra-raised.json index f4da4f255..f6e173680 100644 --- a/data/presets/presets/highway/footway/crosswalk-raised.json +++ b/data/presets/presets/highway/footway/_zebra-raised.json @@ -22,10 +22,13 @@ }, "terms": [ "zebra crossing", + "marked crossing", + "crosswalk", "flat top", "hump", "speed", "slow" ], - "name": "Raised Pedestrian Crosswalk" + "name": "Marked Crosswalk (Raised)", + "searchable": false } diff --git a/data/presets/presets/highway/footway/crosswalk.json b/data/presets/presets/highway/footway/_zebra.json similarity index 76% rename from data/presets/presets/highway/footway/crosswalk.json rename to data/presets/presets/highway/footway/_zebra.json index a73153777..646800847 100644 --- a/data/presets/presets/highway/footway/crosswalk.json +++ b/data/presets/presets/highway/footway/_zebra.json @@ -20,7 +20,10 @@ "value": "crossing" }, "terms": [ - "zebra crossing" + "zebra crossing", + "marked crossing", + "crosswalk" ], - "name": "Pedestrian Crosswalk" + "name": "Marked Crosswalk", + "searchable": false } diff --git a/data/presets/presets/highway/footway/crossing-raised.json b/data/presets/presets/highway/footway/marked-raised.json similarity index 71% rename from data/presets/presets/highway/footway/crossing-raised.json rename to data/presets/presets/highway/footway/marked-raised.json index 0ed1a2b50..d23d080f7 100644 --- a/data/presets/presets/highway/footway/crossing-raised.json +++ b/data/presets/presets/highway/footway/marked-raised.json @@ -1,4 +1,5 @@ { + "icon": "iD-highway-footway", "fields": [ "crossing", "access", @@ -12,6 +13,7 @@ "tags": { "highway": "footway", "footway": "crossing", + "crossing": "marked", "traffic_calming": "table" }, "reference": { @@ -19,10 +21,13 @@ "value": "table" }, "terms": [ + "zebra crossing", + "marked crossing", + "crosswalk", "flat top", "hump", "speed", "slow" ], - "name": "Raised Street Crossing" + "name": "Marked Crosswalk (Raised)" } diff --git a/data/presets/presets/highway/footway/crossing.json b/data/presets/presets/highway/footway/marked.json similarity index 57% rename from data/presets/presets/highway/footway/crossing.json rename to data/presets/presets/highway/footway/marked.json index 293e22af8..71e8e499e 100644 --- a/data/presets/presets/highway/footway/crossing.json +++ b/data/presets/presets/highway/footway/marked.json @@ -1,4 +1,5 @@ { + "icon": "iD-highway-footway", "fields": [ "crossing", "access", @@ -11,12 +12,17 @@ ], "tags": { "highway": "footway", - "footway": "crossing" + "footway": "crossing", + "crossing": "marked" }, "reference": { "key": "footway", "value": "crossing" }, - "terms": [], - "name": "Street Crossing" + "terms": [ + "zebra crossing", + "marked crossing", + "crosswalk" + ], + "name": "Marked Crosswalk" } diff --git a/data/presets/presets/highway/footway/sidewalk.json b/data/presets/presets/highway/footway/sidewalk.json index ed2074fab..48390743e 100644 --- a/data/presets/presets/highway/footway/sidewalk.json +++ b/data/presets/presets/highway/footway/sidewalk.json @@ -18,6 +18,9 @@ "key": "footway", "value": "sidewalk" }, - "terms": [], + "terms": [ + "pavement", + "sidepath" + ], "name": "Sidewalk" } diff --git a/data/presets/presets/highway/footway/unmarked-raised.json b/data/presets/presets/highway/footway/unmarked-raised.json new file mode 100644 index 000000000..03ad8db78 --- /dev/null +++ b/data/presets/presets/highway/footway/unmarked-raised.json @@ -0,0 +1,40 @@ +{ + "fields": [ + "crossing", + "access", + "surface", + "kerb", + "tactile_paving" + ], + "geometry": [ + "line" + ], + "addTags": { + "highway": "footway", + "footway": "crossing", + "crossing": "unmarked", + "traffic_calming": "table" + }, + "removeTags": { + "highway": "footway", + "footway": "crossing", + "crossing": "unmarked", + "traffic_calming": "table" + }, + "tags": { + "highway": "footway", + "footway": "crossing", + "traffic_calming": "table" + }, + "reference": { + "key": "traffic_calming", + "value": "table" + }, + "terms": [ + "flat top", + "hump", + "speed", + "slow" + ], + "name": "Unmarked Crossing (Raised)" +} diff --git a/data/presets/presets/highway/footway/unmarked.json b/data/presets/presets/highway/footway/unmarked.json new file mode 100644 index 000000000..c60797fa2 --- /dev/null +++ b/data/presets/presets/highway/footway/unmarked.json @@ -0,0 +1,32 @@ +{ + "fields": [ + "crossing", + "access", + "surface", + "kerb", + "tactile_paving" + ], + "geometry": [ + "line" + ], + "addTags": { + "highway": "footway", + "footway": "crossing", + "crossing": "unmarked" + }, + "removeTags": { + "highway": "footway", + "footway": "crossing", + "crossing": "unmarked" + }, + "tags": { + "highway": "footway", + "footway": "crossing" + }, + "reference": { + "key": "footway", + "value": "crossing" + }, + "terms": [], + "name": "Unmarked Crossing" +} diff --git a/data/taginfo.json b/data/taginfo.json index 9713915ed..2b116be2f 100644 --- a/data/taginfo.json +++ b/data/taginfo.json @@ -2487,22 +2487,30 @@ { "key": "traffic_calming", "value": "table", - "description": "Raised Street Crossing, Raised Pedestrian Crosswalk, Speed Table", - "object_types": ["node"] - }, - { - "key": "highway", - "value": "crossing", - "description": "Street Crossing", - "object_types": ["node"] + "description": "Marked Crosswalk (Raised), Unmarked Crossing (Raised), Speed Table", + "object_types": ["node"], + "icon_url": "https://raw.githubusercontent.com/bhousel/temaki/master/icons/pedestrian.svg?sanitize=true" }, { "key": "crossing", "value": "zebra", - "description": "Pedestrian Crosswalk", + "description": "Marked Crosswalk", "object_types": ["node"], "icon_url": "https://raw.githubusercontent.com/bhousel/temaki/master/icons/pedestrian.svg?sanitize=true" }, + { + "key": "crossing", + "value": "marked", + "description": "Marked Crosswalk", + "object_types": ["node"], + "icon_url": "https://raw.githubusercontent.com/bhousel/temaki/master/icons/pedestrian.svg?sanitize=true" + }, + { + "key": "highway", + "value": "crossing", + "description": "Unmarked Crossing", + "object_types": ["node"] + }, { "key": "highway", "value": "cycleway", @@ -2530,12 +2538,6 @@ "object_types": ["way"], "icon_url": "https://raw.githubusercontent.com/openstreetmap/iD/master/svg/iD-sprite/presets/highway-footway.svg?sanitize=true" }, - { - "key": "footway", - "value": "crossing", - "description": "Street Crossing", - "object_types": ["way"] - }, { "key": "footway", "value": "sidewalk", @@ -2543,6 +2545,12 @@ "object_types": ["way"], "icon_url": "https://raw.githubusercontent.com/openstreetmap/iD/master/svg/iD-sprite/presets/highway-footway.svg?sanitize=true" }, + { + "key": "footway", + "value": "crossing", + "description": "Unmarked Crossing", + "object_types": ["way"] + }, { "key": "highway", "value": "give_way", diff --git a/dist/locales/en.json b/dist/locales/en.json index 79538ab8a..7f15d4e44 100644 --- a/dist/locales/en.json +++ b/dist/locales/en.json @@ -4534,22 +4534,30 @@ "name": "Indoor Corridor", "terms": "gallery,hall,hallway,indoor,passage,passageway" }, - "highway/crossing-raised": { - "name": "Raised Street Crossing", + "highway/crossing/zebra-raised": { + "name": "Marked Crosswalk (Raised)", + "terms": "zebra crossing,marked crossing,crosswalk,flat top,hump,speed,slow" + }, + "highway/crossing/zebra": { + "name": "Marked Crosswalk", + "terms": "zebra crossing,marked crossing,crosswalk" + }, + "highway/crossing/marked-raised": { + "name": "Marked Crosswalk (Raised)", + "terms": "zebra crossing,marked crossing,crosswalk,flat top,hump,speed,slow" + }, + "highway/crossing/marked": { + "name": "Marked Crosswalk", + "terms": "zebra crossing,marked crossing,crosswalk" + }, + "highway/crossing/unmarked-raised": { + "name": "Unmarked Crossing (Raised)", "terms": "flat top,hump,speed,slow" }, - "highway/crossing": { - "name": "Street Crossing", + "highway/crossing/unmarked": { + "name": "Unmarked Crossing", "terms": "" }, - "highway/crosswalk-raised": { - "name": "Raised Pedestrian Crosswalk", - "terms": "zebra crossing,flat top,hump,speed,slow" - }, - "highway/crosswalk": { - "name": "Pedestrian Crosswalk", - "terms": "zebra crossing" - }, "highway/cycleway": { "name": "Cycle Path", "terms": "bike" @@ -4562,28 +4570,36 @@ "name": "Foot Path", "terms": "hike,hiking,trackway,trail,walk" }, - "highway/footway/conveying/moving-walkway": { + "highway/footway/zebra-raised": { + "name": "Marked Crosswalk (Raised)", + "terms": "zebra crossing,marked crossing,crosswalk,flat top,hump,speed,slow" + }, + "highway/footway/zebra": { + "name": "Marked Crosswalk", + "terms": "zebra crossing,marked crossing,crosswalk" + }, + "highway/footway/conveying": { "name": "Moving Walkway", "terms": "moving sidewalk,autwalk,skywalk,travolator,travelator,travellator,conveyor" }, - "highway/footway/crossing-raised": { - "name": "Raised Street Crossing", - "terms": "flat top,hump,speed,slow" + "highway/footway/marked-raised": { + "name": "Marked Crosswalk (Raised)", + "terms": "zebra crossing,marked crossing,crosswalk,flat top,hump,speed,slow" }, - "highway/footway/crossing": { - "name": "Street Crossing", - "terms": "" - }, - "highway/footway/crosswalk-raised": { - "name": "Raised Pedestrian Crosswalk", - "terms": "zebra crossing,flat top,hump,speed,slow" - }, - "highway/footway/crosswalk": { - "name": "Pedestrian Crosswalk", - "terms": "zebra crossing" + "highway/footway/marked": { + "name": "Marked Crosswalk", + "terms": "zebra crossing,marked crossing,crosswalk" }, "highway/footway/sidewalk": { "name": "Sidewalk", + "terms": "pavement,sidepath" + }, + "highway/footway/unmarked-raised": { + "name": "Unmarked Crossing (Raised)", + "terms": "flat top,hump,speed,slow" + }, + "highway/footway/unmarked": { + "name": "Unmarked Crossing", "terms": "" }, "highway/give_way": { @@ -4698,7 +4714,7 @@ "name": "Steps", "terms": "stairs,staircase" }, - "highway/steps/conveying/escalator": { + "highway/steps/conveying": { "name": "Escalator", "terms": "moving staircase,moving stairway,people mover" }, diff --git a/test/spec/actions/merge_nodes.js b/test/spec/actions/merge_nodes.js index 5bde52beb..8d6c5460a 100644 --- a/test/spec/actions/merge_nodes.js +++ b/test/spec/actions/merge_nodes.js @@ -60,14 +60,14 @@ describe('iD.actionMergeNodes', function () { it('merges two isolated nodes, merging tags, and averaging loc of both interesting nodes', function() { var graph = iD.coreGraph([ iD.osmNode({ id: 'a', loc: [0, -2], tags: { highway: 'traffic_signals' } }), - iD.osmNode({ id: 'b', loc: [0, 2], tags: { crossing: 'zebra' } }) + iD.osmNode({ id: 'b', loc: [0, 2], tags: { crossing: 'marked' } }) ]); graph = iD.actionMergeNodes(['a', 'b'])(graph); expect(graph.hasEntity('a')).to.be.undefined; var survivor = graph.hasEntity('b'); - expect(survivor.tags).to.eql({ highway: 'traffic_signals', crossing: 'zebra' }, 'merge all tags'); + expect(survivor.tags).to.eql({ highway: 'traffic_signals', crossing: 'marked' }, 'merge all tags'); expect(survivor.loc).to.eql([0, 0], 'average loc of both interesting nodes'); }); diff --git a/test/spec/core/difference.js b/test/spec/core/difference.js index b3829127d..623387e5c 100644 --- a/test/spec/core/difference.js +++ b/test/spec/core/difference.js @@ -153,7 +153,7 @@ describe('iD.Difference', function () { describe('#summary', function () { var base = iD.Graph([ - iD.Node({id: 'a', tags: {crossing: 'zebra'}}), + iD.Node({id: 'a', tags: {crossing: 'marked'}}), iD.Node({id: 'b'}), iD.Node({id: 'v'}), iD.Way({id: '-', nodes: ['a', 'b']}) @@ -315,7 +315,7 @@ describe('iD.Difference', function () { }); it('reports a vertex as created when it has tags', function() { - var vertex = iD.Node({id: 'c', tags: {crossing: 'zebra'}}), + var vertex = iD.Node({id: 'c', tags: {crossing: 'marked'}}), way = base.entity('-').addNode('c'), head = base.replace(way).replace(vertex), diff = iD.Difference(base, head); From d55fe9f5dfe1cb239424bedce21b17fcc5e40634 Mon Sep 17 00:00:00 2001 From: Bryan Housel Date: Tue, 2 Oct 2018 17:43:49 -0400 Subject: [PATCH 28/56] Add generic "Recycling" preset and field `recycling_type=container/center` (closes #5363) --- data/presets.yaml | 19 ++++++++++--- data/presets/fields.json | 1 + data/presets/fields/recycling_type.json | 12 +++++++++ data/presets/presets.json | 3 ++- data/presets/presets/amenity/_recycling.json | 27 +++++++++++++++++++ ...ecycling.json => recycling_container.json} | 7 ----- data/taginfo.json | 15 ++++++++--- dist/locales/en.json | 14 +++++++++- 8 files changed, 82 insertions(+), 16 deletions(-) create mode 100644 data/presets/fields/recycling_type.json create mode 100644 data/presets/presets/amenity/_recycling.json rename data/presets/presets/amenity/{recycling.json => recycling_container.json} (77%) diff --git a/data/presets.yaml b/data/presets.yaml index baa149787..c975f7959 100644 --- a/data/presets.yaml +++ b/data/presets.yaml @@ -1267,6 +1267,16 @@ en: recycling_accepts: # 'recycling:=*' label: Accepts + recycling_type: + # recycling_type=* + label: Type + options: + # recycling_type=centre + centre: Center + # recycling_type=container + container: Container + # recycling_type field placeholder + placeholder: 'Container, Center' ref: # ref=* label: Reference Code @@ -2451,14 +2461,17 @@ en: terms: '' amenity/recycling: # amenity=recycling - name: Recycling Container - # 'terms: bin,can,bottle,glass,garbage,rubbish,scrap,trash' - terms: '' + name: Recycling amenity/recycling_centre: # 'amenity=recycling, recycling_type=centre' name: Recycling Center # 'terms: bottle,can,dump,glass,garbage,rubbish,scrap,trash' terms: '' + amenity/recycling_container: + # 'amenity=recycling, recycling_type=container' + name: Recycling Container + # 'terms: bin,can,bottle,glass,garbage,rubbish,scrap,trash' + terms: '' amenity/register_office: # amenity=register_office name: Register Office diff --git a/data/presets/fields.json b/data/presets/fields.json index 8c2246978..b0ec1b069 100644 --- a/data/presets/fields.json +++ b/data/presets/fields.json @@ -220,6 +220,7 @@ "railway/signal/direction": {"key": "railway:signal:direction", "type": "combo", "label": "Direction", "strings": {"options": {"forward": "Forward", "backward": "Backward", "both": "Both / All"}}}, "rating": {"key": "rating", "type": "combo", "label": "Power Rating", "snake_case": false}, "recycling_accepts": {"key": "recycling:", "type": "multiCombo", "label": "Accepts"}, + "recycling_type": {"key": "recycling_type", "type": "combo", "label": "Type", "placeholder": "Container, Center", "strings": {"options": {"container": "Container", "centre": "Center"}}}, "ref_aeroway_gate": {"key": "ref", "type": "text", "label": "Gate Number"}, "ref_golf_hole": {"key": "ref", "type": "text", "label": "Hole Number", "placeholder": "1-18"}, "ref_highway_junction": {"key": "ref", "type": "text", "label": "Junction Number"}, diff --git a/data/presets/fields/recycling_type.json b/data/presets/fields/recycling_type.json new file mode 100644 index 000000000..31e767816 --- /dev/null +++ b/data/presets/fields/recycling_type.json @@ -0,0 +1,12 @@ +{ + "key": "recycling_type", + "type": "combo", + "label": "Type", + "placeholder": "Container, Center", + "strings": { + "options": { + "container": "Container", + "centre": "Center" + } + } +} diff --git a/data/presets/presets.json b/data/presets/presets.json index c3196ce4e..4d1f7eb42 100644 --- a/data/presets/presets.json +++ b/data/presets/presets.json @@ -39,6 +39,7 @@ "amenity/coworking_space": {"icon": "maki-commercial", "fields": ["name", "address", "building_area", "opening_hours", "internet_access", "internet_access/fee", "internet_access/ssid"], "geometry": ["point", "area"], "tags": {"amenity": "coworking_space"}, "name": "Coworking Space", "searchable": false}, "amenity/ferry_terminal": {"icon": "maki-ferry", "fields": ["name", "network", "operator", "address", "building_area"], "geometry": ["point", "vertex", "area"], "terms": [], "tags": {"amenity": "ferry_terminal"}, "name": "Ferry Station / Terminal", "searchable": false}, "amenity/nursing_home": {"icon": "maki-wheelchair", "fields": ["name", "operator", "address", "building_area", "social_facility", "social_facility_for", "opening_hours", "wheelchair"], "geometry": ["point", "area"], "tags": {"amenity": "nursing_home"}, "reference": {"key": "social_facility", "value": "nursing_home"}, "name": "Nursing Home", "searchable": false}, + "amenity/recycling": {"icon": "maki-recycling", "fields": ["recycling_type", "recycling_accepts", "collection_times"], "geometry": ["point", "area"], "terms": ["bin", "can", "bottle", "glass", "garbage", "rubbish", "scrap", "trash"], "tags": {"amenity": "recycling"}, "name": "Recycling", "searchable": false}, "amenity/register_office": {"icon": "maki-town-hall", "fields": ["name", "address", "building_area", "opening_hours", "operator"], "geometry": ["point", "area"], "tags": {"amenity": "register_office"}, "reference": {"key": "government", "value": "register_office"}, "name": "Register Office", "searchable": false}, "amenity/scrapyard": {"icon": "maki-car", "fields": ["name", "operator", "address", "opening_hours"], "geometry": ["point", "area"], "tags": {"amenity": "scrapyard"}, "reference": {"key": "industrial", "value": "scrap_yard"}, "name": "Scrap Yard", "searchable": false}, "amenity/swimming_pool": {"icon": "maki-swimming", "geometry": ["point", "vertex", "area"], "tags": {"amenity": "swimming_pool"}, "reference": {"key": "leisure", "value": "swimming_pool"}, "name": "Swimming Pool", "searchable": false}, @@ -125,7 +126,7 @@ "amenity/public_bookcase": {"icon": "maki-library", "fields": ["name", "operator", "capacity", "website"], "geometry": ["point", "area"], "terms": ["library", "bookcrossing"], "tags": {"amenity": "public_bookcase"}, "name": "Public Bookcase"}, "amenity/ranger_station": {"icon": "maki-ranger-station", "fields": ["name", "operator", "address", "building_area", "opening_hours"], "geometry": ["point", "area"], "terms": ["visitor center", "visitor centre", "permit center", "permit centre", "backcountry office", "warden office", "warden center"], "tags": {"amenity": "ranger_station"}, "name": "Ranger Station"}, "amenity/recycling_centre": {"icon": "maki-recycling", "fields": ["name", "operator", "address", "building", "opening_hours", "recycling_accepts"], "geometry": ["point", "area"], "terms": ["bottle", "can", "dump", "glass", "garbage", "rubbish", "scrap", "trash"], "tags": {"amenity": "recycling", "recycling_type": "centre"}, "reference": {"key": "recycling_type", "value": "*"}, "name": "Recycling Center"}, - "amenity/recycling": {"icon": "maki-recycling", "fields": ["recycling_accepts", "collection_times"], "geometry": ["point", "area"], "terms": ["bin", "can", "bottle", "glass", "garbage", "rubbish", "scrap", "trash"], "tags": {"amenity": "recycling"}, "addTags": {"amenity": "recycling", "recycling_type": "container"}, "removeTags": {"amenity": "recycling", "recycling_type": "container"}, "reference": {"key": "amenity", "value": "recycling"}, "name": "Recycling Container"}, + "amenity/recycling_container": {"icon": "maki-recycling", "fields": ["recycling_accepts", "collection_times"], "geometry": ["point", "area"], "terms": ["bin", "can", "bottle", "glass", "garbage", "rubbish", "scrap", "trash"], "tags": {"amenity": "recycling", "recycling_type": "container"}, "reference": {"key": "amenity", "value": "recycling"}, "name": "Recycling Container"}, "amenity/restaurant": {"icon": "maki-restaurant", "fields": ["name", "cuisine", "address", "building_area", "opening_hours", "capacity", "takeaway", "delivery", "smoking", "outdoor_seating"], "geometry": ["point", "area"], "terms": ["bar", "breakfast", "cafe", "café", "canteen", "coffee", "dine", "dining", "dinner", "drive-in", "eat", "grill", "lunch", "table"], "tags": {"amenity": "restaurant"}, "name": "Restaurant"}, "amenity/sanitary_dump_station": {"icon": "temaki-storage_tank", "fields": ["operator", "access_simple", "fee", "water_point"], "geometry": ["point", "vertex", "area"], "terms": ["Motor Home", "Camper", "Sanitary", "Dump Station", "Elsan", "CDP", "CTDP", "Chemical Toilet"], "tags": {"amenity": "sanitary_dump_station"}, "name": "RV Toilet Disposal"}, "amenity/school": {"icon": "maki-school", "fields": ["name", "operator", "address", "religion", "denomination"], "geometry": ["point", "area"], "terms": ["academy", "elementary school", "middle school", "high school"], "tags": {"amenity": "school"}, "name": "School Grounds"}, diff --git a/data/presets/presets/amenity/_recycling.json b/data/presets/presets/amenity/_recycling.json new file mode 100644 index 000000000..9fd440d1b --- /dev/null +++ b/data/presets/presets/amenity/_recycling.json @@ -0,0 +1,27 @@ +{ + "icon": "maki-recycling", + "fields": [ + "recycling_type", + "recycling_accepts", + "collection_times" + ], + "geometry": [ + "point", + "area" + ], + "terms": [ + "bin", + "can", + "bottle", + "glass", + "garbage", + "rubbish", + "scrap", + "trash" + ], + "tags": { + "amenity": "recycling" + }, + "name": "Recycling", + "searchable": false +} diff --git a/data/presets/presets/amenity/recycling.json b/data/presets/presets/amenity/recycling_container.json similarity index 77% rename from data/presets/presets/amenity/recycling.json rename to data/presets/presets/amenity/recycling_container.json index 68847b930..f7ab742ca 100644 --- a/data/presets/presets/amenity/recycling.json +++ b/data/presets/presets/amenity/recycling_container.json @@ -19,13 +19,6 @@ "trash" ], "tags": { - "amenity": "recycling" - }, - "addTags": { - "amenity": "recycling", - "recycling_type": "container" - }, - "removeTags": { "amenity": "recycling", "recycling_type": "container" }, diff --git a/data/taginfo.json b/data/taginfo.json index 2b116be2f..244690dee 100644 --- a/data/taginfo.json +++ b/data/taginfo.json @@ -248,6 +248,13 @@ "object_types": ["node", "area"], "icon_url": "https://raw.githubusercontent.com/mapbox/maki/master/icons/wheelchair-15.svg?sanitize=true" }, + { + "key": "amenity", + "value": "recycling", + "description": "Recycling", + "object_types": ["node", "area"], + "icon_url": "https://raw.githubusercontent.com/mapbox/maki/master/icons/recycling-15.svg?sanitize=true" + }, { "key": "amenity", "value": "register_office", @@ -843,14 +850,14 @@ { "key": "recycling_type", "value": "centre", - "description": "Recycling Center", + "description": "Recycling Center, Type", "object_types": ["node", "area"], "icon_url": "https://raw.githubusercontent.com/mapbox/maki/master/icons/recycling-15.svg?sanitize=true" }, { - "key": "amenity", - "value": "recycling", - "description": "Recycling Container", + "key": "recycling_type", + "value": "container", + "description": "Recycling Container, Type", "object_types": ["node", "area"], "icon_url": "https://raw.githubusercontent.com/mapbox/maki/master/icons/recycling-15.svg?sanitize=true" }, diff --git a/dist/locales/en.json b/dist/locales/en.json index 7f15d4e44..cac517781 100644 --- a/dist/locales/en.json +++ b/dist/locales/en.json @@ -2521,6 +2521,14 @@ "recycling_accepts": { "label": "Accepts" }, + "recycling_type": { + "label": "Type", + "placeholder": "Container, Center", + "options": { + "container": "Container", + "centre": "Center" + } + }, "ref_aeroway_gate": { "label": "Gate Number" }, @@ -3226,6 +3234,10 @@ "name": "Nursing Home", "terms": "" }, + "amenity/recycling": { + "name": "Recycling", + "terms": "bin,can,bottle,glass,garbage,rubbish,scrap,trash" + }, "amenity/register_office": { "name": "Register Office", "terms": "" @@ -3570,7 +3582,7 @@ "name": "Recycling Center", "terms": "bottle,can,dump,glass,garbage,rubbish,scrap,trash" }, - "amenity/recycling": { + "amenity/recycling_container": { "name": "Recycling Container", "terms": "bin,can,bottle,glass,garbage,rubbish,scrap,trash" }, From f3e23b71963f990b1c949bd50bf64967eacb17eb Mon Sep 17 00:00:00 2001 From: yves Date: Thu, 4 Oct 2018 14:53:41 +0200 Subject: [PATCH 29/56] Split piste presset into each piste:values to make sense of the difficulty and grooming keys. --- .../{piste => piste_downhill}/difficulty.json | 0 .../fields/piste_downhill/grooming.json | 12 ++++++++ .../{piste => piste_downhill}/type.json | 8 +---- .../presets/fields/piste_hike/difficulty.json | 17 +++++++++++ data/presets/fields/piste_hike/grooming.json | 11 +++++++ .../fields/piste_nordic/difficulty.json | 15 ++++++++++ .../{piste => piste_nordic}/grooming.json | 3 +- data/presets/fields/piste_nordic/type.json | 12 ++++++++ .../fields/piste_skitour/difficulty.json | 17 +++++++++++ .../fields/piste_skitour/grooming.json | 12 ++++++++ .../presets/fields/piste_sled/difficulty.json | 17 +++++++++++ data/presets/fields/piste_sled/grooming.json | 11 +++++++ .../fields/piste_sleigh/difficulty.json | 17 +++++++++++ .../presets/fields/piste_sleigh/grooming.json | 11 +++++++ .../{piste.json => piste/piste_downhill.json} | 16 +++++----- data/presets/presets/piste/piste_hike.json | 27 +++++++++++++++++ .../presets/piste/piste_ice_skate.json | 24 +++++++++++++++ data/presets/presets/piste/piste_nordic.json | 27 +++++++++++++++++ data/presets/presets/piste/piste_skitour.json | 26 ++++++++++++++++ data/presets/presets/piste/piste_sled.json | 27 +++++++++++++++++ data/presets/presets/piste/piste_sleigh.json | 30 +++++++++++++++++++ 21 files changed, 322 insertions(+), 18 deletions(-) rename data/presets/fields/{piste => piste_downhill}/difficulty.json (100%) create mode 100644 data/presets/fields/piste_downhill/grooming.json rename data/presets/fields/{piste => piste_downhill}/type.json (51%) create mode 100644 data/presets/fields/piste_hike/difficulty.json create mode 100644 data/presets/fields/piste_hike/grooming.json create mode 100644 data/presets/fields/piste_nordic/difficulty.json rename data/presets/fields/{piste => piste_nordic}/grooming.json (80%) create mode 100644 data/presets/fields/piste_nordic/type.json create mode 100644 data/presets/fields/piste_skitour/difficulty.json create mode 100644 data/presets/fields/piste_skitour/grooming.json create mode 100644 data/presets/fields/piste_sled/difficulty.json create mode 100644 data/presets/fields/piste_sled/grooming.json create mode 100644 data/presets/fields/piste_sleigh/difficulty.json create mode 100644 data/presets/fields/piste_sleigh/grooming.json rename data/presets/presets/{piste.json => piste/piste_downhill.json} (56%) create mode 100644 data/presets/presets/piste/piste_hike.json create mode 100644 data/presets/presets/piste/piste_ice_skate.json create mode 100644 data/presets/presets/piste/piste_nordic.json create mode 100644 data/presets/presets/piste/piste_skitour.json create mode 100644 data/presets/presets/piste/piste_sled.json create mode 100644 data/presets/presets/piste/piste_sleigh.json diff --git a/data/presets/fields/piste/difficulty.json b/data/presets/fields/piste_downhill/difficulty.json similarity index 100% rename from data/presets/fields/piste/difficulty.json rename to data/presets/fields/piste_downhill/difficulty.json diff --git a/data/presets/fields/piste_downhill/grooming.json b/data/presets/fields/piste_downhill/grooming.json new file mode 100644 index 000000000..ad415eb25 --- /dev/null +++ b/data/presets/fields/piste_downhill/grooming.json @@ -0,0 +1,12 @@ +{ + "key": "piste:grooming", + "type": "combo", + "label": "Grooming", + "strings": { + "options": { + "classic": "Classic", + "mogul": "Mogul", + "backcountry": "Backcountry - no grooming" + } + } +} diff --git a/data/presets/fields/piste/type.json b/data/presets/fields/piste_downhill/type.json similarity index 51% rename from data/presets/fields/piste/type.json rename to data/presets/fields/piste_downhill/type.json index ac3bee99a..597f838e2 100644 --- a/data/presets/fields/piste/type.json +++ b/data/presets/fields/piste_downhill/type.json @@ -5,15 +5,9 @@ "strings": { "options": { "downhill": "Downhill", - "nordic": "Nordic", - "skitour": "Skitour", - "sled": "Sled", - "hike": "Hike", - "sleigh": "Sleigh", - "ice_skate": "Ice Skate", "snow_park": "Snow Park", "playground": "Playground", - "connection": "Connection" + "connection": "Connection between pistes" } } } diff --git a/data/presets/fields/piste_hike/difficulty.json b/data/presets/fields/piste_hike/difficulty.json new file mode 100644 index 000000000..a06a3d18b --- /dev/null +++ b/data/presets/fields/piste_hike/difficulty.json @@ -0,0 +1,17 @@ +{ + "key": "piste:difficulty", + "type": "combo", + "label": "Difficulty", + "placeholder": "Easy, Intermediate, Advanced...", + "strings": { + "options": { + "novice": "Novice", + "easy": "Easy", + "intermediate": "Intermediate", + "advanced": "Advanced", + "expert": "Expert", + "freeride": "Freeride", + "extreme": "Extreme" + } + } +} diff --git a/data/presets/fields/piste_hike/grooming.json b/data/presets/fields/piste_hike/grooming.json new file mode 100644 index 000000000..733b9da41 --- /dev/null +++ b/data/presets/fields/piste_hike/grooming.json @@ -0,0 +1,11 @@ +{ + "key": "piste:grooming", + "type": "combo", + "label": "Grooming", + "strings": { + "options": { + "classic": "Classic - Winter Hiking", + "backcountry": "Backcountry - Snowshoeing" + } + } +} diff --git a/data/presets/fields/piste_nordic/difficulty.json b/data/presets/fields/piste_nordic/difficulty.json new file mode 100644 index 000000000..52d173667 --- /dev/null +++ b/data/presets/fields/piste_nordic/difficulty.json @@ -0,0 +1,15 @@ +{ + "key": "piste:difficulty", + "type": "combo", + "label": "Difficulty", + "placeholder": "Easy, Intermediate, Advanced...", + "strings": { + "options": { + "novice": "Novice - Flat, no effort needed", + "easy": "Easy - Soft hills, short steep section", + "intermediate": "Intermediate - Steep section", + "advanced": "Advanced - Narrow, steep or icy section, sharp turn", + "expert": "Expert - Dangerous terrain around" + } + } +} diff --git a/data/presets/fields/piste/grooming.json b/data/presets/fields/piste_nordic/grooming.json similarity index 80% rename from data/presets/fields/piste/grooming.json rename to data/presets/fields/piste_nordic/grooming.json index a96c9f563..71b07d971 100644 --- a/data/presets/fields/piste/grooming.json +++ b/data/presets/fields/piste_nordic/grooming.json @@ -5,8 +5,7 @@ "strings": { "options": { "classic": "Classic", - "mogul": "Mogul", - "backcountry": "Backcountry", + "backcountry": "Backcountry, no grooming", "classic+skating": "Classic and Skating", "scooter": "Scooter/Snowmobile", "skating": "Skating" diff --git a/data/presets/fields/piste_nordic/type.json b/data/presets/fields/piste_nordic/type.json new file mode 100644 index 000000000..2065421f4 --- /dev/null +++ b/data/presets/fields/piste_nordic/type.json @@ -0,0 +1,12 @@ +{ + "key": "piste:type", + "type": "typeCombo", + "label": "Type", + "strings": { + "options": { + "downhill": "Nordic", + "playground": "Playground", + "connection": "Connection between pistes" + } + } +} diff --git a/data/presets/fields/piste_skitour/difficulty.json b/data/presets/fields/piste_skitour/difficulty.json new file mode 100644 index 000000000..c0227f1bd --- /dev/null +++ b/data/presets/fields/piste_skitour/difficulty.json @@ -0,0 +1,17 @@ +{ + "key": "piste:difficulty", + "type": "combo", + "label": "Difficulty", + "placeholder": "Easy, Intermediate, Advanced...", + "strings": { + "options": { + "novice": "novice - L: inclination <30 degree", + "easy": "Easy - WS: inclination 30-35 degree", + "intermediate": "Intermediate - ZS: inclination 35-40 degree", + "advanced": "Advanced - S: inclination 40-45 degree", + "expert": "Expert - SS: inclination 45–50 degree", + "freeride": "Freeride - AS: inclination 50–55 degree", + "extreme": "Extreme - EX: inclination >55 degree" + } + } +} diff --git a/data/presets/fields/piste_skitour/grooming.json b/data/presets/fields/piste_skitour/grooming.json new file mode 100644 index 000000000..3c39f9c9a --- /dev/null +++ b/data/presets/fields/piste_skitour/grooming.json @@ -0,0 +1,12 @@ +{ + "key": "piste:grooming", + "type": "combo", + "label": "Grooming", + "strings": { + "options": { + "classic": "Classic", + "mogul": "Mogul", + "backcountry": "Backcountry" + } + } +} diff --git a/data/presets/fields/piste_sled/difficulty.json b/data/presets/fields/piste_sled/difficulty.json new file mode 100644 index 000000000..a06a3d18b --- /dev/null +++ b/data/presets/fields/piste_sled/difficulty.json @@ -0,0 +1,17 @@ +{ + "key": "piste:difficulty", + "type": "combo", + "label": "Difficulty", + "placeholder": "Easy, Intermediate, Advanced...", + "strings": { + "options": { + "novice": "Novice", + "easy": "Easy", + "intermediate": "Intermediate", + "advanced": "Advanced", + "expert": "Expert", + "freeride": "Freeride", + "extreme": "Extreme" + } + } +} diff --git a/data/presets/fields/piste_sled/grooming.json b/data/presets/fields/piste_sled/grooming.json new file mode 100644 index 000000000..b250887b4 --- /dev/null +++ b/data/presets/fields/piste_sled/grooming.json @@ -0,0 +1,11 @@ +{ + "key": "piste:grooming", + "type": "combo", + "label": "Grooming", + "strings": { + "options": { + "classic": "Classic - prepared", + "backcountry": "Backcountry - no grooming" + } + } +} diff --git a/data/presets/fields/piste_sleigh/difficulty.json b/data/presets/fields/piste_sleigh/difficulty.json new file mode 100644 index 000000000..a06a3d18b --- /dev/null +++ b/data/presets/fields/piste_sleigh/difficulty.json @@ -0,0 +1,17 @@ +{ + "key": "piste:difficulty", + "type": "combo", + "label": "Difficulty", + "placeholder": "Easy, Intermediate, Advanced...", + "strings": { + "options": { + "novice": "Novice", + "easy": "Easy", + "intermediate": "Intermediate", + "advanced": "Advanced", + "expert": "Expert", + "freeride": "Freeride", + "extreme": "Extreme" + } + } +} diff --git a/data/presets/fields/piste_sleigh/grooming.json b/data/presets/fields/piste_sleigh/grooming.json new file mode 100644 index 000000000..b250887b4 --- /dev/null +++ b/data/presets/fields/piste_sleigh/grooming.json @@ -0,0 +1,11 @@ +{ + "key": "piste:grooming", + "type": "combo", + "label": "Grooming", + "strings": { + "options": { + "classic": "Classic - prepared", + "backcountry": "Backcountry - no grooming" + } + } +} diff --git a/data/presets/presets/piste.json b/data/presets/presets/piste/piste_downhill.json similarity index 56% rename from data/presets/presets/piste.json rename to data/presets/presets/piste/piste_downhill.json index b838e1b0c..33b639a18 100644 --- a/data/presets/presets/piste.json +++ b/data/presets/presets/piste/piste_downhill.json @@ -2,9 +2,9 @@ "icon": "maki-skiing", "fields": [ "name", - "piste/type", - "piste/difficulty", - "piste/grooming", + "piste_downhill/type", + "piste_downhill/difficulty", + "piste_downhill/grooming", "oneway", "lit" ], @@ -15,15 +15,13 @@ ], "terms": [ "ski", - "sled", - "sleigh", + "alpine", "snowboard", - "nordic", "downhill", - "snowmobile" + "piste" ], "tags": { - "piste:type": "*" + "piste:type": "downhill" }, - "name": "Piste/Ski Trail" + "name": "Downhill Piste/Ski Run" } diff --git a/data/presets/presets/piste/piste_hike.json b/data/presets/presets/piste/piste_hike.json new file mode 100644 index 000000000..bd1393e95 --- /dev/null +++ b/data/presets/presets/piste/piste_hike.json @@ -0,0 +1,27 @@ +{ + "icon": "fas-snowflake", + "fields": [ + "name", + "piste_hike/difficulty", + "piste_hike/grooming", + "oneway", + "lit" + ], + "geometry": [ + "point", + "line", + "area" + ], + "terms": [ + "hike", + "winter hiking", + "snowshoe", + "snowshoeing", + "piste", + "ski" + ], + "tags": { + "piste:type": "hike" + }, + "name": "Snowshoeing or Winter Hiking Trail" +} diff --git a/data/presets/presets/piste/piste_ice_skate.json b/data/presets/presets/piste/piste_ice_skate.json new file mode 100644 index 000000000..945c683a2 --- /dev/null +++ b/data/presets/presets/piste/piste_ice_skate.json @@ -0,0 +1,24 @@ +{ + "icon": "fas-snowflake", + "fields": [ + "name", + "sport_ice", + "oneway", + "lit" + ], + "geometry": [ + "point", + "line", + "area" + ], + "terms": [ + "ice", + "skating", + "ski", + "piste" + ], + "tags": { + "piste:type": "ice_skate" + }, + "name": "Ice Skating Piste" +} diff --git a/data/presets/presets/piste/piste_nordic.json b/data/presets/presets/piste/piste_nordic.json new file mode 100644 index 000000000..37708f1bf --- /dev/null +++ b/data/presets/presets/piste/piste_nordic.json @@ -0,0 +1,27 @@ +{ + "icon": "maki-skiing", + "fields": [ + "name", + "piste_nordic/type", + "piste_nordic/difficulty", + "piste_nordic/grooming", + "oneway", + "lit" + ], + "geometry": [ + "point", + "line", + "area" + ], + "terms": [ + "ski", + "nordic", + "crosscountry", + "skating", + "piste" + ], + "tags": { + "piste:type": "nordic" + }, + "name": "Nordic or Crosscountry Piste/Ski Trail" +} diff --git a/data/presets/presets/piste/piste_skitour.json b/data/presets/presets/piste/piste_skitour.json new file mode 100644 index 000000000..2bc9a5841 --- /dev/null +++ b/data/presets/presets/piste/piste_skitour.json @@ -0,0 +1,26 @@ +{ + "icon": "maki-skiing", + "fields": [ + "name", + "piste_skitour/difficulty", + "piste_skitour/grooming", + "oneway", + "lit" + ], + "geometry": [ + "point", + "line", + "area" + ], + "terms": [ + "ski", + "skitour", + "crosscountry", + "ski touring", + "piste" + ], + "tags": { + "piste:type": "skitour" + }, + "name": "Ski Touring Trail" +} diff --git a/data/presets/presets/piste/piste_sled.json b/data/presets/presets/piste/piste_sled.json new file mode 100644 index 000000000..c7cefb333 --- /dev/null +++ b/data/presets/presets/piste/piste_sled.json @@ -0,0 +1,27 @@ +{ + "icon": "fas-snowflake", + "fields": [ + "name", + "piste_sled/difficulty", + "piste_sled/grooming", + "oneway", + "lit" + ], + "geometry": [ + "point", + "line", + "area" + ], + "terms": [ + "ski", + "sled", + "luge", + "sleigh", + "sledge", + "piste" + ], + "tags": { + "piste:type": "sled" + }, + "name": "Sled Piste" +} diff --git a/data/presets/presets/piste/piste_sleigh.json b/data/presets/presets/piste/piste_sleigh.json new file mode 100644 index 000000000..364b31760 --- /dev/null +++ b/data/presets/presets/piste/piste_sleigh.json @@ -0,0 +1,30 @@ +{ + "icon": "fas-snowflake", + "fields": [ + "name", + "piste_sled/difficulty", + "piste_sled/grooming", + "oneway", + "lit" + ], + "geometry": [ + "point", + "line", + "area" + ], + "terms": [ + "ski", + "piste", + "sled", + "luge", + "sleigh", + "sledge", + "ski-joring", + "husky", + "horse" + ], + "tags": { + "piste:type": "sleigh" + }, + "name": "Animal-pulled Sleigh Piste" +} From 77f534f4979b7a2eda2469b12cf687cea794f80c Mon Sep 17 00:00:00 2001 From: yves Date: Thu, 4 Oct 2018 15:34:01 +0200 Subject: [PATCH 30/56] Build --- data/presets.yaml | 240 ++++++++++++++++++++++++++++++++------ data/presets/fields.json | 17 ++- data/presets/presets.json | 8 +- data/taginfo.json | 58 +++++++-- dist/locales/en.json | 157 ++++++++++++++++++++++--- 5 files changed, 412 insertions(+), 68 deletions(-) diff --git a/data/presets.yaml b/data/presets.yaml index c975f7959..3ac8a211a 100644 --- a/data/presets.yaml +++ b/data/presets.yaml @@ -1148,7 +1148,7 @@ en: label: Telephone # phone field placeholder placeholder: +31 42 123 4567 - piste/difficulty: + piste_downhill/difficulty: # 'piste:difficulty=*' label: Difficulty options: @@ -1166,9 +1166,119 @@ en: intermediate: Intermediate (blue square) # 'piste:difficulty=novice' novice: Novice (instructional) - # piste/difficulty field placeholder + # piste_downhill/difficulty field placeholder placeholder: 'Easy, Intermediate, Advanced...' - piste/grooming: + piste_downhill/grooming: + # 'piste:grooming=*' + label: Grooming + options: + # 'piste:grooming=backcountry' + backcountry: Backcountry - no grooming + # 'piste:grooming=classic' + classic: Classic + # 'piste:grooming=mogul' + mogul: Mogul + piste_downhill/type: + # 'piste:type=*' + label: Type + options: + # 'piste:type=connection' + connection: Connection between pistes + # 'piste:type=downhill' + downhill: Downhill + # 'piste:type=playground' + playground: Playground + # 'piste:type=snow_park' + snow_park: Snow Park + piste_hike/difficulty: + # 'piste:difficulty=*' + label: Difficulty + options: + # 'piste:difficulty=advanced' + advanced: Advanced + # 'piste:difficulty=easy' + easy: Easy + # 'piste:difficulty=expert' + expert: Expert + # 'piste:difficulty=extreme' + extreme: Extreme + # 'piste:difficulty=freeride' + freeride: Freeride + # 'piste:difficulty=intermediate' + intermediate: Intermediate + # 'piste:difficulty=novice' + novice: Novice + # piste_hike/difficulty field placeholder + placeholder: 'Easy, Intermediate, Advanced...' + piste_hike/grooming: + # 'piste:grooming=*' + label: Grooming + options: + # 'piste:grooming=backcountry' + backcountry: Backcountry - Snowshoeing + # 'piste:grooming=classic' + classic: Classic - Winter Hiking + piste_nordic/difficulty: + # 'piste:difficulty=*' + label: Difficulty + options: + # 'piste:difficulty=advanced' + advanced: 'Advanced - Narrow, steep or icy section, sharp turn' + # 'piste:difficulty=easy' + easy: 'Easy - Soft hills, short steep section' + # 'piste:difficulty=expert' + expert: Expert - Dangerous terrain around + # 'piste:difficulty=intermediate' + intermediate: Intermediate - Steep section + # 'piste:difficulty=novice' + novice: 'Novice - Flat, no effort needed' + # piste_nordic/difficulty field placeholder + placeholder: 'Easy, Intermediate, Advanced...' + piste_nordic/grooming: + # 'piste:grooming=*' + label: Grooming + options: + # 'piste:grooming=backcountry' + backcountry: 'Backcountry, no grooming' + # 'piste:grooming=classic' + classic: Classic + # 'piste:grooming=classic+skating' + classic+skating: Classic and Skating + # 'piste:grooming=scooter' + scooter: Scooter/Snowmobile + # 'piste:grooming=skating' + skating: Skating + piste_nordic/type: + # 'piste:type=*' + label: Type + options: + # 'piste:type=connection' + connection: Connection between pistes + # 'piste:type=downhill' + downhill: Nordic + # 'piste:type=playground' + playground: Playground + piste_skitour/difficulty: + # 'piste:difficulty=*' + label: Difficulty + options: + # 'piste:difficulty=advanced' + advanced: 'Advanced - S: inclination 40-45 degree' + # 'piste:difficulty=easy' + easy: 'Easy - WS: inclination 30-35 degree' + # 'piste:difficulty=expert' + expert: 'Expert - SS: inclination 45–50 degree' + # 'piste:difficulty=extreme' + extreme: 'Extreme - EX: inclination >55 degree' + # 'piste:difficulty=freeride' + freeride: 'Freeride - AS: inclination 50–55 degree' + # 'piste:difficulty=intermediate' + intermediate: 'Intermediate - ZS: inclination 35-40 degree' + # 'piste:difficulty=novice' + novice: 'novice - L: inclination <30 degree' + # piste_skitour/difficulty field placeholder + placeholder: 'Easy, Intermediate, Advanced...' + piste_skitour/grooming: # 'piste:grooming=*' label: Grooming options: @@ -1176,38 +1286,64 @@ en: backcountry: Backcountry # 'piste:grooming=classic' classic: Classic - # 'piste:grooming=classic+skating' - classic+skating: Classic and Skating # 'piste:grooming=mogul' mogul: Mogul - # 'piste:grooming=scooter' - scooter: Scooter/Snowmobile - # 'piste:grooming=skating' - skating: Skating - piste/type: - # 'piste:type=*' - label: Type + piste_sled/difficulty: + # 'piste:difficulty=*' + label: Difficulty options: - # 'piste:type=connection' - connection: Connection - # 'piste:type=downhill' - downhill: Downhill - # 'piste:type=hike' - hike: Hike - # 'piste:type=ice_skate' - ice_skate: Ice Skate - # 'piste:type=nordic' - nordic: Nordic - # 'piste:type=playground' - playground: Playground - # 'piste:type=skitour' - skitour: Skitour - # 'piste:type=sled' - sled: Sled - # 'piste:type=sleigh' - sleigh: Sleigh - # 'piste:type=snow_park' - snow_park: Snow Park + # 'piste:difficulty=advanced' + advanced: Advanced + # 'piste:difficulty=easy' + easy: Easy + # 'piste:difficulty=expert' + expert: Expert + # 'piste:difficulty=extreme' + extreme: Extreme + # 'piste:difficulty=freeride' + freeride: Freeride + # 'piste:difficulty=intermediate' + intermediate: Intermediate + # 'piste:difficulty=novice' + novice: Novice + # piste_sled/difficulty field placeholder + placeholder: 'Easy, Intermediate, Advanced...' + piste_sled/grooming: + # 'piste:grooming=*' + label: Grooming + options: + # 'piste:grooming=backcountry' + backcountry: Backcountry - no grooming + # 'piste:grooming=classic' + classic: Classic - prepared + piste_sleigh/difficulty: + # 'piste:difficulty=*' + label: Difficulty + options: + # 'piste:difficulty=advanced' + advanced: Advanced + # 'piste:difficulty=easy' + easy: Easy + # 'piste:difficulty=expert' + expert: Expert + # 'piste:difficulty=extreme' + extreme: Extreme + # 'piste:difficulty=freeride' + freeride: Freeride + # 'piste:difficulty=intermediate' + intermediate: Intermediate + # 'piste:difficulty=novice' + novice: Novice + # piste_sleigh/difficulty field placeholder + placeholder: 'Easy, Intermediate, Advanced...' + piste_sleigh/grooming: + # 'piste:grooming=*' + label: Grooming + options: + # 'piste:grooming=backcountry' + backcountry: Backcountry - no grooming + # 'piste:grooming=classic' + classic: Classic - prepared place: # place=* label: Type @@ -4887,11 +5023,41 @@ en: name: Water Utility Office # 'terms: water board,utility' terms: '' - piste: - # 'piste:type=*' - name: Piste/Ski Trail - # 'terms: ski,sled,sleigh,snowboard,nordic,downhill,snowmobile' - terms: '' + piste/piste_downhill: + # 'piste:type=downhill' + name: Downhill Piste/Ski Run + # 'terms: ski,alpine,snowboard,downhill,piste' + terms: '' + piste/piste_hike: + # 'piste:type=hike' + name: Snowshoeing or Winter Hiking Trail + # 'terms: hike,winter hiking,snowshoe,snowshoeing,piste,ski' + terms: '' + piste/piste_ice_skate: + # 'piste:type=ice_skate' + name: Ice Skating Piste + # 'terms: ice,skating,ski,piste' + terms: '' + piste/piste_nordic: + # 'piste:type=nordic' + name: Nordic or Crosscountry Piste/Ski Trail + # 'terms: ski,nordic,crosscountry,skating,piste' + terms: '' + piste/piste_skitour: + # 'piste:type=skitour' + name: Ski Touring Trail + # 'terms: ski,skitour,crosscountry,ski touring,piste' + terms: '' + piste/piste_sled: + # 'piste:type=sled' + name: Sled Piste + # 'terms: ski,sled,luge,sleigh,sledge,piste' + terms: '' + piste/piste_sleigh: + # 'piste:type=sleigh' + name: Animal-pulled Sleigh Piste + # 'terms: ski,piste,sled,luge,sleigh,sledge,ski-joring,husky,horse' + terms: '' place: # place=* name: Place diff --git a/data/presets/fields.json b/data/presets/fields.json index b0ec1b069..d64368007 100644 --- a/data/presets/fields.json +++ b/data/presets/fields.json @@ -201,9 +201,20 @@ "payment_multi": {"key": "payment:", "type": "multiCombo", "label": "Payment Types", "universal": true}, "phases": {"key": "phases", "type": "number", "minValue": 1, "label": "Phases", "placeholder": "1, 2, 3..."}, "phone": {"key": "phone", "type": "tel", "icon": "maki-telephone", "universal": true, "label": "Telephone", "placeholder": "+31 42 123 4567"}, - "piste/difficulty": {"key": "piste:difficulty", "type": "combo", "label": "Difficulty", "placeholder": "Easy, Intermediate, Advanced...", "strings": {"options": {"novice": "Novice (instructional)", "easy": "Easy (green circle)", "intermediate": "Intermediate (blue square)", "advanced": "Advanced (black diamond)", "expert": "Expert (double black diamond)", "freeride": "Freeride (off-piste)", "extreme": "Extreme (climbing equipment required)"}}}, - "piste/grooming": {"key": "piste:grooming", "type": "combo", "label": "Grooming", "strings": {"options": {"classic": "Classic", "mogul": "Mogul", "backcountry": "Backcountry", "classic+skating": "Classic and Skating", "scooter": "Scooter/Snowmobile", "skating": "Skating"}}}, - "piste/type": {"key": "piste:type", "type": "typeCombo", "label": "Type", "strings": {"options": {"downhill": "Downhill", "nordic": "Nordic", "skitour": "Skitour", "sled": "Sled", "hike": "Hike", "sleigh": "Sleigh", "ice_skate": "Ice Skate", "snow_park": "Snow Park", "playground": "Playground", "connection": "Connection"}}}, + "piste_downhill/difficulty": {"key": "piste:difficulty", "type": "combo", "label": "Difficulty", "placeholder": "Easy, Intermediate, Advanced...", "strings": {"options": {"novice": "Novice (instructional)", "easy": "Easy (green circle)", "intermediate": "Intermediate (blue square)", "advanced": "Advanced (black diamond)", "expert": "Expert (double black diamond)", "freeride": "Freeride (off-piste)", "extreme": "Extreme (climbing equipment required)"}}}, + "piste_downhill/grooming": {"key": "piste:grooming", "type": "combo", "label": "Grooming", "strings": {"options": {"classic": "Classic", "mogul": "Mogul", "backcountry": "Backcountry - no grooming"}}}, + "piste_downhill/type": {"key": "piste:type", "type": "typeCombo", "label": "Type", "strings": {"options": {"downhill": "Downhill", "snow_park": "Snow Park", "playground": "Playground", "connection": "Connection between pistes"}}}, + "piste_hike/difficulty": {"key": "piste:difficulty", "type": "combo", "label": "Difficulty", "placeholder": "Easy, Intermediate, Advanced...", "strings": {"options": {"novice": "Novice", "easy": "Easy", "intermediate": "Intermediate", "advanced": "Advanced", "expert": "Expert", "freeride": "Freeride", "extreme": "Extreme"}}}, + "piste_hike/grooming": {"key": "piste:grooming", "type": "combo", "label": "Grooming", "strings": {"options": {"classic": "Classic - Winter Hiking", "backcountry": "Backcountry - Snowshoeing"}}}, + "piste_nordic/difficulty": {"key": "piste:difficulty", "type": "combo", "label": "Difficulty", "placeholder": "Easy, Intermediate, Advanced...", "strings": {"options": {"novice": "Novice - Flat, no effort needed", "easy": "Easy - Soft hills, short steep section", "intermediate": "Intermediate - Steep section", "advanced": "Advanced - Narrow, steep or icy section, sharp turn", "expert": "Expert - Dangerous terrain around"}}}, + "piste_nordic/grooming": {"key": "piste:grooming", "type": "combo", "label": "Grooming", "strings": {"options": {"classic": "Classic", "backcountry": "Backcountry, no grooming", "classic+skating": "Classic and Skating", "scooter": "Scooter/Snowmobile", "skating": "Skating"}}}, + "piste_nordic/type": {"key": "piste:type", "type": "typeCombo", "label": "Type", "strings": {"options": {"downhill": "Nordic", "playground": "Playground", "connection": "Connection between pistes"}}}, + "piste_skitour/difficulty": {"key": "piste:difficulty", "type": "combo", "label": "Difficulty", "placeholder": "Easy, Intermediate, Advanced...", "strings": {"options": {"novice": "novice - L: inclination <30 degree", "easy": "Easy - WS: inclination 30-35 degree", "intermediate": "Intermediate - ZS: inclination 35-40 degree", "advanced": "Advanced - S: inclination 40-45 degree", "expert": "Expert - SS: inclination 45–50 degree", "freeride": "Freeride - AS: inclination 50–55 degree", "extreme": "Extreme - EX: inclination >55 degree"}}}, + "piste_skitour/grooming": {"key": "piste:grooming", "type": "combo", "label": "Grooming", "strings": {"options": {"classic": "Classic", "mogul": "Mogul", "backcountry": "Backcountry"}}}, + "piste_sled/difficulty": {"key": "piste:difficulty", "type": "combo", "label": "Difficulty", "placeholder": "Easy, Intermediate, Advanced...", "strings": {"options": {"novice": "Novice", "easy": "Easy", "intermediate": "Intermediate", "advanced": "Advanced", "expert": "Expert", "freeride": "Freeride", "extreme": "Extreme"}}}, + "piste_sled/grooming": {"key": "piste:grooming", "type": "combo", "label": "Grooming", "strings": {"options": {"classic": "Classic - prepared", "backcountry": "Backcountry - no grooming"}}}, + "piste_sleigh/difficulty": {"key": "piste:difficulty", "type": "combo", "label": "Difficulty", "placeholder": "Easy, Intermediate, Advanced...", "strings": {"options": {"novice": "Novice", "easy": "Easy", "intermediate": "Intermediate", "advanced": "Advanced", "expert": "Expert", "freeride": "Freeride", "extreme": "Extreme"}}}, + "piste_sleigh/grooming": {"key": "piste:grooming", "type": "combo", "label": "Grooming", "strings": {"options": {"classic": "Classic - prepared", "backcountry": "Backcountry - no grooming"}}}, "place": {"key": "place", "type": "typeCombo", "label": "Type"}, "plant": {"key": "plant", "type": "combo", "label": "Plant"}, "plant/output/electricity": {"key": "plant:output:electricity", "type": "text", "label": "Power Output", "placeholder": "500 MW, 1000 MW, 2000 MW..."}, diff --git a/data/presets/presets.json b/data/presets/presets.json index 4d1f7eb42..85be7bedc 100644 --- a/data/presets/presets.json +++ b/data/presets/presets.json @@ -659,7 +659,13 @@ "office/telecommunication": {"icon": "maki-telephone", "fields": ["name", "address", "building_area", "opening_hours"], "geometry": ["point", "area"], "tags": {"office": "telecommunication"}, "terms": ["communication", "internet", "phone", "voice"], "name": "Telecom Office"}, "office/therapist": {"icon": "maki-suitcase", "fields": ["name", "address", "building_area", "opening_hours"], "geometry": ["point", "area"], "tags": {"office": "therapist"}, "terms": ["therapy"], "name": "Therapist Office"}, "office/water_utility": {"icon": "maki-suitcase", "fields": ["name", "address", "building_area", "opening_hours", "operator"], "geometry": ["point", "area"], "tags": {"office": "water_utility"}, "terms": ["water board", "utility"], "name": "Water Utility Office"}, - "piste": {"icon": "maki-skiing", "fields": ["name", "piste/type", "piste/difficulty", "piste/grooming", "oneway", "lit"], "geometry": ["point", "line", "area"], "terms": ["ski", "sled", "sleigh", "snowboard", "nordic", "downhill", "snowmobile"], "tags": {"piste:type": "*"}, "name": "Piste/Ski Trail"}, + "piste/piste_downhill": {"icon": "maki-skiing", "fields": ["name", "piste_downhill/type", "piste_downhill/difficulty", "piste_downhill/grooming", "oneway", "lit"], "geometry": ["point", "line", "area"], "terms": ["ski", "alpine", "snowboard", "downhill", "piste"], "tags": {"piste:type": "downhill"}, "name": "Downhill Piste/Ski Run"}, + "piste/piste_hike": {"icon": "fas-snowflake", "fields": ["name", "piste_hike/difficulty", "piste_hike/grooming", "oneway", "lit"], "geometry": ["point", "line", "area"], "terms": ["hike", "winter hiking", "snowshoe", "snowshoeing", "piste", "ski"], "tags": {"piste:type": "hike"}, "name": "Snowshoeing or Winter Hiking Trail"}, + "piste/piste_ice_skate": {"icon": "fas-snowflake", "fields": ["name", "sport_ice", "oneway", "lit"], "geometry": ["point", "line", "area"], "terms": ["ice", "skating", "ski", "piste"], "tags": {"piste:type": "ice_skate"}, "name": "Ice Skating Piste"}, + "piste/piste_nordic": {"icon": "maki-skiing", "fields": ["name", "piste_nordic/type", "piste_nordic/difficulty", "piste_nordic/grooming", "oneway", "lit"], "geometry": ["point", "line", "area"], "terms": ["ski", "nordic", "crosscountry", "skating", "piste"], "tags": {"piste:type": "nordic"}, "name": "Nordic or Crosscountry Piste/Ski Trail"}, + "piste/piste_skitour": {"icon": "maki-skiing", "fields": ["name", "piste_skitour/difficulty", "piste_skitour/grooming", "oneway", "lit"], "geometry": ["point", "line", "area"], "terms": ["ski", "skitour", "crosscountry", "ski touring", "piste"], "tags": {"piste:type": "skitour"}, "name": "Ski Touring Trail"}, + "piste/piste_sled": {"icon": "fas-snowflake", "fields": ["name", "piste_sled/difficulty", "piste_sled/grooming", "oneway", "lit"], "geometry": ["point", "line", "area"], "terms": ["ski", "sled", "luge", "sleigh", "sledge", "piste"], "tags": {"piste:type": "sled"}, "name": "Sled Piste"}, + "piste/piste_sleigh": {"icon": "fas-snowflake", "fields": ["name", "piste_sled/difficulty", "piste_sled/grooming", "oneway", "lit"], "geometry": ["point", "line", "area"], "terms": ["ski", "piste", "sled", "luge", "sleigh", "sledge", "ski-joring", "husky", "horse"], "tags": {"piste:type": "sleigh"}, "name": "Animal-pulled Sleigh Piste"}, "place/farm": {"icon": "maki-farm", "geometry": ["point", "area"], "fields": ["name"], "tags": {"place": "farm"}, "name": "Farm", "searchable": false}, "place/city": {"icon": "maki-city", "fields": ["name", "population"], "geometry": ["point", "area"], "tags": {"place": "city"}, "name": "City"}, "place/hamlet": {"icon": "maki-triangle-stroked", "fields": ["name", "population"], "geometry": ["point", "area"], "tags": {"place": "hamlet"}, "name": "Hamlet"}, diff --git a/data/taginfo.json b/data/taginfo.json index 244690dee..67041056a 100644 --- a/data/taginfo.json +++ b/data/taginfo.json @@ -4414,10 +4414,53 @@ }, { "key": "piste:type", - "description": "Piste/Ski Trail", + "value": "downhill", + "description": "Downhill Piste/Ski Run, Type", "object_types": ["node", "way", "area"], "icon_url": "https://raw.githubusercontent.com/mapbox/maki/master/icons/skiing-15.svg?sanitize=true" }, + { + "key": "piste:type", + "value": "hike", + "description": "Snowshoeing or Winter Hiking Trail", + "object_types": ["node", "way", "area"], + "icon_url": "https://raw.githubusercontent.com/openstreetmap/iD/master/svg/fontawesome/fas-snowflake.svg?sanitize=true" + }, + { + "key": "piste:type", + "value": "ice_skate", + "description": "Ice Skating Piste", + "object_types": ["node", "way", "area"], + "icon_url": "https://raw.githubusercontent.com/openstreetmap/iD/master/svg/fontawesome/fas-snowflake.svg?sanitize=true" + }, + { + "key": "piste:type", + "value": "nordic", + "description": "Nordic or Crosscountry Piste/Ski Trail", + "object_types": ["node", "way", "area"], + "icon_url": "https://raw.githubusercontent.com/mapbox/maki/master/icons/skiing-15.svg?sanitize=true" + }, + { + "key": "piste:type", + "value": "skitour", + "description": "Ski Touring Trail", + "object_types": ["node", "way", "area"], + "icon_url": "https://raw.githubusercontent.com/mapbox/maki/master/icons/skiing-15.svg?sanitize=true" + }, + { + "key": "piste:type", + "value": "sled", + "description": "Sled Piste", + "object_types": ["node", "way", "area"], + "icon_url": "https://raw.githubusercontent.com/openstreetmap/iD/master/svg/fontawesome/fas-snowflake.svg?sanitize=true" + }, + { + "key": "piste:type", + "value": "sleigh", + "description": "Animal-pulled Sleigh Piste", + "object_types": ["node", "way", "area"], + "icon_url": "https://raw.githubusercontent.com/openstreetmap/iD/master/svg/fontawesome/fas-snowflake.svg?sanitize=true" + }, { "key": "place", "value": "farm", @@ -7085,6 +7128,9 @@ "value": "backcountry", "description": "Grooming" }, + {"key": "piste:type", "value": "snow_park", "description": "Type"}, + {"key": "piste:type", "value": "playground", "description": "Type"}, + {"key": "piste:type", "value": "connection", "description": "Type"}, { "key": "piste:grooming", "value": "classic+skating", @@ -7092,16 +7138,6 @@ }, {"key": "piste:grooming", "value": "scooter", "description": "Grooming"}, {"key": "piste:grooming", "value": "skating", "description": "Grooming"}, - {"key": "piste:type", "value": "downhill", "description": "Type"}, - {"key": "piste:type", "value": "nordic", "description": "Type"}, - {"key": "piste:type", "value": "skitour", "description": "Type"}, - {"key": "piste:type", "value": "sled", "description": "Type"}, - {"key": "piste:type", "value": "hike", "description": "Type"}, - {"key": "piste:type", "value": "sleigh", "description": "Type"}, - {"key": "piste:type", "value": "ice_skate", "description": "Type"}, - {"key": "piste:type", "value": "snow_park", "description": "Type"}, - {"key": "piste:type", "value": "playground", "description": "Type"}, - {"key": "piste:type", "value": "connection", "description": "Type"}, {"key": "plant", "description": "Plant"}, {"key": "plant:output:electricity", "description": "Power Output"}, {"key": "baby", "description": "Baby Seat"}, diff --git a/dist/locales/en.json b/dist/locales/en.json index cac517781..2c1fd036b 100644 --- a/dist/locales/en.json +++ b/dist/locales/en.json @@ -2427,7 +2427,7 @@ "label": "Telephone", "placeholder": "+31 42 123 4567" }, - "piste/difficulty": { + "piste_downhill/difficulty": { "label": "Difficulty", "placeholder": "Easy, Intermediate, Advanced...", "options": { @@ -2440,30 +2440,131 @@ "extreme": "Extreme (climbing equipment required)" } }, - "piste/grooming": { + "piste_downhill/grooming": { "label": "Grooming", "options": { "classic": "Classic", "mogul": "Mogul", - "backcountry": "Backcountry", + "backcountry": "Backcountry - no grooming" + } + }, + "piste_downhill/type": { + "label": "Type", + "options": { + "downhill": "Downhill", + "snow_park": "Snow Park", + "playground": "Playground", + "connection": "Connection between pistes" + } + }, + "piste_hike/difficulty": { + "label": "Difficulty", + "placeholder": "Easy, Intermediate, Advanced...", + "options": { + "novice": "Novice", + "easy": "Easy", + "intermediate": "Intermediate", + "advanced": "Advanced", + "expert": "Expert", + "freeride": "Freeride", + "extreme": "Extreme" + } + }, + "piste_hike/grooming": { + "label": "Grooming", + "options": { + "classic": "Classic - Winter Hiking", + "backcountry": "Backcountry - Snowshoeing" + } + }, + "piste_nordic/difficulty": { + "label": "Difficulty", + "placeholder": "Easy, Intermediate, Advanced...", + "options": { + "novice": "Novice - Flat, no effort needed", + "easy": "Easy - Soft hills, short steep section", + "intermediate": "Intermediate - Steep section", + "advanced": "Advanced - Narrow, steep or icy section, sharp turn", + "expert": "Expert - Dangerous terrain around" + } + }, + "piste_nordic/grooming": { + "label": "Grooming", + "options": { + "classic": "Classic", + "backcountry": "Backcountry, no grooming", "classic+skating": "Classic and Skating", "scooter": "Scooter/Snowmobile", "skating": "Skating" } }, - "piste/type": { + "piste_nordic/type": { "label": "Type", "options": { - "downhill": "Downhill", - "nordic": "Nordic", - "skitour": "Skitour", - "sled": "Sled", - "hike": "Hike", - "sleigh": "Sleigh", - "ice_skate": "Ice Skate", - "snow_park": "Snow Park", + "downhill": "Nordic", "playground": "Playground", - "connection": "Connection" + "connection": "Connection between pistes" + } + }, + "piste_skitour/difficulty": { + "label": "Difficulty", + "placeholder": "Easy, Intermediate, Advanced...", + "options": { + "novice": "novice - L: inclination <30 degree", + "easy": "Easy - WS: inclination 30-35 degree", + "intermediate": "Intermediate - ZS: inclination 35-40 degree", + "advanced": "Advanced - S: inclination 40-45 degree", + "expert": "Expert - SS: inclination 45–50 degree", + "freeride": "Freeride - AS: inclination 50–55 degree", + "extreme": "Extreme - EX: inclination >55 degree" + } + }, + "piste_skitour/grooming": { + "label": "Grooming", + "options": { + "classic": "Classic", + "mogul": "Mogul", + "backcountry": "Backcountry" + } + }, + "piste_sled/difficulty": { + "label": "Difficulty", + "placeholder": "Easy, Intermediate, Advanced...", + "options": { + "novice": "Novice", + "easy": "Easy", + "intermediate": "Intermediate", + "advanced": "Advanced", + "expert": "Expert", + "freeride": "Freeride", + "extreme": "Extreme" + } + }, + "piste_sled/grooming": { + "label": "Grooming", + "options": { + "classic": "Classic - prepared", + "backcountry": "Backcountry - no grooming" + } + }, + "piste_sleigh/difficulty": { + "label": "Difficulty", + "placeholder": "Easy, Intermediate, Advanced...", + "options": { + "novice": "Novice", + "easy": "Easy", + "intermediate": "Intermediate", + "advanced": "Advanced", + "expert": "Expert", + "freeride": "Freeride", + "extreme": "Extreme" + } + }, + "piste_sleigh/grooming": { + "label": "Grooming", + "options": { + "classic": "Classic - prepared", + "backcountry": "Backcountry - no grooming" } }, "place": { @@ -5714,9 +5815,33 @@ "name": "Water Utility Office", "terms": "water board,utility" }, - "piste": { - "name": "Piste/Ski Trail", - "terms": "ski,sled,sleigh,snowboard,nordic,downhill,snowmobile" + "piste/piste_downhill": { + "name": "Downhill Piste/Ski Run", + "terms": "ski,alpine,snowboard,downhill,piste" + }, + "piste/piste_hike": { + "name": "Snowshoeing or Winter Hiking Trail", + "terms": "hike,winter hiking,snowshoe,snowshoeing,piste,ski" + }, + "piste/piste_ice_skate": { + "name": "Ice Skating Piste", + "terms": "ice,skating,ski,piste" + }, + "piste/piste_nordic": { + "name": "Nordic or Crosscountry Piste/Ski Trail", + "terms": "ski,nordic,crosscountry,skating,piste" + }, + "piste/piste_skitour": { + "name": "Ski Touring Trail", + "terms": "ski,skitour,crosscountry,ski touring,piste" + }, + "piste/piste_sled": { + "name": "Sled Piste", + "terms": "ski,sled,luge,sleigh,sledge,piste" + }, + "piste/piste_sleigh": { + "name": "Animal-pulled Sleigh Piste", + "terms": "ski,piste,sled,luge,sleigh,sledge,ski-joring,husky,horse" }, "place/farm": { "name": "Farm", From 3296176d7a48ecd59d7089e6ae356d2449363485 Mon Sep 17 00:00:00 2001 From: yves Date: Sat, 6 Oct 2018 08:27:10 +0200 Subject: [PATCH 31/56] Change the piste presets directory structure and other fixes --- data/presets.yaml | 281 ++++++++---------- data/presets/fields.json | 25 +- .../{piste_hike => piste}/difficulty.json | 0 .../difficulty_downhill.json} | 0 .../difficulty_nordic.json} | 0 .../fields/piste/difficulty_skitour.json | 17 ++ .../{piste_skitour => piste}/grooming.json | 5 +- .../grooming_downhill.json} | 0 .../grooming_hike.json} | 0 .../grooming_nordic.json} | 0 data/presets/fields/piste/type.json | 19 ++ .../type.json => piste/type_downhill.json} | 0 .../type.json => piste/type_nordic.json} | 0 .../fields/piste_skitour/difficulty.json | 17 -- .../presets/fields/piste_sled/difficulty.json | 17 -- data/presets/fields/piste_sled/grooming.json | 11 - .../fields/piste_sleigh/difficulty.json | 17 -- .../presets/fields/piste_sleigh/grooming.json | 11 - data/presets/presets.json | 15 +- .../{piste_downhill.json => downhill.json} | 7 +- .../piste/{piste_hike.json => hike.json} | 5 +- .../{piste_ice_skate.json => ice_skate.json} | 1 - .../piste/{piste_nordic.json => nordic.json} | 7 +- data/presets/presets/piste/piste.json | 41 +++ .../{piste_skitour.json => skitour.json} | 5 +- .../piste/{piste_sled.json => sled.json} | 5 +- .../piste/{piste_sleigh.json => sleigh.json} | 7 +- data/taginfo.json | 38 ++- dist/locales/en.json | 196 ++++++------ 29 files changed, 356 insertions(+), 391 deletions(-) rename data/presets/fields/{piste_hike => piste}/difficulty.json (100%) rename data/presets/fields/{piste_downhill/difficulty.json => piste/difficulty_downhill.json} (100%) rename data/presets/fields/{piste_nordic/difficulty.json => piste/difficulty_nordic.json} (100%) create mode 100644 data/presets/fields/piste/difficulty_skitour.json rename data/presets/fields/{piste_skitour => piste}/grooming.json (53%) rename data/presets/fields/{piste_downhill/grooming.json => piste/grooming_downhill.json} (100%) rename data/presets/fields/{piste_hike/grooming.json => piste/grooming_hike.json} (100%) rename data/presets/fields/{piste_nordic/grooming.json => piste/grooming_nordic.json} (100%) create mode 100644 data/presets/fields/piste/type.json rename data/presets/fields/{piste_downhill/type.json => piste/type_downhill.json} (100%) rename data/presets/fields/{piste_nordic/type.json => piste/type_nordic.json} (100%) delete mode 100644 data/presets/fields/piste_skitour/difficulty.json delete mode 100644 data/presets/fields/piste_sled/difficulty.json delete mode 100644 data/presets/fields/piste_sled/grooming.json delete mode 100644 data/presets/fields/piste_sleigh/difficulty.json delete mode 100644 data/presets/fields/piste_sleigh/grooming.json rename data/presets/presets/piste/{piste_downhill.json => downhill.json} (75%) rename data/presets/presets/piste/{piste_hike.json => hike.json} (83%) rename data/presets/presets/piste/{piste_ice_skate.json => ice_skate.json} (95%) rename data/presets/presets/piste/{piste_nordic.json => nordic.json} (76%) create mode 100644 data/presets/presets/piste/piste.json rename data/presets/presets/piste/{piste_skitour.json => skitour.json} (80%) rename data/presets/presets/piste/{piste_sled.json => sled.json} (81%) rename data/presets/presets/piste/{piste_sleigh.json => sleigh.json} (76%) diff --git a/data/presets.yaml b/data/presets.yaml index 3ac8a211a..cc8509c00 100644 --- a/data/presets.yaml +++ b/data/presets.yaml @@ -1148,7 +1148,27 @@ en: label: Telephone # phone field placeholder placeholder: +31 42 123 4567 - piste_downhill/difficulty: + piste/difficulty: + # 'piste:difficulty=*' + label: Difficulty + options: + # 'piste:difficulty=advanced' + advanced: Advanced + # 'piste:difficulty=easy' + easy: Easy + # 'piste:difficulty=expert' + expert: Expert + # 'piste:difficulty=extreme' + extreme: Extreme + # 'piste:difficulty=freeride' + freeride: Freeride + # 'piste:difficulty=intermediate' + intermediate: Intermediate + # 'piste:difficulty=novice' + novice: Novice + # piste/difficulty field placeholder + placeholder: 'Easy, Intermediate, Advanced...' + piste/difficulty_downhill: # 'piste:difficulty=*' label: Difficulty options: @@ -1166,59 +1186,9 @@ en: intermediate: Intermediate (blue square) # 'piste:difficulty=novice' novice: Novice (instructional) - # piste_downhill/difficulty field placeholder + # piste/difficulty_downhill field placeholder placeholder: 'Easy, Intermediate, Advanced...' - piste_downhill/grooming: - # 'piste:grooming=*' - label: Grooming - options: - # 'piste:grooming=backcountry' - backcountry: Backcountry - no grooming - # 'piste:grooming=classic' - classic: Classic - # 'piste:grooming=mogul' - mogul: Mogul - piste_downhill/type: - # 'piste:type=*' - label: Type - options: - # 'piste:type=connection' - connection: Connection between pistes - # 'piste:type=downhill' - downhill: Downhill - # 'piste:type=playground' - playground: Playground - # 'piste:type=snow_park' - snow_park: Snow Park - piste_hike/difficulty: - # 'piste:difficulty=*' - label: Difficulty - options: - # 'piste:difficulty=advanced' - advanced: Advanced - # 'piste:difficulty=easy' - easy: Easy - # 'piste:difficulty=expert' - expert: Expert - # 'piste:difficulty=extreme' - extreme: Extreme - # 'piste:difficulty=freeride' - freeride: Freeride - # 'piste:difficulty=intermediate' - intermediate: Intermediate - # 'piste:difficulty=novice' - novice: Novice - # piste_hike/difficulty field placeholder - placeholder: 'Easy, Intermediate, Advanced...' - piste_hike/grooming: - # 'piste:grooming=*' - label: Grooming - options: - # 'piste:grooming=backcountry' - backcountry: Backcountry - Snowshoeing - # 'piste:grooming=classic' - classic: Classic - Winter Hiking - piste_nordic/difficulty: + piste/difficulty_nordic: # 'piste:difficulty=*' label: Difficulty options: @@ -1232,9 +1202,63 @@ en: intermediate: Intermediate - Steep section # 'piste:difficulty=novice' novice: 'Novice - Flat, no effort needed' - # piste_nordic/difficulty field placeholder + # piste/difficulty_nordic field placeholder placeholder: 'Easy, Intermediate, Advanced...' - piste_nordic/grooming: + piste/difficulty_skitour: + # 'piste:difficulty=*' + label: Difficulty + options: + # 'piste:difficulty=advanced' + advanced: 'Advanced - S: 40-45° incline' + # 'piste:difficulty=easy' + easy: 'Easy - WS: 30-35° incline' + # 'piste:difficulty=expert' + expert: 'Expert - SS: 45–50° incline' + # 'piste:difficulty=extreme' + extreme: 'Extreme - EX: >55° incline' + # 'piste:difficulty=freeride' + freeride: 'Freeride - AS: 50–55° incline' + # 'piste:difficulty=intermediate' + intermediate: 'Intermediate - ZS: 35-40° incline' + # 'piste:difficulty=novice' + novice: 'Novice - L: <30° incline' + # piste/difficulty_skitour field placeholder + placeholder: 'Easy, Intermediate, Advanced...' + piste/grooming: + # 'piste:grooming=*' + label: Grooming + options: + # 'piste:grooming=backcountry' + backcountry: Backcountry + # 'piste:grooming=classic' + classic: Classic + # 'piste:grooming=classic+skating' + classic+skating: Classic and Skating + # 'piste:grooming=mogul' + mogul: Mogul + # 'piste:grooming=scooter' + scooter: Scooter/Snowmobile + # 'piste:grooming=skating' + skating: Skating + piste/grooming_downhill: + # 'piste:grooming=*' + label: Grooming + options: + # 'piste:grooming=backcountry' + backcountry: Backcountry - no grooming + # 'piste:grooming=classic' + classic: Classic + # 'piste:grooming=mogul' + mogul: Mogul + piste/grooming_hike: + # 'piste:grooming=*' + label: Grooming + options: + # 'piste:grooming=backcountry' + backcountry: Backcountry - Snowshoeing + # 'piste:grooming=classic' + classic: Classic - Winter Hiking + piste/grooming_nordic: # 'piste:grooming=*' label: Grooming options: @@ -1248,7 +1272,43 @@ en: scooter: Scooter/Snowmobile # 'piste:grooming=skating' skating: Skating - piste_nordic/type: + piste/type: + # 'piste:type=*' + label: Type + options: + # 'piste:type=connection' + connection: Connection + # 'piste:type=downhill' + downhill: Downhill + # 'piste:type=hike' + hike: Hike + # 'piste:type=ice_skate' + ice_skate: Ice Skate + # 'piste:type=nordic' + nordic: Nordic + # 'piste:type=playground' + playground: Playground + # 'piste:type=skitour' + skitour: Skitour + # 'piste:type=sled' + sled: Sled + # 'piste:type=sleigh' + sleigh: Sleigh + # 'piste:type=snow_park' + snow_park: Snow Park + piste/type_downhill: + # 'piste:type=*' + label: Type + options: + # 'piste:type=connection' + connection: Connection between pistes + # 'piste:type=downhill' + downhill: Downhill + # 'piste:type=playground' + playground: Playground + # 'piste:type=snow_park' + snow_park: Snow Park + piste/type_nordic: # 'piste:type=*' label: Type options: @@ -1258,92 +1318,6 @@ en: downhill: Nordic # 'piste:type=playground' playground: Playground - piste_skitour/difficulty: - # 'piste:difficulty=*' - label: Difficulty - options: - # 'piste:difficulty=advanced' - advanced: 'Advanced - S: inclination 40-45 degree' - # 'piste:difficulty=easy' - easy: 'Easy - WS: inclination 30-35 degree' - # 'piste:difficulty=expert' - expert: 'Expert - SS: inclination 45–50 degree' - # 'piste:difficulty=extreme' - extreme: 'Extreme - EX: inclination >55 degree' - # 'piste:difficulty=freeride' - freeride: 'Freeride - AS: inclination 50–55 degree' - # 'piste:difficulty=intermediate' - intermediate: 'Intermediate - ZS: inclination 35-40 degree' - # 'piste:difficulty=novice' - novice: 'novice - L: inclination <30 degree' - # piste_skitour/difficulty field placeholder - placeholder: 'Easy, Intermediate, Advanced...' - piste_skitour/grooming: - # 'piste:grooming=*' - label: Grooming - options: - # 'piste:grooming=backcountry' - backcountry: Backcountry - # 'piste:grooming=classic' - classic: Classic - # 'piste:grooming=mogul' - mogul: Mogul - piste_sled/difficulty: - # 'piste:difficulty=*' - label: Difficulty - options: - # 'piste:difficulty=advanced' - advanced: Advanced - # 'piste:difficulty=easy' - easy: Easy - # 'piste:difficulty=expert' - expert: Expert - # 'piste:difficulty=extreme' - extreme: Extreme - # 'piste:difficulty=freeride' - freeride: Freeride - # 'piste:difficulty=intermediate' - intermediate: Intermediate - # 'piste:difficulty=novice' - novice: Novice - # piste_sled/difficulty field placeholder - placeholder: 'Easy, Intermediate, Advanced...' - piste_sled/grooming: - # 'piste:grooming=*' - label: Grooming - options: - # 'piste:grooming=backcountry' - backcountry: Backcountry - no grooming - # 'piste:grooming=classic' - classic: Classic - prepared - piste_sleigh/difficulty: - # 'piste:difficulty=*' - label: Difficulty - options: - # 'piste:difficulty=advanced' - advanced: Advanced - # 'piste:difficulty=easy' - easy: Easy - # 'piste:difficulty=expert' - expert: Expert - # 'piste:difficulty=extreme' - extreme: Extreme - # 'piste:difficulty=freeride' - freeride: Freeride - # 'piste:difficulty=intermediate' - intermediate: Intermediate - # 'piste:difficulty=novice' - novice: Novice - # piste_sleigh/difficulty field placeholder - placeholder: 'Easy, Intermediate, Advanced...' - piste_sleigh/grooming: - # 'piste:grooming=*' - label: Grooming - options: - # 'piste:grooming=backcountry' - backcountry: Backcountry - no grooming - # 'piste:grooming=classic' - classic: Classic - prepared place: # place=* label: Type @@ -5023,41 +4997,46 @@ en: name: Water Utility Office # 'terms: water board,utility' terms: '' - piste/piste_downhill: + piste/downhill: # 'piste:type=downhill' name: Downhill Piste/Ski Run # 'terms: ski,alpine,snowboard,downhill,piste' terms: '' - piste/piste_hike: + piste/hike: # 'piste:type=hike' name: Snowshoeing or Winter Hiking Trail # 'terms: hike,winter hiking,snowshoe,snowshoeing,piste,ski' terms: '' - piste/piste_ice_skate: + piste/ice_skate: # 'piste:type=ice_skate' name: Ice Skating Piste # 'terms: ice,skating,ski,piste' terms: '' - piste/piste_nordic: + piste/nordic: # 'piste:type=nordic' name: Nordic or Crosscountry Piste/Ski Trail # 'terms: ski,nordic,crosscountry,skating,piste' terms: '' - piste/piste_skitour: + piste/piste: + # 'piste:type=*' + name: Winter Sport Trails + # 'terms: ski,nordic,crosscountry,downhill,alpine,snowboard,skitour,ski touring,sled,luge,sleigh,sledge,ski-joring,husky,horse,winter hiking,snowshoe,snowshoeing,ice,skating' + terms: '' + piste/skitour: # 'piste:type=skitour' name: Ski Touring Trail # 'terms: ski,skitour,crosscountry,ski touring,piste' terms: '' - piste/piste_sled: + piste/sled: # 'piste:type=sled' name: Sled Piste # 'terms: ski,sled,luge,sleigh,sledge,piste' terms: '' - piste/piste_sleigh: + piste/sleigh: # 'piste:type=sleigh' - name: Animal-pulled Sleigh Piste + name: Sleigh Piste # 'terms: ski,piste,sled,luge,sleigh,sledge,ski-joring,husky,horse' - terms: '' + terms: '' place: # place=* name: Place diff --git a/data/presets/fields.json b/data/presets/fields.json index d64368007..b06b19beb 100644 --- a/data/presets/fields.json +++ b/data/presets/fields.json @@ -201,20 +201,17 @@ "payment_multi": {"key": "payment:", "type": "multiCombo", "label": "Payment Types", "universal": true}, "phases": {"key": "phases", "type": "number", "minValue": 1, "label": "Phases", "placeholder": "1, 2, 3..."}, "phone": {"key": "phone", "type": "tel", "icon": "maki-telephone", "universal": true, "label": "Telephone", "placeholder": "+31 42 123 4567"}, - "piste_downhill/difficulty": {"key": "piste:difficulty", "type": "combo", "label": "Difficulty", "placeholder": "Easy, Intermediate, Advanced...", "strings": {"options": {"novice": "Novice (instructional)", "easy": "Easy (green circle)", "intermediate": "Intermediate (blue square)", "advanced": "Advanced (black diamond)", "expert": "Expert (double black diamond)", "freeride": "Freeride (off-piste)", "extreme": "Extreme (climbing equipment required)"}}}, - "piste_downhill/grooming": {"key": "piste:grooming", "type": "combo", "label": "Grooming", "strings": {"options": {"classic": "Classic", "mogul": "Mogul", "backcountry": "Backcountry - no grooming"}}}, - "piste_downhill/type": {"key": "piste:type", "type": "typeCombo", "label": "Type", "strings": {"options": {"downhill": "Downhill", "snow_park": "Snow Park", "playground": "Playground", "connection": "Connection between pistes"}}}, - "piste_hike/difficulty": {"key": "piste:difficulty", "type": "combo", "label": "Difficulty", "placeholder": "Easy, Intermediate, Advanced...", "strings": {"options": {"novice": "Novice", "easy": "Easy", "intermediate": "Intermediate", "advanced": "Advanced", "expert": "Expert", "freeride": "Freeride", "extreme": "Extreme"}}}, - "piste_hike/grooming": {"key": "piste:grooming", "type": "combo", "label": "Grooming", "strings": {"options": {"classic": "Classic - Winter Hiking", "backcountry": "Backcountry - Snowshoeing"}}}, - "piste_nordic/difficulty": {"key": "piste:difficulty", "type": "combo", "label": "Difficulty", "placeholder": "Easy, Intermediate, Advanced...", "strings": {"options": {"novice": "Novice - Flat, no effort needed", "easy": "Easy - Soft hills, short steep section", "intermediate": "Intermediate - Steep section", "advanced": "Advanced - Narrow, steep or icy section, sharp turn", "expert": "Expert - Dangerous terrain around"}}}, - "piste_nordic/grooming": {"key": "piste:grooming", "type": "combo", "label": "Grooming", "strings": {"options": {"classic": "Classic", "backcountry": "Backcountry, no grooming", "classic+skating": "Classic and Skating", "scooter": "Scooter/Snowmobile", "skating": "Skating"}}}, - "piste_nordic/type": {"key": "piste:type", "type": "typeCombo", "label": "Type", "strings": {"options": {"downhill": "Nordic", "playground": "Playground", "connection": "Connection between pistes"}}}, - "piste_skitour/difficulty": {"key": "piste:difficulty", "type": "combo", "label": "Difficulty", "placeholder": "Easy, Intermediate, Advanced...", "strings": {"options": {"novice": "novice - L: inclination <30 degree", "easy": "Easy - WS: inclination 30-35 degree", "intermediate": "Intermediate - ZS: inclination 35-40 degree", "advanced": "Advanced - S: inclination 40-45 degree", "expert": "Expert - SS: inclination 45–50 degree", "freeride": "Freeride - AS: inclination 50–55 degree", "extreme": "Extreme - EX: inclination >55 degree"}}}, - "piste_skitour/grooming": {"key": "piste:grooming", "type": "combo", "label": "Grooming", "strings": {"options": {"classic": "Classic", "mogul": "Mogul", "backcountry": "Backcountry"}}}, - "piste_sled/difficulty": {"key": "piste:difficulty", "type": "combo", "label": "Difficulty", "placeholder": "Easy, Intermediate, Advanced...", "strings": {"options": {"novice": "Novice", "easy": "Easy", "intermediate": "Intermediate", "advanced": "Advanced", "expert": "Expert", "freeride": "Freeride", "extreme": "Extreme"}}}, - "piste_sled/grooming": {"key": "piste:grooming", "type": "combo", "label": "Grooming", "strings": {"options": {"classic": "Classic - prepared", "backcountry": "Backcountry - no grooming"}}}, - "piste_sleigh/difficulty": {"key": "piste:difficulty", "type": "combo", "label": "Difficulty", "placeholder": "Easy, Intermediate, Advanced...", "strings": {"options": {"novice": "Novice", "easy": "Easy", "intermediate": "Intermediate", "advanced": "Advanced", "expert": "Expert", "freeride": "Freeride", "extreme": "Extreme"}}}, - "piste_sleigh/grooming": {"key": "piste:grooming", "type": "combo", "label": "Grooming", "strings": {"options": {"classic": "Classic - prepared", "backcountry": "Backcountry - no grooming"}}}, + "piste/difficulty_downhill": {"key": "piste:difficulty", "type": "combo", "label": "Difficulty", "placeholder": "Easy, Intermediate, Advanced...", "strings": {"options": {"novice": "Novice (instructional)", "easy": "Easy (green circle)", "intermediate": "Intermediate (blue square)", "advanced": "Advanced (black diamond)", "expert": "Expert (double black diamond)", "freeride": "Freeride (off-piste)", "extreme": "Extreme (climbing equipment required)"}}}, + "piste/difficulty_nordic": {"key": "piste:difficulty", "type": "combo", "label": "Difficulty", "placeholder": "Easy, Intermediate, Advanced...", "strings": {"options": {"novice": "Novice - Flat, no effort needed", "easy": "Easy - Soft hills, short steep section", "intermediate": "Intermediate - Steep section", "advanced": "Advanced - Narrow, steep or icy section, sharp turn", "expert": "Expert - Dangerous terrain around"}}}, + "piste/difficulty_skitour": {"key": "piste:difficulty", "type": "combo", "label": "Difficulty", "placeholder": "Easy, Intermediate, Advanced...", "strings": {"options": {"novice": "Novice - L: <30° incline", "easy": "Easy - WS: 30-35° incline", "intermediate": "Intermediate - ZS: 35-40° incline", "advanced": "Advanced - S: 40-45° incline", "expert": "Expert - SS: 45–50° incline", "freeride": "Freeride - AS: 50–55° incline", "extreme": "Extreme - EX: >55° incline"}}}, + "piste/difficulty": {"key": "piste:difficulty", "type": "combo", "label": "Difficulty", "placeholder": "Easy, Intermediate, Advanced...", "strings": {"options": {"novice": "Novice", "easy": "Easy", "intermediate": "Intermediate", "advanced": "Advanced", "expert": "Expert", "freeride": "Freeride", "extreme": "Extreme"}}}, + "piste/grooming_downhill": {"key": "piste:grooming", "type": "combo", "label": "Grooming", "strings": {"options": {"classic": "Classic", "mogul": "Mogul", "backcountry": "Backcountry - no grooming"}}}, + "piste/grooming_hike": {"key": "piste:grooming", "type": "combo", "label": "Grooming", "strings": {"options": {"classic": "Classic - Winter Hiking", "backcountry": "Backcountry - Snowshoeing"}}}, + "piste/grooming_nordic": {"key": "piste:grooming", "type": "combo", "label": "Grooming", "strings": {"options": {"classic": "Classic", "backcountry": "Backcountry, no grooming", "classic+skating": "Classic and Skating", "scooter": "Scooter/Snowmobile", "skating": "Skating"}}}, + "piste/grooming": {"key": "piste:grooming", "type": "combo", "label": "Grooming", "strings": {"options": {"classic": "Classic", "mogul": "Mogul", "backcountry": "Backcountry", "classic+skating": "Classic and Skating", "scooter": "Scooter/Snowmobile", "skating": "Skating"}}}, + "piste/type_downhill": {"key": "piste:type", "type": "typeCombo", "label": "Type", "strings": {"options": {"downhill": "Downhill", "snow_park": "Snow Park", "playground": "Playground", "connection": "Connection between pistes"}}}, + "piste/type_nordic": {"key": "piste:type", "type": "typeCombo", "label": "Type", "strings": {"options": {"downhill": "Nordic", "playground": "Playground", "connection": "Connection between pistes"}}}, + "piste/type": {"key": "piste:type", "type": "typeCombo", "label": "Type", "strings": {"options": {"downhill": "Downhill", "nordic": "Nordic", "skitour": "Skitour", "sled": "Sled", "hike": "Hike", "sleigh": "Sleigh", "ice_skate": "Ice Skate", "snow_park": "Snow Park", "playground": "Playground", "connection": "Connection"}}}, "place": {"key": "place", "type": "typeCombo", "label": "Type"}, "plant": {"key": "plant", "type": "combo", "label": "Plant"}, "plant/output/electricity": {"key": "plant:output:electricity", "type": "text", "label": "Power Output", "placeholder": "500 MW, 1000 MW, 2000 MW..."}, diff --git a/data/presets/fields/piste_hike/difficulty.json b/data/presets/fields/piste/difficulty.json similarity index 100% rename from data/presets/fields/piste_hike/difficulty.json rename to data/presets/fields/piste/difficulty.json diff --git a/data/presets/fields/piste_downhill/difficulty.json b/data/presets/fields/piste/difficulty_downhill.json similarity index 100% rename from data/presets/fields/piste_downhill/difficulty.json rename to data/presets/fields/piste/difficulty_downhill.json diff --git a/data/presets/fields/piste_nordic/difficulty.json b/data/presets/fields/piste/difficulty_nordic.json similarity index 100% rename from data/presets/fields/piste_nordic/difficulty.json rename to data/presets/fields/piste/difficulty_nordic.json diff --git a/data/presets/fields/piste/difficulty_skitour.json b/data/presets/fields/piste/difficulty_skitour.json new file mode 100644 index 000000000..f4b68e209 --- /dev/null +++ b/data/presets/fields/piste/difficulty_skitour.json @@ -0,0 +1,17 @@ +{ + "key": "piste:difficulty", + "type": "combo", + "label": "Difficulty", + "placeholder": "Easy, Intermediate, Advanced...", + "strings": { + "options": { + "novice": "Novice - L: <30° incline", + "easy": "Easy - WS: 30-35° incline", + "intermediate": "Intermediate - ZS: 35-40° incline", + "advanced": "Advanced - S: 40-45° incline", + "expert": "Expert - SS: 45–50° incline", + "freeride": "Freeride - AS: 50–55° incline", + "extreme": "Extreme - EX: >55° incline" + } + } +} diff --git a/data/presets/fields/piste_skitour/grooming.json b/data/presets/fields/piste/grooming.json similarity index 53% rename from data/presets/fields/piste_skitour/grooming.json rename to data/presets/fields/piste/grooming.json index 3c39f9c9a..a96c9f563 100644 --- a/data/presets/fields/piste_skitour/grooming.json +++ b/data/presets/fields/piste/grooming.json @@ -6,7 +6,10 @@ "options": { "classic": "Classic", "mogul": "Mogul", - "backcountry": "Backcountry" + "backcountry": "Backcountry", + "classic+skating": "Classic and Skating", + "scooter": "Scooter/Snowmobile", + "skating": "Skating" } } } diff --git a/data/presets/fields/piste_downhill/grooming.json b/data/presets/fields/piste/grooming_downhill.json similarity index 100% rename from data/presets/fields/piste_downhill/grooming.json rename to data/presets/fields/piste/grooming_downhill.json diff --git a/data/presets/fields/piste_hike/grooming.json b/data/presets/fields/piste/grooming_hike.json similarity index 100% rename from data/presets/fields/piste_hike/grooming.json rename to data/presets/fields/piste/grooming_hike.json diff --git a/data/presets/fields/piste_nordic/grooming.json b/data/presets/fields/piste/grooming_nordic.json similarity index 100% rename from data/presets/fields/piste_nordic/grooming.json rename to data/presets/fields/piste/grooming_nordic.json diff --git a/data/presets/fields/piste/type.json b/data/presets/fields/piste/type.json new file mode 100644 index 000000000..ac3bee99a --- /dev/null +++ b/data/presets/fields/piste/type.json @@ -0,0 +1,19 @@ +{ + "key": "piste:type", + "type": "typeCombo", + "label": "Type", + "strings": { + "options": { + "downhill": "Downhill", + "nordic": "Nordic", + "skitour": "Skitour", + "sled": "Sled", + "hike": "Hike", + "sleigh": "Sleigh", + "ice_skate": "Ice Skate", + "snow_park": "Snow Park", + "playground": "Playground", + "connection": "Connection" + } + } +} diff --git a/data/presets/fields/piste_downhill/type.json b/data/presets/fields/piste/type_downhill.json similarity index 100% rename from data/presets/fields/piste_downhill/type.json rename to data/presets/fields/piste/type_downhill.json diff --git a/data/presets/fields/piste_nordic/type.json b/data/presets/fields/piste/type_nordic.json similarity index 100% rename from data/presets/fields/piste_nordic/type.json rename to data/presets/fields/piste/type_nordic.json diff --git a/data/presets/fields/piste_skitour/difficulty.json b/data/presets/fields/piste_skitour/difficulty.json deleted file mode 100644 index c0227f1bd..000000000 --- a/data/presets/fields/piste_skitour/difficulty.json +++ /dev/null @@ -1,17 +0,0 @@ -{ - "key": "piste:difficulty", - "type": "combo", - "label": "Difficulty", - "placeholder": "Easy, Intermediate, Advanced...", - "strings": { - "options": { - "novice": "novice - L: inclination <30 degree", - "easy": "Easy - WS: inclination 30-35 degree", - "intermediate": "Intermediate - ZS: inclination 35-40 degree", - "advanced": "Advanced - S: inclination 40-45 degree", - "expert": "Expert - SS: inclination 45–50 degree", - "freeride": "Freeride - AS: inclination 50–55 degree", - "extreme": "Extreme - EX: inclination >55 degree" - } - } -} diff --git a/data/presets/fields/piste_sled/difficulty.json b/data/presets/fields/piste_sled/difficulty.json deleted file mode 100644 index a06a3d18b..000000000 --- a/data/presets/fields/piste_sled/difficulty.json +++ /dev/null @@ -1,17 +0,0 @@ -{ - "key": "piste:difficulty", - "type": "combo", - "label": "Difficulty", - "placeholder": "Easy, Intermediate, Advanced...", - "strings": { - "options": { - "novice": "Novice", - "easy": "Easy", - "intermediate": "Intermediate", - "advanced": "Advanced", - "expert": "Expert", - "freeride": "Freeride", - "extreme": "Extreme" - } - } -} diff --git a/data/presets/fields/piste_sled/grooming.json b/data/presets/fields/piste_sled/grooming.json deleted file mode 100644 index b250887b4..000000000 --- a/data/presets/fields/piste_sled/grooming.json +++ /dev/null @@ -1,11 +0,0 @@ -{ - "key": "piste:grooming", - "type": "combo", - "label": "Grooming", - "strings": { - "options": { - "classic": "Classic - prepared", - "backcountry": "Backcountry - no grooming" - } - } -} diff --git a/data/presets/fields/piste_sleigh/difficulty.json b/data/presets/fields/piste_sleigh/difficulty.json deleted file mode 100644 index a06a3d18b..000000000 --- a/data/presets/fields/piste_sleigh/difficulty.json +++ /dev/null @@ -1,17 +0,0 @@ -{ - "key": "piste:difficulty", - "type": "combo", - "label": "Difficulty", - "placeholder": "Easy, Intermediate, Advanced...", - "strings": { - "options": { - "novice": "Novice", - "easy": "Easy", - "intermediate": "Intermediate", - "advanced": "Advanced", - "expert": "Expert", - "freeride": "Freeride", - "extreme": "Extreme" - } - } -} diff --git a/data/presets/fields/piste_sleigh/grooming.json b/data/presets/fields/piste_sleigh/grooming.json deleted file mode 100644 index b250887b4..000000000 --- a/data/presets/fields/piste_sleigh/grooming.json +++ /dev/null @@ -1,11 +0,0 @@ -{ - "key": "piste:grooming", - "type": "combo", - "label": "Grooming", - "strings": { - "options": { - "classic": "Classic - prepared", - "backcountry": "Backcountry - no grooming" - } - } -} diff --git a/data/presets/presets.json b/data/presets/presets.json index 85be7bedc..18431fa32 100644 --- a/data/presets/presets.json +++ b/data/presets/presets.json @@ -659,13 +659,14 @@ "office/telecommunication": {"icon": "maki-telephone", "fields": ["name", "address", "building_area", "opening_hours"], "geometry": ["point", "area"], "tags": {"office": "telecommunication"}, "terms": ["communication", "internet", "phone", "voice"], "name": "Telecom Office"}, "office/therapist": {"icon": "maki-suitcase", "fields": ["name", "address", "building_area", "opening_hours"], "geometry": ["point", "area"], "tags": {"office": "therapist"}, "terms": ["therapy"], "name": "Therapist Office"}, "office/water_utility": {"icon": "maki-suitcase", "fields": ["name", "address", "building_area", "opening_hours", "operator"], "geometry": ["point", "area"], "tags": {"office": "water_utility"}, "terms": ["water board", "utility"], "name": "Water Utility Office"}, - "piste/piste_downhill": {"icon": "maki-skiing", "fields": ["name", "piste_downhill/type", "piste_downhill/difficulty", "piste_downhill/grooming", "oneway", "lit"], "geometry": ["point", "line", "area"], "terms": ["ski", "alpine", "snowboard", "downhill", "piste"], "tags": {"piste:type": "downhill"}, "name": "Downhill Piste/Ski Run"}, - "piste/piste_hike": {"icon": "fas-snowflake", "fields": ["name", "piste_hike/difficulty", "piste_hike/grooming", "oneway", "lit"], "geometry": ["point", "line", "area"], "terms": ["hike", "winter hiking", "snowshoe", "snowshoeing", "piste", "ski"], "tags": {"piste:type": "hike"}, "name": "Snowshoeing or Winter Hiking Trail"}, - "piste/piste_ice_skate": {"icon": "fas-snowflake", "fields": ["name", "sport_ice", "oneway", "lit"], "geometry": ["point", "line", "area"], "terms": ["ice", "skating", "ski", "piste"], "tags": {"piste:type": "ice_skate"}, "name": "Ice Skating Piste"}, - "piste/piste_nordic": {"icon": "maki-skiing", "fields": ["name", "piste_nordic/type", "piste_nordic/difficulty", "piste_nordic/grooming", "oneway", "lit"], "geometry": ["point", "line", "area"], "terms": ["ski", "nordic", "crosscountry", "skating", "piste"], "tags": {"piste:type": "nordic"}, "name": "Nordic or Crosscountry Piste/Ski Trail"}, - "piste/piste_skitour": {"icon": "maki-skiing", "fields": ["name", "piste_skitour/difficulty", "piste_skitour/grooming", "oneway", "lit"], "geometry": ["point", "line", "area"], "terms": ["ski", "skitour", "crosscountry", "ski touring", "piste"], "tags": {"piste:type": "skitour"}, "name": "Ski Touring Trail"}, - "piste/piste_sled": {"icon": "fas-snowflake", "fields": ["name", "piste_sled/difficulty", "piste_sled/grooming", "oneway", "lit"], "geometry": ["point", "line", "area"], "terms": ["ski", "sled", "luge", "sleigh", "sledge", "piste"], "tags": {"piste:type": "sled"}, "name": "Sled Piste"}, - "piste/piste_sleigh": {"icon": "fas-snowflake", "fields": ["name", "piste_sled/difficulty", "piste_sled/grooming", "oneway", "lit"], "geometry": ["point", "line", "area"], "terms": ["ski", "piste", "sled", "luge", "sleigh", "sledge", "ski-joring", "husky", "horse"], "tags": {"piste:type": "sleigh"}, "name": "Animal-pulled Sleigh Piste"}, + "piste/downhill": {"icon": "maki-skiing", "fields": ["name", "piste/type_downhill", "piste/difficulty_downhill", "piste/grooming_downhill", "oneway", "lit"], "geometry": ["line", "area"], "terms": ["ski", "alpine", "snowboard", "downhill", "piste"], "tags": {"piste:type": "downhill"}, "name": "Downhill Piste/Ski Run"}, + "piste/hike": {"icon": "fas-snowflake", "fields": ["name", "piste/difficulty", "piste/grooming_hike", "oneway", "lit"], "geometry": ["line", "area"], "terms": ["hike", "winter hiking", "snowshoe", "snowshoeing", "piste", "ski"], "tags": {"piste:type": "hike"}, "name": "Snowshoeing or Winter Hiking Trail"}, + "piste/ice_skate": {"icon": "fas-snowflake", "fields": ["name", "sport_ice", "oneway", "lit"], "geometry": ["line", "area"], "terms": ["ice", "skating", "ski", "piste"], "tags": {"piste:type": "ice_skate"}, "name": "Ice Skating Piste"}, + "piste/nordic": {"icon": "maki-skiing", "fields": ["name", "piste/type_nordic", "piste/difficulty_nordic", "piste/grooming_nordic", "oneway", "lit"], "geometry": ["line", "area"], "terms": ["ski", "nordic", "crosscountry", "skating", "piste"], "tags": {"piste:type": "nordic"}, "name": "Nordic or Crosscountry Piste/Ski Trail"}, + "piste/piste": {"icon": "maki-skiing", "fields": ["name", "piste/type", "piste/difficulty", "piste/grooming", "oneway", "lit"], "geometry": ["line", "area"], "terms": ["ski", "nordic", "crosscountry", "downhill", "alpine", "snowboard", "skitour", "ski touring", "sled", "luge", "sleigh", "sledge", "ski-joring", "husky", "horse", "winter hiking", "snowshoe", "snowshoeing", "ice", "skating"], "tags": {"piste:type": "*"}, "name": "Winter Sport Trails"}, + "piste/skitour": {"icon": "maki-skiing", "fields": ["name", "piste/difficulty_skitour", "piste/grooming", "oneway", "lit"], "geometry": ["line", "area"], "terms": ["ski", "skitour", "crosscountry", "ski touring", "piste"], "tags": {"piste:type": "skitour"}, "name": "Ski Touring Trail"}, + "piste/sled": {"icon": "fas-snowflake", "fields": ["name", "piste/difficulty", "piste/grooming", "oneway", "lit"], "geometry": ["line", "area"], "terms": ["ski", "sled", "luge", "sleigh", "sledge", "piste"], "tags": {"piste:type": "sled"}, "name": "Sled Piste"}, + "piste/sleigh": {"icon": "fas-snowflake", "fields": ["name", "piste/difficulty", "piste/grooming", "oneway", "lit"], "geometry": ["line", "area"], "terms": ["ski", "piste", "sled", "luge", "sleigh", "sledge", "ski-joring", "husky", "horse"], "tags": {"piste:type": "sleigh"}, "name": "Sleigh Piste"}, "place/farm": {"icon": "maki-farm", "geometry": ["point", "area"], "fields": ["name"], "tags": {"place": "farm"}, "name": "Farm", "searchable": false}, "place/city": {"icon": "maki-city", "fields": ["name", "population"], "geometry": ["point", "area"], "tags": {"place": "city"}, "name": "City"}, "place/hamlet": {"icon": "maki-triangle-stroked", "fields": ["name", "population"], "geometry": ["point", "area"], "tags": {"place": "hamlet"}, "name": "Hamlet"}, diff --git a/data/presets/presets/piste/piste_downhill.json b/data/presets/presets/piste/downhill.json similarity index 75% rename from data/presets/presets/piste/piste_downhill.json rename to data/presets/presets/piste/downhill.json index 33b639a18..a93097c42 100644 --- a/data/presets/presets/piste/piste_downhill.json +++ b/data/presets/presets/piste/downhill.json @@ -2,14 +2,13 @@ "icon": "maki-skiing", "fields": [ "name", - "piste_downhill/type", - "piste_downhill/difficulty", - "piste_downhill/grooming", + "piste/type_downhill", + "piste/difficulty_downhill", + "piste/grooming_downhill", "oneway", "lit" ], "geometry": [ - "point", "line", "area" ], diff --git a/data/presets/presets/piste/piste_hike.json b/data/presets/presets/piste/hike.json similarity index 83% rename from data/presets/presets/piste/piste_hike.json rename to data/presets/presets/piste/hike.json index bd1393e95..9376515b7 100644 --- a/data/presets/presets/piste/piste_hike.json +++ b/data/presets/presets/piste/hike.json @@ -2,13 +2,12 @@ "icon": "fas-snowflake", "fields": [ "name", - "piste_hike/difficulty", - "piste_hike/grooming", + "piste/difficulty", + "piste/grooming_hike", "oneway", "lit" ], "geometry": [ - "point", "line", "area" ], diff --git a/data/presets/presets/piste/piste_ice_skate.json b/data/presets/presets/piste/ice_skate.json similarity index 95% rename from data/presets/presets/piste/piste_ice_skate.json rename to data/presets/presets/piste/ice_skate.json index 945c683a2..4e6a86bde 100644 --- a/data/presets/presets/piste/piste_ice_skate.json +++ b/data/presets/presets/piste/ice_skate.json @@ -7,7 +7,6 @@ "lit" ], "geometry": [ - "point", "line", "area" ], diff --git a/data/presets/presets/piste/piste_nordic.json b/data/presets/presets/piste/nordic.json similarity index 76% rename from data/presets/presets/piste/piste_nordic.json rename to data/presets/presets/piste/nordic.json index 37708f1bf..42a95f751 100644 --- a/data/presets/presets/piste/piste_nordic.json +++ b/data/presets/presets/piste/nordic.json @@ -2,14 +2,13 @@ "icon": "maki-skiing", "fields": [ "name", - "piste_nordic/type", - "piste_nordic/difficulty", - "piste_nordic/grooming", + "piste/type_nordic", + "piste/difficulty_nordic", + "piste/grooming_nordic", "oneway", "lit" ], "geometry": [ - "point", "line", "area" ], diff --git a/data/presets/presets/piste/piste.json b/data/presets/presets/piste/piste.json new file mode 100644 index 000000000..c6c38f060 --- /dev/null +++ b/data/presets/presets/piste/piste.json @@ -0,0 +1,41 @@ +{ + "icon": "maki-skiing", + "fields": [ + "name", + "piste/type", + "piste/difficulty", + "piste/grooming", + "oneway", + "lit" + ], + "geometry": [ + "line", + "area" + ], + "terms": [ + "ski", + "nordic", + "crosscountry", + "downhill", + "alpine", + "snowboard", + "skitour", + "ski touring", + "sled", + "luge", + "sleigh", + "sledge", + "ski-joring", + "husky", + "horse", + "winter hiking", + "snowshoe", + "snowshoeing", + "ice", + "skating" + ], + "tags": { + "piste:type": "*" + }, + "name": "Winter Sport Trails" +} diff --git a/data/presets/presets/piste/piste_skitour.json b/data/presets/presets/piste/skitour.json similarity index 80% rename from data/presets/presets/piste/piste_skitour.json rename to data/presets/presets/piste/skitour.json index 2bc9a5841..a8ab25a0b 100644 --- a/data/presets/presets/piste/piste_skitour.json +++ b/data/presets/presets/piste/skitour.json @@ -2,13 +2,12 @@ "icon": "maki-skiing", "fields": [ "name", - "piste_skitour/difficulty", - "piste_skitour/grooming", + "piste/difficulty_skitour", + "piste/grooming", "oneway", "lit" ], "geometry": [ - "point", "line", "area" ], diff --git a/data/presets/presets/piste/piste_sled.json b/data/presets/presets/piste/sled.json similarity index 81% rename from data/presets/presets/piste/piste_sled.json rename to data/presets/presets/piste/sled.json index c7cefb333..594cb743a 100644 --- a/data/presets/presets/piste/piste_sled.json +++ b/data/presets/presets/piste/sled.json @@ -2,13 +2,12 @@ "icon": "fas-snowflake", "fields": [ "name", - "piste_sled/difficulty", - "piste_sled/grooming", + "piste/difficulty", + "piste/grooming", "oneway", "lit" ], "geometry": [ - "point", "line", "area" ], diff --git a/data/presets/presets/piste/piste_sleigh.json b/data/presets/presets/piste/sleigh.json similarity index 76% rename from data/presets/presets/piste/piste_sleigh.json rename to data/presets/presets/piste/sleigh.json index 364b31760..8b919c431 100644 --- a/data/presets/presets/piste/piste_sleigh.json +++ b/data/presets/presets/piste/sleigh.json @@ -2,13 +2,12 @@ "icon": "fas-snowflake", "fields": [ "name", - "piste_sled/difficulty", - "piste_sled/grooming", + "piste/difficulty", + "piste/grooming", "oneway", "lit" ], "geometry": [ - "point", "line", "area" ], @@ -26,5 +25,5 @@ "tags": { "piste:type": "sleigh" }, - "name": "Animal-pulled Sleigh Piste" + "name": "Sleigh Piste" } diff --git a/data/taginfo.json b/data/taginfo.json index 67041056a..94ac193da 100644 --- a/data/taginfo.json +++ b/data/taginfo.json @@ -4416,49 +4416,55 @@ "key": "piste:type", "value": "downhill", "description": "Downhill Piste/Ski Run, Type", - "object_types": ["node", "way", "area"], + "object_types": ["way", "area"], "icon_url": "https://raw.githubusercontent.com/mapbox/maki/master/icons/skiing-15.svg?sanitize=true" }, { "key": "piste:type", "value": "hike", - "description": "Snowshoeing or Winter Hiking Trail", - "object_types": ["node", "way", "area"], + "description": "Snowshoeing or Winter Hiking Trail, Type", + "object_types": ["way", "area"], "icon_url": "https://raw.githubusercontent.com/openstreetmap/iD/master/svg/fontawesome/fas-snowflake.svg?sanitize=true" }, { "key": "piste:type", "value": "ice_skate", - "description": "Ice Skating Piste", - "object_types": ["node", "way", "area"], + "description": "Ice Skating Piste, Type", + "object_types": ["way", "area"], "icon_url": "https://raw.githubusercontent.com/openstreetmap/iD/master/svg/fontawesome/fas-snowflake.svg?sanitize=true" }, { "key": "piste:type", "value": "nordic", - "description": "Nordic or Crosscountry Piste/Ski Trail", - "object_types": ["node", "way", "area"], + "description": "Nordic or Crosscountry Piste/Ski Trail, Type", + "object_types": ["way", "area"], + "icon_url": "https://raw.githubusercontent.com/mapbox/maki/master/icons/skiing-15.svg?sanitize=true" + }, + { + "key": "piste:type", + "description": "Winter Sport Trails", + "object_types": ["way", "area"], "icon_url": "https://raw.githubusercontent.com/mapbox/maki/master/icons/skiing-15.svg?sanitize=true" }, { "key": "piste:type", "value": "skitour", - "description": "Ski Touring Trail", - "object_types": ["node", "way", "area"], + "description": "Ski Touring Trail, Type", + "object_types": ["way", "area"], "icon_url": "https://raw.githubusercontent.com/mapbox/maki/master/icons/skiing-15.svg?sanitize=true" }, { "key": "piste:type", "value": "sled", - "description": "Sled Piste", - "object_types": ["node", "way", "area"], + "description": "Sled Piste, Type", + "object_types": ["way", "area"], "icon_url": "https://raw.githubusercontent.com/openstreetmap/iD/master/svg/fontawesome/fas-snowflake.svg?sanitize=true" }, { "key": "piste:type", "value": "sleigh", - "description": "Animal-pulled Sleigh Piste", - "object_types": ["node", "way", "area"], + "description": "Sleigh Piste, Type", + "object_types": ["way", "area"], "icon_url": "https://raw.githubusercontent.com/openstreetmap/iD/master/svg/fontawesome/fas-snowflake.svg?sanitize=true" }, { @@ -7128,9 +7134,6 @@ "value": "backcountry", "description": "Grooming" }, - {"key": "piste:type", "value": "snow_park", "description": "Type"}, - {"key": "piste:type", "value": "playground", "description": "Type"}, - {"key": "piste:type", "value": "connection", "description": "Type"}, { "key": "piste:grooming", "value": "classic+skating", @@ -7138,6 +7141,9 @@ }, {"key": "piste:grooming", "value": "scooter", "description": "Grooming"}, {"key": "piste:grooming", "value": "skating", "description": "Grooming"}, + {"key": "piste:type", "value": "snow_park", "description": "Type"}, + {"key": "piste:type", "value": "playground", "description": "Type"}, + {"key": "piste:type", "value": "connection", "description": "Type"}, {"key": "plant", "description": "Plant"}, {"key": "plant:output:electricity", "description": "Power Output"}, {"key": "baby", "description": "Baby Seat"}, diff --git a/dist/locales/en.json b/dist/locales/en.json index 2c1fd036b..7f6b44f06 100644 --- a/dist/locales/en.json +++ b/dist/locales/en.json @@ -2427,7 +2427,7 @@ "label": "Telephone", "placeholder": "+31 42 123 4567" }, - "piste_downhill/difficulty": { + "piste/difficulty_downhill": { "label": "Difficulty", "placeholder": "Easy, Intermediate, Advanced...", "options": { @@ -2440,44 +2440,7 @@ "extreme": "Extreme (climbing equipment required)" } }, - "piste_downhill/grooming": { - "label": "Grooming", - "options": { - "classic": "Classic", - "mogul": "Mogul", - "backcountry": "Backcountry - no grooming" - } - }, - "piste_downhill/type": { - "label": "Type", - "options": { - "downhill": "Downhill", - "snow_park": "Snow Park", - "playground": "Playground", - "connection": "Connection between pistes" - } - }, - "piste_hike/difficulty": { - "label": "Difficulty", - "placeholder": "Easy, Intermediate, Advanced...", - "options": { - "novice": "Novice", - "easy": "Easy", - "intermediate": "Intermediate", - "advanced": "Advanced", - "expert": "Expert", - "freeride": "Freeride", - "extreme": "Extreme" - } - }, - "piste_hike/grooming": { - "label": "Grooming", - "options": { - "classic": "Classic - Winter Hiking", - "backcountry": "Backcountry - Snowshoeing" - } - }, - "piste_nordic/difficulty": { + "piste/difficulty_nordic": { "label": "Difficulty", "placeholder": "Easy, Intermediate, Advanced...", "options": { @@ -2488,7 +2451,48 @@ "expert": "Expert - Dangerous terrain around" } }, - "piste_nordic/grooming": { + "piste/difficulty_skitour": { + "label": "Difficulty", + "placeholder": "Easy, Intermediate, Advanced...", + "options": { + "novice": "Novice - L: <30° incline", + "easy": "Easy - WS: 30-35° incline", + "intermediate": "Intermediate - ZS: 35-40° incline", + "advanced": "Advanced - S: 40-45° incline", + "expert": "Expert - SS: 45–50° incline", + "freeride": "Freeride - AS: 50–55° incline", + "extreme": "Extreme - EX: >55° incline" + } + }, + "piste/difficulty": { + "label": "Difficulty", + "placeholder": "Easy, Intermediate, Advanced...", + "options": { + "novice": "Novice", + "easy": "Easy", + "intermediate": "Intermediate", + "advanced": "Advanced", + "expert": "Expert", + "freeride": "Freeride", + "extreme": "Extreme" + } + }, + "piste/grooming_downhill": { + "label": "Grooming", + "options": { + "classic": "Classic", + "mogul": "Mogul", + "backcountry": "Backcountry - no grooming" + } + }, + "piste/grooming_hike": { + "label": "Grooming", + "options": { + "classic": "Classic - Winter Hiking", + "backcountry": "Backcountry - Snowshoeing" + } + }, + "piste/grooming_nordic": { "label": "Grooming", "options": { "classic": "Classic", @@ -2498,7 +2502,27 @@ "skating": "Skating" } }, - "piste_nordic/type": { + "piste/grooming": { + "label": "Grooming", + "options": { + "classic": "Classic", + "mogul": "Mogul", + "backcountry": "Backcountry", + "classic+skating": "Classic and Skating", + "scooter": "Scooter/Snowmobile", + "skating": "Skating" + } + }, + "piste/type_downhill": { + "label": "Type", + "options": { + "downhill": "Downhill", + "snow_park": "Snow Park", + "playground": "Playground", + "connection": "Connection between pistes" + } + }, + "piste/type_nordic": { "label": "Type", "options": { "downhill": "Nordic", @@ -2506,65 +2530,19 @@ "connection": "Connection between pistes" } }, - "piste_skitour/difficulty": { - "label": "Difficulty", - "placeholder": "Easy, Intermediate, Advanced...", + "piste/type": { + "label": "Type", "options": { - "novice": "novice - L: inclination <30 degree", - "easy": "Easy - WS: inclination 30-35 degree", - "intermediate": "Intermediate - ZS: inclination 35-40 degree", - "advanced": "Advanced - S: inclination 40-45 degree", - "expert": "Expert - SS: inclination 45–50 degree", - "freeride": "Freeride - AS: inclination 50–55 degree", - "extreme": "Extreme - EX: inclination >55 degree" - } - }, - "piste_skitour/grooming": { - "label": "Grooming", - "options": { - "classic": "Classic", - "mogul": "Mogul", - "backcountry": "Backcountry" - } - }, - "piste_sled/difficulty": { - "label": "Difficulty", - "placeholder": "Easy, Intermediate, Advanced...", - "options": { - "novice": "Novice", - "easy": "Easy", - "intermediate": "Intermediate", - "advanced": "Advanced", - "expert": "Expert", - "freeride": "Freeride", - "extreme": "Extreme" - } - }, - "piste_sled/grooming": { - "label": "Grooming", - "options": { - "classic": "Classic - prepared", - "backcountry": "Backcountry - no grooming" - } - }, - "piste_sleigh/difficulty": { - "label": "Difficulty", - "placeholder": "Easy, Intermediate, Advanced...", - "options": { - "novice": "Novice", - "easy": "Easy", - "intermediate": "Intermediate", - "advanced": "Advanced", - "expert": "Expert", - "freeride": "Freeride", - "extreme": "Extreme" - } - }, - "piste_sleigh/grooming": { - "label": "Grooming", - "options": { - "classic": "Classic - prepared", - "backcountry": "Backcountry - no grooming" + "downhill": "Downhill", + "nordic": "Nordic", + "skitour": "Skitour", + "sled": "Sled", + "hike": "Hike", + "sleigh": "Sleigh", + "ice_skate": "Ice Skate", + "snow_park": "Snow Park", + "playground": "Playground", + "connection": "Connection" } }, "place": { @@ -5815,32 +5793,36 @@ "name": "Water Utility Office", "terms": "water board,utility" }, - "piste/piste_downhill": { + "piste/downhill": { "name": "Downhill Piste/Ski Run", "terms": "ski,alpine,snowboard,downhill,piste" }, - "piste/piste_hike": { + "piste/hike": { "name": "Snowshoeing or Winter Hiking Trail", "terms": "hike,winter hiking,snowshoe,snowshoeing,piste,ski" }, - "piste/piste_ice_skate": { + "piste/ice_skate": { "name": "Ice Skating Piste", "terms": "ice,skating,ski,piste" }, - "piste/piste_nordic": { + "piste/nordic": { "name": "Nordic or Crosscountry Piste/Ski Trail", "terms": "ski,nordic,crosscountry,skating,piste" }, - "piste/piste_skitour": { + "piste/piste": { + "name": "Winter Sport Trails", + "terms": "ski,nordic,crosscountry,downhill,alpine,snowboard,skitour,ski touring,sled,luge,sleigh,sledge,ski-joring,husky,horse,winter hiking,snowshoe,snowshoeing,ice,skating" + }, + "piste/skitour": { "name": "Ski Touring Trail", "terms": "ski,skitour,crosscountry,ski touring,piste" }, - "piste/piste_sled": { + "piste/sled": { "name": "Sled Piste", "terms": "ski,sled,luge,sleigh,sledge,piste" }, - "piste/piste_sleigh": { - "name": "Animal-pulled Sleigh Piste", + "piste/sleigh": { + "name": "Sleigh Piste", "terms": "ski,piste,sled,luge,sleigh,sledge,ski-joring,husky,horse" }, "place/farm": { From 67d5e896807b5fc872b179112a0b59e22d6f4094 Mon Sep 17 00:00:00 2001 From: yves Date: Sat, 6 Oct 2018 09:10:28 +0200 Subject: [PATCH 32/56] Add colour field to the piste route preset --- data/presets.yaml | 3 +++ data/presets/fields.json | 1 + data/presets/fields/colour.json | 5 +++++ data/presets/presets.json | 2 +- data/presets/presets/type/route/piste.json | 5 +++-- data/taginfo.json | 1 + dist/locales/en.json | 3 +++ 7 files changed, 17 insertions(+), 3 deletions(-) create mode 100644 data/presets/fields/colour.json diff --git a/data/presets.yaml b/data/presets.yaml index cc8509c00..f04b94426 100644 --- a/data/presets.yaml +++ b/data/presets.yaml @@ -321,6 +321,9 @@ en: collection_times: # collection_times=* label: Collection Times + colour: + # colour=* + label: Colour comment: # comment=* label: Changeset Comment diff --git a/data/presets/fields.json b/data/presets/fields.json index b06b19beb..801eb4d74 100644 --- a/data/presets/fields.json +++ b/data/presets/fields.json @@ -53,6 +53,7 @@ "clothes": {"key": "clothes", "type": "semiCombo", "label": "Clothes"}, "club": {"key": "club", "type": "typeCombo", "label": "Type"}, "collection_times": {"key": "collection_times", "type": "text", "label": "Collection Times"}, + "colour": {"key": "colour", "type": "text", "label": "Colour"}, "comment": {"key": "comment", "type": "textarea", "label": "Changeset Comment", "placeholder": "Brief description of your contributions (required)"}, "communication_multi": {"key": "communication:", "type": "multiCombo", "label": "Communication Types"}, "construction": {"key": "construction", "type": "combo", "label": "Type"}, diff --git a/data/presets/fields/colour.json b/data/presets/fields/colour.json new file mode 100644 index 000000000..6ab9de9af --- /dev/null +++ b/data/presets/fields/colour.json @@ -0,0 +1,5 @@ +{ + "key": "colour", + "type": "text", + "label": "Colour" +} diff --git a/data/presets/presets.json b/data/presets/presets.json index 18431fa32..814adcd7b 100644 --- a/data/presets/presets.json +++ b/data/presets/presets.json @@ -978,7 +978,7 @@ "type/route/horse": {"icon": "iD-route-horse", "fields": ["name", "ref_route", "operator", "network_horse", "description", "distance"], "geometry": ["relation"], "tags": {"type": "route", "route": "horse"}, "name": "Riding Route"}, "type/route/light_rail": {"icon": "iD-route-light-rail", "fields": ["name", "ref_route", "operator", "network"], "geometry": ["relation"], "tags": {"type": "route", "route": "light_rail"}, "name": "Light Rail Route"}, "type/route/pipeline": {"icon": "iD-route-pipeline", "fields": ["name", "ref_route", "operator"], "geometry": ["relation"], "tags": {"type": "route", "route": "pipeline"}, "name": "Pipeline Route"}, - "type/route/piste": {"icon": "iD-route-piste", "fields": ["name", "ref_route", "operator", "network"], "geometry": ["relation"], "tags": {"type": "route", "route": "piste"}, "name": "Piste/Ski Route"}, + "type/route/piste": {"icon": "iD-route-piste", "fields": ["name", "piste/type", "colour", "ref_route", "operator"], "geometry": ["relation"], "tags": {"type": "route", "route": "piste"}, "name": "Piste/Ski Route"}, "type/route/power": {"icon": "iD-route-power", "fields": ["name", "ref_route", "operator"], "geometry": ["relation"], "tags": {"type": "route", "route": "power"}, "name": "Power Route"}, "type/route/road": {"icon": "iD-route-road", "fields": ["name", "ref_route", "network_road"], "geometry": ["relation"], "tags": {"type": "route", "route": "road"}, "name": "Road Route"}, "type/route/subway": {"icon": "iD-route-subway", "fields": ["name", "ref_route", "operator", "network"], "geometry": ["relation"], "tags": {"type": "route", "route": "subway"}, "name": "Subway Route"}, diff --git a/data/presets/presets/type/route/piste.json b/data/presets/presets/type/route/piste.json index d670b77b3..42993a796 100644 --- a/data/presets/presets/type/route/piste.json +++ b/data/presets/presets/type/route/piste.json @@ -2,9 +2,10 @@ "icon": "iD-route-piste", "fields": [ "name", + "piste/type", + "colour", "ref_route", - "operator", - "network" + "operator" ], "geometry": [ "relation" diff --git a/data/taginfo.json b/data/taginfo.json index 94ac193da..299bcf6ee 100644 --- a/data/taginfo.json +++ b/data/taginfo.json @@ -6689,6 +6689,7 @@ {"key": "castle_type", "description": "Type"}, {"key": "clothes", "description": "Clothes"}, {"key": "collection_times", "description": "Collection Times"}, + {"key": "colour", "description": "Colour"}, {"key": "comment", "description": "Changeset Comment"}, {"key": "communication:", "description": "Communication Types"}, {"key": "construction", "description": "Type"}, diff --git a/dist/locales/en.json b/dist/locales/en.json index 7f6b44f06..431da2fe2 100644 --- a/dist/locales/en.json +++ b/dist/locales/en.json @@ -1730,6 +1730,9 @@ "collection_times": { "label": "Collection Times" }, + "colour": { + "label": "Colour" + }, "comment": { "label": "Changeset Comment", "placeholder": "Brief description of your contributions (required)" From fc76e2c8c658b81a14fa996e99b910431276ee14 Mon Sep 17 00:00:00 2001 From: Quincy Morgan Date: Sat, 6 Oct 2018 09:41:39 -0700 Subject: [PATCH 33/56] Adds the Solar Panel preset Changes the Power Output field type from "text" to "typeCombo" Renames the source_nuclear and source_wind presets to source/nuclear and source/wind Adds point geometry to the power/tower preset --- data/presets.yaml | 9 +++- data/presets/fields.json | 2 +- .../fields/generator/output/electricity.json | 2 +- data/presets/presets.json | 7 +-- .../power/generator/method/photovoltaic.json | 43 +++++++++++++++++++ .../nuclear.json} | 0 .../{source_wind.json => source/wind.json} | 0 data/presets/presets/power/tower.json | 1 + data/taginfo.json | 7 +++ dist/locales/en.json | 8 +++- svg/fontawesome/fas-solar-panel.svg | 1 + 11 files changed, 71 insertions(+), 9 deletions(-) create mode 100644 data/presets/presets/power/generator/method/photovoltaic.json rename data/presets/presets/power/generator/{source_nuclear.json => source/nuclear.json} (100%) rename data/presets/presets/power/generator/{source_wind.json => source/wind.json} (100%) create mode 100644 svg/fontawesome/fas-solar-panel.svg diff --git a/data/presets.yaml b/data/presets.yaml index c975f7959..a22496d31 100644 --- a/data/presets.yaml +++ b/data/presets.yaml @@ -5027,12 +5027,17 @@ en: name: Power Generator # 'terms: hydro,solar,turbine,wind' terms: '' - power/generator/source_nuclear: + power/generator/method/photovoltaic: + # 'power=generator, generator:source=solar, generator:method=photovoltaic, generator:type=solar_photovoltaic_panel' + name: Solar Panel + # 'terms: photovoltaic module,PV module,sunlight' + terms: '' + power/generator/source/nuclear: # 'power=generator, generator:source=nuclear, generator:method=fission' name: Nuclear Reactor # 'terms: fission,generator,nuclear,nuke,reactor' terms: '' - power/generator/source_wind: + power/generator/source/wind: # 'power=generator, generator:source=wind, generator:method=wind_turbine' name: Wind Turbine # 'terms: generator,turbine,windmill,wind' diff --git a/data/presets/fields.json b/data/presets/fields.json index b0ec1b069..0addd4de0 100644 --- a/data/presets/fields.json +++ b/data/presets/fields.json @@ -113,7 +113,7 @@ "gauge": {"key": "gauge", "type": "combo", "label": "Gauge"}, "gender": {"type": "radio", "keys": ["male", "female", "unisex"], "label": "Gender", "placeholder": "Unknown", "strings": {"options": {"male": "Male", "female": "Female", "unisex": "Unisex"}}}, "generator/method": {"key": "generator:method", "type": "combo", "label": "Method"}, - "generator/output/electricity": {"key": "generator:output:electricity", "type": "text", "label": "Power Output", "placeholder": "50 MW, 100 MW, 200 MW..."}, + "generator/output/electricity": {"key": "generator:output:electricity", "type": "typeCombo", "label": "Power Output", "placeholder": "50 MW, 100 MW, 200 MW..."}, "generator/source": {"key": "generator:source", "type": "combo", "label": "Source"}, "generator/type": {"key": "generator:type", "type": "combo", "label": "Type"}, "government": {"key": "government", "type": "typeCombo", "label": "Type"}, diff --git a/data/presets/fields/generator/output/electricity.json b/data/presets/fields/generator/output/electricity.json index 50bc4cfd2..ae078a86e 100644 --- a/data/presets/fields/generator/output/electricity.json +++ b/data/presets/fields/generator/output/electricity.json @@ -1,6 +1,6 @@ { "key": "generator:output:electricity", - "type": "text", + "type": "typeCombo", "label": "Power Output", "placeholder": "50 MW, 100 MW, 200 MW..." } diff --git a/data/presets/presets.json b/data/presets/presets.json index 4d1f7eb42..decbea42b 100644 --- a/data/presets/presets.json +++ b/data/presets/presets.json @@ -691,15 +691,16 @@ "point": {"fields": ["name"], "geometry": ["point"], "tags": {}, "name": "Point", "matchScore": 0.1}, "power/sub_station": {"icon": "temaki-power", "fields": ["substation", "operator", "building", "ref"], "geometry": ["point", "area"], "tags": {"power": "sub_station"}, "reference": {"key": "power", "value": "substation"}, "name": "Substation", "searchable": false}, "power/generator": {"icon": "temaki-power", "fields": ["operator", "generator/source", "generator/method", "generator/type", "generator/output/electricity", "ref"], "geometry": ["point", "vertex", "area"], "terms": ["hydro", "solar", "turbine", "wind"], "tags": {"power": "generator"}, "name": "Power Generator"}, - "power/generator/source_nuclear": {"icon": "temaki-radiation", "fields": ["operator", "generator/source", "generator/method", "generator/type", "generator/output/electricity", "ref"], "geometry": ["point", "vertex", "area"], "terms": ["fission", "generator", "nuclear", "nuke", "reactor"], "tags": {"power": "generator", "generator:source": "nuclear", "generator:method": "fission"}, "reference": {"key": "generator:source", "value": "nuclear"}, "name": "Nuclear Reactor"}, - "power/generator/source_wind": {"icon": "temaki-wind_turbine", "fields": ["operator", "generator/source", "generator/method", "generator/type", "generator/output/electricity", "height", "ref"], "geometry": ["point", "vertex", "area"], "terms": ["generator", "turbine", "windmill", "wind"], "tags": {"power": "generator", "generator:source": "wind", "generator:method": "wind_turbine"}, "reference": {"key": "generator:source", "value": "wind"}, "name": "Wind Turbine"}, + "power/generator/method/photovoltaic": {"icon": "fas-solar-panel", "fields": ["operator", "generator/output/electricity", "ref"], "geometry": ["point", "vertex", "area"], "terms": ["photovoltaic module", "PV module", "sunlight"], "tags": {"power": "generator", "generator:source": "solar", "generator:method": "photovoltaic", "generator:type": "solar_photovoltaic_panel"}, "addTags": {"power": "generator", "generator:source": "solar", "generator:method": "photovoltaic", "generator:type": "solar_photovoltaic_panel", "generator:output:electricity": "yes"}, "removeTags": {"power": "generator", "generator:source": "solar", "generator:method": "photovoltaic", "generator:type": "solar_photovoltaic_panel", "generator:output:electricity": "yes"}, "reference": {"key": "generator:method", "value": "photovoltaic"}, "name": "Solar Panel"}, + "power/generator/source/nuclear": {"icon": "temaki-radiation", "fields": ["operator", "generator/source", "generator/method", "generator/type", "generator/output/electricity", "ref"], "geometry": ["point", "vertex", "area"], "terms": ["fission", "generator", "nuclear", "nuke", "reactor"], "tags": {"power": "generator", "generator:source": "nuclear", "generator:method": "fission"}, "reference": {"key": "generator:source", "value": "nuclear"}, "name": "Nuclear Reactor"}, + "power/generator/source/wind": {"icon": "temaki-wind_turbine", "fields": ["operator", "generator/source", "generator/method", "generator/type", "generator/output/electricity", "height", "ref"], "geometry": ["point", "vertex", "area"], "terms": ["generator", "turbine", "windmill", "wind"], "tags": {"power": "generator", "generator:source": "wind", "generator:method": "wind_turbine"}, "reference": {"key": "generator:source", "value": "wind"}, "name": "Wind Turbine"}, "power/line": {"icon": "iD-power-line", "fields": ["name", "operator", "voltage", "ref", "layer"], "geometry": ["line"], "tags": {"power": "line"}, "name": "Power Line"}, "power/minor_line": {"icon": "iD-power-line", "fields": ["name", "operator", "voltage", "ref", "layer"], "geometry": ["line"], "tags": {"power": "minor_line"}, "name": "Minor Power Line"}, "power/plant": {"icon": "maki-industry", "fields": ["name", "operator", "address", "plant/output/electricity", "start_date"], "geometry": ["area"], "tags": {"power": "plant"}, "addTags": {"power": "plant", "landuse": "industrial"}, "removeTags": {"power": "plant", "landuse": "industrial"}, "terms": ["coal", "gas", "generat*", "hydro", "nuclear", "power", "station"], "name": "Power Station Grounds"}, "power/pole": {"fields": ["ref"], "geometry": ["point", "vertex"], "tags": {"power": "pole"}, "name": "Power Pole"}, "power/substation": {"icon": "temaki-power", "fields": ["substation", "operator", "building", "ref"], "geometry": ["point", "area"], "tags": {"power": "substation"}, "name": "Substation"}, "power/switch": {"icon": "temaki-power", "fields": ["switch", "operator", "location", "cables", "voltage", "ref"], "geometry": ["point", "vertex", "area"], "tags": {"power": "switch"}, "name": "Power Switch"}, - "power/tower": {"fields": ["design", "ref"], "geometry": ["vertex"], "terms": ["power"], "tags": {"power": "tower"}, "name": "High-Voltage Tower"}, + "power/tower": {"fields": ["design", "ref"], "geometry": ["point", "vertex"], "terms": ["power"], "tags": {"power": "tower"}, "name": "High-Voltage Tower"}, "power/transformer": {"icon": "temaki-power", "fields": ["transformer", "operator", "location", "rating", "devices", "phases", "frequency", "voltage/primary", "voltage/secondary", "voltage/tertiary", "windings", "windings/configuration", "ref"], "geometry": ["point", "vertex", "area"], "tags": {"power": "transformer"}, "name": "Transformer"}, "public_transport/linear_platform_aerialway": {"icon": "iD-highway-footway", "fields": ["name", "ref_platform", "network", "operator", "surface", "lit", "bench", "shelter"], "geometry": ["line"], "tags": {"public_transport": "platform", "aerialway": "yes"}, "reference": {"key": "public_transport", "value": "platform"}, "terms": ["aerialway", "cable car", "platform", "public transit", "public transportation", "transit", "transportation"], "name": "Aerialway Stop / Platform"}, "public_transport/linear_platform_bus": {"icon": "iD-highway-footway", "fields": ["name", "ref_platform", "network", "operator", "surface", "lit", "bench", "shelter", "passenger_information_display"], "geometry": ["line"], "tags": {"public_transport": "platform", "bus": "yes"}, "addTags": {"public_transport": "platform", "bus": "yes", "highway": "bus_stop"}, "removeTags": {"public_transport": "platform", "bus": "yes", "highway": "bus_stop"}, "reference": {"key": "public_transport", "value": "platform"}, "terms": ["bus", "platform", "public transit", "public transportation", "transit", "transportation"], "name": "Bus Stop / Platform"}, diff --git a/data/presets/presets/power/generator/method/photovoltaic.json b/data/presets/presets/power/generator/method/photovoltaic.json new file mode 100644 index 000000000..eaecdb820 --- /dev/null +++ b/data/presets/presets/power/generator/method/photovoltaic.json @@ -0,0 +1,43 @@ +{ + "icon": "fas-solar-panel", + "fields": [ + "operator", + "generator/output/electricity", + "ref" + ], + "geometry": [ + "point", + "vertex", + "area" + ], + "terms": [ + "photovoltaic module", + "PV module", + "sunlight" + ], + "tags": { + "power": "generator", + "generator:source": "solar", + "generator:method": "photovoltaic", + "generator:type": "solar_photovoltaic_panel" + }, + "addTags": { + "power": "generator", + "generator:source": "solar", + "generator:method": "photovoltaic", + "generator:type": "solar_photovoltaic_panel", + "generator:output:electricity": "yes" + }, + "removeTags": { + "power": "generator", + "generator:source": "solar", + "generator:method": "photovoltaic", + "generator:type": "solar_photovoltaic_panel", + "generator:output:electricity": "yes" + }, + "reference": { + "key": "generator:method", + "value": "photovoltaic" + }, + "name": "Solar Panel" +} diff --git a/data/presets/presets/power/generator/source_nuclear.json b/data/presets/presets/power/generator/source/nuclear.json similarity index 100% rename from data/presets/presets/power/generator/source_nuclear.json rename to data/presets/presets/power/generator/source/nuclear.json diff --git a/data/presets/presets/power/generator/source_wind.json b/data/presets/presets/power/generator/source/wind.json similarity index 100% rename from data/presets/presets/power/generator/source_wind.json rename to data/presets/presets/power/generator/source/wind.json diff --git a/data/presets/presets/power/tower.json b/data/presets/presets/power/tower.json index 77c5277fe..eddacdbfd 100644 --- a/data/presets/presets/power/tower.json +++ b/data/presets/presets/power/tower.json @@ -4,6 +4,7 @@ "ref" ], "geometry": [ + "point", "vertex" ], "terms": [ diff --git a/data/taginfo.json b/data/taginfo.json index 244690dee..337b438d4 100644 --- a/data/taginfo.json +++ b/data/taginfo.json @@ -4627,6 +4627,13 @@ "object_types": ["node", "area"], "icon_url": "https://raw.githubusercontent.com/bhousel/temaki/master/icons/power.svg?sanitize=true" }, + { + "key": "generator:type", + "value": "solar_photovoltaic_panel", + "description": "Solar Panel", + "object_types": ["node", "area"], + "icon_url": "https://raw.githubusercontent.com/openstreetmap/iD/master/svg/fontawesome/fas-solar-panel.svg?sanitize=true" + }, { "key": "generator:method", "value": "fission", diff --git a/dist/locales/en.json b/dist/locales/en.json index cac517781..34ef50c3a 100644 --- a/dist/locales/en.json +++ b/dist/locales/en.json @@ -5842,11 +5842,15 @@ "name": "Power Generator", "terms": "hydro,solar,turbine,wind" }, - "power/generator/source_nuclear": { + "power/generator/method/photovoltaic": { + "name": "Solar Panel", + "terms": "photovoltaic module,PV module,sunlight" + }, + "power/generator/source/nuclear": { "name": "Nuclear Reactor", "terms": "fission,generator,nuclear,nuke,reactor" }, - "power/generator/source_wind": { + "power/generator/source/wind": { "name": "Wind Turbine", "terms": "generator,turbine,windmill,wind" }, diff --git a/svg/fontawesome/fas-solar-panel.svg b/svg/fontawesome/fas-solar-panel.svg new file mode 100644 index 000000000..6c637615d --- /dev/null +++ b/svg/fontawesome/fas-solar-panel.svg @@ -0,0 +1 @@ + \ No newline at end of file From cadfbbe4e0d42e1f9a303e1729aaca7966b6f4e5 Mon Sep 17 00:00:00 2001 From: "greenkeeper[bot]" Date: Fri, 5 Oct 2018 11:33:06 +0000 Subject: [PATCH 34/56] chore(package): update mapillary-js to version 2.13.1 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 3c267e3f4..4dd97c03f 100644 --- a/package.json +++ b/package.json @@ -68,7 +68,7 @@ "js-yaml": "^3.9.0", "json-stringify-pretty-compact": "^1.1.0", "jsonschema": "^1.1.0", - "mapillary-js": "2.13.0", + "mapillary-js": "2.13.1", "mapillary_sprite_source": "^1.5.0", "minimist": "^1.2.0", "mocha": "^5.0.0", From 805491caedd788b18f1bd1e44ea7ebbad7bbc558 Mon Sep 17 00:00:00 2001 From: yvecai Date: Sun, 7 Oct 2018 09:37:41 +0200 Subject: [PATCH 35/56] Fix nordic type field --- data/presets/fields/piste/type_nordic.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/data/presets/fields/piste/type_nordic.json b/data/presets/fields/piste/type_nordic.json index 2065421f4..dba168b2f 100644 --- a/data/presets/fields/piste/type_nordic.json +++ b/data/presets/fields/piste/type_nordic.json @@ -4,7 +4,7 @@ "label": "Type", "strings": { "options": { - "downhill": "Nordic", + "nordic": "Nordic", "playground": "Playground", "connection": "Connection between pistes" } From bfc3bc3c3c5023176492a7099bdd4980e3f037e8 Mon Sep 17 00:00:00 2001 From: Quincy Morgan Date: Sun, 7 Oct 2018 09:01:01 -0700 Subject: [PATCH 36/56] Changes the type of the generator/output/electricity field back to `text` --- data/presets/fields.json | 2 +- data/presets/fields/generator/output/electricity.json | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/data/presets/fields.json b/data/presets/fields.json index 0addd4de0..b0ec1b069 100644 --- a/data/presets/fields.json +++ b/data/presets/fields.json @@ -113,7 +113,7 @@ "gauge": {"key": "gauge", "type": "combo", "label": "Gauge"}, "gender": {"type": "radio", "keys": ["male", "female", "unisex"], "label": "Gender", "placeholder": "Unknown", "strings": {"options": {"male": "Male", "female": "Female", "unisex": "Unisex"}}}, "generator/method": {"key": "generator:method", "type": "combo", "label": "Method"}, - "generator/output/electricity": {"key": "generator:output:electricity", "type": "typeCombo", "label": "Power Output", "placeholder": "50 MW, 100 MW, 200 MW..."}, + "generator/output/electricity": {"key": "generator:output:electricity", "type": "text", "label": "Power Output", "placeholder": "50 MW, 100 MW, 200 MW..."}, "generator/source": {"key": "generator:source", "type": "combo", "label": "Source"}, "generator/type": {"key": "generator:type", "type": "combo", "label": "Type"}, "government": {"key": "government", "type": "typeCombo", "label": "Type"}, diff --git a/data/presets/fields/generator/output/electricity.json b/data/presets/fields/generator/output/electricity.json index ae078a86e..50bc4cfd2 100644 --- a/data/presets/fields/generator/output/electricity.json +++ b/data/presets/fields/generator/output/electricity.json @@ -1,6 +1,6 @@ { "key": "generator:output:electricity", - "type": "typeCombo", + "type": "text", "label": "Power Output", "placeholder": "50 MW, 100 MW, 200 MW..." } From 6fca79fc23819d88cc8c6275e297cdeebd064403 Mon Sep 17 00:00:00 2001 From: Quincy Morgan Date: Sun, 7 Oct 2018 11:02:30 -0700 Subject: [PATCH 37/56] Adds the snowflake icon referenced by some piste presets added in #5368 --- svg/fontawesome/fas-snowflake.svg | 1 + 1 file changed, 1 insertion(+) create mode 100644 svg/fontawesome/fas-snowflake.svg diff --git a/svg/fontawesome/fas-snowflake.svg b/svg/fontawesome/fas-snowflake.svg new file mode 100644 index 000000000..a162d4179 --- /dev/null +++ b/svg/fontawesome/fas-snowflake.svg @@ -0,0 +1 @@ + \ No newline at end of file From 72842ff0f5c101f4cf5ba1eda11b27b397969f07 Mon Sep 17 00:00:00 2001 From: Quincy Morgan Date: Sun, 7 Oct 2018 11:05:31 -0700 Subject: [PATCH 38/56] Adds the Underground Power Cable Preset (closes #5380) Adds the Utility Features preset category for line geometry Adds terms to the Pipeline preset --- data/presets.yaml | 7 +++++++ data/presets/categories.json | 11 +++++++++++ data/presets/categories/utility.json | 11 +++++++++++ data/presets/defaults.json | 2 +- data/presets/presets.json | 3 ++- data/presets/presets/man_made/pipeline.json | 7 +++++++ .../presets/power/cable/underground.json | 17 +++++++++++++++++ data/taginfo.json | 6 ++++++ dist/locales/en.json | 9 ++++++++- svg/iD-sprite/presets/category-utility.svg | 8 ++++++++ 10 files changed, 78 insertions(+), 3 deletions(-) create mode 100644 data/presets/categories/utility.json create mode 100644 data/presets/presets/power/cable/underground.json create mode 100644 svg/iD-sprite/presets/category-utility.svg diff --git a/data/presets.yaml b/data/presets.yaml index f04b94426..17cce17aa 100644 --- a/data/presets.yaml +++ b/data/presets.yaml @@ -25,6 +25,8 @@ en: name: Road Features category-route: name: Route Features + category-utility: + name: Utility Features category-water-area: name: Water Features category-water-line: @@ -4603,6 +4605,7 @@ en: man_made/pipeline: # man_made=pipeline name: Pipeline + # 'terms: oil,natural gas,water,sewer,sewage' terms: '' man_made/pumping_station: # man_made=pumping_station @@ -5170,6 +5173,10 @@ en: power: # power=* name: Power + power/cable/underground: + # 'power=cable, location=underground' + name: Underground Power Cable + terms: '' power/generator: # power=generator name: Power Generator diff --git a/data/presets/categories.json b/data/presets/categories.json index af19ba230..60309de77 100644 --- a/data/presets/categories.json +++ b/data/presets/categories.json @@ -186,6 +186,17 @@ "type/route" ] }, + "category-utility": { + "icon": "iD-category-utility", + "geometry": "line", + "name": "Utility Features", + "members": [ + "power/line", + "power/minor_line", + "man_made/pipeline", + "power/cable/underground" + ] + }, "category-water-area": { "icon": "maki-water", "geometry": "area", diff --git a/data/presets/categories/utility.json b/data/presets/categories/utility.json new file mode 100644 index 000000000..63aae92d0 --- /dev/null +++ b/data/presets/categories/utility.json @@ -0,0 +1,11 @@ +{ + "icon": "iD-category-utility", + "geometry": "line", + "name": "Utility Features", + "members": [ + "power/line", + "power/minor_line", + "man_made/pipeline", + "power/cable/underground" + ] +} diff --git a/data/presets/defaults.json b/data/presets/defaults.json index b0c9e52ef..a6db43d57 100644 --- a/data/presets/defaults.json +++ b/data/presets/defaults.json @@ -19,7 +19,7 @@ "category-water-line", "category-barrier", "category-natural-line", - "power/line", + "category-utility", "line" ], "point": [ diff --git a/data/presets/presets.json b/data/presets/presets.json index 814adcd7b..6b499878d 100644 --- a/data/presets/presets.json +++ b/data/presets/presets.json @@ -571,7 +571,7 @@ "man_made/observatory": {"geometry": ["point", "area"], "terms": ["astronomical", "meteorological"], "tags": {"man_made": "observatory"}, "name": "Observatory"}, "man_made/petroleum_well": {"icon": "temaki-storage_tank", "geometry": ["point"], "terms": ["drilling rig", "oil derrick", "oil drill", "oil horse", "oil rig", "oil pump", "petroleum well", "pumpjack"], "tags": {"man_made": "petroleum_well"}, "name": "Oil Well"}, "man_made/pier": {"icon": "iD-highway-footway", "fields": ["name", "surface", "lit", "width", "access"], "geometry": ["line", "area"], "terms": ["dock", "jetty"], "tags": {"man_made": "pier"}, "name": "Pier"}, - "man_made/pipeline": {"icon": "iD-pipeline-line", "fields": ["location", "operator", "substance", "layer"], "geometry": ["line"], "tags": {"man_made": "pipeline"}, "name": "Pipeline"}, + "man_made/pipeline": {"icon": "iD-pipeline-line", "fields": ["location", "operator", "substance", "layer"], "geometry": ["line"], "terms": ["oil", "natural gas", "water", "sewer", "sewage"], "tags": {"man_made": "pipeline"}, "name": "Pipeline"}, "man_made/pumping_station": {"icon": "maki-water", "geometry": ["point", "area"], "tags": {"man_made": "pumping_station"}, "name": "Pumping Station"}, "man_made/silo": {"icon": "temaki-silo", "fields": ["crop", "building_area"], "geometry": ["point", "area"], "terms": ["grain", "corn", "wheat"], "tags": {"man_made": "silo"}, "name": "Silo"}, "man_made/storage_tank": {"icon": "temaki-storage_tank", "fields": ["content", "building_area"], "geometry": ["point", "area"], "terms": ["water", "oil", "gas", "petrol"], "tags": {"man_made": "storage_tank"}, "name": "Storage Tank"}, @@ -697,6 +697,7 @@ "playground/zipwire": {"icon": "maki-playground", "geometry": ["point", "line"], "tags": {"playground": "zipwire"}, "name": "Zip Wire"}, "point": {"fields": ["name"], "geometry": ["point"], "tags": {}, "name": "Point", "matchScore": 0.1}, "power/sub_station": {"icon": "temaki-power", "fields": ["substation", "operator", "building", "ref"], "geometry": ["point", "area"], "tags": {"power": "sub_station"}, "reference": {"key": "power", "value": "substation"}, "name": "Substation", "searchable": false}, + "power/cable/underground": {"fields": ["name", "operator", "voltage", "ref", "layer"], "geometry": ["line"], "tags": {"power": "cable", "location": "underground"}, "name": "Underground Power Cable"}, "power/generator": {"icon": "temaki-power", "fields": ["operator", "generator/source", "generator/method", "generator/type", "generator/output/electricity", "ref"], "geometry": ["point", "vertex", "area"], "terms": ["hydro", "solar", "turbine", "wind"], "tags": {"power": "generator"}, "name": "Power Generator"}, "power/generator/source_nuclear": {"icon": "temaki-radiation", "fields": ["operator", "generator/source", "generator/method", "generator/type", "generator/output/electricity", "ref"], "geometry": ["point", "vertex", "area"], "terms": ["fission", "generator", "nuclear", "nuke", "reactor"], "tags": {"power": "generator", "generator:source": "nuclear", "generator:method": "fission"}, "reference": {"key": "generator:source", "value": "nuclear"}, "name": "Nuclear Reactor"}, "power/generator/source_wind": {"icon": "temaki-wind_turbine", "fields": ["operator", "generator/source", "generator/method", "generator/type", "generator/output/electricity", "height", "ref"], "geometry": ["point", "vertex", "area"], "terms": ["generator", "turbine", "windmill", "wind"], "tags": {"power": "generator", "generator:source": "wind", "generator:method": "wind_turbine"}, "reference": {"key": "generator:source", "value": "wind"}, "name": "Wind Turbine"}, diff --git a/data/presets/presets/man_made/pipeline.json b/data/presets/presets/man_made/pipeline.json index 192855517..d198ffc10 100644 --- a/data/presets/presets/man_made/pipeline.json +++ b/data/presets/presets/man_made/pipeline.json @@ -9,6 +9,13 @@ "geometry": [ "line" ], + "terms": [ + "oil", + "natural gas", + "water", + "sewer", + "sewage" + ], "tags": { "man_made": "pipeline" }, diff --git a/data/presets/presets/power/cable/underground.json b/data/presets/presets/power/cable/underground.json new file mode 100644 index 000000000..0d80be672 --- /dev/null +++ b/data/presets/presets/power/cable/underground.json @@ -0,0 +1,17 @@ +{ + "fields": [ + "name", + "operator", + "voltage", + "ref", + "layer" + ], + "geometry": [ + "line" + ], + "tags": { + "power": "cable", + "location": "underground" + }, + "name": "Underground Power Cable" +} diff --git a/data/taginfo.json b/data/taginfo.json index 299bcf6ee..fbd88f0eb 100644 --- a/data/taginfo.json +++ b/data/taginfo.json @@ -4669,6 +4669,12 @@ "object_types": ["node", "area"], "icon_url": "https://raw.githubusercontent.com/bhousel/temaki/master/icons/power.svg?sanitize=true" }, + { + "key": "location", + "value": "underground", + "description": "Underground Power Cable", + "object_types": ["way"] + }, { "key": "power", "value": "generator", diff --git a/dist/locales/en.json b/dist/locales/en.json index 431da2fe2..d8cb61df6 100644 --- a/dist/locales/en.json +++ b/dist/locales/en.json @@ -1455,6 +1455,9 @@ "category-route": { "name": "Route Features" }, + "category-utility": { + "name": "Utility Features" + }, "category-water-area": { "name": "Water Features" }, @@ -5446,7 +5449,7 @@ }, "man_made/pipeline": { "name": "Pipeline", - "terms": "" + "terms": "oil,natural gas,water,sewer,sewage" }, "man_made/pumping_station": { "name": "Pumping Station", @@ -5948,6 +5951,10 @@ "name": "Substation", "terms": "" }, + "power/cable/underground": { + "name": "Underground Power Cable", + "terms": "" + }, "power/generator": { "name": "Power Generator", "terms": "hydro,solar,turbine,wind" diff --git a/svg/iD-sprite/presets/category-utility.svg b/svg/iD-sprite/presets/category-utility.svg new file mode 100644 index 000000000..e819114fc --- /dev/null +++ b/svg/iD-sprite/presets/category-utility.svg @@ -0,0 +1,8 @@ + + + + + + + + From b7555b4f0b29af2bb12b6af98ca480d370820ac2 Mon Sep 17 00:00:00 2001 From: Quincy Morgan Date: Sun, 7 Oct 2018 11:09:42 -0700 Subject: [PATCH 39/56] Adds the generated changes for #5376 --- data/presets.yaml | 4 ++-- data/presets/fields.json | 2 +- dist/locales/en.json | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/data/presets.yaml b/data/presets.yaml index f04b94426..b292d1c24 100644 --- a/data/presets.yaml +++ b/data/presets.yaml @@ -1317,8 +1317,8 @@ en: options: # 'piste:type=connection' connection: Connection between pistes - # 'piste:type=downhill' - downhill: Nordic + # 'piste:type=nordic' + nordic: Nordic # 'piste:type=playground' playground: Playground place: diff --git a/data/presets/fields.json b/data/presets/fields.json index 801eb4d74..1d8fc8bf7 100644 --- a/data/presets/fields.json +++ b/data/presets/fields.json @@ -211,7 +211,7 @@ "piste/grooming_nordic": {"key": "piste:grooming", "type": "combo", "label": "Grooming", "strings": {"options": {"classic": "Classic", "backcountry": "Backcountry, no grooming", "classic+skating": "Classic and Skating", "scooter": "Scooter/Snowmobile", "skating": "Skating"}}}, "piste/grooming": {"key": "piste:grooming", "type": "combo", "label": "Grooming", "strings": {"options": {"classic": "Classic", "mogul": "Mogul", "backcountry": "Backcountry", "classic+skating": "Classic and Skating", "scooter": "Scooter/Snowmobile", "skating": "Skating"}}}, "piste/type_downhill": {"key": "piste:type", "type": "typeCombo", "label": "Type", "strings": {"options": {"downhill": "Downhill", "snow_park": "Snow Park", "playground": "Playground", "connection": "Connection between pistes"}}}, - "piste/type_nordic": {"key": "piste:type", "type": "typeCombo", "label": "Type", "strings": {"options": {"downhill": "Nordic", "playground": "Playground", "connection": "Connection between pistes"}}}, + "piste/type_nordic": {"key": "piste:type", "type": "typeCombo", "label": "Type", "strings": {"options": {"nordic": "Nordic", "playground": "Playground", "connection": "Connection between pistes"}}}, "piste/type": {"key": "piste:type", "type": "typeCombo", "label": "Type", "strings": {"options": {"downhill": "Downhill", "nordic": "Nordic", "skitour": "Skitour", "sled": "Sled", "hike": "Hike", "sleigh": "Sleigh", "ice_skate": "Ice Skate", "snow_park": "Snow Park", "playground": "Playground", "connection": "Connection"}}}, "place": {"key": "place", "type": "typeCombo", "label": "Type"}, "plant": {"key": "plant", "type": "combo", "label": "Plant"}, diff --git a/dist/locales/en.json b/dist/locales/en.json index 431da2fe2..0d4eb105b 100644 --- a/dist/locales/en.json +++ b/dist/locales/en.json @@ -2528,7 +2528,7 @@ "piste/type_nordic": { "label": "Type", "options": { - "downhill": "Nordic", + "nordic": "Nordic", "playground": "Playground", "connection": "Connection between pistes" } From fa15acc4bb16ad2a9cd9fadb035ecdf379dc2590 Mon Sep 17 00:00:00 2001 From: Bryan Housel Date: Sun, 7 Oct 2018 14:15:40 -0400 Subject: [PATCH 40/56] Use 'en-us' "Color" --- data/presets.yaml | 2 +- data/presets/fields.json | 2 +- data/presets/fields/colour.json | 2 +- data/taginfo.json | 2 +- dist/locales/en.json | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) diff --git a/data/presets.yaml b/data/presets.yaml index b292d1c24..f81d2a5cf 100644 --- a/data/presets.yaml +++ b/data/presets.yaml @@ -323,7 +323,7 @@ en: label: Collection Times colour: # colour=* - label: Colour + label: Color comment: # comment=* label: Changeset Comment diff --git a/data/presets/fields.json b/data/presets/fields.json index 1d8fc8bf7..4212d95e1 100644 --- a/data/presets/fields.json +++ b/data/presets/fields.json @@ -53,7 +53,7 @@ "clothes": {"key": "clothes", "type": "semiCombo", "label": "Clothes"}, "club": {"key": "club", "type": "typeCombo", "label": "Type"}, "collection_times": {"key": "collection_times", "type": "text", "label": "Collection Times"}, - "colour": {"key": "colour", "type": "text", "label": "Colour"}, + "colour": {"key": "colour", "type": "text", "label": "Color"}, "comment": {"key": "comment", "type": "textarea", "label": "Changeset Comment", "placeholder": "Brief description of your contributions (required)"}, "communication_multi": {"key": "communication:", "type": "multiCombo", "label": "Communication Types"}, "construction": {"key": "construction", "type": "combo", "label": "Type"}, diff --git a/data/presets/fields/colour.json b/data/presets/fields/colour.json index 6ab9de9af..d53e2a950 100644 --- a/data/presets/fields/colour.json +++ b/data/presets/fields/colour.json @@ -1,5 +1,5 @@ { "key": "colour", "type": "text", - "label": "Colour" + "label": "Color" } diff --git a/data/taginfo.json b/data/taginfo.json index 299bcf6ee..4af7e5ca2 100644 --- a/data/taginfo.json +++ b/data/taginfo.json @@ -6689,7 +6689,7 @@ {"key": "castle_type", "description": "Type"}, {"key": "clothes", "description": "Clothes"}, {"key": "collection_times", "description": "Collection Times"}, - {"key": "colour", "description": "Colour"}, + {"key": "colour", "description": "Color"}, {"key": "comment", "description": "Changeset Comment"}, {"key": "communication:", "description": "Communication Types"}, {"key": "construction", "description": "Type"}, diff --git a/dist/locales/en.json b/dist/locales/en.json index 0d4eb105b..19ffe1642 100644 --- a/dist/locales/en.json +++ b/dist/locales/en.json @@ -1731,7 +1731,7 @@ "label": "Collection Times" }, "colour": { - "label": "Colour" + "label": "Color" }, "comment": { "label": "Changeset Comment", From 62d16d8b5a8df334784b7ed14a7a24888a3ec18a Mon Sep 17 00:00:00 2001 From: Quincy Morgan Date: Sun, 7 Oct 2018 12:26:28 -0700 Subject: [PATCH 41/56] Corrects the names of the curb presets and seamark color fields to use US English spellings --- data/presets.yaml | 12 ++++----- data/presets/fields.json | 4 +-- .../fields/seamark/beacon_lateral/colour.json | 2 +- .../fields/seamark/buoy_lateral/colour.json | 2 +- data/presets/presets.json | 4 +-- data/presets/presets/barrier/kerb.json | 2 +- .../presets/presets/barrier/kerb/lowered.json | 2 +- data/taginfo.json | 26 +++++++++---------- dist/locales/en.json | 8 +++--- 9 files changed, 31 insertions(+), 31 deletions(-) diff --git a/data/presets.yaml b/data/presets.yaml index f81d2a5cf..cf7299c1e 100644 --- a/data/presets.yaml +++ b/data/presets.yaml @@ -1491,7 +1491,7 @@ en: waterway_right: Waterway Right seamark/beacon_lateral/colour: # 'seamark:beacon_lateral:colour=*' - label: Colour + label: Color options: # 'seamark:beacon_lateral:colour=green' green: Green @@ -1540,7 +1540,7 @@ en: waterway_right: Waterway Right seamark/buoy_lateral/colour: # 'seamark:buoy_lateral:colour=*' - label: Colour + label: Color options: # 'seamark:buoy_lateral:colour=green' green: Green @@ -2961,13 +2961,13 @@ en: terms: '' barrier/kerb: # barrier=kerb - name: Kerb - terms: '' + name: Curb + terms: '' barrier/kerb/lowered: # 'barrier=kerb, kerb=lowered' - name: Lowered Kerb + name: Lowered Curb # 'terms: curb cut,curb ramp,kerb ramp,dropped kerb,pram ramp' - terms: '' + terms: '' barrier/kissing_gate: # barrier=kissing_gate name: Kissing Gate diff --git a/data/presets/fields.json b/data/presets/fields.json index 4212d95e1..fc1b11195 100644 --- a/data/presets/fields.json +++ b/data/presets/fields.json @@ -252,11 +252,11 @@ "sanitary_dump_station": {"key": "sanitary_dump_station", "type": "check", "label": "Toilet Disposal"}, "seamark/beacon_isolated_danger/shape": {"key": "seamark:beacon_isolated_danger:shape", "type": "combo", "label": "Shape"}, "seamark/beacon_lateral/category": {"key": "seamark:beacon_lateral:category", "type": "combo", "label": "Category", "strings": {"options": {"port": "Port", "starboard": "Starboard", "waterway_left": "Waterway Left", "waterway_right": "Waterway Right", "danger_left": "Danger Left", "danger_right": "Danger Right"}}}, - "seamark/beacon_lateral/colour": {"key": "seamark:beacon_lateral:colour", "type": "combo", "label": "Colour", "strings": {"options": {"red": "Red", "green": "Green", "grey": "Grey"}}}, + "seamark/beacon_lateral/colour": {"key": "seamark:beacon_lateral:colour", "type": "combo", "label": "Color", "strings": {"options": {"red": "Red", "green": "Green", "grey": "Grey"}}}, "seamark/beacon_lateral/shape": {"key": "seamark:beacon_lateral:shape", "type": "combo", "label": "Shape"}, "seamark/beacon_lateral/system": {"key": "seamark:beacon_lateral:system", "type": "combo", "label": "System", "strings": {"options": {"iala-a": "IALA A", "iala-b": "IALA B", "cevni": "CEVNI", "other": "Other"}}}, "seamark/buoy_lateral/category": {"key": "seamark:buoy_lateral:category", "type": "combo", "label": "Category", "strings": {"options": {"port": "Port", "starboard": "Starboard", "channel_left": "Channel Left", "channel_right": "Channel Right", "waterway_left": "Waterway Left", "waterway_right": "Waterway Right", "danger_left": "Danger Left", "danger_right": "Danger Right", "preferred_channel_port": "Preferred Channel Port", "preferred_channel_starboard": "Preferred Channel Starboard"}}}, - "seamark/buoy_lateral/colour": {"key": "seamark:buoy_lateral:colour", "type": "combo", "label": "Colour", "strings": {"options": {"red": "Red", "green": "Green", "red;white;red;white": "Red-White-Red-White", "green;white;green;white": "Green-White-Green-White", "red;green;red": "Red-Green-Red", "green;red;green": "Green-Red-Green", "white": "White", "yellow": "Yellow"}}}, + "seamark/buoy_lateral/colour": {"key": "seamark:buoy_lateral:colour", "type": "combo", "label": "Color", "strings": {"options": {"red": "Red", "green": "Green", "red;white;red;white": "Red-White-Red-White", "green;white;green;white": "Green-White-Green-White", "red;green;red": "Red-Green-Red", "green;red;green": "Green-Red-Green", "white": "White", "yellow": "Yellow"}}}, "seamark/buoy_lateral/shape": {"key": "seamark:buoy_lateral:shape", "type": "combo", "label": "Shape"}, "seamark/buoy_lateral/system": {"key": "seamark:buoy_lateral:system", "type": "combo", "label": "System", "strings": {"options": {"iala-a": "IALA A", "iala-b": "IALA B", "cevni": "CEVNI", "other": "Other"}}}, "seamark/mooring/category": {"key": "seamark:mooring:category", "type": "combo", "label": "Category"}, diff --git a/data/presets/fields/seamark/beacon_lateral/colour.json b/data/presets/fields/seamark/beacon_lateral/colour.json index 2af53b30e..94c35483c 100644 --- a/data/presets/fields/seamark/beacon_lateral/colour.json +++ b/data/presets/fields/seamark/beacon_lateral/colour.json @@ -1,7 +1,7 @@ { "key": "seamark:beacon_lateral:colour", "type": "combo", - "label": "Colour", + "label": "Color", "strings": { "options": { "red": "Red", diff --git a/data/presets/fields/seamark/buoy_lateral/colour.json b/data/presets/fields/seamark/buoy_lateral/colour.json index abe96b049..e95c4363e 100644 --- a/data/presets/fields/seamark/buoy_lateral/colour.json +++ b/data/presets/fields/seamark/buoy_lateral/colour.json @@ -1,7 +1,7 @@ { "key": "seamark:buoy_lateral:colour", "type": "combo", - "label": "Colour", + "label": "Color", "strings": { "options": { "red": "Red", diff --git a/data/presets/presets.json b/data/presets/presets.json index 814adcd7b..e8d5feadb 100644 --- a/data/presets/presets.json +++ b/data/presets/presets.json @@ -205,8 +205,8 @@ "barrier/fence": {"icon": "maki-fence", "fields": ["fence_type", "height"], "geometry": ["line"], "tags": {"barrier": "fence"}, "name": "Fence", "matchScore": 0.25}, "barrier/gate": {"icon": "maki-barrier", "fields": ["access"], "geometry": ["vertex", "line"], "tags": {"barrier": "gate"}, "name": "Gate"}, "barrier/hedge": {"fields": ["height"], "geometry": ["line", "area"], "tags": {"barrier": "hedge"}, "name": "Hedge", "matchScore": 0.25}, - "barrier/kerb": {"icon": "maki-wheelchair", "fields": ["kerb", "tactile_paving"], "geometry": ["vertex", "line"], "tags": {"barrier": "kerb"}, "name": "Kerb"}, - "barrier/kerb/lowered": {"icon": "maki-wheelchair", "fields": ["kerb", "tactile_paving"], "geometry": ["vertex", "line"], "tags": {"barrier": "kerb", "kerb": "lowered"}, "reference": {"key": "kerb", "value": "lowered"}, "terms": ["curb cut", "curb ramp", "kerb ramp", "dropped kerb", "pram ramp"], "name": "Lowered Kerb"}, + "barrier/kerb": {"icon": "maki-wheelchair", "fields": ["kerb", "tactile_paving"], "geometry": ["vertex", "line"], "tags": {"barrier": "kerb"}, "name": "Curb"}, + "barrier/kerb/lowered": {"icon": "maki-wheelchair", "fields": ["kerb", "tactile_paving"], "geometry": ["vertex", "line"], "tags": {"barrier": "kerb", "kerb": "lowered"}, "reference": {"key": "kerb", "value": "lowered"}, "terms": ["curb cut", "curb ramp", "kerb ramp", "dropped kerb", "pram ramp"], "name": "Lowered Curb"}, "barrier/kissing_gate": {"icon": "maki-barrier", "fields": ["access"], "geometry": ["vertex"], "tags": {"barrier": "kissing_gate"}, "name": "Kissing Gate"}, "barrier/lift_gate": {"icon": "maki-roadblock", "fields": ["access"], "geometry": ["vertex", "line"], "tags": {"barrier": "lift_gate"}, "name": "Lift Gate"}, "barrier/retaining_wall": {"fields": ["height"], "geometry": ["line", "area"], "tags": {"barrier": "retaining_wall"}, "name": "Retaining Wall"}, diff --git a/data/presets/presets/barrier/kerb.json b/data/presets/presets/barrier/kerb.json index aff132c00..21fdd6985 100644 --- a/data/presets/presets/barrier/kerb.json +++ b/data/presets/presets/barrier/kerb.json @@ -11,5 +11,5 @@ "tags": { "barrier": "kerb" }, - "name": "Kerb" + "name": "Curb" } diff --git a/data/presets/presets/barrier/kerb/lowered.json b/data/presets/presets/barrier/kerb/lowered.json index 98a3b9a56..9054ddc4d 100644 --- a/data/presets/presets/barrier/kerb/lowered.json +++ b/data/presets/presets/barrier/kerb/lowered.json @@ -23,5 +23,5 @@ "dropped kerb", "pram ramp" ], - "name": "Lowered Kerb" + "name": "Lowered Curb" } diff --git a/data/taginfo.json b/data/taginfo.json index 4af7e5ca2..ecf5e471c 100644 --- a/data/taginfo.json +++ b/data/taginfo.json @@ -1398,14 +1398,14 @@ { "key": "barrier", "value": "kerb", - "description": "Kerb", + "description": "Curb", "object_types": ["node", "way"], "icon_url": "https://raw.githubusercontent.com/mapbox/maki/master/icons/wheelchair-15.svg?sanitize=true" }, { "key": "kerb", "value": "lowered", - "description": "Lowered Kerb", + "description": "Lowered Curb", "object_types": ["node", "way"], "icon_url": "https://raw.githubusercontent.com/mapbox/maki/master/icons/wheelchair-15.svg?sanitize=true" }, @@ -5024,13 +5024,13 @@ { "key": "seamark:buoy_lateral:colour", "value": "green", - "description": "Green Buoy, Colour", + "description": "Green Buoy, Color", "object_types": ["node"] }, { "key": "seamark:buoy_lateral:colour", "value": "red", - "description": "Red Buoy, Colour", + "description": "Red Buoy, Color", "object_types": ["node"] }, { @@ -7244,17 +7244,17 @@ { "key": "seamark:beacon_lateral:colour", "value": "red", - "description": "Colour" + "description": "Color" }, { "key": "seamark:beacon_lateral:colour", "value": "green", - "description": "Colour" + "description": "Color" }, { "key": "seamark:beacon_lateral:colour", "value": "grey", - "description": "Colour" + "description": "Color" }, {"key": "seamark:beacon_lateral:shape", "description": "Shape"}, { @@ -7330,32 +7330,32 @@ { "key": "seamark:buoy_lateral:colour", "value": "red;white;red;white", - "description": "Colour" + "description": "Color" }, { "key": "seamark:buoy_lateral:colour", "value": "green;white;green;white", - "description": "Colour" + "description": "Color" }, { "key": "seamark:buoy_lateral:colour", "value": "red;green;red", - "description": "Colour" + "description": "Color" }, { "key": "seamark:buoy_lateral:colour", "value": "green;red;green", - "description": "Colour" + "description": "Color" }, { "key": "seamark:buoy_lateral:colour", "value": "white", - "description": "Colour" + "description": "Color" }, { "key": "seamark:buoy_lateral:colour", "value": "yellow", - "description": "Colour" + "description": "Color" }, {"key": "seamark:buoy_lateral:shape", "description": "Shape"}, { diff --git a/dist/locales/en.json b/dist/locales/en.json index 19ffe1642..61869528c 100644 --- a/dist/locales/en.json +++ b/dist/locales/en.json @@ -2698,7 +2698,7 @@ } }, "seamark/beacon_lateral/colour": { - "label": "Colour", + "label": "Color", "options": { "red": "Red", "green": "Green", @@ -2733,7 +2733,7 @@ } }, "seamark/buoy_lateral/colour": { - "label": "Colour", + "label": "Color", "options": { "red": "Red", "green": "Green", @@ -3981,11 +3981,11 @@ "terms": "" }, "barrier/kerb": { - "name": "Kerb", + "name": "Curb", "terms": "" }, "barrier/kerb/lowered": { - "name": "Lowered Kerb", + "name": "Lowered Curb", "terms": "curb cut,curb ramp,kerb ramp,dropped kerb,pram ramp" }, "barrier/kissing_gate": { From 159622f57200d40ef73b13b3bca9375c06e482ec Mon Sep 17 00:00:00 2001 From: Bryan Housel Date: Sun, 7 Oct 2018 16:05:04 -0400 Subject: [PATCH 42/56] Don't lookup `postal_code` values from taginfo --- modules/services/taginfo.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/modules/services/taginfo.js b/modules/services/taginfo.js index cc8df7041..6242be845 100644 --- a/modules/services/taginfo.js +++ b/modules/services/taginfo.js @@ -182,7 +182,9 @@ export default { init: function() { inflight = {}; taginfoCache = {}; - popularKeys = {}; + popularKeys = { + postal_code: true // #5377 + }; // Fetch popular keys. We'll exclude these from `values` // lookups because they stress taginfo, and they aren't likely From 68323f818e1f38a57fd07bcd995f8bb3c47c65fa Mon Sep 17 00:00:00 2001 From: Quincy Morgan Date: Sun, 7 Oct 2018 13:27:14 -0700 Subject: [PATCH 43/56] Adds documentation for the snake_case field property (closes #5379) Adds documentation for the caseSensitive, min_value, and max_value field properties --- data/presets/README.md | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/data/presets/README.md b/data/presets/README.md index 24df5b0e8..b76dac1a5 100644 --- a/data/presets/README.md +++ b/data/presets/README.md @@ -210,6 +210,21 @@ the user can not type their own value, they must choose one of the given values. If a combo field does not specify `options` or `strings`, the field will fetch common tag values from the Taginfo service to use as dropdown values. +##### `snake_case` + +For combo fields, spaces are replaced with underscores in the tag value if `snake_case` is `true`. The default is `true`. + +##### `caseSensitive` + +For combo fields, case-sensitve field values are allowed if `caseSensitive` is `true`. The default is `false`. + +##### `min_value` + +For number fields, the lowest valid value. There is no default. + +##### `max_value` + +For number fields, the greatest valid value. There is no defualt. ## Icons From 6fad8a5d40fe31815b259ea767503bba79afe7a2 Mon Sep 17 00:00:00 2001 From: James Kingdom Date: Sun, 7 Oct 2018 21:30:51 +0100 Subject: [PATCH 44/56] Fix spelling --- data/presets/README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/data/presets/README.md b/data/presets/README.md index b76dac1a5..d9b4fa0ac 100644 --- a/data/presets/README.md +++ b/data/presets/README.md @@ -224,7 +224,7 @@ For number fields, the lowest valid value. There is no default. ##### `max_value` -For number fields, the greatest valid value. There is no defualt. +For number fields, the greatest valid value. There is no default. ## Icons From 73ede123c28a58e850161c3a574f5aaf46a1198a Mon Sep 17 00:00:00 2001 From: Quincy Morgan Date: Sun, 7 Oct 2018 13:31:15 -0700 Subject: [PATCH 45/56] Converts the generator/output/electricity field from text to typeCombo --- data/presets/fields.json | 2 +- data/presets/fields/generator/output/electricity.json | 5 +++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/data/presets/fields.json b/data/presets/fields.json index fc1b11195..e15156d4d 100644 --- a/data/presets/fields.json +++ b/data/presets/fields.json @@ -114,7 +114,7 @@ "gauge": {"key": "gauge", "type": "combo", "label": "Gauge"}, "gender": {"type": "radio", "keys": ["male", "female", "unisex"], "label": "Gender", "placeholder": "Unknown", "strings": {"options": {"male": "Male", "female": "Female", "unisex": "Unisex"}}}, "generator/method": {"key": "generator:method", "type": "combo", "label": "Method"}, - "generator/output/electricity": {"key": "generator:output:electricity", "type": "text", "label": "Power Output", "placeholder": "50 MW, 100 MW, 200 MW..."}, + "generator/output/electricity": {"key": "generator:output:electricity", "type": "typeCombo", "label": "Power Output", "placeholder": "50 MW, 100 MW, 200 MW...", "snake_case": false}, "generator/source": {"key": "generator:source", "type": "combo", "label": "Source"}, "generator/type": {"key": "generator:type", "type": "combo", "label": "Type"}, "government": {"key": "government", "type": "typeCombo", "label": "Type"}, diff --git a/data/presets/fields/generator/output/electricity.json b/data/presets/fields/generator/output/electricity.json index 50bc4cfd2..01efca521 100644 --- a/data/presets/fields/generator/output/electricity.json +++ b/data/presets/fields/generator/output/electricity.json @@ -1,6 +1,7 @@ { "key": "generator:output:electricity", - "type": "text", + "type": "typeCombo", "label": "Power Output", - "placeholder": "50 MW, 100 MW, 200 MW..." + "placeholder": "50 MW, 100 MW, 200 MW...", + "snake_case": false } From a916402c7f464bb6bc6167a38c03ebf015a61d82 Mon Sep 17 00:00:00 2001 From: J Guthrie Date: Mon, 8 Oct 2018 15:18:40 +0100 Subject: [PATCH 46/56] Changed styling of geocode-worldwide-search button --- css/80_app.css | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/css/80_app.css b/css/80_app.css index 6b3047bcd..427022792 100644 --- a/css/80_app.css +++ b/css/80_app.css @@ -902,6 +902,18 @@ a.hide-toggle { border-radius: 0; } +.geocode-item { + width: 50%; + background-color: #ccc; + left: 25%; + margin-top: 30px; + border-radius: 2px; +} + +.geocode-item:hover { + background-color: #aaa; +} + .feature-list-item { background-color: #fff; font-weight: bold; From 29765f961d2a3f16a62b78e73d71bfed4242f69e Mon Sep 17 00:00:00 2001 From: Simon Bilsky-Rollins Date: Mon, 8 Oct 2018 12:14:03 -0400 Subject: [PATCH 47/56] add fields to bench preset and create seats field --- data/presets.yaml | 3 +++ data/presets/fields.json | 1 + data/presets/fields/seats.json | 5 ++++ data/presets/presets.json | 2 +- data/presets/presets/amenity/bench.json | 5 +++- data/taginfo.json | 1 + dist/locales/en.json | 31 +++---------------------- 7 files changed, 18 insertions(+), 30 deletions(-) create mode 100644 data/presets/fields/seats.json diff --git a/data/presets.yaml b/data/presets.yaml index cf7299c1e..1bbe52bd8 100644 --- a/data/presets.yaml +++ b/data/presets.yaml @@ -1585,6 +1585,9 @@ en: seasonal: # seasonal=* label: Seasonal + seats: + # seats=* + label: Seats second_hand: # second_hand=* label: Sells Used diff --git a/data/presets/fields.json b/data/presets/fields.json index fc1b11195..ef5e3a31e 100644 --- a/data/presets/fields.json +++ b/data/presets/fields.json @@ -263,6 +263,7 @@ "seamark/type": {"key": "seamark:type", "type": "combo", "universal": true, "label": "Seamark"}, "seamark/wreck/category": {"key": "seamark:wreck:category", "type": "combo", "label": "Category"}, "seasonal": {"key": "seasonal", "type": "check", "label": "Seasonal"}, + "seats": {"key": "seats", "type": "number", "label": "Seats"}, "second_hand": {"key": "second_hand", "type": "combo", "label": "Sells Used", "placeholder": "Yes, No, Only", "strings": {"options": {"yes": "Yes", "no": "No", "only": "Only"}}}, "service_rail": {"key": "service", "type": "combo", "label": "Service Type", "strings": {"options": {"spur": "Spur", "yard": "Yard", "siding": "Siding", "crossover": "Crossover"}}}, "service_times": {"key": "service_times", "type": "text", "label": "Service Times"}, diff --git a/data/presets/fields/seats.json b/data/presets/fields/seats.json new file mode 100644 index 000000000..d3f5818f2 --- /dev/null +++ b/data/presets/fields/seats.json @@ -0,0 +1,5 @@ +{ + "key": "seats", + "type": "number", + "label": "Seats" +} diff --git a/data/presets/presets.json b/data/presets/presets.json index e8d5feadb..4ee17ff64 100644 --- a/data/presets/presets.json +++ b/data/presets/presets.json @@ -51,7 +51,7 @@ "amenity/bank": {"icon": "maki-bank", "fields": ["name", "atm", "operator", "address", "building_area", "opening_hours", "drive_through"], "geometry": ["point", "area"], "terms": ["credit union", "check", "deposit", "fund", "investment", "repository", "reserve", "safe", "savings", "stock", "treasury", "trust", "vault"], "tags": {"amenity": "bank"}, "name": "Bank"}, "amenity/bar": {"icon": "maki-bar", "fields": ["name", "operator", "address", "building_area", "opening_hours", "smoking", "outdoor_seating", "brewery"], "geometry": ["point", "area"], "terms": ["dive", "beer", "bier", "booze"], "tags": {"amenity": "bar"}, "name": "Bar"}, "amenity/bbq": {"icon": "maki-bbq", "fields": ["covered", "fuel", "access_simple"], "geometry": ["point"], "terms": ["bbq", "grill"], "tags": {"amenity": "bbq"}, "name": "Barbecue/Grill"}, - "amenity/bench": {"icon": "temaki-bench", "fields": ["backrest"], "geometry": ["point", "vertex", "line"], "terms": ["seat"], "tags": {"amenity": "bench"}, "name": "Bench"}, + "amenity/bench": {"icon": "temaki-bench", "fields": ["backrest", "material", "seats", "colour"], "geometry": ["point", "vertex", "line"], "terms": ["seat"], "tags": {"amenity": "bench"}, "name": "Bench"}, "amenity/bicycle_parking": {"icon": "maki-bicycle", "fields": ["bicycle_parking", "capacity", "operator", "covered", "access_simple"], "geometry": ["point", "vertex", "area"], "terms": ["bike"], "tags": {"amenity": "bicycle_parking"}, "name": "Bicycle Parking"}, "amenity/bicycle_rental": {"icon": "maki-bicycle", "fields": ["capacity", "network", "operator", "payment_multi"], "geometry": ["point", "vertex", "area"], "terms": ["bike"], "tags": {"amenity": "bicycle_rental"}, "name": "Bicycle Rental"}, "amenity/bicycle_repair_station": {"icon": "maki-bicycle", "fields": ["operator", "brand", "opening_hours", "fee", "service/bicycle"], "geometry": ["point", "vertex"], "terms": ["bike", "repair", "chain", "pump"], "tags": {"amenity": "bicycle_repair_station"}, "name": "Bicycle Repair Tool Stand"}, diff --git a/data/presets/presets/amenity/bench.json b/data/presets/presets/amenity/bench.json index fa9be5ffc..5d58127cd 100644 --- a/data/presets/presets/amenity/bench.json +++ b/data/presets/presets/amenity/bench.json @@ -1,7 +1,10 @@ { "icon": "temaki-bench", "fields": [ - "backrest" + "backrest", + "material", + "seats", + "colour" ], "geometry": [ "point", diff --git a/data/taginfo.json b/data/taginfo.json index ecf5e471c..578541ce6 100644 --- a/data/taginfo.json +++ b/data/taginfo.json @@ -7381,6 +7381,7 @@ {"key": "seamark:mooring:category", "description": "Category"}, {"key": "seamark:wreck:category", "description": "Category"}, {"key": "seasonal", "description": "Seasonal"}, + {"key": "seats", "description": "Seats"}, {"key": "second_hand", "value": "yes", "description": "Sells Used"}, {"key": "second_hand", "value": "no", "description": "Sells Used"}, {"key": "second_hand", "value": "only", "description": "Sells Used"}, diff --git a/dist/locales/en.json b/dist/locales/en.json index 61869528c..ec87ef3ae 100644 --- a/dist/locales/en.json +++ b/dist/locales/en.json @@ -2769,6 +2769,9 @@ "seasonal": { "label": "Seasonal" }, + "seats": { + "label": "Seats" + }, "second_hand": { "label": "Sells Used", "placeholder": "Yes, No, Only", @@ -7384,34 +7387,6 @@ "description": "Orthofoto layer provided by basemap.at. \"Successor\" of geoimage.at imagery.", "name": "basemap.at Orthofoto" }, - "eufar-balaton": { - "attribution": { - "text": "EUFAR Balaton ortofotó 2010" - }, - "description": "1940 geo-tagged photography from Balaton Limnological Institute.", - "name": "EUFAR Balaton orthophotos" - }, - "finds.jp_KBN_2500": { - "attribution": { - "text": "GSI KIBAN 2500" - }, - "description": "GSI Kiban 2500 via finds.jp. Good for tracing, but a bit older.", - "name": "Japan GSI KIBAN 2500" - }, - "gsi.go.jp": { - "attribution": { - "text": "GSI Japan" - }, - "description": "Japan GSI ortho Imagery. Usually better than bing, but a bit older.", - "name": "Japan GSI ortho Imagery" - }, - "gsi.go.jp_std_map": { - "attribution": { - "text": "GSI Japan" - }, - "description": "Japan GSI Standard Map. Widely covered.", - "name": "Japan GSI Standard Map" - }, "hike_n_bike": { "attribution": { "text": "© OpenStreetMap contributors" From c886490f79a5d4038dc9e499b54d7ea4a3087564 Mon Sep 17 00:00:00 2001 From: Simon Bilsky-Rollins Date: Mon, 8 Oct 2018 22:09:34 -0400 Subject: [PATCH 48/56] add minValue and placeholder for seats field --- data/presets.yaml | 2 ++ data/presets/fields.json | 2 +- data/presets/fields/seats.json | 4 +++- dist/locales/en.json | 3 ++- 4 files changed, 8 insertions(+), 3 deletions(-) diff --git a/data/presets.yaml b/data/presets.yaml index 1bbe52bd8..3b55cbb35 100644 --- a/data/presets.yaml +++ b/data/presets.yaml @@ -1588,6 +1588,8 @@ en: seats: # seats=* label: Seats + # seats field placeholder + placeholder: '2, 4, 6...' second_hand: # second_hand=* label: Sells Used diff --git a/data/presets/fields.json b/data/presets/fields.json index ef5e3a31e..19c54a78d 100644 --- a/data/presets/fields.json +++ b/data/presets/fields.json @@ -263,7 +263,7 @@ "seamark/type": {"key": "seamark:type", "type": "combo", "universal": true, "label": "Seamark"}, "seamark/wreck/category": {"key": "seamark:wreck:category", "type": "combo", "label": "Category"}, "seasonal": {"key": "seasonal", "type": "check", "label": "Seasonal"}, - "seats": {"key": "seats", "type": "number", "label": "Seats"}, + "seats": {"key": "seats", "type": "number", "minValue": 0, "label": "Seats", "placeholder": "2, 4, 6..."}, "second_hand": {"key": "second_hand", "type": "combo", "label": "Sells Used", "placeholder": "Yes, No, Only", "strings": {"options": {"yes": "Yes", "no": "No", "only": "Only"}}}, "service_rail": {"key": "service", "type": "combo", "label": "Service Type", "strings": {"options": {"spur": "Spur", "yard": "Yard", "siding": "Siding", "crossover": "Crossover"}}}, "service_times": {"key": "service_times", "type": "text", "label": "Service Times"}, diff --git a/data/presets/fields/seats.json b/data/presets/fields/seats.json index d3f5818f2..e9655f895 100644 --- a/data/presets/fields/seats.json +++ b/data/presets/fields/seats.json @@ -1,5 +1,7 @@ { "key": "seats", "type": "number", - "label": "Seats" + "minValue": 0, + "label": "Seats", + "placeholder": "2, 4, 6..." } diff --git a/dist/locales/en.json b/dist/locales/en.json index ec87ef3ae..6e8391569 100644 --- a/dist/locales/en.json +++ b/dist/locales/en.json @@ -2770,7 +2770,8 @@ "label": "Seasonal" }, "seats": { - "label": "Seats" + "label": "Seats", + "placeholder": "2, 4, 6..." }, "second_hand": { "label": "Sells Used", From 35d8143f006bc38d13bf98f24c7c141d2d3e5634 Mon Sep 17 00:00:00 2001 From: Bryan Housel Date: Mon, 8 Oct 2018 22:44:10 -0400 Subject: [PATCH 49/56] Upgrade FontAwesome (closes #5389, closes #5388) --- package.json | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/package.json b/package.json index 4dd97c03f..7e05e92fd 100644 --- a/package.json +++ b/package.json @@ -49,10 +49,10 @@ "wmf-sitematrix": "0.1.4" }, "devDependencies": { - "@fortawesome/fontawesome-svg-core": "~1.2.4", - "@fortawesome/free-brands-svg-icons": "~5.3.1", - "@fortawesome/free-regular-svg-icons": "~5.3.1", - "@fortawesome/free-solid-svg-icons": "~5.3.1", + "@fortawesome/fontawesome-svg-core": "~1.2.5", + "@fortawesome/free-brands-svg-icons": "~5.4.0", + "@fortawesome/free-regular-svg-icons": "~5.4.0", + "@fortawesome/free-solid-svg-icons": "~5.4.0", "@mapbox/maki": "^4.0.0", "chai": "^4.1.0", "colors": "^1.1.2", From 3586451392f5a841a469ecfb3c1691ab66f65e5b Mon Sep 17 00:00:00 2001 From: Quincy Morgan Date: Tue, 9 Oct 2018 18:44:49 -0700 Subject: [PATCH 50/56] Adds custom CSS to `man_made=pipeline` features Adds `location` as a secondary tag class Adds the `tunnel` styling to lines tagged `location=underground` --- css/50_misc.css | 26 ++++++++++++++++++++++---- modules/svg/tag_classes.js | 2 +- 2 files changed, 23 insertions(+), 5 deletions(-) diff --git a/css/50_misc.css b/css/50_misc.css index be90c5e73..a2abc74aa 100644 --- a/css/50_misc.css +++ b/css/50_misc.css @@ -1,10 +1,12 @@ -/* power */ +/* power and pipeline */ .preset-icon .icon.tag-man_made-pipeline, .preset-icon .icon.tag-power { color: #939393; fill: #939393; } +/* power */ + path.stroke.tag-power { stroke: #939393; stroke-width: 2; @@ -13,6 +15,21 @@ path.casing.tag-power { stroke: none; } +/* pipeline */ + +path.stroke.tag-man_made-pipeline { + stroke: #CBD0D8; + stroke-linecap: butt; + stroke-width: 3; + stroke-dasharray: 80, 1.25; +} +path.casing.tag-man_made-pipeline { + stroke: #666; + stroke-width: 4.5; +} +.low-zoom path.stroke.tag-man_made-pipeline { + stroke-dasharray: 40, 1; +} /* boundaries */ path.stroke.tag-boundary { @@ -145,10 +162,12 @@ path.casing.tag-highway-bridleway.tag-bridge { /* tunnels */ -path.stroke.tag-tunnel { +path.stroke.tag-tunnel, +path.line.stroke.tag-location-underground { stroke-opacity: 0.3; } -path.casing.tag-tunnel { +path.casing.tag-tunnel, +path.line.casing.tag-location-underground { stroke-opacity: 0.5; stroke-linecap: butt; stroke-dasharray: none; @@ -325,4 +344,3 @@ path.stroke.tag-crossing.tag-crossing-zebra { .low-zoom path.stroke.tag-crossing.tag-crossing-zebra { stroke-dasharray: 3, 2; } - diff --git a/modules/svg/tag_classes.js b/modules/svg/tag_classes.js index d84b3c0f6..508c731a3 100644 --- a/modules/svg/tag_classes.js +++ b/modules/svg/tag_classes.js @@ -15,7 +15,7 @@ export function svgTagClasses() { var secondaries = [ 'oneway', 'bridge', 'tunnel', 'embankment', 'cutting', 'barrier', 'surface', 'tracktype', 'footway', 'crossing', 'service', 'sport', - 'public_transport' + 'public_transport', 'location' ]; var tagClassRe = /^tag-/; var _tags = function(entity) { return entity.tags; }; From 27158d77f3d715fd99d6e14e910ecc659decfdd6 Mon Sep 17 00:00:00 2001 From: Quincy Morgan Date: Wed, 10 Oct 2018 20:36:53 -0700 Subject: [PATCH 51/56] Adds a button that lets users manually download individual relation members Makes the map zoom to the chosen relation member if it is not currently visible --- dist/locales/en.json | 1 + modules/ui/raw_member_editor.js | 27 ++++++++++++++++++++++++++- 2 files changed, 27 insertions(+), 1 deletion(-) diff --git a/dist/locales/en.json b/dist/locales/en.json index 8b6be7311..4ad9102d2 100644 --- a/dist/locales/en.json +++ b/dist/locales/en.json @@ -1,6 +1,7 @@ { "en": { "icons": { + "download": "download", "information": "info", "remove": "remove", "undo": "undo" diff --git a/modules/ui/raw_member_editor.js b/modules/ui/raw_member_editor.js index 3d61148ab..dc5f56053 100644 --- a/modules/ui/raw_member_editor.js +++ b/modules/ui/raw_member_editor.js @@ -23,9 +23,24 @@ export function uiRawMemberEditor(context) { var taginfo = services.taginfo, _entityID; + function downloadMember(d) { + d3_event.preventDefault(); + // display the loading indicator + d3_select(this.parentNode).classed('tag-reference-loading', true); + context.loadEntity(d.id); + } + function selectMember(d) { d3_event.preventDefault(); + + var entity = context.entity(d.id); + var mapExtent = context.map().extent(); + if (!entity.intersects(mapExtent, context.graph())) { + // zoom to the entity if its extent is not visible now + context.map().zoomTo(entity); + } + context.enter(modeSelect(context, [d.id])); } @@ -125,9 +140,19 @@ export function uiRawMemberEditor(context) { .text(function(d) { return utilDisplayName(d.member); }); } else { - d3_select(this).append('label') + var incompleteLabel = d3_select(this).append('label') .attr('class', 'form-label') .text(t('inspector.incomplete', { id: d.id })); + + var wrap = incompleteLabel.append('div') + .attr('class', 'form-label-button-wrap'); + + wrap.append('button') + .attr('class', 'download-icon') + .attr('title', t('icons.download')) + .attr('tabindex', -1) + .call(svgIcon('#iD-icon-load')) + .on('click', downloadMember); } }); From 02bbe7bcc8750e7c653d74822452ce41e6f00464 Mon Sep 17 00:00:00 2001 From: Quincy Morgan Date: Wed, 10 Oct 2018 20:50:17 -0700 Subject: [PATCH 52/56] Checks in the core.yaml changes needed for the prior commit --- data/core.yaml | 1 + 1 file changed, 1 insertion(+) diff --git a/data/core.yaml b/data/core.yaml index 5472f81d1..ff8df3ff6 100644 --- a/data/core.yaml +++ b/data/core.yaml @@ -1,5 +1,6 @@ en: icons: + download: download information: info remove: remove undo: undo From 4fefa515745b43ed02fabaeaeb9130188bab27bf Mon Sep 17 00:00:00 2001 From: yves Date: Thu, 11 Oct 2018 14:11:02 +0200 Subject: [PATCH 53/56] No differentiation of piste type field is needed, it's even disturbing to see the piste field change when you change the piste type. --- data/presets.yaml | 22 ---------- data/presets/fields.json | 2 - data/presets/fields/piste/type_downhill.json | 13 ------ data/presets/fields/piste/type_nordic.json | 12 ------ data/presets/presets.json | 14 +++--- data/presets/presets/piste/downhill.json | 2 +- data/presets/presets/piste/hike.json | 1 + data/presets/presets/piste/ice_skate.json | 1 + data/presets/presets/piste/nordic.json | 2 +- data/presets/presets/piste/skitour.json | 1 + data/presets/presets/piste/sled.json | 1 + data/presets/presets/piste/sleigh.json | 1 + dist/locales/en.json | 45 ++++++++++++-------- 13 files changed, 42 insertions(+), 75 deletions(-) delete mode 100644 data/presets/fields/piste/type_downhill.json delete mode 100644 data/presets/fields/piste/type_nordic.json diff --git a/data/presets.yaml b/data/presets.yaml index f0ed96ea0..bcade88e0 100644 --- a/data/presets.yaml +++ b/data/presets.yaml @@ -1301,28 +1301,6 @@ en: sleigh: Sleigh # 'piste:type=snow_park' snow_park: Snow Park - piste/type_downhill: - # 'piste:type=*' - label: Type - options: - # 'piste:type=connection' - connection: Connection between pistes - # 'piste:type=downhill' - downhill: Downhill - # 'piste:type=playground' - playground: Playground - # 'piste:type=snow_park' - snow_park: Snow Park - piste/type_nordic: - # 'piste:type=*' - label: Type - options: - # 'piste:type=connection' - connection: Connection between pistes - # 'piste:type=nordic' - nordic: Nordic - # 'piste:type=playground' - playground: Playground place: # place=* label: Type diff --git a/data/presets/fields.json b/data/presets/fields.json index b7567c740..2a8bb55a6 100644 --- a/data/presets/fields.json +++ b/data/presets/fields.json @@ -210,8 +210,6 @@ "piste/grooming_hike": {"key": "piste:grooming", "type": "combo", "label": "Grooming", "strings": {"options": {"classic": "Classic - Winter Hiking", "backcountry": "Backcountry - Snowshoeing"}}}, "piste/grooming_nordic": {"key": "piste:grooming", "type": "combo", "label": "Grooming", "strings": {"options": {"classic": "Classic", "backcountry": "Backcountry, no grooming", "classic+skating": "Classic and Skating", "scooter": "Scooter/Snowmobile", "skating": "Skating"}}}, "piste/grooming": {"key": "piste:grooming", "type": "combo", "label": "Grooming", "strings": {"options": {"classic": "Classic", "mogul": "Mogul", "backcountry": "Backcountry", "classic+skating": "Classic and Skating", "scooter": "Scooter/Snowmobile", "skating": "Skating"}}}, - "piste/type_downhill": {"key": "piste:type", "type": "typeCombo", "label": "Type", "strings": {"options": {"downhill": "Downhill", "snow_park": "Snow Park", "playground": "Playground", "connection": "Connection between pistes"}}}, - "piste/type_nordic": {"key": "piste:type", "type": "typeCombo", "label": "Type", "strings": {"options": {"nordic": "Nordic", "playground": "Playground", "connection": "Connection between pistes"}}}, "piste/type": {"key": "piste:type", "type": "typeCombo", "label": "Type", "strings": {"options": {"downhill": "Downhill", "nordic": "Nordic", "skitour": "Skitour", "sled": "Sled", "hike": "Hike", "sleigh": "Sleigh", "ice_skate": "Ice Skate", "snow_park": "Snow Park", "playground": "Playground", "connection": "Connection"}}}, "place": {"key": "place", "type": "typeCombo", "label": "Type"}, "plant": {"key": "plant", "type": "combo", "label": "Plant"}, diff --git a/data/presets/fields/piste/type_downhill.json b/data/presets/fields/piste/type_downhill.json deleted file mode 100644 index 597f838e2..000000000 --- a/data/presets/fields/piste/type_downhill.json +++ /dev/null @@ -1,13 +0,0 @@ -{ - "key": "piste:type", - "type": "typeCombo", - "label": "Type", - "strings": { - "options": { - "downhill": "Downhill", - "snow_park": "Snow Park", - "playground": "Playground", - "connection": "Connection between pistes" - } - } -} diff --git a/data/presets/fields/piste/type_nordic.json b/data/presets/fields/piste/type_nordic.json deleted file mode 100644 index dba168b2f..000000000 --- a/data/presets/fields/piste/type_nordic.json +++ /dev/null @@ -1,12 +0,0 @@ -{ - "key": "piste:type", - "type": "typeCombo", - "label": "Type", - "strings": { - "options": { - "nordic": "Nordic", - "playground": "Playground", - "connection": "Connection between pistes" - } - } -} diff --git a/data/presets/presets.json b/data/presets/presets.json index 509ce6b2f..b2f94a36f 100644 --- a/data/presets/presets.json +++ b/data/presets/presets.json @@ -659,14 +659,14 @@ "office/telecommunication": {"icon": "maki-telephone", "fields": ["name", "address", "building_area", "opening_hours"], "geometry": ["point", "area"], "tags": {"office": "telecommunication"}, "terms": ["communication", "internet", "phone", "voice"], "name": "Telecom Office"}, "office/therapist": {"icon": "maki-suitcase", "fields": ["name", "address", "building_area", "opening_hours"], "geometry": ["point", "area"], "tags": {"office": "therapist"}, "terms": ["therapy"], "name": "Therapist Office"}, "office/water_utility": {"icon": "maki-suitcase", "fields": ["name", "address", "building_area", "opening_hours", "operator"], "geometry": ["point", "area"], "tags": {"office": "water_utility"}, "terms": ["water board", "utility"], "name": "Water Utility Office"}, - "piste/downhill": {"icon": "maki-skiing", "fields": ["name", "piste/type_downhill", "piste/difficulty_downhill", "piste/grooming_downhill", "oneway", "lit"], "geometry": ["line", "area"], "terms": ["ski", "alpine", "snowboard", "downhill", "piste"], "tags": {"piste:type": "downhill"}, "name": "Downhill Piste/Ski Run"}, - "piste/hike": {"icon": "fas-snowflake", "fields": ["name", "piste/difficulty", "piste/grooming_hike", "oneway", "lit"], "geometry": ["line", "area"], "terms": ["hike", "winter hiking", "snowshoe", "snowshoeing", "piste", "ski"], "tags": {"piste:type": "hike"}, "name": "Snowshoeing or Winter Hiking Trail"}, - "piste/ice_skate": {"icon": "fas-snowflake", "fields": ["name", "sport_ice", "oneway", "lit"], "geometry": ["line", "area"], "terms": ["ice", "skating", "ski", "piste"], "tags": {"piste:type": "ice_skate"}, "name": "Ice Skating Piste"}, - "piste/nordic": {"icon": "maki-skiing", "fields": ["name", "piste/type_nordic", "piste/difficulty_nordic", "piste/grooming_nordic", "oneway", "lit"], "geometry": ["line", "area"], "terms": ["ski", "nordic", "crosscountry", "skating", "piste"], "tags": {"piste:type": "nordic"}, "name": "Nordic or Crosscountry Piste/Ski Trail"}, + "piste/downhill": {"icon": "maki-skiing", "fields": ["name", "piste/type", "piste/difficulty_downhill", "piste/grooming_downhill", "oneway", "lit"], "geometry": ["line", "area"], "terms": ["ski", "alpine", "snowboard", "downhill", "piste"], "tags": {"piste:type": "downhill"}, "name": "Downhill Piste/Ski Run"}, + "piste/hike": {"icon": "fas-snowflake", "fields": ["name", "piste/type", "piste/difficulty", "piste/grooming_hike", "oneway", "lit"], "geometry": ["line", "area"], "terms": ["hike", "winter hiking", "snowshoe", "snowshoeing", "piste", "ski"], "tags": {"piste:type": "hike"}, "name": "Snowshoeing or Winter Hiking Trail"}, + "piste/ice_skate": {"icon": "fas-snowflake", "fields": ["name", "piste/type", "sport_ice", "oneway", "lit"], "geometry": ["line", "area"], "terms": ["ice", "skating", "ski", "piste"], "tags": {"piste:type": "ice_skate"}, "name": "Ice Skating Piste"}, + "piste/nordic": {"icon": "maki-skiing", "fields": ["name", "piste/type", "piste/difficulty_nordic", "piste/grooming_nordic", "oneway", "lit"], "geometry": ["line", "area"], "terms": ["ski", "nordic", "crosscountry", "skating", "piste"], "tags": {"piste:type": "nordic"}, "name": "Nordic or Crosscountry Piste/Ski Trail"}, "piste/piste": {"icon": "maki-skiing", "fields": ["name", "piste/type", "piste/difficulty", "piste/grooming", "oneway", "lit"], "geometry": ["line", "area"], "terms": ["ski", "nordic", "crosscountry", "downhill", "alpine", "snowboard", "skitour", "ski touring", "sled", "luge", "sleigh", "sledge", "ski-joring", "husky", "horse", "winter hiking", "snowshoe", "snowshoeing", "ice", "skating"], "tags": {"piste:type": "*"}, "name": "Winter Sport Trails"}, - "piste/skitour": {"icon": "maki-skiing", "fields": ["name", "piste/difficulty_skitour", "piste/grooming", "oneway", "lit"], "geometry": ["line", "area"], "terms": ["ski", "skitour", "crosscountry", "ski touring", "piste"], "tags": {"piste:type": "skitour"}, "name": "Ski Touring Trail"}, - "piste/sled": {"icon": "fas-snowflake", "fields": ["name", "piste/difficulty", "piste/grooming", "oneway", "lit"], "geometry": ["line", "area"], "terms": ["ski", "sled", "luge", "sleigh", "sledge", "piste"], "tags": {"piste:type": "sled"}, "name": "Sled Piste"}, - "piste/sleigh": {"icon": "fas-snowflake", "fields": ["name", "piste/difficulty", "piste/grooming", "oneway", "lit"], "geometry": ["line", "area"], "terms": ["ski", "piste", "sled", "luge", "sleigh", "sledge", "ski-joring", "husky", "horse"], "tags": {"piste:type": "sleigh"}, "name": "Sleigh Piste"}, + "piste/skitour": {"icon": "maki-skiing", "fields": ["name", "piste/type", "piste/difficulty_skitour", "piste/grooming", "oneway", "lit"], "geometry": ["line", "area"], "terms": ["ski", "skitour", "crosscountry", "ski touring", "piste"], "tags": {"piste:type": "skitour"}, "name": "Ski Touring Trail"}, + "piste/sled": {"icon": "fas-snowflake", "fields": ["name", "piste/type", "piste/difficulty", "piste/grooming", "oneway", "lit"], "geometry": ["line", "area"], "terms": ["ski", "sled", "luge", "sleigh", "sledge", "piste"], "tags": {"piste:type": "sled"}, "name": "Sled Piste"}, + "piste/sleigh": {"icon": "fas-snowflake", "fields": ["name", "piste/type", "piste/difficulty", "piste/grooming", "oneway", "lit"], "geometry": ["line", "area"], "terms": ["ski", "piste", "sled", "luge", "sleigh", "sledge", "ski-joring", "husky", "horse"], "tags": {"piste:type": "sleigh"}, "name": "Sleigh Piste"}, "place/farm": {"icon": "maki-farm", "geometry": ["point", "area"], "fields": ["name"], "tags": {"place": "farm"}, "name": "Farm", "searchable": false}, "place/city": {"icon": "maki-city", "fields": ["name", "population"], "geometry": ["point", "area"], "tags": {"place": "city"}, "name": "City"}, "place/hamlet": {"icon": "maki-triangle-stroked", "fields": ["name", "population"], "geometry": ["point", "area"], "tags": {"place": "hamlet"}, "name": "Hamlet"}, diff --git a/data/presets/presets/piste/downhill.json b/data/presets/presets/piste/downhill.json index a93097c42..c8e453def 100644 --- a/data/presets/presets/piste/downhill.json +++ b/data/presets/presets/piste/downhill.json @@ -2,7 +2,7 @@ "icon": "maki-skiing", "fields": [ "name", - "piste/type_downhill", + "piste/type", "piste/difficulty_downhill", "piste/grooming_downhill", "oneway", diff --git a/data/presets/presets/piste/hike.json b/data/presets/presets/piste/hike.json index 9376515b7..79aaa6183 100644 --- a/data/presets/presets/piste/hike.json +++ b/data/presets/presets/piste/hike.json @@ -2,6 +2,7 @@ "icon": "fas-snowflake", "fields": [ "name", + "piste/type", "piste/difficulty", "piste/grooming_hike", "oneway", diff --git a/data/presets/presets/piste/ice_skate.json b/data/presets/presets/piste/ice_skate.json index 4e6a86bde..a64e4854c 100644 --- a/data/presets/presets/piste/ice_skate.json +++ b/data/presets/presets/piste/ice_skate.json @@ -2,6 +2,7 @@ "icon": "fas-snowflake", "fields": [ "name", + "piste/type", "sport_ice", "oneway", "lit" diff --git a/data/presets/presets/piste/nordic.json b/data/presets/presets/piste/nordic.json index 42a95f751..99d4d17f2 100644 --- a/data/presets/presets/piste/nordic.json +++ b/data/presets/presets/piste/nordic.json @@ -2,7 +2,7 @@ "icon": "maki-skiing", "fields": [ "name", - "piste/type_nordic", + "piste/type", "piste/difficulty_nordic", "piste/grooming_nordic", "oneway", diff --git a/data/presets/presets/piste/skitour.json b/data/presets/presets/piste/skitour.json index a8ab25a0b..831b84fe9 100644 --- a/data/presets/presets/piste/skitour.json +++ b/data/presets/presets/piste/skitour.json @@ -2,6 +2,7 @@ "icon": "maki-skiing", "fields": [ "name", + "piste/type", "piste/difficulty_skitour", "piste/grooming", "oneway", diff --git a/data/presets/presets/piste/sled.json b/data/presets/presets/piste/sled.json index 594cb743a..d64a55a7b 100644 --- a/data/presets/presets/piste/sled.json +++ b/data/presets/presets/piste/sled.json @@ -2,6 +2,7 @@ "icon": "fas-snowflake", "fields": [ "name", + "piste/type", "piste/difficulty", "piste/grooming", "oneway", diff --git a/data/presets/presets/piste/sleigh.json b/data/presets/presets/piste/sleigh.json index 8b919c431..dc7c7cd28 100644 --- a/data/presets/presets/piste/sleigh.json +++ b/data/presets/presets/piste/sleigh.json @@ -2,6 +2,7 @@ "icon": "fas-snowflake", "fields": [ "name", + "piste/type", "piste/difficulty", "piste/grooming", "oneway", diff --git a/dist/locales/en.json b/dist/locales/en.json index 8b6be7311..7d2ed2e9e 100644 --- a/dist/locales/en.json +++ b/dist/locales/en.json @@ -2519,23 +2519,6 @@ "skating": "Skating" } }, - "piste/type_downhill": { - "label": "Type", - "options": { - "downhill": "Downhill", - "snow_park": "Snow Park", - "playground": "Playground", - "connection": "Connection between pistes" - } - }, - "piste/type_nordic": { - "label": "Type", - "options": { - "nordic": "Nordic", - "playground": "Playground", - "connection": "Connection between pistes" - } - }, "piste/type": { "label": "Type", "options": { @@ -7399,6 +7382,34 @@ "description": "Orthofoto layer provided by basemap.at. \"Successor\" of geoimage.at imagery.", "name": "basemap.at Orthofoto" }, + "eufar-balaton": { + "attribution": { + "text": "EUFAR Balaton ortofotó 2010" + }, + "description": "1940 geo-tagged photography from Balaton Limnological Institute.", + "name": "EUFAR Balaton orthophotos" + }, + "finds.jp_KBN_2500": { + "attribution": { + "text": "GSI KIBAN 2500" + }, + "description": "GSI Kiban 2500 via finds.jp. Good for tracing, but a bit older.", + "name": "Japan GSI KIBAN 2500" + }, + "gsi.go.jp": { + "attribution": { + "text": "GSI Japan" + }, + "description": "Japan GSI ortho Imagery. Usually better than bing, but a bit older.", + "name": "Japan GSI ortho Imagery" + }, + "gsi.go.jp_std_map": { + "attribution": { + "text": "GSI Japan" + }, + "description": "Japan GSI Standard Map. Widely covered.", + "name": "Japan GSI Standard Map" + }, "hike_n_bike": { "attribution": { "text": "© OpenStreetMap contributors" From 7ad55b50745881f433f5fa5f7b947bc2d80783ef Mon Sep 17 00:00:00 2001 From: Christopher Beddow Date: Wed, 10 Oct 2018 17:15:31 -0600 Subject: [PATCH 54/56] fix: traffic signs to new endpoint --- modules/services/mapillary.js | 1432 ++++++++++++++++----------------- 1 file changed, 716 insertions(+), 716 deletions(-) diff --git a/modules/services/mapillary.js b/modules/services/mapillary.js index 8be72b3f1..0656bfc22 100644 --- a/modules/services/mapillary.js +++ b/modules/services/mapillary.js @@ -1,716 +1,716 @@ -/* global Mapillary:false */ -import _find from 'lodash-es/find'; -import _flatten from 'lodash-es/flatten'; -import _forEach from 'lodash-es/forEach'; -import _isEmpty from 'lodash-es/isEmpty'; -import _map from 'lodash-es/map'; -import _some from 'lodash-es/some'; -import _union from 'lodash-es/union'; - -import { range as d3_range } from 'd3-array'; -import { dispatch as d3_dispatch } from 'd3-dispatch'; -import { request as d3_request } from 'd3-request'; -import { - select as d3_select, - selectAll as d3_selectAll -} from 'd3-selection'; - -import rbush from 'rbush'; - -import { geoExtent, geoScaleToZoom } from '../geo'; -import { svgDefs } from '../svg'; -import { utilQsString, utilRebind, utilTiler } from '../util'; - - -var apibase = 'https://a.mapillary.com/v3/'; -var viewercss = 'mapillary-js/mapillary.min.css'; -var viewerjs = 'mapillary-js/mapillary.min.js'; -var clientId = 'NzNRM2otQkR2SHJzaXJmNmdQWVQ0dzo1ZWYyMmYwNjdmNDdlNmVi'; -var maxResults = 1000; -var tileZoom = 14; -var tiler = utilTiler().zoomExtent([tileZoom, tileZoom]).skipNullIsland(true); -var dispatch = d3_dispatch('loadedImages', 'loadedSigns', 'bearingChanged'); -var _mlyFallback = false; -var _mlyCache; -var _mlyClicks; -var _mlySelectedImage; -var _mlyViewer; - - -function abortRequest(i) { - i.abort(); -} - - -function maxPageAtZoom(z) { - if (z < 15) return 2; - if (z === 15) return 5; - if (z === 16) return 10; - if (z === 17) return 20; - if (z === 18) return 40; - if (z > 18) return 80; -} - - -function loadTiles(which, url, projection) { - var currZoom = Math.floor(geoScaleToZoom(projection.scale())); - var tiles = tiler.getTiles(projection); - - // abort inflight requests that are no longer needed - var cache = _mlyCache[which]; - _forEach(cache.inflight, function(v, k) { - var wanted = _find(tiles, function(tile) { return k.indexOf(tile.id + ',') === 0; }); - - if (!wanted) { - abortRequest(v); - delete cache.inflight[k]; - } - }); - - tiles.forEach(function(tile) { - loadNextTilePage(which, currZoom, url, tile); - }); -} - - -function loadNextTilePage(which, currZoom, url, tile) { - var cache = _mlyCache[which]; - var rect = tile.extent.rectangle(); - var maxPages = maxPageAtZoom(currZoom); - var nextPage = cache.nextPage[tile.id] || 0; - var nextURL = cache.nextURL[tile.id] || url + - utilQsString({ - per_page: maxResults, - page: nextPage, - client_id: clientId, - bbox: [rect[0], rect[1], rect[2], rect[3]].join(','), - }); - - if (nextPage > maxPages) return; - - var id = tile.id + ',' + String(nextPage); - if (cache.loaded[id] || cache.inflight[id]) return; - cache.inflight[id] = d3_request(nextURL) - .mimeType('application/json') - .response(function(xhr) { - var linkHeader = xhr.getResponseHeader('Link'); - if (linkHeader) { - var pagination = parsePagination(xhr.getResponseHeader('Link')); - if (pagination.next) { - cache.nextURL[tile.id] = pagination.next; - } - } - return JSON.parse(xhr.responseText); - }) - .get(function(err, data) { - cache.loaded[id] = true; - delete cache.inflight[id]; - if (err || !data.features || !data.features.length) return; - - var features = data.features.map(function(feature) { - var loc = feature.geometry.coordinates; - var d; - - if (which === 'images') { - d = { - loc: loc, - key: feature.properties.key, - ca: feature.properties.ca, - captured_at: feature.properties.captured_at, - captured_by: feature.properties.username, - pano: feature.properties.pano - }; - cache.forImageKey[d.key] = d; // cache imageKey -> image - - } else if (which === 'sequences') { - var sequenceKey = feature.properties.key; - cache.lineString[sequenceKey] = feature; // cache sequenceKey -> lineString - feature.properties.coordinateProperties.image_keys.forEach(function(imageKey) { - cache.forImageKey[imageKey] = sequenceKey; // cache imageKey -> sequenceKey - }); - return false; // because no `d` data worth loading into an rbush - - } else if (which === 'objects') { - d = { - loc: loc, - key: feature.properties.key, - value: feature.properties.value, - package: feature.properties.package, - detections: feature.properties.detections - }; - - // cache imageKey -> detectionKey - feature.properties.detections.forEach(function(detection) { - var imageKey = detection.image_key; - var detectionKey = detection.detection_key; - if (!_mlyCache.detections[imageKey]) { - _mlyCache.detections[imageKey] = {}; - } - if (!_mlyCache.detections[imageKey][detectionKey]) { - _mlyCache.detections[imageKey][detectionKey] = {}; - } - }); - } - - return { - minX: loc[0], minY: loc[1], maxX: loc[0], maxY: loc[1], data: d - }; - - }).filter(Boolean); - - cache.rtree.load(features); - - if (which === 'images' || which === 'sequences') { - dispatch.call('loadedImages'); - } else if (which === 'objects') { - dispatch.call('loadedSigns'); - } - - if (data.features.length === maxResults) { // more pages to load - cache.nextPage[tile.id] = nextPage + 1; - loadNextTilePage(which, currZoom, url, tile); - } else { - cache.nextPage[tile.id] = Infinity; // no more pages to load - } - }); -} - -// extract links to pages of API results -function parsePagination(links) { - return links.split(',').map(function(rel) { - var elements = rel.split(';'); - if (elements.length === 2) { - return [ - /<(.+)>/.exec(elements[0])[1], - /rel="(.+)"/.exec(elements[1])[1] - ]; - } else { - return ['','']; - } - }).reduce(function(pagination, val) { - pagination[val[1]] = val[0]; - return pagination; - }, {}); -} - - -// partition viewport into `psize` x `psize` regions -function partitionViewport(psize, projection) { - var dimensions = projection.clipExtent()[1]; - psize = psize || 16; - var cols = d3_range(0, dimensions[0], psize); - var rows = d3_range(0, dimensions[1], psize); - var partitions = []; - - rows.forEach(function(y) { - cols.forEach(function(x) { - var min = [x, y + psize]; - var max = [x + psize, y]; - partitions.push( - geoExtent(projection.invert(min), projection.invert(max))); - }); - }); - - return partitions; -} - - -// no more than `limit` results per partition. -function searchLimited(psize, limit, projection, rtree) { - limit = limit || 3; - - var partitions = partitionViewport(psize, projection); - var results; - - // console.time('previous'); - results = _flatten(_map(partitions, function(extent) { - return rtree.search(extent.bbox()) - .slice(0, limit) - .map(function(d) { return d.data; }); - })); - // console.timeEnd('previous'); - - // console.time('new'); - // results = partitions.reduce(function(result, extent) { - // var found = rtree.search(extent.bbox()) - // .map(function(d) { return d.data; }) - // .sort(function(a, b) { - // return a.loc[1] - b.loc[1]; - // // return a.key.localeCompare(b.key); - // }) - // .slice(0, limit); - - // return (found.length ? result.concat(found) : result); - // }, []); - // console.timeEnd('new'); - - return results; -} - - - -export default { - - init: function() { - if (!_mlyCache) { - this.reset(); - } - - this.event = utilRebind(this, dispatch, 'on'); - }, - - reset: function() { - var cache = _mlyCache; - - if (cache) { - if (cache.images && cache.images.inflight) { - _forEach(cache.images.inflight, abortRequest); - } - if (cache.objects && cache.objects.inflight) { - _forEach(cache.objects.inflight, abortRequest); - } - if (cache.sequences && cache.sequences.inflight) { - _forEach(cache.sequences.inflight, abortRequest); - } - } - - _mlyCache = { - images: { inflight: {}, loaded: {}, nextPage: {}, nextURL: {}, rtree: rbush(), forImageKey: {} }, - objects: { inflight: {}, loaded: {}, nextPage: {}, nextURL: {}, rtree: rbush() }, - sequences: { inflight: {}, loaded: {}, nextPage: {}, nextURL: {}, rtree: rbush(), forImageKey: {}, lineString: {} }, - detections: {} - }; - - _mlySelectedImage = null; - _mlyClicks = []; - }, - - - images: function(projection) { - var psize = 16, limit = 3; - return searchLimited(psize, limit, projection, _mlyCache.images.rtree); - }, - - - signs: function(projection) { - var psize = 32, limit = 3; - return searchLimited(psize, limit, projection, _mlyCache.objects.rtree); - }, - - - sequences: function(projection) { - var viewport = projection.clipExtent(); - var min = [viewport[0][0], viewport[1][1]]; - var max = [viewport[1][0], viewport[0][1]]; - var bbox = geoExtent(projection.invert(min), projection.invert(max)).bbox(); - var sequenceKeys = {}; - - // all sequences for images in viewport - _mlyCache.images.rtree.search(bbox) - .forEach(function(d) { - var sequenceKey = _mlyCache.sequences.forImageKey[d.data.key]; - if (sequenceKey) { - sequenceKeys[sequenceKey] = true; - } - }); - - // Return lineStrings for the sequences - return Object.keys(sequenceKeys).map(function(sequenceKey) { - return _mlyCache.sequences.lineString[sequenceKey]; - }); - }, - - - signsSupported: function() { - return true; - }, - - - loadImages: function(projection) { - loadTiles('images', apibase + 'images?', projection); - loadTiles('sequences', apibase + 'sequences?', projection); - }, - - - loadSigns: function(context, projection) { - // if we are looking at signs, we'll actually need to fetch images too - loadTiles('images', apibase + 'images?', projection); - loadTiles('objects', apibase + 'objects?', projection); - }, - - - loadViewer: function(context) { - // add mly-wrapper - var wrap = d3_select('#photoviewer').selectAll('.mly-wrapper') - .data([0]); - - wrap.enter() - .append('div') - .attr('id', 'mly') - .attr('class', 'photo-wrapper mly-wrapper') - .classed('hide', true); - - // load mapillary-viewercss - d3_select('head').selectAll('#mapillary-viewercss') - .data([0]) - .enter() - .append('link') - .attr('id', 'mapillary-viewercss') - .attr('rel', 'stylesheet') - .attr('href', context.asset(viewercss)); - - // load mapillary-viewerjs - d3_select('head').selectAll('#mapillary-viewerjs') - .data([0]) - .enter() - .append('script') - .attr('id', 'mapillary-viewerjs') - .attr('src', context.asset(viewerjs)); - - // load mapillary signs sprite - var defs = context.container().select('defs'); - defs.call(svgDefs(context).addSprites, ['mapillary-sprite']); - - // Register viewer resize handler - context.ui().on('photoviewerResize', function() { - if (_mlyViewer) { - _mlyViewer.resize(); - } - }); - }, - - - showViewer: function() { - var wrap = d3_select('#photoviewer') - .classed('hide', false); - - var isHidden = wrap.selectAll('.photo-wrapper.mly-wrapper.hide').size(); - - if (isHidden && _mlyViewer) { - wrap - .selectAll('.photo-wrapper:not(.mly-wrapper)') - .classed('hide', true); - - wrap - .selectAll('.photo-wrapper.mly-wrapper') - .classed('hide', false); - - _mlyViewer.resize(); - } - - return this; - }, - - - hideViewer: function() { - _mlySelectedImage = null; - - if (!_mlyFallback && _mlyViewer) { - _mlyViewer.getComponent('sequence').stop(); - } - - var viewer = d3_select('#photoviewer'); - if (!viewer.empty()) viewer.datum(null); - - viewer - .classed('hide', true) - .selectAll('.photo-wrapper') - .classed('hide', true); - - d3_selectAll('.viewfield-group, .sequence, .icon-sign') - .classed('selected', false); - - return this.setStyles(null, true); - }, - - - parsePagination: parsePagination, - - - updateViewer: function(imageKey, context) { - if (!imageKey) return this; - - if (!_mlyViewer) { - this.initViewer(imageKey, context); - } else { - _mlyViewer.moveToKey(imageKey) - .catch(function(e) { console.error('mly3', e); }); // eslint-disable-line no-console - } - - return this; - }, - - - initViewer: function(imageKey, context) { - var that = this; - if (window.Mapillary && imageKey) { - var opts = { - baseImageSize: 320, - component: { - cover: false, - keyboard: false, - tag: true - } - }; - - // Disable components requiring WebGL support - if (!Mapillary.isSupported() && Mapillary.isFallbackSupported()) { - _mlyFallback = true; - opts.component = { - cover: false, - direction: false, - imagePlane: false, - keyboard: false, - mouse: false, - sequence: false, - tag: false, - image: true, // fallback - navigation: true // fallback - }; - } - - _mlyViewer = new Mapillary.Viewer('mly', clientId, null, opts); - _mlyViewer.on('nodechanged', nodeChanged); - _mlyViewer.on('bearingchanged', bearingChanged); - _mlyViewer.moveToKey(imageKey) - .catch(function(e) { console.error('mly3', e); }); // eslint-disable-line no-console - } - - // nodeChanged: called after the viewer has changed images and is ready. - // - // There is some logic here to batch up clicks into a _mlyClicks array - // because the user might click on a lot of markers quickly and nodechanged - // may be called out of order asychronously. - // - // Clicks are added to the array in `selectedImage` and removed here. - // - function nodeChanged(node) { - if (!_mlyFallback) { - _mlyViewer.getComponent('tag').removeAll(); // remove previous detections - } - - var clicks = _mlyClicks; - var index = clicks.indexOf(node.key); - var selectedKey = _mlySelectedImage && _mlySelectedImage.key; - - if (index > -1) { // `nodechanged` initiated from clicking on a marker.. - clicks.splice(index, 1); // remove the click - // If `node.key` matches the current _mlySelectedImage, call `selectImage()` - // one more time to update the detections and attribution.. - if (node.key === selectedKey) { - that.selectImage(_mlySelectedImage, node.key, true); - } - } else { // `nodechanged` initiated from the Mapillary viewer controls.. - var loc = node.computedLatLon ? [node.computedLatLon.lon, node.computedLatLon.lat] : [node.latLon.lon, node.latLon.lat]; - context.map().centerEase(loc); - that.selectImage(undefined, node.key, true); - } - } - - function bearingChanged(e) { - dispatch.call('bearingChanged', undefined, e); - } - }, - - - // Pass the image datum itself in `d` or the `imageKey` string. - // This allows images to be selected from places that dont have access - // to the full image datum (like the street signs layer or the js viewer) - selectImage: function(d, imageKey, fromViewer) { - if (!d && imageKey) { - // If the user clicked on something that's not an image marker, we - // might get in here.. Cache lookup can fail, e.g. if the user - // clicked a streetsign, but images are loading slowly asynchronously. - // We'll try to carry on anyway if there is no datum. There just - // might be a delay before user sees detections, captured_at, etc. - d = _mlyCache.images.forImageKey[imageKey]; - } - - _mlySelectedImage = d; - var viewer = d3_select('#photoviewer'); - if (!viewer.empty()) viewer.datum(d); - - imageKey = (d && d.key) || imageKey; - if (!fromViewer && imageKey) { - _mlyClicks.push(imageKey); - } - - this.setStyles(null, true); - - d3_selectAll('.layer-mapillary-signs .icon-sign') - .classed('selected', function(d) { - return _some(d.detections, function(detection) { - return detection.image_key === imageKey; - }); - }); - - if (d) { - this.updateDetections(d); - } - - return this; - }, - - - getSelectedImage: function() { - return _mlySelectedImage; - }, - - - getSequenceKeyForImage: function(d) { - var imageKey = d && d.key; - return imageKey && _mlyCache.sequences.forImageKey[imageKey]; - }, - - - setStyles: function(hovered, reset) { - if (reset) { // reset all layers - d3_selectAll('.viewfield-group') - .classed('highlighted', false) - .classed('hovered', false) - .classed('selected', false); - - d3_selectAll('.sequence') - .classed('highlighted', false) - .classed('selected', false); - } - - var hoveredImageKey = hovered && hovered.key; - var hoveredSequenceKey = this.getSequenceKeyForImage(hovered); - var hoveredLineString = hoveredSequenceKey && _mlyCache.sequences.lineString[hoveredSequenceKey]; - var hoveredImageKeys = (hoveredLineString && hoveredLineString.properties.coordinateProperties.image_keys) || []; - - var viewer = d3_select('#photoviewer'); - var selected = viewer.empty() ? undefined : viewer.datum(); - var selectedImageKey = selected && selected.key; - var selectedSequenceKey = this.getSequenceKeyForImage(selected); - var selectedLineString = selectedSequenceKey && _mlyCache.sequences.lineString[selectedSequenceKey]; - var selectedImageKeys = (selectedLineString && selectedLineString.properties.coordinateProperties.image_keys) || []; - - // highlight sibling viewfields on either the selected or the hovered sequences - var highlightedImageKeys = _union(hoveredImageKeys, selectedImageKeys); - - d3_selectAll('.layer-mapillary-images .viewfield-group') - .classed('highlighted', function(d) { return highlightedImageKeys.indexOf(d.key) !== -1; }) - .classed('hovered', function(d) { return d.key === hoveredImageKey; }) - .classed('selected', function(d) { return d.key === selectedImageKey; }); - - d3_selectAll('.layer-mapillary-images .sequence') - .classed('highlighted', function(d) { return d.properties.key === hoveredSequenceKey; }) - .classed('selected', function(d) { return d.properties.key === selectedSequenceKey; }); - - // update viewfields if needed - d3_selectAll('.viewfield-group .viewfield') - .attr('d', viewfieldPath); - - function viewfieldPath() { - var d = this.parentNode.__data__; - if (d.pano && d.key !== selectedImageKey) { - return 'M 8,13 m -10,0 a 10,10 0 1,0 20,0 a 10,10 0 1,0 -20,0'; - } else { - return 'M 6,9 C 8,8.4 8,8.4 10,9 L 16,-2 C 12,-5 4,-5 0,-2 z'; - } - } - - return this; - }, - - - updateDetections: function(d) { - if (!_mlyViewer || _mlyFallback) return; - - var imageKey = d && d.key; - var detections = (imageKey && _mlyCache.detections[imageKey]) || []; - - _forEach(detections, function(data, k) { - if (_isEmpty(data)) { - loadDetection(k); - } else { - var tag = makeTag(data); - if (tag) { - var tagComponent = _mlyViewer.getComponent('tag'); - tagComponent.add([tag]); - } - } - }); - - - function loadDetection(detectionKey) { - var url = apibase + 'detections/' + - detectionKey + '?' + utilQsString({ client_id: clientId }); - - d3_request(url) - .mimeType('application/json') - .response(function(xhr) { - return JSON.parse(xhr.responseText); - }) - .get(function(err, data) { - if (!data || !data.properties) return; - - var imageKey = data.properties.image_key; - _mlyCache.detections[imageKey][detectionKey] = data; - - var selectedKey = _mlySelectedImage && _mlySelectedImage.key; - if (imageKey === selectedKey) { - var tag = makeTag(data); - if (tag) { - var tagComponent = _mlyViewer.getComponent('tag'); - tagComponent.add([tag]); - } - } - }); - } - - - function makeTag(data) { - var valueParts = data.properties.value.split('--'); - if (valueParts.length !== 3) return; - - var text = valueParts[1].replace(/-/g, ' '); - var tag; - - // Currently only two shapes - if (data.properties.shape.type === 'Polygon') { - var polygonGeometry = new Mapillary - .TagComponent - .PolygonGeometry(data.properties.shape.coordinates[0]); - - tag = new Mapillary.TagComponent.OutlineTag( - data.properties.key, - polygonGeometry, - { - text: text, - textColor: 0xffff00, - lineColor: 0xffff00, - lineWidth: 2, - fillColor: 0xffff00, - fillOpacity: 0.3, - } - ); - - } else if (data.properties.shape.type === 'Point') { - var pointGeometry = new Mapillary - .TagComponent - .PointGeometry(data.properties.shape.coordinates[0]); - - tag = new Mapillary.TagComponent.SpotTag( - data.properties.key, - pointGeometry, - { - text: text, - color: 0xffff00, - textColor: 0xffff00 - } - ); - } - - return tag; - } - }, - - - cache: function() { - return _mlyCache; - } - -}; +/* global Mapillary:false */ +import _find from 'lodash-es/find'; +import _flatten from 'lodash-es/flatten'; +import _forEach from 'lodash-es/forEach'; +import _isEmpty from 'lodash-es/isEmpty'; +import _map from 'lodash-es/map'; +import _some from 'lodash-es/some'; +import _union from 'lodash-es/union'; + +import { range as d3_range } from 'd3-array'; +import { dispatch as d3_dispatch } from 'd3-dispatch'; +import { request as d3_request } from 'd3-request'; +import { + select as d3_select, + selectAll as d3_selectAll +} from 'd3-selection'; + +import rbush from 'rbush'; + +import { geoExtent, geoScaleToZoom } from '../geo'; +import { svgDefs } from '../svg'; +import { utilQsString, utilRebind, utilTiler } from '../util'; + + +var apibase = 'https://a.mapillary.com/v3/'; +var viewercss = 'mapillary-js/mapillary.min.css'; +var viewerjs = 'mapillary-js/mapillary.min.js'; +var clientId = 'NzNRM2otQkR2SHJzaXJmNmdQWVQ0dzo1ZWYyMmYwNjdmNDdlNmVi'; +var maxResults = 1000; +var tileZoom = 14; +var tiler = utilTiler().zoomExtent([tileZoom, tileZoom]).skipNullIsland(true); +var dispatch = d3_dispatch('loadedImages', 'loadedSigns', 'bearingChanged'); +var _mlyFallback = false; +var _mlyCache; +var _mlyClicks; +var _mlySelectedImage; +var _mlyViewer; + + +function abortRequest(i) { + i.abort(); +} + + +function maxPageAtZoom(z) { + if (z < 15) return 2; + if (z === 15) return 5; + if (z === 16) return 10; + if (z === 17) return 20; + if (z === 18) return 40; + if (z > 18) return 80; +} + + +function loadTiles(which, url, projection) { + var currZoom = Math.floor(geoScaleToZoom(projection.scale())); + var tiles = tiler.getTiles(projection); + + // abort inflight requests that are no longer needed + var cache = _mlyCache[which]; + _forEach(cache.inflight, function(v, k) { + var wanted = _find(tiles, function(tile) { return k.indexOf(tile.id + ',') === 0; }); + + if (!wanted) { + abortRequest(v); + delete cache.inflight[k]; + } + }); + + tiles.forEach(function(tile) { + loadNextTilePage(which, currZoom, url, tile); + }); +} + + +function loadNextTilePage(which, currZoom, url, tile) { + var cache = _mlyCache[which]; + var rect = tile.extent.rectangle(); + var maxPages = maxPageAtZoom(currZoom); + var nextPage = cache.nextPage[tile.id] || 0; + var nextURL = cache.nextURL[tile.id] || url + + utilQsString({ + per_page: maxResults, + page: nextPage, + client_id: clientId, + bbox: [rect[0], rect[1], rect[2], rect[3]].join(','), + }); + + if (nextPage > maxPages) return; + + var id = tile.id + ',' + String(nextPage); + if (cache.loaded[id] || cache.inflight[id]) return; + cache.inflight[id] = d3_request(nextURL) + .mimeType('application/json') + .response(function(xhr) { + var linkHeader = xhr.getResponseHeader('Link'); + if (linkHeader) { + var pagination = parsePagination(xhr.getResponseHeader('Link')); + if (pagination.next) { + cache.nextURL[tile.id] = pagination.next; + } + } + return JSON.parse(xhr.responseText); + }) + .get(function(err, data) { + cache.loaded[id] = true; + delete cache.inflight[id]; + if (err || !data.features || !data.features.length) return; + + var features = data.features.map(function(feature) { + var loc = feature.geometry.coordinates; + var d; + + if (which === 'images') { + d = { + loc: loc, + key: feature.properties.key, + ca: feature.properties.ca, + captured_at: feature.properties.captured_at, + captured_by: feature.properties.username, + pano: feature.properties.pano + }; + cache.forImageKey[d.key] = d; // cache imageKey -> image + + } else if (which === 'sequences') { + var sequenceKey = feature.properties.key; + cache.lineString[sequenceKey] = feature; // cache sequenceKey -> lineString + feature.properties.coordinateProperties.image_keys.forEach(function(imageKey) { + cache.forImageKey[imageKey] = sequenceKey; // cache imageKey -> sequenceKey + }); + return false; // because no `d` data worth loading into an rbush + + } else if (which === 'map_features') { + d = { + loc: loc, + key: feature.properties.key, + value: feature.properties.value, + package: feature.properties.package, + detections: feature.properties.detections + }; + + // cache imageKey -> detectionKey + feature.properties.detections.forEach(function(detection) { + var imageKey = detection.image_key; + var detectionKey = detection.detection_key; + if (!_mlyCache.detections[imageKey]) { + _mlyCache.detections[imageKey] = {}; + } + if (!_mlyCache.detections[imageKey][detectionKey]) { + _mlyCache.detections[imageKey][detectionKey] = {}; + } + }); + } + + return { + minX: loc[0], minY: loc[1], maxX: loc[0], maxY: loc[1], data: d + }; + + }).filter(Boolean); + + cache.rtree.load(features); + + if (which === 'images' || which === 'sequences') { + dispatch.call('loadedImages'); + } else if (which === 'map_features') { + dispatch.call('loadedSigns'); + } + + if (data.features.length === maxResults) { // more pages to load + cache.nextPage[tile.id] = nextPage + 1; + loadNextTilePage(which, currZoom, url, tile); + } else { + cache.nextPage[tile.id] = Infinity; // no more pages to load + } + }); +} + +// extract links to pages of API results +function parsePagination(links) { + return links.split(',').map(function(rel) { + var elements = rel.split(';'); + if (elements.length === 2) { + return [ + /<(.+)>/.exec(elements[0])[1], + /rel="(.+)"/.exec(elements[1])[1] + ]; + } else { + return ['','']; + } + }).reduce(function(pagination, val) { + pagination[val[1]] = val[0]; + return pagination; + }, {}); +} + + +// partition viewport into `psize` x `psize` regions +function partitionViewport(psize, projection) { + var dimensions = projection.clipExtent()[1]; + psize = psize || 16; + var cols = d3_range(0, dimensions[0], psize); + var rows = d3_range(0, dimensions[1], psize); + var partitions = []; + + rows.forEach(function(y) { + cols.forEach(function(x) { + var min = [x, y + psize]; + var max = [x + psize, y]; + partitions.push( + geoExtent(projection.invert(min), projection.invert(max))); + }); + }); + + return partitions; +} + + +// no more than `limit` results per partition. +function searchLimited(psize, limit, projection, rtree) { + limit = limit || 3; + + var partitions = partitionViewport(psize, projection); + var results; + + // console.time('previous'); + results = _flatten(_map(partitions, function(extent) { + return rtree.search(extent.bbox()) + .slice(0, limit) + .map(function(d) { return d.data; }); + })); + // console.timeEnd('previous'); + + // console.time('new'); + // results = partitions.reduce(function(result, extent) { + // var found = rtree.search(extent.bbox()) + // .map(function(d) { return d.data; }) + // .sort(function(a, b) { + // return a.loc[1] - b.loc[1]; + // // return a.key.localeCompare(b.key); + // }) + // .slice(0, limit); + + // return (found.length ? result.concat(found) : result); + // }, []); + // console.timeEnd('new'); + + return results; +} + + + +export default { + + init: function() { + if (!_mlyCache) { + this.reset(); + } + + this.event = utilRebind(this, dispatch, 'on'); + }, + + reset: function() { + var cache = _mlyCache; + + if (cache) { + if (cache.images && cache.images.inflight) { + _forEach(cache.images.inflight, abortRequest); + } + if (cache.objects && cache.objects.inflight) { + _forEach(cache.objects.inflight, abortRequest); + } + if (cache.sequences && cache.sequences.inflight) { + _forEach(cache.sequences.inflight, abortRequest); + } + } + + _mlyCache = { + images: { inflight: {}, loaded: {}, nextPage: {}, nextURL: {}, rtree: rbush(), forImageKey: {} }, + objects: { inflight: {}, loaded: {}, nextPage: {}, nextURL: {}, rtree: rbush() }, + sequences: { inflight: {}, loaded: {}, nextPage: {}, nextURL: {}, rtree: rbush(), forImageKey: {}, lineString: {} }, + detections: {} + }; + + _mlySelectedImage = null; + _mlyClicks = []; + }, + + + images: function(projection) { + var psize = 16, limit = 3; + return searchLimited(psize, limit, projection, _mlyCache.images.rtree); + }, + + + signs: function(projection) { + var psize = 32, limit = 3; + return searchLimited(psize, limit, projection, _mlyCache.objects.rtree); + }, + + + sequences: function(projection) { + var viewport = projection.clipExtent(); + var min = [viewport[0][0], viewport[1][1]]; + var max = [viewport[1][0], viewport[0][1]]; + var bbox = geoExtent(projection.invert(min), projection.invert(max)).bbox(); + var sequenceKeys = {}; + + // all sequences for images in viewport + _mlyCache.images.rtree.search(bbox) + .forEach(function(d) { + var sequenceKey = _mlyCache.sequences.forImageKey[d.data.key]; + if (sequenceKey) { + sequenceKeys[sequenceKey] = true; + } + }); + + // Return lineStrings for the sequences + return Object.keys(sequenceKeys).map(function(sequenceKey) { + return _mlyCache.sequences.lineString[sequenceKey]; + }); + }, + + + signsSupported: function() { + return true; + }, + + + loadImages: function(projection) { + loadTiles('images', apibase + 'images?', projection); + loadTiles('sequences', apibase + 'sequences?', projection); + }, + + + loadSigns: function(context, projection) { + // if we are looking at signs, we'll actually need to fetch images too + loadTiles('images', apibase + 'images?', projection); + loadTiles('map_features', apibase + 'map_features?layers=trafficsigns&', projection); + }, + + + loadViewer: function(context) { + // add mly-wrapper + var wrap = d3_select('#photoviewer').selectAll('.mly-wrapper') + .data([0]); + + wrap.enter() + .append('div') + .attr('id', 'mly') + .attr('class', 'photo-wrapper mly-wrapper') + .classed('hide', true); + + // load mapillary-viewercss + d3_select('head').selectAll('#mapillary-viewercss') + .data([0]) + .enter() + .append('link') + .attr('id', 'mapillary-viewercss') + .attr('rel', 'stylesheet') + .attr('href', context.asset(viewercss)); + + // load mapillary-viewerjs + d3_select('head').selectAll('#mapillary-viewerjs') + .data([0]) + .enter() + .append('script') + .attr('id', 'mapillary-viewerjs') + .attr('src', context.asset(viewerjs)); + + // load mapillary signs sprite + var defs = context.container().select('defs'); + defs.call(svgDefs(context).addSprites, ['mapillary-sprite']); + + // Register viewer resize handler + context.ui().on('photoviewerResize', function() { + if (_mlyViewer) { + _mlyViewer.resize(); + } + }); + }, + + + showViewer: function() { + var wrap = d3_select('#photoviewer') + .classed('hide', false); + + var isHidden = wrap.selectAll('.photo-wrapper.mly-wrapper.hide').size(); + + if (isHidden && _mlyViewer) { + wrap + .selectAll('.photo-wrapper:not(.mly-wrapper)') + .classed('hide', true); + + wrap + .selectAll('.photo-wrapper.mly-wrapper') + .classed('hide', false); + + _mlyViewer.resize(); + } + + return this; + }, + + + hideViewer: function() { + _mlySelectedImage = null; + + if (!_mlyFallback && _mlyViewer) { + _mlyViewer.getComponent('sequence').stop(); + } + + var viewer = d3_select('#photoviewer'); + if (!viewer.empty()) viewer.datum(null); + + viewer + .classed('hide', true) + .selectAll('.photo-wrapper') + .classed('hide', true); + + d3_selectAll('.viewfield-group, .sequence, .icon-sign') + .classed('selected', false); + + return this.setStyles(null, true); + }, + + + parsePagination: parsePagination, + + + updateViewer: function(imageKey, context) { + if (!imageKey) return this; + + if (!_mlyViewer) { + this.initViewer(imageKey, context); + } else { + _mlyViewer.moveToKey(imageKey) + .catch(function(e) { console.error('mly3', e); }); // eslint-disable-line no-console + } + + return this; + }, + + + initViewer: function(imageKey, context) { + var that = this; + if (window.Mapillary && imageKey) { + var opts = { + baseImageSize: 320, + component: { + cover: false, + keyboard: false, + tag: true + } + }; + + // Disable components requiring WebGL support + if (!Mapillary.isSupported() && Mapillary.isFallbackSupported()) { + _mlyFallback = true; + opts.component = { + cover: false, + direction: false, + imagePlane: false, + keyboard: false, + mouse: false, + sequence: false, + tag: false, + image: true, // fallback + navigation: true // fallback + }; + } + + _mlyViewer = new Mapillary.Viewer('mly', clientId, null, opts); + _mlyViewer.on('nodechanged', nodeChanged); + _mlyViewer.on('bearingchanged', bearingChanged); + _mlyViewer.moveToKey(imageKey) + .catch(function(e) { console.error('mly3', e); }); // eslint-disable-line no-console + } + + // nodeChanged: called after the viewer has changed images and is ready. + // + // There is some logic here to batch up clicks into a _mlyClicks array + // because the user might click on a lot of markers quickly and nodechanged + // may be called out of order asychronously. + // + // Clicks are added to the array in `selectedImage` and removed here. + // + function nodeChanged(node) { + if (!_mlyFallback) { + _mlyViewer.getComponent('tag').removeAll(); // remove previous detections + } + + var clicks = _mlyClicks; + var index = clicks.indexOf(node.key); + var selectedKey = _mlySelectedImage && _mlySelectedImage.key; + + if (index > -1) { // `nodechanged` initiated from clicking on a marker.. + clicks.splice(index, 1); // remove the click + // If `node.key` matches the current _mlySelectedImage, call `selectImage()` + // one more time to update the detections and attribution.. + if (node.key === selectedKey) { + that.selectImage(_mlySelectedImage, node.key, true); + } + } else { // `nodechanged` initiated from the Mapillary viewer controls.. + var loc = node.computedLatLon ? [node.computedLatLon.lon, node.computedLatLon.lat] : [node.latLon.lon, node.latLon.lat]; + context.map().centerEase(loc); + that.selectImage(undefined, node.key, true); + } + } + + function bearingChanged(e) { + dispatch.call('bearingChanged', undefined, e); + } + }, + + + // Pass the image datum itself in `d` or the `imageKey` string. + // This allows images to be selected from places that dont have access + // to the full image datum (like the street signs layer or the js viewer) + selectImage: function(d, imageKey, fromViewer) { + if (!d && imageKey) { + // If the user clicked on something that's not an image marker, we + // might get in here.. Cache lookup can fail, e.g. if the user + // clicked a streetsign, but images are loading slowly asynchronously. + // We'll try to carry on anyway if there is no datum. There just + // might be a delay before user sees detections, captured_at, etc. + d = _mlyCache.images.forImageKey[imageKey]; + } + + _mlySelectedImage = d; + var viewer = d3_select('#photoviewer'); + if (!viewer.empty()) viewer.datum(d); + + imageKey = (d && d.key) || imageKey; + if (!fromViewer && imageKey) { + _mlyClicks.push(imageKey); + } + + this.setStyles(null, true); + + d3_selectAll('.layer-mapillary-signs .icon-sign') + .classed('selected', function(d) { + return _some(d.detections, function(detection) { + return detection.image_key === imageKey; + }); + }); + + if (d) { + this.updateDetections(d); + } + + return this; + }, + + + getSelectedImage: function() { + return _mlySelectedImage; + }, + + + getSequenceKeyForImage: function(d) { + var imageKey = d && d.key; + return imageKey && _mlyCache.sequences.forImageKey[imageKey]; + }, + + + setStyles: function(hovered, reset) { + if (reset) { // reset all layers + d3_selectAll('.viewfield-group') + .classed('highlighted', false) + .classed('hovered', false) + .classed('selected', false); + + d3_selectAll('.sequence') + .classed('highlighted', false) + .classed('selected', false); + } + + var hoveredImageKey = hovered && hovered.key; + var hoveredSequenceKey = this.getSequenceKeyForImage(hovered); + var hoveredLineString = hoveredSequenceKey && _mlyCache.sequences.lineString[hoveredSequenceKey]; + var hoveredImageKeys = (hoveredLineString && hoveredLineString.properties.coordinateProperties.image_keys) || []; + + var viewer = d3_select('#photoviewer'); + var selected = viewer.empty() ? undefined : viewer.datum(); + var selectedImageKey = selected && selected.key; + var selectedSequenceKey = this.getSequenceKeyForImage(selected); + var selectedLineString = selectedSequenceKey && _mlyCache.sequences.lineString[selectedSequenceKey]; + var selectedImageKeys = (selectedLineString && selectedLineString.properties.coordinateProperties.image_keys) || []; + + // highlight sibling viewfields on either the selected or the hovered sequences + var highlightedImageKeys = _union(hoveredImageKeys, selectedImageKeys); + + d3_selectAll('.layer-mapillary-images .viewfield-group') + .classed('highlighted', function(d) { return highlightedImageKeys.indexOf(d.key) !== -1; }) + .classed('hovered', function(d) { return d.key === hoveredImageKey; }) + .classed('selected', function(d) { return d.key === selectedImageKey; }); + + d3_selectAll('.layer-mapillary-images .sequence') + .classed('highlighted', function(d) { return d.properties.key === hoveredSequenceKey; }) + .classed('selected', function(d) { return d.properties.key === selectedSequenceKey; }); + + // update viewfields if needed + d3_selectAll('.viewfield-group .viewfield') + .attr('d', viewfieldPath); + + function viewfieldPath() { + var d = this.parentNode.__data__; + if (d.pano && d.key !== selectedImageKey) { + return 'M 8,13 m -10,0 a 10,10 0 1,0 20,0 a 10,10 0 1,0 -20,0'; + } else { + return 'M 6,9 C 8,8.4 8,8.4 10,9 L 16,-2 C 12,-5 4,-5 0,-2 z'; + } + } + + return this; + }, + + + updateDetections: function(d) { + if (!_mlyViewer || _mlyFallback) return; + + var imageKey = d && d.key; + var detections = (imageKey && _mlyCache.detections[imageKey]) || []; + + _forEach(detections, function(data, k) { + if (_isEmpty(data)) { + loadDetection(k); + } else { + var tag = makeTag(data); + if (tag) { + var tagComponent = _mlyViewer.getComponent('tag'); + tagComponent.add([tag]); + } + } + }); + + + function loadDetection(detectionKey) { + var url = apibase + 'image_detections/' + + detectionKey + '?' + utilQsString({ client_id: clientId }); + + d3_request(url) + .mimeType('application/json') + .response(function(xhr) { + return JSON.parse(xhr.responseText); + }) + .get(function(err, data) { + if (!data || !data.properties) return; + + var imageKey = data.properties.image_key; + _mlyCache.detections[imageKey][detectionKey] = data; + + var selectedKey = _mlySelectedImage && _mlySelectedImage.key; + if (imageKey === selectedKey) { + var tag = makeTag(data); + if (tag) { + var tagComponent = _mlyViewer.getComponent('tag'); + tagComponent.add([tag]); + } + } + }); + } + + + function makeTag(data) { + var valueParts = data.properties.value.split('--'); + if (valueParts.length !== 3) return; + + var text = valueParts[1].replace(/-/g, ' '); + var tag; + + // Currently only two shapes + if (data.properties.shape.type === 'Polygon') { + var polygonGeometry = new Mapillary + .TagComponent + .PolygonGeometry(data.properties.shape.coordinates[0]); + + tag = new Mapillary.TagComponent.OutlineTag( + data.properties.key, + polygonGeometry, + { + text: text, + textColor: 0xffff00, + lineColor: 0xffff00, + lineWidth: 2, + fillColor: 0xffff00, + fillOpacity: 0.3, + } + ); + + } else if (data.properties.shape.type === 'Point') { + var pointGeometry = new Mapillary + .TagComponent + .PointGeometry(data.properties.shape.coordinates[0]); + + tag = new Mapillary.TagComponent.SpotTag( + data.properties.key, + pointGeometry, + { + text: text, + color: 0xffff00, + textColor: 0xffff00 + } + ); + } + + return tag; + } + }, + + + cache: function() { + return _mlyCache; + } + +}; From 0353b3110d0d3d0711cd21878a5c835c7e9c9add Mon Sep 17 00:00:00 2001 From: Bryan Housel Date: Thu, 11 Oct 2018 12:41:27 -0400 Subject: [PATCH 55/56] Fix parse error in testing osm.js --- test/spec/services/osm.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/spec/services/osm.js b/test/spec/services/osm.js index b8080b2c5..c977cf599 100644 --- a/test/spec/services/osm.js +++ b/test/spec/services/osm.js @@ -140,7 +140,7 @@ describe('iD.serviceOsm', function () { var path = '/api/0.6/map?bbox=-74.542,40.655,-74.541,40.656'; var response = '' + '' + - ' ' + ' ' + ' ' + ' ' + From 4cd442e09d580a32870eab7b8a6c2882fbd72a77 Mon Sep 17 00:00:00 2001 From: Bryan Housel Date: Thu, 11 Oct 2018 12:53:47 -0400 Subject: [PATCH 56/56] Restore mapillary.js line endings back from CRLF -> CR, fix tests --- modules/services/mapillary.js | 1432 +++++++++++++++---------------- test/spec/services/mapillary.js | 152 ++-- 2 files changed, 792 insertions(+), 792 deletions(-) diff --git a/modules/services/mapillary.js b/modules/services/mapillary.js index 0656bfc22..77d516a6d 100644 --- a/modules/services/mapillary.js +++ b/modules/services/mapillary.js @@ -1,716 +1,716 @@ -/* global Mapillary:false */ -import _find from 'lodash-es/find'; -import _flatten from 'lodash-es/flatten'; -import _forEach from 'lodash-es/forEach'; -import _isEmpty from 'lodash-es/isEmpty'; -import _map from 'lodash-es/map'; -import _some from 'lodash-es/some'; -import _union from 'lodash-es/union'; - -import { range as d3_range } from 'd3-array'; -import { dispatch as d3_dispatch } from 'd3-dispatch'; -import { request as d3_request } from 'd3-request'; -import { - select as d3_select, - selectAll as d3_selectAll -} from 'd3-selection'; - -import rbush from 'rbush'; - -import { geoExtent, geoScaleToZoom } from '../geo'; -import { svgDefs } from '../svg'; -import { utilQsString, utilRebind, utilTiler } from '../util'; - - -var apibase = 'https://a.mapillary.com/v3/'; -var viewercss = 'mapillary-js/mapillary.min.css'; -var viewerjs = 'mapillary-js/mapillary.min.js'; -var clientId = 'NzNRM2otQkR2SHJzaXJmNmdQWVQ0dzo1ZWYyMmYwNjdmNDdlNmVi'; -var maxResults = 1000; -var tileZoom = 14; -var tiler = utilTiler().zoomExtent([tileZoom, tileZoom]).skipNullIsland(true); -var dispatch = d3_dispatch('loadedImages', 'loadedSigns', 'bearingChanged'); -var _mlyFallback = false; -var _mlyCache; -var _mlyClicks; -var _mlySelectedImage; -var _mlyViewer; - - -function abortRequest(i) { - i.abort(); -} - - -function maxPageAtZoom(z) { - if (z < 15) return 2; - if (z === 15) return 5; - if (z === 16) return 10; - if (z === 17) return 20; - if (z === 18) return 40; - if (z > 18) return 80; -} - - -function loadTiles(which, url, projection) { - var currZoom = Math.floor(geoScaleToZoom(projection.scale())); - var tiles = tiler.getTiles(projection); - - // abort inflight requests that are no longer needed - var cache = _mlyCache[which]; - _forEach(cache.inflight, function(v, k) { - var wanted = _find(tiles, function(tile) { return k.indexOf(tile.id + ',') === 0; }); - - if (!wanted) { - abortRequest(v); - delete cache.inflight[k]; - } - }); - - tiles.forEach(function(tile) { - loadNextTilePage(which, currZoom, url, tile); - }); -} - - -function loadNextTilePage(which, currZoom, url, tile) { - var cache = _mlyCache[which]; - var rect = tile.extent.rectangle(); - var maxPages = maxPageAtZoom(currZoom); - var nextPage = cache.nextPage[tile.id] || 0; - var nextURL = cache.nextURL[tile.id] || url + - utilQsString({ - per_page: maxResults, - page: nextPage, - client_id: clientId, - bbox: [rect[0], rect[1], rect[2], rect[3]].join(','), - }); - - if (nextPage > maxPages) return; - - var id = tile.id + ',' + String(nextPage); - if (cache.loaded[id] || cache.inflight[id]) return; - cache.inflight[id] = d3_request(nextURL) - .mimeType('application/json') - .response(function(xhr) { - var linkHeader = xhr.getResponseHeader('Link'); - if (linkHeader) { - var pagination = parsePagination(xhr.getResponseHeader('Link')); - if (pagination.next) { - cache.nextURL[tile.id] = pagination.next; - } - } - return JSON.parse(xhr.responseText); - }) - .get(function(err, data) { - cache.loaded[id] = true; - delete cache.inflight[id]; - if (err || !data.features || !data.features.length) return; - - var features = data.features.map(function(feature) { - var loc = feature.geometry.coordinates; - var d; - - if (which === 'images') { - d = { - loc: loc, - key: feature.properties.key, - ca: feature.properties.ca, - captured_at: feature.properties.captured_at, - captured_by: feature.properties.username, - pano: feature.properties.pano - }; - cache.forImageKey[d.key] = d; // cache imageKey -> image - - } else if (which === 'sequences') { - var sequenceKey = feature.properties.key; - cache.lineString[sequenceKey] = feature; // cache sequenceKey -> lineString - feature.properties.coordinateProperties.image_keys.forEach(function(imageKey) { - cache.forImageKey[imageKey] = sequenceKey; // cache imageKey -> sequenceKey - }); - return false; // because no `d` data worth loading into an rbush - - } else if (which === 'map_features') { - d = { - loc: loc, - key: feature.properties.key, - value: feature.properties.value, - package: feature.properties.package, - detections: feature.properties.detections - }; - - // cache imageKey -> detectionKey - feature.properties.detections.forEach(function(detection) { - var imageKey = detection.image_key; - var detectionKey = detection.detection_key; - if (!_mlyCache.detections[imageKey]) { - _mlyCache.detections[imageKey] = {}; - } - if (!_mlyCache.detections[imageKey][detectionKey]) { - _mlyCache.detections[imageKey][detectionKey] = {}; - } - }); - } - - return { - minX: loc[0], minY: loc[1], maxX: loc[0], maxY: loc[1], data: d - }; - - }).filter(Boolean); - - cache.rtree.load(features); - - if (which === 'images' || which === 'sequences') { - dispatch.call('loadedImages'); - } else if (which === 'map_features') { - dispatch.call('loadedSigns'); - } - - if (data.features.length === maxResults) { // more pages to load - cache.nextPage[tile.id] = nextPage + 1; - loadNextTilePage(which, currZoom, url, tile); - } else { - cache.nextPage[tile.id] = Infinity; // no more pages to load - } - }); -} - -// extract links to pages of API results -function parsePagination(links) { - return links.split(',').map(function(rel) { - var elements = rel.split(';'); - if (elements.length === 2) { - return [ - /<(.+)>/.exec(elements[0])[1], - /rel="(.+)"/.exec(elements[1])[1] - ]; - } else { - return ['','']; - } - }).reduce(function(pagination, val) { - pagination[val[1]] = val[0]; - return pagination; - }, {}); -} - - -// partition viewport into `psize` x `psize` regions -function partitionViewport(psize, projection) { - var dimensions = projection.clipExtent()[1]; - psize = psize || 16; - var cols = d3_range(0, dimensions[0], psize); - var rows = d3_range(0, dimensions[1], psize); - var partitions = []; - - rows.forEach(function(y) { - cols.forEach(function(x) { - var min = [x, y + psize]; - var max = [x + psize, y]; - partitions.push( - geoExtent(projection.invert(min), projection.invert(max))); - }); - }); - - return partitions; -} - - -// no more than `limit` results per partition. -function searchLimited(psize, limit, projection, rtree) { - limit = limit || 3; - - var partitions = partitionViewport(psize, projection); - var results; - - // console.time('previous'); - results = _flatten(_map(partitions, function(extent) { - return rtree.search(extent.bbox()) - .slice(0, limit) - .map(function(d) { return d.data; }); - })); - // console.timeEnd('previous'); - - // console.time('new'); - // results = partitions.reduce(function(result, extent) { - // var found = rtree.search(extent.bbox()) - // .map(function(d) { return d.data; }) - // .sort(function(a, b) { - // return a.loc[1] - b.loc[1]; - // // return a.key.localeCompare(b.key); - // }) - // .slice(0, limit); - - // return (found.length ? result.concat(found) : result); - // }, []); - // console.timeEnd('new'); - - return results; -} - - - -export default { - - init: function() { - if (!_mlyCache) { - this.reset(); - } - - this.event = utilRebind(this, dispatch, 'on'); - }, - - reset: function() { - var cache = _mlyCache; - - if (cache) { - if (cache.images && cache.images.inflight) { - _forEach(cache.images.inflight, abortRequest); - } - if (cache.objects && cache.objects.inflight) { - _forEach(cache.objects.inflight, abortRequest); - } - if (cache.sequences && cache.sequences.inflight) { - _forEach(cache.sequences.inflight, abortRequest); - } - } - - _mlyCache = { - images: { inflight: {}, loaded: {}, nextPage: {}, nextURL: {}, rtree: rbush(), forImageKey: {} }, - objects: { inflight: {}, loaded: {}, nextPage: {}, nextURL: {}, rtree: rbush() }, - sequences: { inflight: {}, loaded: {}, nextPage: {}, nextURL: {}, rtree: rbush(), forImageKey: {}, lineString: {} }, - detections: {} - }; - - _mlySelectedImage = null; - _mlyClicks = []; - }, - - - images: function(projection) { - var psize = 16, limit = 3; - return searchLimited(psize, limit, projection, _mlyCache.images.rtree); - }, - - - signs: function(projection) { - var psize = 32, limit = 3; - return searchLimited(psize, limit, projection, _mlyCache.objects.rtree); - }, - - - sequences: function(projection) { - var viewport = projection.clipExtent(); - var min = [viewport[0][0], viewport[1][1]]; - var max = [viewport[1][0], viewport[0][1]]; - var bbox = geoExtent(projection.invert(min), projection.invert(max)).bbox(); - var sequenceKeys = {}; - - // all sequences for images in viewport - _mlyCache.images.rtree.search(bbox) - .forEach(function(d) { - var sequenceKey = _mlyCache.sequences.forImageKey[d.data.key]; - if (sequenceKey) { - sequenceKeys[sequenceKey] = true; - } - }); - - // Return lineStrings for the sequences - return Object.keys(sequenceKeys).map(function(sequenceKey) { - return _mlyCache.sequences.lineString[sequenceKey]; - }); - }, - - - signsSupported: function() { - return true; - }, - - - loadImages: function(projection) { - loadTiles('images', apibase + 'images?', projection); - loadTiles('sequences', apibase + 'sequences?', projection); - }, - - - loadSigns: function(context, projection) { - // if we are looking at signs, we'll actually need to fetch images too - loadTiles('images', apibase + 'images?', projection); - loadTiles('map_features', apibase + 'map_features?layers=trafficsigns&', projection); - }, - - - loadViewer: function(context) { - // add mly-wrapper - var wrap = d3_select('#photoviewer').selectAll('.mly-wrapper') - .data([0]); - - wrap.enter() - .append('div') - .attr('id', 'mly') - .attr('class', 'photo-wrapper mly-wrapper') - .classed('hide', true); - - // load mapillary-viewercss - d3_select('head').selectAll('#mapillary-viewercss') - .data([0]) - .enter() - .append('link') - .attr('id', 'mapillary-viewercss') - .attr('rel', 'stylesheet') - .attr('href', context.asset(viewercss)); - - // load mapillary-viewerjs - d3_select('head').selectAll('#mapillary-viewerjs') - .data([0]) - .enter() - .append('script') - .attr('id', 'mapillary-viewerjs') - .attr('src', context.asset(viewerjs)); - - // load mapillary signs sprite - var defs = context.container().select('defs'); - defs.call(svgDefs(context).addSprites, ['mapillary-sprite']); - - // Register viewer resize handler - context.ui().on('photoviewerResize', function() { - if (_mlyViewer) { - _mlyViewer.resize(); - } - }); - }, - - - showViewer: function() { - var wrap = d3_select('#photoviewer') - .classed('hide', false); - - var isHidden = wrap.selectAll('.photo-wrapper.mly-wrapper.hide').size(); - - if (isHidden && _mlyViewer) { - wrap - .selectAll('.photo-wrapper:not(.mly-wrapper)') - .classed('hide', true); - - wrap - .selectAll('.photo-wrapper.mly-wrapper') - .classed('hide', false); - - _mlyViewer.resize(); - } - - return this; - }, - - - hideViewer: function() { - _mlySelectedImage = null; - - if (!_mlyFallback && _mlyViewer) { - _mlyViewer.getComponent('sequence').stop(); - } - - var viewer = d3_select('#photoviewer'); - if (!viewer.empty()) viewer.datum(null); - - viewer - .classed('hide', true) - .selectAll('.photo-wrapper') - .classed('hide', true); - - d3_selectAll('.viewfield-group, .sequence, .icon-sign') - .classed('selected', false); - - return this.setStyles(null, true); - }, - - - parsePagination: parsePagination, - - - updateViewer: function(imageKey, context) { - if (!imageKey) return this; - - if (!_mlyViewer) { - this.initViewer(imageKey, context); - } else { - _mlyViewer.moveToKey(imageKey) - .catch(function(e) { console.error('mly3', e); }); // eslint-disable-line no-console - } - - return this; - }, - - - initViewer: function(imageKey, context) { - var that = this; - if (window.Mapillary && imageKey) { - var opts = { - baseImageSize: 320, - component: { - cover: false, - keyboard: false, - tag: true - } - }; - - // Disable components requiring WebGL support - if (!Mapillary.isSupported() && Mapillary.isFallbackSupported()) { - _mlyFallback = true; - opts.component = { - cover: false, - direction: false, - imagePlane: false, - keyboard: false, - mouse: false, - sequence: false, - tag: false, - image: true, // fallback - navigation: true // fallback - }; - } - - _mlyViewer = new Mapillary.Viewer('mly', clientId, null, opts); - _mlyViewer.on('nodechanged', nodeChanged); - _mlyViewer.on('bearingchanged', bearingChanged); - _mlyViewer.moveToKey(imageKey) - .catch(function(e) { console.error('mly3', e); }); // eslint-disable-line no-console - } - - // nodeChanged: called after the viewer has changed images and is ready. - // - // There is some logic here to batch up clicks into a _mlyClicks array - // because the user might click on a lot of markers quickly and nodechanged - // may be called out of order asychronously. - // - // Clicks are added to the array in `selectedImage` and removed here. - // - function nodeChanged(node) { - if (!_mlyFallback) { - _mlyViewer.getComponent('tag').removeAll(); // remove previous detections - } - - var clicks = _mlyClicks; - var index = clicks.indexOf(node.key); - var selectedKey = _mlySelectedImage && _mlySelectedImage.key; - - if (index > -1) { // `nodechanged` initiated from clicking on a marker.. - clicks.splice(index, 1); // remove the click - // If `node.key` matches the current _mlySelectedImage, call `selectImage()` - // one more time to update the detections and attribution.. - if (node.key === selectedKey) { - that.selectImage(_mlySelectedImage, node.key, true); - } - } else { // `nodechanged` initiated from the Mapillary viewer controls.. - var loc = node.computedLatLon ? [node.computedLatLon.lon, node.computedLatLon.lat] : [node.latLon.lon, node.latLon.lat]; - context.map().centerEase(loc); - that.selectImage(undefined, node.key, true); - } - } - - function bearingChanged(e) { - dispatch.call('bearingChanged', undefined, e); - } - }, - - - // Pass the image datum itself in `d` or the `imageKey` string. - // This allows images to be selected from places that dont have access - // to the full image datum (like the street signs layer or the js viewer) - selectImage: function(d, imageKey, fromViewer) { - if (!d && imageKey) { - // If the user clicked on something that's not an image marker, we - // might get in here.. Cache lookup can fail, e.g. if the user - // clicked a streetsign, but images are loading slowly asynchronously. - // We'll try to carry on anyway if there is no datum. There just - // might be a delay before user sees detections, captured_at, etc. - d = _mlyCache.images.forImageKey[imageKey]; - } - - _mlySelectedImage = d; - var viewer = d3_select('#photoviewer'); - if (!viewer.empty()) viewer.datum(d); - - imageKey = (d && d.key) || imageKey; - if (!fromViewer && imageKey) { - _mlyClicks.push(imageKey); - } - - this.setStyles(null, true); - - d3_selectAll('.layer-mapillary-signs .icon-sign') - .classed('selected', function(d) { - return _some(d.detections, function(detection) { - return detection.image_key === imageKey; - }); - }); - - if (d) { - this.updateDetections(d); - } - - return this; - }, - - - getSelectedImage: function() { - return _mlySelectedImage; - }, - - - getSequenceKeyForImage: function(d) { - var imageKey = d && d.key; - return imageKey && _mlyCache.sequences.forImageKey[imageKey]; - }, - - - setStyles: function(hovered, reset) { - if (reset) { // reset all layers - d3_selectAll('.viewfield-group') - .classed('highlighted', false) - .classed('hovered', false) - .classed('selected', false); - - d3_selectAll('.sequence') - .classed('highlighted', false) - .classed('selected', false); - } - - var hoveredImageKey = hovered && hovered.key; - var hoveredSequenceKey = this.getSequenceKeyForImage(hovered); - var hoveredLineString = hoveredSequenceKey && _mlyCache.sequences.lineString[hoveredSequenceKey]; - var hoveredImageKeys = (hoveredLineString && hoveredLineString.properties.coordinateProperties.image_keys) || []; - - var viewer = d3_select('#photoviewer'); - var selected = viewer.empty() ? undefined : viewer.datum(); - var selectedImageKey = selected && selected.key; - var selectedSequenceKey = this.getSequenceKeyForImage(selected); - var selectedLineString = selectedSequenceKey && _mlyCache.sequences.lineString[selectedSequenceKey]; - var selectedImageKeys = (selectedLineString && selectedLineString.properties.coordinateProperties.image_keys) || []; - - // highlight sibling viewfields on either the selected or the hovered sequences - var highlightedImageKeys = _union(hoveredImageKeys, selectedImageKeys); - - d3_selectAll('.layer-mapillary-images .viewfield-group') - .classed('highlighted', function(d) { return highlightedImageKeys.indexOf(d.key) !== -1; }) - .classed('hovered', function(d) { return d.key === hoveredImageKey; }) - .classed('selected', function(d) { return d.key === selectedImageKey; }); - - d3_selectAll('.layer-mapillary-images .sequence') - .classed('highlighted', function(d) { return d.properties.key === hoveredSequenceKey; }) - .classed('selected', function(d) { return d.properties.key === selectedSequenceKey; }); - - // update viewfields if needed - d3_selectAll('.viewfield-group .viewfield') - .attr('d', viewfieldPath); - - function viewfieldPath() { - var d = this.parentNode.__data__; - if (d.pano && d.key !== selectedImageKey) { - return 'M 8,13 m -10,0 a 10,10 0 1,0 20,0 a 10,10 0 1,0 -20,0'; - } else { - return 'M 6,9 C 8,8.4 8,8.4 10,9 L 16,-2 C 12,-5 4,-5 0,-2 z'; - } - } - - return this; - }, - - - updateDetections: function(d) { - if (!_mlyViewer || _mlyFallback) return; - - var imageKey = d && d.key; - var detections = (imageKey && _mlyCache.detections[imageKey]) || []; - - _forEach(detections, function(data, k) { - if (_isEmpty(data)) { - loadDetection(k); - } else { - var tag = makeTag(data); - if (tag) { - var tagComponent = _mlyViewer.getComponent('tag'); - tagComponent.add([tag]); - } - } - }); - - - function loadDetection(detectionKey) { - var url = apibase + 'image_detections/' + - detectionKey + '?' + utilQsString({ client_id: clientId }); - - d3_request(url) - .mimeType('application/json') - .response(function(xhr) { - return JSON.parse(xhr.responseText); - }) - .get(function(err, data) { - if (!data || !data.properties) return; - - var imageKey = data.properties.image_key; - _mlyCache.detections[imageKey][detectionKey] = data; - - var selectedKey = _mlySelectedImage && _mlySelectedImage.key; - if (imageKey === selectedKey) { - var tag = makeTag(data); - if (tag) { - var tagComponent = _mlyViewer.getComponent('tag'); - tagComponent.add([tag]); - } - } - }); - } - - - function makeTag(data) { - var valueParts = data.properties.value.split('--'); - if (valueParts.length !== 3) return; - - var text = valueParts[1].replace(/-/g, ' '); - var tag; - - // Currently only two shapes - if (data.properties.shape.type === 'Polygon') { - var polygonGeometry = new Mapillary - .TagComponent - .PolygonGeometry(data.properties.shape.coordinates[0]); - - tag = new Mapillary.TagComponent.OutlineTag( - data.properties.key, - polygonGeometry, - { - text: text, - textColor: 0xffff00, - lineColor: 0xffff00, - lineWidth: 2, - fillColor: 0xffff00, - fillOpacity: 0.3, - } - ); - - } else if (data.properties.shape.type === 'Point') { - var pointGeometry = new Mapillary - .TagComponent - .PointGeometry(data.properties.shape.coordinates[0]); - - tag = new Mapillary.TagComponent.SpotTag( - data.properties.key, - pointGeometry, - { - text: text, - color: 0xffff00, - textColor: 0xffff00 - } - ); - } - - return tag; - } - }, - - - cache: function() { - return _mlyCache; - } - -}; +/* global Mapillary:false */ +import _find from 'lodash-es/find'; +import _flatten from 'lodash-es/flatten'; +import _forEach from 'lodash-es/forEach'; +import _isEmpty from 'lodash-es/isEmpty'; +import _map from 'lodash-es/map'; +import _some from 'lodash-es/some'; +import _union from 'lodash-es/union'; + +import { range as d3_range } from 'd3-array'; +import { dispatch as d3_dispatch } from 'd3-dispatch'; +import { request as d3_request } from 'd3-request'; +import { + select as d3_select, + selectAll as d3_selectAll +} from 'd3-selection'; + +import rbush from 'rbush'; + +import { geoExtent, geoScaleToZoom } from '../geo'; +import { svgDefs } from '../svg'; +import { utilQsString, utilRebind, utilTiler } from '../util'; + + +var apibase = 'https://a.mapillary.com/v3/'; +var viewercss = 'mapillary-js/mapillary.min.css'; +var viewerjs = 'mapillary-js/mapillary.min.js'; +var clientId = 'NzNRM2otQkR2SHJzaXJmNmdQWVQ0dzo1ZWYyMmYwNjdmNDdlNmVi'; +var maxResults = 1000; +var tileZoom = 14; +var tiler = utilTiler().zoomExtent([tileZoom, tileZoom]).skipNullIsland(true); +var dispatch = d3_dispatch('loadedImages', 'loadedSigns', 'bearingChanged'); +var _mlyFallback = false; +var _mlyCache; +var _mlyClicks; +var _mlySelectedImage; +var _mlyViewer; + + +function abortRequest(i) { + i.abort(); +} + + +function maxPageAtZoom(z) { + if (z < 15) return 2; + if (z === 15) return 5; + if (z === 16) return 10; + if (z === 17) return 20; + if (z === 18) return 40; + if (z > 18) return 80; +} + + +function loadTiles(which, url, projection) { + var currZoom = Math.floor(geoScaleToZoom(projection.scale())); + var tiles = tiler.getTiles(projection); + + // abort inflight requests that are no longer needed + var cache = _mlyCache[which]; + _forEach(cache.inflight, function(v, k) { + var wanted = _find(tiles, function(tile) { return k.indexOf(tile.id + ',') === 0; }); + + if (!wanted) { + abortRequest(v); + delete cache.inflight[k]; + } + }); + + tiles.forEach(function(tile) { + loadNextTilePage(which, currZoom, url, tile); + }); +} + + +function loadNextTilePage(which, currZoom, url, tile) { + var cache = _mlyCache[which]; + var rect = tile.extent.rectangle(); + var maxPages = maxPageAtZoom(currZoom); + var nextPage = cache.nextPage[tile.id] || 0; + var nextURL = cache.nextURL[tile.id] || url + + utilQsString({ + per_page: maxResults, + page: nextPage, + client_id: clientId, + bbox: [rect[0], rect[1], rect[2], rect[3]].join(','), + }); + + if (nextPage > maxPages) return; + + var id = tile.id + ',' + String(nextPage); + if (cache.loaded[id] || cache.inflight[id]) return; + cache.inflight[id] = d3_request(nextURL) + .mimeType('application/json') + .response(function(xhr) { + var linkHeader = xhr.getResponseHeader('Link'); + if (linkHeader) { + var pagination = parsePagination(xhr.getResponseHeader('Link')); + if (pagination.next) { + cache.nextURL[tile.id] = pagination.next; + } + } + return JSON.parse(xhr.responseText); + }) + .get(function(err, data) { + cache.loaded[id] = true; + delete cache.inflight[id]; + if (err || !data.features || !data.features.length) return; + + var features = data.features.map(function(feature) { + var loc = feature.geometry.coordinates; + var d; + + if (which === 'images') { + d = { + loc: loc, + key: feature.properties.key, + ca: feature.properties.ca, + captured_at: feature.properties.captured_at, + captured_by: feature.properties.username, + pano: feature.properties.pano + }; + cache.forImageKey[d.key] = d; // cache imageKey -> image + + } else if (which === 'sequences') { + var sequenceKey = feature.properties.key; + cache.lineString[sequenceKey] = feature; // cache sequenceKey -> lineString + feature.properties.coordinateProperties.image_keys.forEach(function(imageKey) { + cache.forImageKey[imageKey] = sequenceKey; // cache imageKey -> sequenceKey + }); + return false; // because no `d` data worth loading into an rbush + + } else if (which === 'objects') { + d = { + loc: loc, + key: feature.properties.key, + value: feature.properties.value, + package: feature.properties.package, + detections: feature.properties.detections + }; + + // cache imageKey -> detectionKey + feature.properties.detections.forEach(function(detection) { + var imageKey = detection.image_key; + var detectionKey = detection.detection_key; + if (!_mlyCache.detections[imageKey]) { + _mlyCache.detections[imageKey] = {}; + } + if (!_mlyCache.detections[imageKey][detectionKey]) { + _mlyCache.detections[imageKey][detectionKey] = {}; + } + }); + } + + return { + minX: loc[0], minY: loc[1], maxX: loc[0], maxY: loc[1], data: d + }; + + }).filter(Boolean); + + cache.rtree.load(features); + + if (which === 'images' || which === 'sequences') { + dispatch.call('loadedImages'); + } else if (which === 'objects') { + dispatch.call('loadedSigns'); + } + + if (data.features.length === maxResults) { // more pages to load + cache.nextPage[tile.id] = nextPage + 1; + loadNextTilePage(which, currZoom, url, tile); + } else { + cache.nextPage[tile.id] = Infinity; // no more pages to load + } + }); +} + +// extract links to pages of API results +function parsePagination(links) { + return links.split(',').map(function(rel) { + var elements = rel.split(';'); + if (elements.length === 2) { + return [ + /<(.+)>/.exec(elements[0])[1], + /rel="(.+)"/.exec(elements[1])[1] + ]; + } else { + return ['','']; + } + }).reduce(function(pagination, val) { + pagination[val[1]] = val[0]; + return pagination; + }, {}); +} + + +// partition viewport into `psize` x `psize` regions +function partitionViewport(psize, projection) { + var dimensions = projection.clipExtent()[1]; + psize = psize || 16; + var cols = d3_range(0, dimensions[0], psize); + var rows = d3_range(0, dimensions[1], psize); + var partitions = []; + + rows.forEach(function(y) { + cols.forEach(function(x) { + var min = [x, y + psize]; + var max = [x + psize, y]; + partitions.push( + geoExtent(projection.invert(min), projection.invert(max))); + }); + }); + + return partitions; +} + + +// no more than `limit` results per partition. +function searchLimited(psize, limit, projection, rtree) { + limit = limit || 3; + + var partitions = partitionViewport(psize, projection); + var results; + + // console.time('previous'); + results = _flatten(_map(partitions, function(extent) { + return rtree.search(extent.bbox()) + .slice(0, limit) + .map(function(d) { return d.data; }); + })); + // console.timeEnd('previous'); + + // console.time('new'); + // results = partitions.reduce(function(result, extent) { + // var found = rtree.search(extent.bbox()) + // .map(function(d) { return d.data; }) + // .sort(function(a, b) { + // return a.loc[1] - b.loc[1]; + // // return a.key.localeCompare(b.key); + // }) + // .slice(0, limit); + + // return (found.length ? result.concat(found) : result); + // }, []); + // console.timeEnd('new'); + + return results; +} + + + +export default { + + init: function() { + if (!_mlyCache) { + this.reset(); + } + + this.event = utilRebind(this, dispatch, 'on'); + }, + + reset: function() { + var cache = _mlyCache; + + if (cache) { + if (cache.images && cache.images.inflight) { + _forEach(cache.images.inflight, abortRequest); + } + if (cache.objects && cache.objects.inflight) { + _forEach(cache.objects.inflight, abortRequest); + } + if (cache.sequences && cache.sequences.inflight) { + _forEach(cache.sequences.inflight, abortRequest); + } + } + + _mlyCache = { + images: { inflight: {}, loaded: {}, nextPage: {}, nextURL: {}, rtree: rbush(), forImageKey: {} }, + objects: { inflight: {}, loaded: {}, nextPage: {}, nextURL: {}, rtree: rbush() }, + sequences: { inflight: {}, loaded: {}, nextPage: {}, nextURL: {}, rtree: rbush(), forImageKey: {}, lineString: {} }, + detections: {} + }; + + _mlySelectedImage = null; + _mlyClicks = []; + }, + + + images: function(projection) { + var psize = 16, limit = 3; + return searchLimited(psize, limit, projection, _mlyCache.images.rtree); + }, + + + signs: function(projection) { + var psize = 32, limit = 3; + return searchLimited(psize, limit, projection, _mlyCache.objects.rtree); + }, + + + sequences: function(projection) { + var viewport = projection.clipExtent(); + var min = [viewport[0][0], viewport[1][1]]; + var max = [viewport[1][0], viewport[0][1]]; + var bbox = geoExtent(projection.invert(min), projection.invert(max)).bbox(); + var sequenceKeys = {}; + + // all sequences for images in viewport + _mlyCache.images.rtree.search(bbox) + .forEach(function(d) { + var sequenceKey = _mlyCache.sequences.forImageKey[d.data.key]; + if (sequenceKey) { + sequenceKeys[sequenceKey] = true; + } + }); + + // Return lineStrings for the sequences + return Object.keys(sequenceKeys).map(function(sequenceKey) { + return _mlyCache.sequences.lineString[sequenceKey]; + }); + }, + + + signsSupported: function() { + return true; + }, + + + loadImages: function(projection) { + loadTiles('images', apibase + 'images?', projection); + loadTiles('sequences', apibase + 'sequences?', projection); + }, + + + loadSigns: function(context, projection) { + // if we are looking at signs, we'll actually need to fetch images too + loadTiles('images', apibase + 'images?', projection); + loadTiles('objects', apibase + 'map_features?layers=trafficsigns&', projection); + }, + + + loadViewer: function(context) { + // add mly-wrapper + var wrap = d3_select('#photoviewer').selectAll('.mly-wrapper') + .data([0]); + + wrap.enter() + .append('div') + .attr('id', 'mly') + .attr('class', 'photo-wrapper mly-wrapper') + .classed('hide', true); + + // load mapillary-viewercss + d3_select('head').selectAll('#mapillary-viewercss') + .data([0]) + .enter() + .append('link') + .attr('id', 'mapillary-viewercss') + .attr('rel', 'stylesheet') + .attr('href', context.asset(viewercss)); + + // load mapillary-viewerjs + d3_select('head').selectAll('#mapillary-viewerjs') + .data([0]) + .enter() + .append('script') + .attr('id', 'mapillary-viewerjs') + .attr('src', context.asset(viewerjs)); + + // load mapillary signs sprite + var defs = context.container().select('defs'); + defs.call(svgDefs(context).addSprites, ['mapillary-sprite']); + + // Register viewer resize handler + context.ui().on('photoviewerResize', function() { + if (_mlyViewer) { + _mlyViewer.resize(); + } + }); + }, + + + showViewer: function() { + var wrap = d3_select('#photoviewer') + .classed('hide', false); + + var isHidden = wrap.selectAll('.photo-wrapper.mly-wrapper.hide').size(); + + if (isHidden && _mlyViewer) { + wrap + .selectAll('.photo-wrapper:not(.mly-wrapper)') + .classed('hide', true); + + wrap + .selectAll('.photo-wrapper.mly-wrapper') + .classed('hide', false); + + _mlyViewer.resize(); + } + + return this; + }, + + + hideViewer: function() { + _mlySelectedImage = null; + + if (!_mlyFallback && _mlyViewer) { + _mlyViewer.getComponent('sequence').stop(); + } + + var viewer = d3_select('#photoviewer'); + if (!viewer.empty()) viewer.datum(null); + + viewer + .classed('hide', true) + .selectAll('.photo-wrapper') + .classed('hide', true); + + d3_selectAll('.viewfield-group, .sequence, .icon-sign') + .classed('selected', false); + + return this.setStyles(null, true); + }, + + + parsePagination: parsePagination, + + + updateViewer: function(imageKey, context) { + if (!imageKey) return this; + + if (!_mlyViewer) { + this.initViewer(imageKey, context); + } else { + _mlyViewer.moveToKey(imageKey) + .catch(function(e) { console.error('mly3', e); }); // eslint-disable-line no-console + } + + return this; + }, + + + initViewer: function(imageKey, context) { + var that = this; + if (window.Mapillary && imageKey) { + var opts = { + baseImageSize: 320, + component: { + cover: false, + keyboard: false, + tag: true + } + }; + + // Disable components requiring WebGL support + if (!Mapillary.isSupported() && Mapillary.isFallbackSupported()) { + _mlyFallback = true; + opts.component = { + cover: false, + direction: false, + imagePlane: false, + keyboard: false, + mouse: false, + sequence: false, + tag: false, + image: true, // fallback + navigation: true // fallback + }; + } + + _mlyViewer = new Mapillary.Viewer('mly', clientId, null, opts); + _mlyViewer.on('nodechanged', nodeChanged); + _mlyViewer.on('bearingchanged', bearingChanged); + _mlyViewer.moveToKey(imageKey) + .catch(function(e) { console.error('mly3', e); }); // eslint-disable-line no-console + } + + // nodeChanged: called after the viewer has changed images and is ready. + // + // There is some logic here to batch up clicks into a _mlyClicks array + // because the user might click on a lot of markers quickly and nodechanged + // may be called out of order asychronously. + // + // Clicks are added to the array in `selectedImage` and removed here. + // + function nodeChanged(node) { + if (!_mlyFallback) { + _mlyViewer.getComponent('tag').removeAll(); // remove previous detections + } + + var clicks = _mlyClicks; + var index = clicks.indexOf(node.key); + var selectedKey = _mlySelectedImage && _mlySelectedImage.key; + + if (index > -1) { // `nodechanged` initiated from clicking on a marker.. + clicks.splice(index, 1); // remove the click + // If `node.key` matches the current _mlySelectedImage, call `selectImage()` + // one more time to update the detections and attribution.. + if (node.key === selectedKey) { + that.selectImage(_mlySelectedImage, node.key, true); + } + } else { // `nodechanged` initiated from the Mapillary viewer controls.. + var loc = node.computedLatLon ? [node.computedLatLon.lon, node.computedLatLon.lat] : [node.latLon.lon, node.latLon.lat]; + context.map().centerEase(loc); + that.selectImage(undefined, node.key, true); + } + } + + function bearingChanged(e) { + dispatch.call('bearingChanged', undefined, e); + } + }, + + + // Pass the image datum itself in `d` or the `imageKey` string. + // This allows images to be selected from places that dont have access + // to the full image datum (like the street signs layer or the js viewer) + selectImage: function(d, imageKey, fromViewer) { + if (!d && imageKey) { + // If the user clicked on something that's not an image marker, we + // might get in here.. Cache lookup can fail, e.g. if the user + // clicked a streetsign, but images are loading slowly asynchronously. + // We'll try to carry on anyway if there is no datum. There just + // might be a delay before user sees detections, captured_at, etc. + d = _mlyCache.images.forImageKey[imageKey]; + } + + _mlySelectedImage = d; + var viewer = d3_select('#photoviewer'); + if (!viewer.empty()) viewer.datum(d); + + imageKey = (d && d.key) || imageKey; + if (!fromViewer && imageKey) { + _mlyClicks.push(imageKey); + } + + this.setStyles(null, true); + + d3_selectAll('.layer-mapillary-signs .icon-sign') + .classed('selected', function(d) { + return _some(d.detections, function(detection) { + return detection.image_key === imageKey; + }); + }); + + if (d) { + this.updateDetections(d); + } + + return this; + }, + + + getSelectedImage: function() { + return _mlySelectedImage; + }, + + + getSequenceKeyForImage: function(d) { + var imageKey = d && d.key; + return imageKey && _mlyCache.sequences.forImageKey[imageKey]; + }, + + + setStyles: function(hovered, reset) { + if (reset) { // reset all layers + d3_selectAll('.viewfield-group') + .classed('highlighted', false) + .classed('hovered', false) + .classed('selected', false); + + d3_selectAll('.sequence') + .classed('highlighted', false) + .classed('selected', false); + } + + var hoveredImageKey = hovered && hovered.key; + var hoveredSequenceKey = this.getSequenceKeyForImage(hovered); + var hoveredLineString = hoveredSequenceKey && _mlyCache.sequences.lineString[hoveredSequenceKey]; + var hoveredImageKeys = (hoveredLineString && hoveredLineString.properties.coordinateProperties.image_keys) || []; + + var viewer = d3_select('#photoviewer'); + var selected = viewer.empty() ? undefined : viewer.datum(); + var selectedImageKey = selected && selected.key; + var selectedSequenceKey = this.getSequenceKeyForImage(selected); + var selectedLineString = selectedSequenceKey && _mlyCache.sequences.lineString[selectedSequenceKey]; + var selectedImageKeys = (selectedLineString && selectedLineString.properties.coordinateProperties.image_keys) || []; + + // highlight sibling viewfields on either the selected or the hovered sequences + var highlightedImageKeys = _union(hoveredImageKeys, selectedImageKeys); + + d3_selectAll('.layer-mapillary-images .viewfield-group') + .classed('highlighted', function(d) { return highlightedImageKeys.indexOf(d.key) !== -1; }) + .classed('hovered', function(d) { return d.key === hoveredImageKey; }) + .classed('selected', function(d) { return d.key === selectedImageKey; }); + + d3_selectAll('.layer-mapillary-images .sequence') + .classed('highlighted', function(d) { return d.properties.key === hoveredSequenceKey; }) + .classed('selected', function(d) { return d.properties.key === selectedSequenceKey; }); + + // update viewfields if needed + d3_selectAll('.viewfield-group .viewfield') + .attr('d', viewfieldPath); + + function viewfieldPath() { + var d = this.parentNode.__data__; + if (d.pano && d.key !== selectedImageKey) { + return 'M 8,13 m -10,0 a 10,10 0 1,0 20,0 a 10,10 0 1,0 -20,0'; + } else { + return 'M 6,9 C 8,8.4 8,8.4 10,9 L 16,-2 C 12,-5 4,-5 0,-2 z'; + } + } + + return this; + }, + + + updateDetections: function(d) { + if (!_mlyViewer || _mlyFallback) return; + + var imageKey = d && d.key; + var detections = (imageKey && _mlyCache.detections[imageKey]) || []; + + _forEach(detections, function(data, k) { + if (_isEmpty(data)) { + loadDetection(k); + } else { + var tag = makeTag(data); + if (tag) { + var tagComponent = _mlyViewer.getComponent('tag'); + tagComponent.add([tag]); + } + } + }); + + + function loadDetection(detectionKey) { + var url = apibase + 'image_detections/' + + detectionKey + '?' + utilQsString({ client_id: clientId }); + + d3_request(url) + .mimeType('application/json') + .response(function(xhr) { + return JSON.parse(xhr.responseText); + }) + .get(function(err, data) { + if (!data || !data.properties) return; + + var imageKey = data.properties.image_key; + _mlyCache.detections[imageKey][detectionKey] = data; + + var selectedKey = _mlySelectedImage && _mlySelectedImage.key; + if (imageKey === selectedKey) { + var tag = makeTag(data); + if (tag) { + var tagComponent = _mlyViewer.getComponent('tag'); + tagComponent.add([tag]); + } + } + }); + } + + + function makeTag(data) { + var valueParts = data.properties.value.split('--'); + if (valueParts.length !== 3) return; + + var text = valueParts[1].replace(/-/g, ' '); + var tag; + + // Currently only two shapes + if (data.properties.shape.type === 'Polygon') { + var polygonGeometry = new Mapillary + .TagComponent + .PolygonGeometry(data.properties.shape.coordinates[0]); + + tag = new Mapillary.TagComponent.OutlineTag( + data.properties.key, + polygonGeometry, + { + text: text, + textColor: 0xffff00, + lineColor: 0xffff00, + lineWidth: 2, + fillColor: 0xffff00, + fillOpacity: 0.3, + } + ); + + } else if (data.properties.shape.type === 'Point') { + var pointGeometry = new Mapillary + .TagComponent + .PointGeometry(data.properties.shape.coordinates[0]); + + tag = new Mapillary.TagComponent.SpotTag( + data.properties.key, + pointGeometry, + { + text: text, + color: 0xffff00, + textColor: 0xffff00 + } + ); + } + + return tag; + } + }, + + + cache: function() { + return _mlyCache; + } + +}; diff --git a/test/spec/services/mapillary.js b/test/spec/services/mapillary.js index 72046b1b6..eaadd6ba4 100644 --- a/test/spec/services/mapillary.js +++ b/test/spec/services/mapillary.js @@ -1,6 +1,6 @@ describe('iD.serviceMapillary', function() { - var dimensions = [64, 64], - context, server, mapillary; + var dimensions = [64, 64]; + var context, server, mapillary; before(function() { @@ -59,13 +59,13 @@ describe('iD.serviceMapillary', function() { mapillary.on('loadedImages', spy); mapillary.loadImages(context.projection); - var match = /images/, - features = [{ - type: 'Feature', - geometry: { type: 'Point', coordinates: [10,0] }, - properties: { ca: 90, key: '0' } - }], - response = { type: 'FeatureCollection', features: features }; + var match = /images/; + var features = [{ + type: 'Feature', + geometry: { type: 'Point', coordinates: [10,0] }, + properties: { ca: 90, key: '0' } + }]; + var response = { type: 'FeatureCollection', features: features }; server.respondWith('GET', match, [200, { 'Content-Type': 'application/json' }, JSON.stringify(response) ]); @@ -80,13 +80,13 @@ describe('iD.serviceMapillary', function() { mapillary.on('loadedImages', spy); mapillary.loadImages(context.projection); - var match = /images/, - features = [{ - type: 'Feature', - geometry: { type: 'Point', coordinates: [0,0] }, - properties: { ca: 90, key: '0' } - }], - response = { type: 'FeatureCollection', features: features }; + var match = /images/; + var features = [{ + type: 'Feature', + geometry: { type: 'Point', coordinates: [0,0] }, + properties: { ca: 90, key: '0' } + }]; + var response = { type: 'FeatureCollection', features: features }; server.respondWith('GET', match, [200, { 'Content-Type': 'application/json' }, JSON.stringify(response) ]); @@ -100,9 +100,9 @@ describe('iD.serviceMapillary', function() { mapillary.on('loadedImages', spy); mapillary.loadImages(context.projection); - var features0 = [], - features1 = [], - i; + var features0 = []; + var features1 = []; + var i; for (i = 0; i < 1000; i++) { features0.push({ @@ -119,10 +119,10 @@ describe('iD.serviceMapillary', function() { }); } - var match0 = /page=0/, - response0 = { type: 'FeatureCollection', features: features0 }, - match1 = /page=1/, - response1 = { type: 'FeatureCollection', features: features1 }; + var match0 = /page=0/; + var response0 = { type: 'FeatureCollection', features: features0 }; + var match1 = /page=1/; + var response1 = { type: 'FeatureCollection', features: features1 }; server.respondWith('GET', match0, [200, { 'Content-Type': 'application/json' }, JSON.stringify(response0) ]); @@ -140,17 +140,17 @@ describe('iD.serviceMapillary', function() { mapillary.on('loadedSigns', spy); mapillary.loadSigns(context, context.projection); - var match = /objects/, - detections = [{ - detection_key: '0', - image_key: '0' - }], - features = [{ - type: 'Feature', - geometry: { type: 'Point', coordinates: [10,0] }, - properties: { detections: detections, key: '0', value: 'not-in-set' } - }], - response = { type: 'FeatureCollection', features: features }; + var match = /map_features/; + var detections = [{ + detection_key: '0', + image_key: '0' + }]; + var features = [{ + type: 'Feature', + geometry: { type: 'Point', coordinates: [10,0] }, + properties: { detections: detections, key: '0', value: 'not-in-set' } + }]; + var response = { type: 'FeatureCollection', features: features }; server.respondWith('GET', match, [200, { 'Content-Type': 'application/json' }, JSON.stringify(response) ]); @@ -165,17 +165,17 @@ describe('iD.serviceMapillary', function() { mapillary.on('loadedSigns', spy); mapillary.loadSigns(context, context.projection); - var match = /objects/, - detections = [{ - detection_key: '0', - image_key: '0' - }], - features = [{ - type: 'Feature', - geometry: { type: 'Point', coordinates: [0,0] }, - properties: { detections: detections, key: '0', value: 'not-in-set' } - }], - response = { type: 'FeatureCollection', features: features }; + var match = /map_features/; + var detections = [{ + detection_key: '0', + image_key: '0' + }]; + var features = [{ + type: 'Feature', + geometry: { type: 'Point', coordinates: [0,0] }, + properties: { detections: detections, key: '0', value: 'not-in-set' } + }]; + var response = { type: 'FeatureCollection', features: features }; server.respondWith('GET', match, [200, { 'Content-Type': 'application/json' }, JSON.stringify(response) ]); @@ -190,15 +190,15 @@ describe('iD.serviceMapillary', function() { mapillary.loadSigns(context, context.projection); var rects = [{ - package: 'trafficsign', - rect: [ 0.805, 0.463, 0.833, 0.502 ], - length: 4, - score: '1.27', - type: 'regulatory--maximum-speed-limit-65--us' - }], - features0 = [], - features1 = [], - i; + package: 'trafficsign', + rect: [ 0.805, 0.463, 0.833, 0.502 ], + length: 4, + score: '1.27', + type: 'regulatory--maximum-speed-limit-65--us' + }]; + var features0 = []; + var features1 = []; + var i; for (i = 0; i < 1000; i++) { features0.push({ @@ -215,10 +215,10 @@ describe('iD.serviceMapillary', function() { }); } - var match0 = /page=0/, - response0 = { type: 'FeatureCollection', features: features0 }, - match1 = /page=1/, - response1 = { type: 'FeatureCollection', features: features1 }; + var match0 = /page=0/; + var response0 = { type: 'FeatureCollection', features: features0 }; + var match1 = /page=1/; + var response1 = { type: 'FeatureCollection', features: features1 }; server.respondWith('GET', match0, [200, { 'Content-Type': 'application/json' }, JSON.stringify(response0) ]); @@ -266,14 +266,14 @@ describe('iD.serviceMapillary', function() { describe('#signs', function() { it('returns signs in the visible map area', function() { var detections = [{ - detection_key: '78vqha63gs1upg15s823qckcmn', - image_key: 'bwYs-uXLDvm_meo_EC5Nzw' - }], - features = [ - { minX: 10, minY: 0, maxX: 10, maxY: 0, data: { key: '0', loc: [10,0], detections: detections } }, - { minX: 10, minY: 0, maxX: 10, maxY: 0, data: { key: '1', loc: [10,0], detections: detections } }, - { minX: 10, minY: 1, maxX: 10, maxY: 1, data: { key: '2', loc: [10,1], detections: detections } } - ]; + detection_key: '78vqha63gs1upg15s823qckcmn', + image_key: 'bwYs-uXLDvm_meo_EC5Nzw' + }]; + var features = [ + { minX: 10, minY: 0, maxX: 10, maxY: 0, data: { key: '0', loc: [10,0], detections: detections } }, + { minX: 10, minY: 0, maxX: 10, maxY: 0, data: { key: '1', loc: [10,0], detections: detections } }, + { minX: 10, minY: 1, maxX: 10, maxY: 1, data: { key: '2', loc: [10,1], detections: detections } } + ]; mapillary.cache().objects.rtree.load(features); var res = mapillary.signs(context.projection); @@ -286,16 +286,16 @@ describe('iD.serviceMapillary', function() { it('limits results no more than 3 stacked signs in one spot', function() { var detections = [{ - detection_key: '78vqha63gs1upg15s823qckcmn', - image_key: 'bwYs-uXLDvm_meo_EC5Nzw' - }], - features = [ - { minX: 10, minY: 0, maxX: 10, maxY: 0, data: { key: '0', loc: [10,0], detections: detections } }, - { minX: 10, minY: 0, maxX: 10, maxY: 0, data: { key: '1', loc: [10,0], detections: detections } }, - { minX: 10, minY: 0, maxX: 10, maxY: 0, data: { key: '2', loc: [10,0], detections: detections } }, - { minX: 10, minY: 0, maxX: 10, maxY: 0, data: { key: '3', loc: [10,0], detections: detections } }, - { minX: 10, minY: 0, maxX: 10, maxY: 0, data: { key: '4', loc: [10,0], detections: detections } } - ]; + detection_key: '78vqha63gs1upg15s823qckcmn', + image_key: 'bwYs-uXLDvm_meo_EC5Nzw' + }]; + var features = [ + { minX: 10, minY: 0, maxX: 10, maxY: 0, data: { key: '0', loc: [10,0], detections: detections } }, + { minX: 10, minY: 0, maxX: 10, maxY: 0, data: { key: '1', loc: [10,0], detections: detections } }, + { minX: 10, minY: 0, maxX: 10, maxY: 0, data: { key: '2', loc: [10,0], detections: detections } }, + { minX: 10, minY: 0, maxX: 10, maxY: 0, data: { key: '3', loc: [10,0], detections: detections } }, + { minX: 10, minY: 0, maxX: 10, maxY: 0, data: { key: '4', loc: [10,0], detections: detections } } + ]; mapillary.cache().objects.rtree.load(features); var res = mapillary.signs(context.projection);