From de6fce4c7fad8791890bf9ddf8f1dbe4daba5bfc Mon Sep 17 00:00:00 2001 From: FLacombe Date: Mon, 11 Jul 2022 11:28:42 +0200 Subject: [PATCH] Update power presets following transformer tagging extension (#447) --- data/deprecated.json | 28 ++++++++++++++++++++++++++++ data/fields/transformer.json | 15 +++++++-------- data/fields/windings/auto.json | 12 ++++++++++++ data/preset_categories/utility.json | 6 +++++- data/presets/_power.json | 6 ++---- data/presets/power/transformer.json | 3 ++- interim/source_strings.yaml | 19 +++++++++++++++---- 7 files changed, 71 insertions(+), 18 deletions(-) create mode 100644 data/fields/windings/auto.json diff --git a/data/deprecated.json b/data/deprecated.json index 85a85eb26..5106bae1a 100644 --- a/data/deprecated.json +++ b/data/deprecated.json @@ -1655,6 +1655,18 @@ "old": {"townhall:village": "yes"}, "replace": {"amenity": "townhall", "townhall:type": "village"} }, + { + "old": {"transformer": "auto"}, + "replace": {"transformer": "yes", "windings:auto": "yes"} + }, + { + "old": {"transformer": "minor_distribution"}, + "replace": {"transformer": "distribution"} + }, + { + "old": {"transformer": "traction"}, + "replace": {"transformer": "main"} + }, { "old": {"tunnel": "1"}, "replace": {"tunnel": "yes"} @@ -1747,6 +1759,22 @@ "old": {"volcano": "extinct"}, "replace": {"volcano:status": "extinct"} }, + { + "old": {"voltage-high": "*", "transformer":"generator"}, + "replace": {"voltage:secondary":"$1", "transformer":"generator"} + }, + { + "old": {"voltage-low": "*", "transformer":"generator"}, + "replace": {"voltage:primary":"$1", "transformer":"generator"} + }, + { + "old": {"voltage-high": "*"}, + "replace": {"voltage:primary":"$1"} + }, + { + "old": {"voltage-low": "*"}, + "replace": {"voltage:secondary":"$1"} + }, { "old": {"wall_type": "noise_barrier"}, "replace": {"wall": "noise_barrier"} diff --git a/data/fields/transformer.json b/data/fields/transformer.json index 59f92c408..b5a873669 100644 --- a/data/fields/transformer.json +++ b/data/fields/transformer.json @@ -4,14 +4,13 @@ "label": "Type", "strings": { "options": { - "distribution": "Distribution", - "generator": "Generator", - "converter": "Converter", - "traction": "Traction", - "auto": "Autotransformer", - "phase_angle_regulator": "Phase Angle Regulator", - "auxiliary": "Auxiliary", - "yes": "Unknown" + "main": "Forwards power", + "distribution": "Feeds final consumers, installed outside substations", + "generator": "Steps-up voltage in power plants", + "converter": "Feeds power converters", + "phase_angle_regulator": "Regulates phase angle", + "auxiliary": "Feeds internal systems in substations", + "yes": "Unknown role" } }, "autoSuggestions": false, diff --git a/data/fields/windings/auto.json b/data/fields/windings/auto.json new file mode 100644 index 000000000..1d187008f --- /dev/null +++ b/data/fields/windings/auto.json @@ -0,0 +1,12 @@ +{ + "key": "windings:auto", + "type": "check", + "label": "Autotransformer", + "strings": { + "options": { + "undefined": "Assumed to be No", + "yes": "Yes", + "no": "No" + } + } +} diff --git a/data/preset_categories/utility.json b/data/preset_categories/utility.json index 215e331fb..c8636a3f3 100644 --- a/data/preset_categories/utility.json +++ b/data/preset_categories/utility.json @@ -5,6 +5,10 @@ "power/line", "power/minor_line", "man_made/pipeline", - "power/cable/underground" + "power/cable", + "power/generator", + "power/plant", + "power/switch", + "power/transformer" ] } diff --git a/data/presets/_power.json b/data/presets/_power.json index 8804d576a..c656b8617 100644 --- a/data/presets/_power.json +++ b/data/presets/_power.json @@ -10,10 +10,8 @@ "power": "*" }, "fields": [ - "power" - ], - "moreFields": [ - "material" + "power", + "operator" ], "searchable": false, "name": "Power Feature" diff --git a/data/presets/power/transformer.json b/data/presets/power/transformer.json index bc7ca590a..f5dabf814 100644 --- a/data/presets/power/transformer.json +++ b/data/presets/power/transformer.json @@ -16,7 +16,8 @@ "voltage/secondary", "voltage/tertiary", "windings", - "windings/configuration" + "windings/configuration", + "windings/auto" ], "geometry": [ "point", diff --git a/interim/source_strings.yaml b/interim/source_strings.yaml index df311c5eb..b34addd22 100644 --- a/interim/source_strings.yaml +++ b/interim/source_strings.yaml @@ -3339,20 +3339,20 @@ en: # transformer=* label: Type options: - # transformer=auto - auto: Autotransformer # transformer=auxiliary auxiliary: Auxiliary + # transformer=compensator + compensator: Compensation feed # transformer=converter converter: Converter # transformer=distribution distribution: Distribution # transformer=generator generator: Generator + # transformer=main + main: Main # transformer=phase_angle_regulator phase_angle_regulator: Phase Angle Regulator - # transformer=traction - traction: Traction # transformer=yes 'yes': Unknown trees: @@ -3590,6 +3590,17 @@ en: # windings field placeholder placeholder: 1, 2, 3... terms: '[translate with synonyms or related terms for ''Windings'', separated by commas]' + windings/auto: + # windings:auto=* + label: Auto-transformer + options: + # windings:auto=no + 'no': 'No' + # windings:auto=undefined + undefined: Assumed to be No + # windings:auto=yes + 'yes': 'Yes' + terms: '[translate with synonyms or related terms for ''Auto-transformer'', separated by commas]' windings/configuration: # windings:configuration=* label: Windings Configuration