From 74a6e9d57416c3b6e77ed5127f2c168f99518dff Mon Sep 17 00:00:00 2001 From: Quincy Morgan Date: Mon, 15 Jun 2020 16:55:29 -0400 Subject: [PATCH] Add ascent, descent, and roundtrip fields to relevant route presets (close #7671) --- data/presets.yaml | 15 +++++++++++++++ data/presets/fields.json | 3 +++ data/presets/fields/ascent.json | 11 +++++++++++ data/presets/fields/descent.json | 10 ++++++++++ data/presets/fields/roundtrip.json | 11 +++++++++++ data/presets/presets.json | 14 +++++++------- data/presets/presets/route/ferry.json | 1 + data/presets/presets/type/route/bicycle.json | 5 ++++- data/presets/presets/type/route/hiking.json | 5 ++++- data/presets/presets/type/route/horse.json | 2 ++ data/presets/presets/type/route/piste.json | 5 ++++- data/presets/presets/type/route/road.json | 3 ++- data/presets/presets/type/route/train.json | 1 + data/taginfo.json | 3 +++ dist/locales/en.json | 12 ++++++++++++ 15 files changed, 90 insertions(+), 11 deletions(-) create mode 100644 data/presets/fields/ascent.json create mode 100644 data/presets/fields/descent.json create mode 100644 data/presets/fields/roundtrip.json diff --git a/data/presets.yaml b/data/presets.yaml index f08693b81f..01c733c8cd 100644 --- a/data/presets.yaml +++ b/data/presets.yaml @@ -229,6 +229,11 @@ en: artwork_type: # artwork_type=* label: Type + ascent: + # ascent=* + label: Total Ascent + # 'terms: ascent,climb,cumulative elevation gain' + terms: '[translate with synonyms or related terms for ''Total Ascent'', separated by commas]' atm: # atm=* label: ATM @@ -646,6 +651,11 @@ en: depth: # depth=* label: Depth (Meters) + descent: + # descent=* + label: Total Descent + # 'terms: descent,cumulative elevation' + terms: '[translate with synonyms or related terms for ''Total Descent'', separated by commas]' description: # description=* label: Description @@ -2044,6 +2054,11 @@ en: rooms: # rooms=* label: Rooms + roundtrip: + # roundtrip=* + label: Forms Loop + # 'terms: circular,closed,looping,roundtrip' + terms: '[translate with synonyms or related terms for ''Forms Loop'', separated by commas]' route: # route=* label: Type diff --git a/data/presets/fields.json b/data/presets/fields.json index 370ab2be2d..d8c8802fd3 100644 --- a/data/presets/fields.json +++ b/data/presets/fields.json @@ -24,6 +24,7 @@ "area/highway": {"key": "area:highway", "type": "typeCombo", "label": "Type"}, "artist": {"key": "artist_name", "type": "text", "label": "Artist"}, "artwork_type": {"key": "artwork_type", "type": "combo", "label": "Type"}, + "ascent": {"key": "ascent", "minValue": 0, "type": "number", "label": "Total Ascent", "terms": ["ascent", "climb", "cumulative elevation gain"]}, "atm": {"key": "atm", "type": "check", "label": "ATM"}, "attraction": {"key": "attraction", "type": "typeCombo", "label": "Type"}, "automated": {"key": "automated", "type": "check", "label": "Automated"}, @@ -111,6 +112,7 @@ "denotation": {"key": "denotation", "type": "combo", "label": "Denotation"}, "departures_board": {"key": "departures_board", "type": "combo", "label": "Departures Board", "strings": {"options": {"yes": "Yes", "timetable": "Timetable", "realtime": "Realtime", "no": "None"}}}, "depth": {"key": "depth", "minValue": 0, "type": "number", "label": "Depth (Meters)"}, + "descent": {"key": "descent", "minValue": 0, "type": "number", "label": "Total Descent", "terms": ["descent", "cumulative elevation"]}, "description": {"key": "description", "type": "textarea", "label": "Description", "universal": true, "terms": ["summary"]}, "design": {"key": "design", "type": "combo", "label": "Design"}, "destination_oneway": {"key": "destination", "type": "semiCombo", "label": "Destinations", "prerequisiteTag": {"key": "oneway", "value": "yes"}, "snake_case": false}, @@ -364,6 +366,7 @@ "roof/colour": {"key": "roof:colour", "type": "combo", "label": "Roof Color"}, "room": {"key": "room", "type": "combo", "label": "Type"}, "rooms": {"key": "rooms", "type": "number", "minValue": 0, "label": "Rooms"}, + "roundtrip": {"key": "roundtrip", "type": "check", "label": "Forms Loop", "terms": ["circular", "closed", "looping", "roundtrip"]}, "route_master": {"key": "route_master", "type": "combo", "label": "Type"}, "route": {"key": "route", "type": "combo", "label": "Type"}, "ruins": {"key": "ruins", "type": "combo", "label": "Type"}, diff --git a/data/presets/fields/ascent.json b/data/presets/fields/ascent.json new file mode 100644 index 0000000000..d3d9832da2 --- /dev/null +++ b/data/presets/fields/ascent.json @@ -0,0 +1,11 @@ +{ + "key": "ascent", + "minValue": 0, + "type": "number", + "label": "Total Ascent", + "terms":[ + "ascent", + "climb", + "cumulative elevation gain" + ] +} diff --git a/data/presets/fields/descent.json b/data/presets/fields/descent.json new file mode 100644 index 0000000000..11d438e1e9 --- /dev/null +++ b/data/presets/fields/descent.json @@ -0,0 +1,10 @@ +{ + "key": "descent", + "minValue": 0, + "type": "number", + "label": "Total Descent", + "terms": [ + "descent", + "cumulative elevation" + ] +} diff --git a/data/presets/fields/roundtrip.json b/data/presets/fields/roundtrip.json new file mode 100644 index 0000000000..58ddc0be20 --- /dev/null +++ b/data/presets/fields/roundtrip.json @@ -0,0 +1,11 @@ +{ + "key": "roundtrip", + "type": "check", + "label": "Forms Loop", + "terms": [ + "circular", + "closed", + "looping", + "roundtrip" + ] +} diff --git a/data/presets/presets.json b/data/presets/presets.json index b6708638c6..df3d0144f6 100644 --- a/data/presets/presets.json +++ b/data/presets/presets.json @@ -1039,7 +1039,7 @@ "railway/tram": {"icon": "temaki-tram", "fields": ["{railway/light_rail}"], "moreFields": ["{railway/light_rail}"], "geometry": ["line"], "tags": {"railway": "tram"}, "terms": ["electric street railway", "light rail", "streetcar", "tramway", "trolley"], "name": "Tram Track"}, "railway/yard": {"icon": "temaki-freight_car", "fields": ["name", "operator"], "moreFields": ["gnis/feature_id"], "geometry": ["point"], "tags": {"railway": "yard"}, "terms": ["freight car stop", "freight train station", "rail freight station", "railroad yard", "railway yard"], "name": "Rail Yard"}, "relation": {"icon": "iD-relation", "fields": ["name", "relation"], "geometry": ["relation"], "tags": {}, "name": "Relation"}, - "route/ferry": {"icon": "temaki-ferry", "geometry": ["line"], "fields": ["name", "operator", "duration", "access", "toll", "from", "to"], "moreFields": ["charge_toll", "distance", "dog", "interval", "maxheight", "maxweight", "network", "opening_hours", "opening_hours/covid19", "ref_route", "wheelchair"], "tags": {"route": "ferry"}, "terms": ["boat", "merchant vessel", "ship", "water bus", "water shuttle", "water taxi"], "name": "Ferry Route"}, + "route/ferry": {"icon": "temaki-ferry", "geometry": ["line"], "fields": ["name", "operator", "duration", "access", "toll", "from", "to"], "moreFields": ["charge_toll", "distance", "dog", "interval", "maxheight", "maxweight", "network", "opening_hours", "opening_hours/covid19", "ref_route", "roundtrip", "wheelchair"], "tags": {"route": "ferry"}, "terms": ["boat", "merchant vessel", "ship", "water bus", "water shuttle", "water taxi"], "name": "Ferry Route"}, "seamark/beacon_isolated_danger": {"fields": ["ref", "operator", "seamark/beacon_isolated_danger/shape", "seamark/type"], "geometry": ["point", "vertex"], "terms": ["beacon isolated danger", "isolated danger beacon", "iala"], "tags": {"seamark:type": "beacon_isolated_danger"}, "name": "Danger Beacon"}, "seamark/beacon_lateral": {"fields": ["ref", "operator", "seamark/beacon_lateral/colour", "seamark/beacon_lateral/category", "seamark/beacon_lateral/shape", "seamark/beacon_lateral/system", "seamark/type"], "geometry": ["point", "vertex"], "terms": ["lateral beacon", "beacon lateral", "cevni", "channel marker", "iala", "lateral mark"], "tags": {"seamark:type": "beacon_lateral"}, "name": "Channel Beacon"}, "seamark/buoy_lateral": {"icon": "temaki-buoy", "fields": ["ref", "operator", "seamark/buoy_lateral/colour", "seamark/buoy_lateral/category", "seamark/buoy_lateral/shape", "seamark/buoy_lateral/system", "seamark/type"], "geometry": ["point", "vertex"], "terms": ["lateral buoy", "buoy lateral", "cevni", "channel marker", "iala", "lateral mark"], "tags": {"seamark:type": "buoy_lateral"}, "name": "Channel Buoy"}, @@ -1292,21 +1292,21 @@ "type/restriction/only_u_turn": {"icon": "iD-restriction-only-u-turn", "geometry": ["relation"], "tags": {"type": "restriction", "restriction": "only_u_turn"}, "name": "Only U-turn"}, "type/route_master": {"icon": "iD-route-master", "fields": ["name", "route_master", "ref", "operator", "network"], "moreFields": ["colour", "interval", "opening_hours", "opening_hours/covid19", "wheelchair"], "geometry": ["relation"], "tags": {"type": "route_master"}, "name": "Route Master"}, "type/route": {"icon": "iD-route", "fields": ["name", "route", "ref_route", "operator", "network", "network/type"], "moreFields": ["distance"], "geometry": ["relation"], "tags": {"type": "route"}, "name": "Route"}, - "type/route/bicycle": {"icon": "maki-bicycle", "fields": ["name", "ref_route", "network_bicycle", "cycle_network", "network/type", "from", "to"], "moreFields": ["colour", "distance"], "geometry": ["relation"], "tags": {"type": "route", "route": "bicycle"}, "name": "Cycle Route"}, + "type/route/bicycle": {"icon": "maki-bicycle", "fields": ["name", "ref_route", "network_bicycle", "cycle_network", "network/type", "from", "to"], "moreFields": ["ascent", "colour", "descent", "distance", "roundtrip"], "geometry": ["relation"], "tags": {"type": "route", "route": "bicycle"}, "name": "Cycle Route"}, "type/route/bus": {"icon": "temaki-bus", "fields": ["{type/route/train}"], "moreFields": ["{type/route/train}"], "geometry": ["relation"], "tags": {"type": "route", "route": "bus"}, "name": "Bus Route"}, "type/route/detour": {"icon": "iD-route-detour", "fields": ["name", "ref_route", "from", "to"], "geometry": ["relation"], "tags": {"type": "route", "route": "detour"}, "name": "Detour Route"}, "type/route/ferry": {"icon": "temaki-ferry", "fields": ["{route/ferry}"], "moreFields": ["{route/ferry}"], "geometry": ["relation"], "tags": {"type": "route", "route": "ferry"}, "name": "Ferry Route"}, "type/route/foot": {"icon": "temaki-pedestrian", "fields": ["{type/route/hiking}"], "moreFields": ["{type/route/hiking}"], "geometry": ["relation"], "tags": {"type": "route", "route": "foot"}, "name": "Foot Route"}, - "type/route/hiking": {"icon": "fas-hiking", "fields": ["name", "ref_route", "operator", "network_foot", "network/type", "from", "to"], "moreFields": ["colour", "distance"], "geometry": ["relation"], "tags": {"type": "route", "route": "hiking"}, "name": "Hiking Route"}, - "type/route/horse": {"icon": "maki-horse-riding", "fields": ["name", "ref_route", "operator", "network_horse", "network/type", "from", "to"], "moreFields": ["colour", "distance"], "geometry": ["relation"], "tags": {"type": "route", "route": "horse"}, "name": "Riding Route"}, + "type/route/hiking": {"icon": "fas-hiking", "fields": ["name", "ref_route", "operator", "network_foot", "network/type", "from", "to"], "moreFields": ["ascent", "colour", "descent", "distance", "roundtrip"], "geometry": ["relation"], "tags": {"type": "route", "route": "hiking"}, "name": "Hiking Route"}, + "type/route/horse": {"icon": "maki-horse-riding", "fields": ["name", "ref_route", "operator", "network_horse", "network/type", "from", "to"], "moreFields": ["ascent", "colour", "descent", "distance"], "geometry": ["relation"], "tags": {"type": "route", "route": "horse"}, "name": "Riding Route"}, "type/route/light_rail": {"icon": "temaki-light_rail", "fields": ["{type/route/train}"], "moreFields": ["{type/route/train}"], "geometry": ["relation"], "tags": {"type": "route", "route": "light_rail"}, "name": "Light Rail Route"}, "type/route/monorail": {"icon": "temaki-monorail", "fields": ["{type/route/train}"], "moreFields": ["{type/route/train}"], "geometry": ["relation"], "tags": {"type": "route", "route": "monorail"}, "name": "Monorail Route"}, "type/route/pipeline": {"icon": "iD-pipeline-line", "fields": ["{type/route/power}"], "moreFields": ["{type/route/power}"], "geometry": ["relation"], "tags": {"type": "route", "route": "pipeline"}, "name": "Pipeline Route"}, - "type/route/piste": {"icon": "fas-skiing", "fields": ["name", "piste/type", "ref_route", "operator", "from", "to"], "moreFields": ["colour", "distance"], "geometry": ["relation"], "tags": {"type": "route", "route": "piste"}, "name": "Piste/Ski Route"}, + "type/route/piste": {"icon": "fas-skiing", "fields": ["name", "piste/type", "ref_route", "operator", "from", "to"], "moreFields": ["ascent", "colour", "descent", "distance", "roundtrip"], "geometry": ["relation"], "tags": {"type": "route", "route": "piste"}, "name": "Piste/Ski Route"}, "type/route/power": {"icon": "iD-power-line", "fields": ["name", "ref_route", "operator", "from", "to"], "moreFields": ["distance"], "geometry": ["relation"], "tags": {"type": "route", "route": "power"}, "name": "Power Route"}, - "type/route/road": {"icon": "iD-highway-unclassified", "fields": ["name", "ref_route", "network_road", "from", "to"], "moreFields": ["colour", "distance"], "geometry": ["relation"], "tags": {"type": "route", "route": "road"}, "name": "Road Route"}, + "type/route/road": {"icon": "iD-highway-unclassified", "fields": ["name", "ref_route", "network_road", "from", "to"], "moreFields": ["colour", "distance", "roundtrip"], "geometry": ["relation"], "tags": {"type": "route", "route": "road"}, "name": "Road Route"}, "type/route/subway": {"icon": "temaki-subway", "fields": ["{type/route/train}"], "moreFields": ["{type/route/train}"], "geometry": ["relation"], "tags": {"type": "route", "route": "subway"}, "name": "Subway Route"}, - "type/route/train": {"icon": "temaki-train", "fields": ["name", "ref_route", "operator", "network", "from", "to"], "moreFields": ["colour", "distance", "duration", "interval", "opening_hours", "opening_hours/covid19", "wheelchair"], "geometry": ["relation"], "tags": {"type": "route", "route": "train"}, "name": "Train Route"}, + "type/route/train": {"icon": "temaki-train", "fields": ["name", "ref_route", "operator", "network", "from", "to"], "moreFields": ["colour", "distance", "duration", "interval", "opening_hours", "opening_hours/covid19", "roundtrip", "wheelchair"], "geometry": ["relation"], "tags": {"type": "route", "route": "train"}, "name": "Train Route"}, "type/route/tram": {"icon": "temaki-tram", "fields": ["{type/route/train}"], "moreFields": ["{type/route/train}"], "geometry": ["relation"], "tags": {"type": "route", "route": "tram"}, "name": "Tram Route"}, "type/route/trolleybus": {"icon": "temaki-trolleybus", "fields": ["{type/route/train}"], "moreFields": ["{type/route/train}"], "geometry": ["relation"], "tags": {"type": "route", "route": "trolleybus"}, "name": "Trolleybus Route"}, "type/site": {"icon": "iD-relation", "fields": ["name", "site"], "geometry": ["relation"], "tags": {"type": "site"}, "name": "Site"}, diff --git a/data/presets/presets/route/ferry.json b/data/presets/presets/route/ferry.json index d80fc5615d..833a90dcaa 100644 --- a/data/presets/presets/route/ferry.json +++ b/data/presets/presets/route/ferry.json @@ -23,6 +23,7 @@ "opening_hours", "opening_hours/covid19", "ref_route", + "roundtrip", "wheelchair" ], "tags": { diff --git a/data/presets/presets/type/route/bicycle.json b/data/presets/presets/type/route/bicycle.json index 943af4761d..eb2d3a8b84 100644 --- a/data/presets/presets/type/route/bicycle.json +++ b/data/presets/presets/type/route/bicycle.json @@ -10,8 +10,11 @@ "to" ], "moreFields": [ + "ascent", "colour", - "distance" + "descent", + "distance", + "roundtrip" ], "geometry": [ "relation" diff --git a/data/presets/presets/type/route/hiking.json b/data/presets/presets/type/route/hiking.json index e45cfb15e0..138b2d5b21 100644 --- a/data/presets/presets/type/route/hiking.json +++ b/data/presets/presets/type/route/hiking.json @@ -10,8 +10,11 @@ "to" ], "moreFields": [ + "ascent", "colour", - "distance" + "descent", + "distance", + "roundtrip" ], "geometry": [ "relation" diff --git a/data/presets/presets/type/route/horse.json b/data/presets/presets/type/route/horse.json index 0623c9047e..43476a4af9 100644 --- a/data/presets/presets/type/route/horse.json +++ b/data/presets/presets/type/route/horse.json @@ -10,7 +10,9 @@ "to" ], "moreFields": [ + "ascent", "colour", + "descent", "distance" ], "geometry": [ diff --git a/data/presets/presets/type/route/piste.json b/data/presets/presets/type/route/piste.json index d2ad7e92df..e9c0e911fe 100644 --- a/data/presets/presets/type/route/piste.json +++ b/data/presets/presets/type/route/piste.json @@ -9,8 +9,11 @@ "to" ], "moreFields": [ + "ascent", "colour", - "distance" + "descent", + "distance", + "roundtrip" ], "geometry": [ "relation" diff --git a/data/presets/presets/type/route/road.json b/data/presets/presets/type/route/road.json index 97814c1219..2018a8464d 100644 --- a/data/presets/presets/type/route/road.json +++ b/data/presets/presets/type/route/road.json @@ -9,7 +9,8 @@ ], "moreFields": [ "colour", - "distance" + "distance", + "roundtrip" ], "geometry": [ "relation" diff --git a/data/presets/presets/type/route/train.json b/data/presets/presets/type/route/train.json index 2fb98628a7..06f86c08b5 100644 --- a/data/presets/presets/type/route/train.json +++ b/data/presets/presets/type/route/train.json @@ -15,6 +15,7 @@ "interval", "opening_hours", "opening_hours/covid19", + "roundtrip", "wheelchair" ], "geometry": [ diff --git a/data/taginfo.json b/data/taginfo.json index 5332ba2631..e5b5b932ac 100644 --- a/data/taginfo.json +++ b/data/taginfo.json @@ -1354,6 +1354,7 @@ {"key": "architect", "description": "🄵 Architect"}, {"key": "artist_name", "description": "🄵 Artist"}, {"key": "artwork_type", "description": "🄵 Type"}, + {"key": "ascent", "description": "🄵 Total Ascent"}, {"key": "atm", "description": "🄵 ATM"}, {"key": "automated", "description": "🄵 Automated"}, {"key": "baby_feeding", "value": "room", "description": "🄵 Baby Nursing Area"}, @@ -1460,6 +1461,7 @@ {"key": "departures_board", "value": "realtime", "description": "🄵 Departures Board"}, {"key": "departures_board", "value": "no", "description": "🄵 Departures Board"}, {"key": "depth", "description": "🄵 Depth (Meters)"}, + {"key": "descent", "description": "🄵 Total Descent"}, {"key": "description", "description": "🄵 Description"}, {"key": "design", "description": "🄵 Design"}, {"key": "destination", "description": "🄵 Destinations, 🄵 Destination"}, @@ -1778,6 +1780,7 @@ {"key": "roof:colour", "description": "🄵 Roof Color"}, {"key": "room", "description": "🄵 Type"}, {"key": "rooms", "description": "🄵 Rooms"}, + {"key": "roundtrip", "description": "🄵 Forms Loop"}, {"key": "route_master", "description": "🄵 Type"}, {"key": "route", "description": "🄵 Type"}, {"key": "ruins", "description": "🄵 Type"}, diff --git a/dist/locales/en.json b/dist/locales/en.json index 5b9a8d48e1..3983ec4cf3 100644 --- a/dist/locales/en.json +++ b/dist/locales/en.json @@ -2862,6 +2862,10 @@ "artwork_type": { "label": "Type" }, + "ascent": { + "label": "Total Ascent", + "terms": "ascent,climb,cumulative elevation gain" + }, "atm": { "label": "ATM" }, @@ -3238,6 +3242,10 @@ "depth": { "label": "Depth (Meters)" }, + "descent": { + "label": "Total Descent", + "terms": "descent,cumulative elevation" + }, "description": { "label": "Description", "terms": "summary" @@ -4412,6 +4420,10 @@ "rooms": { "label": "Rooms" }, + "roundtrip": { + "label": "Forms Loop", + "terms": "circular,closed,looping,roundtrip" + }, "route_master": { "label": "Type" },