From 59753a3c4311e5993efdc1010534bbc26d1a19f0 Mon Sep 17 00:00:00 2001 From: Quincy Morgan <2046746+quincylvania@users.noreply.github.com> Date: Wed, 16 Sep 2020 09:13:32 -0400 Subject: [PATCH] Merge duplicate presets into one --- data/presets.yaml | 10 +++++----- data/presets/fields.json | 3 ++- data/presets/fields/direction_point.json | 9 +++++++++ .../presets/fields/traffic_sign/direction.json | 5 ++++- data/presets/presets.json | 3 +-- data/presets/presets/traffic_sign.json | 6 ++++-- data/presets/presets/traffic_sign_vertex.json | 18 ------------------ data/taginfo.json | 4 ++-- dist/locales/en.json | 8 ++++---- 9 files changed, 31 insertions(+), 35 deletions(-) create mode 100644 data/presets/fields/direction_point.json delete mode 100644 data/presets/presets/traffic_sign_vertex.json diff --git a/data/presets.yaml b/data/presets.yaml index 328930e83..b6f50395b 100644 --- a/data/presets.yaml +++ b/data/presets.yaml @@ -765,6 +765,11 @@ en: anticlockwise: Counterclockwise # direction=clockwise clockwise: Clockwise + direction_point: + # direction=* + label: Direction (Degrees Clockwise) + # direction_point field placeholder + placeholder: '45, 90, 180, 270' direction_vertex: # direction=* label: Direction Affected @@ -8894,11 +8899,6 @@ en: 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 d33568097..d231401a5 100644 --- a/data/presets/fields.json +++ b/data/presets/fields.json @@ -131,6 +131,7 @@ "diplomatic/services": {"key": "diplomatic:services:", "type": "multiCombo", "label": "Services"}, "direction_cardinal": {"key": "direction", "type": "combo", "label": "Direction", "strings": {"options": {"N": "North", "E": "East", "S": "South", "W": "West", "NE": "Northeast", "SE": "Southeast", "SW": "Southwest", "NW": "Northwest", "NNE": "North-northeast", "ENE": "East-northeast", "ESE": "East-southeast", "SSE": "South-southeast", "SSW": "South-southwest", "WSW": "West-southwest", "WNW": "West-northwest", "NNW": "North-northwest"}}}, "direction_clock": {"key": "direction", "type": "combo", "label": "Direction", "strings": {"options": {"clockwise": "Clockwise", "anticlockwise": "Counterclockwise"}}}, + "direction_point": {"key": "direction", "type": "number", "label": "Direction (Degrees Clockwise)", "placeholder": "45, 90, 180, 270", "geometry": ["point"]}, "direction_vertex_dual": {"key": "direction", "type": "combo", "label": "Direction Affected", "strings": {"options": {"forward": "Forward", "backward": "Backward"}}}, "direction_vertex": {"key": "direction", "type": "combo", "label": "Direction Affected", "strings": {"options": {"forward": "Forward", "backward": "Backward", "both": "Both / All"}}}, "direction": {"key": "direction", "type": "number", "label": "Direction (Degrees Clockwise)", "placeholder": "45, 90, 180, 270"}, @@ -471,7 +472,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 Affected", "strings": {"options": {"forward": "Forward", "backward": "Backward", "both": "Both / All"}}}, + "traffic_sign/direction": {"key": "traffic_sign:direction", "type": "combo", "label": "Direction Affected", "strings": {"options": {"forward": "Forward", "backward": "Backward", "both": "Both / All"}}, "geometry": ["vertex"]}, "traffic_signals": {"key": "traffic_signals", "type": "combo", "label": "Type", "default": "signal"}, "traffic_signals/direction": {"key": "traffic_signals:direction", "type": "combo", "label": "Direction Affected", "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/direction_point.json b/data/presets/fields/direction_point.json new file mode 100644 index 000000000..23100bb2d --- /dev/null +++ b/data/presets/fields/direction_point.json @@ -0,0 +1,9 @@ +{ + "key": "direction", + "type": "number", + "label": "Direction (Degrees Clockwise)", + "placeholder": "45, 90, 180, 270", + "geometry": [ + "point" + ] +} diff --git a/data/presets/fields/traffic_sign/direction.json b/data/presets/fields/traffic_sign/direction.json index c8e06eca5..d6d417cc2 100644 --- a/data/presets/fields/traffic_sign/direction.json +++ b/data/presets/fields/traffic_sign/direction.json @@ -8,5 +8,8 @@ "backward": "Backward", "both": "Both / All" } - } + }, + "geometry": [ + "vertex" + ] } diff --git a/data/presets/presets.json b/data/presets/presets.json index 0d05f8509..6eba633db 100644 --- a/data/presets/presets.json +++ b/data/presets/presets.json @@ -1281,8 +1281,7 @@ "traffic_calming/island": {"icon": "temaki-diamond", "fields": ["surface"], "geometry": ["vertex", "line", "area"], "terms": ["circle", "roundabout", "slow"], "tags": {"traffic_calming": "island"}, "name": "Traffic Island"}, "traffic_calming/rumble_strip": {"icon": "temaki-rumble_strip", "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-speed_table", "fields": ["surface", "direction_vertex"], "geometry": ["vertex"], "tags": {"traffic_calming": "table"}, "terms": ["flat top", "hump", "speed", "slow"], "name": "Speed Table"}, - "traffic_sign_vertex": {"icon": "maki-square-stroked", "fields": ["traffic_sign", "traffic_sign/direction"], "geometry": ["vertex"], "tags": {"traffic_sign": "*"}, "terms": ["road", "highway"], "name": "Traffic Sign"}, - "traffic_sign": {"icon": "fas-directions", "fields": ["traffic_sign", "direction"], "geometry": ["point"], "tags": {"traffic_sign": "*"}, "terms": ["road", "highway"], "name": "Traffic Sign"}, + "traffic_sign": {"icon": "fas-directions", "fields": ["traffic_sign", "traffic_sign/direction", "direction_point"], "geometry": ["point", "vertex"], "tags": {"traffic_sign": "*"}, "terms": ["road", "highway"], "name": "Traffic Sign"}, "traffic_sign/city_limit_vertex": {"icon": "maki-square-stroked", "fields": ["traffic_sign", "traffic_sign/direction", "name"], "geometry": ["vertex"], "tags": {"traffic_sign": "city_limit"}, "terms": ["town", "village", "hamlet", "boundary", "edge", "border", "road", "highway"], "name": "City Limit Sign"}, "traffic_sign/city_limit": {"icon": "maki-square-stroked", "fields": ["traffic_sign", "direction", "name"], "geometry": ["point"], "tags": {"traffic_sign": "city_limit"}, "terms": ["town", "village", "hamlet", "boundary", "edge", "border", "road", "highway"], "name": "City Limit Sign"}, "traffic_sign/maxspeed_vertex": {"icon": "maki-square-stroked", "fields": ["traffic_sign", "traffic_sign/direction", "maxspeed"], "geometry": ["vertex"], "tags": {"traffic_sign": "maxspeed"}, "terms": ["max speed", "maximum speed", "road", "highway"], "name": "Speed Limit Sign"}, diff --git a/data/presets/presets/traffic_sign.json b/data/presets/presets/traffic_sign.json index 423d66e76..60d848853 100644 --- a/data/presets/presets/traffic_sign.json +++ b/data/presets/presets/traffic_sign.json @@ -2,10 +2,12 @@ "icon": "fas-directions", "fields": [ "traffic_sign", - "direction" + "traffic_sign/direction", + "direction_point" ], "geometry": [ - "point" + "point", + "vertex" ], "tags": { "traffic_sign": "*" diff --git a/data/presets/presets/traffic_sign_vertex.json b/data/presets/presets/traffic_sign_vertex.json deleted file mode 100644 index 67edd21d8..000000000 --- a/data/presets/presets/traffic_sign_vertex.json +++ /dev/null @@ -1,18 +0,0 @@ -{ - "icon": "maki-square-stroked", - "fields": [ - "traffic_sign", - "traffic_sign/direction" - ], - "geometry": [ - "vertex" - ], - "tags": { - "traffic_sign": "*" - }, - "terms": [ - "road", - "highway" - ], - "name": "Traffic Sign" -} diff --git a/data/taginfo.json b/data/taginfo.json index 861dae55f..2e0aa5173 100644 --- a/data/taginfo.json +++ b/data/taginfo.json @@ -1225,7 +1225,7 @@ {"key": "traffic_calming", "value": "hump", "description": "🄿 Speed Hump", "object_types": ["node", "way"], "icon_url": "https://cdn.jsdelivr.net/gh/ideditor/temaki/icons/speed_hump.svg"}, {"key": "traffic_calming", "value": "island", "description": "🄿 Traffic Island", "object_types": ["node", "way", "area"], "icon_url": "https://cdn.jsdelivr.net/gh/ideditor/temaki/icons/diamond.svg"}, {"key": "traffic_calming", "value": "rumble_strip", "description": "🄿 Rumble Strip", "object_types": ["node", "way"], "icon_url": "https://cdn.jsdelivr.net/gh/ideditor/temaki/icons/rumble_strip.svg"}, - {"key": "traffic_sign", "description": "🄿 Traffic Sign, 🄵 Traffic Sign", "object_types": ["node"], "icon_url": "https://cdn.jsdelivr.net/gh/mapbox/maki/icons/square-stroked-15.svg"}, + {"key": "traffic_sign", "description": "🄿 Traffic Sign, 🄵 Traffic Sign", "object_types": ["node"], "icon_url": "https://cdn.jsdelivr.net/gh/openstreetmap/iD@develop/svg/fontawesome/fas-directions.svg"}, {"key": "traffic_sign", "value": "city_limit", "description": "🄿 City Limit Sign", "object_types": ["node"], "icon_url": "https://cdn.jsdelivr.net/gh/mapbox/maki/icons/square-stroked-15.svg"}, {"key": "traffic_sign", "value": "maxspeed", "description": "🄿 Speed Limit Sign", "object_types": ["node"], "icon_url": "https://cdn.jsdelivr.net/gh/mapbox/maki/icons/square-stroked-15.svg"}, {"key": "type", "value": "multipolygon", "description": "🄿 Multipolygon (unsearchable)", "object_types": ["area", "relation"], "icon_url": "https://cdn.jsdelivr.net/gh/openstreetmap/iD@develop/svg/iD-sprite/presets/multipolygon.svg"}, @@ -1506,10 +1506,10 @@ {"key": "direction", "value": "NNW", "description": "🄵 Direction"}, {"key": "direction", "value": "clockwise", "description": "🄵 Direction"}, {"key": "direction", "value": "anticlockwise", "description": "🄵 Direction"}, + {"key": "direction", "description": "🄵 Direction (Degrees Clockwise)"}, {"key": "direction", "value": "forward", "description": "🄵 Direction Affected"}, {"key": "direction", "value": "backward", "description": "🄵 Direction Affected"}, {"key": "direction", "value": "both", "description": "🄵 Direction Affected"}, - {"key": "direction", "description": "🄵 Direction (Degrees Clockwise)"}, {"key": "dispensing", "description": "🄵 Dispenses Prescriptions"}, {"key": "display", "description": "🄵 Display"}, {"key": "distance", "description": "🄵 Distance"}, diff --git a/dist/locales/en.json b/dist/locales/en.json index c5abe8aa4..147067663 100644 --- a/dist/locales/en.json +++ b/dist/locales/en.json @@ -3422,6 +3422,10 @@ "anticlockwise": "Counterclockwise" } }, + "direction_point": { + "label": "Direction (Degrees Clockwise)", + "placeholder": "45, 90, 180, 270" + }, "direction_vertex_dual": { "label": "Direction Affected", "options": { @@ -10291,10 +10295,6 @@ "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"