From 93758b7ab957a27ae64b17c7b55f0783f8dcf3be Mon Sep 17 00:00:00 2001 From: John Firebaugh Date: Fri, 9 May 2014 16:39:09 -0700 Subject: [PATCH] Add turn restriction presets --- data/presets.yaml | 14 +++++ data/presets/fields.json | 5 ++ data/presets/fields/except.json | 5 ++ data/presets/presets.json | 59 ++++++++++++++++++- data/presets/presets/type/restriction.json | 3 +- .../type/restriction/no_left_turn.json | 14 +++++ .../type/restriction/no_right_turn.json | 14 +++++ .../type/restriction/no_straight_on.json | 14 +++++ .../presets/type/restriction/no_u_turn.json | 14 +++++ dist/locales/en.json | 19 ++++++ 10 files changed, 159 insertions(+), 2 deletions(-) create mode 100644 data/presets/fields/except.json create mode 100644 data/presets/presets/type/restriction/no_left_turn.json create mode 100644 data/presets/presets/type/restriction/no_right_turn.json create mode 100644 data/presets/presets/type/restriction/no_straight_on.json create mode 100644 data/presets/presets/type/restriction/no_u_turn.json diff --git a/data/presets.yaml b/data/presets.yaml index ceb5a3dba..1c661f7e4 100644 --- a/data/presets.yaml +++ b/data/presets.yaml @@ -138,6 +138,8 @@ en: label: Emergency entrance: label: Type + except: + label: Exceptions fax: label: Fax placeholder: +31 42 123 4567 @@ -1788,6 +1790,18 @@ en: type/restriction: name: Restriction terms: "" + type/restriction/no_left_turn: + name: No Left Turn + terms: "" + type/restriction/no_right_turn: + name: No Right Turn + terms: "" + type/restriction/no_straight_on: + name: No Straight On + terms: "" + type/restriction/no_u_turn: + name: No U Turn + terms: "" type/route: name: Route terms: "" diff --git a/data/presets/fields.json b/data/presets/fields.json index 65545df54..c25b151e9 100644 --- a/data/presets/fields.json +++ b/data/presets/fields.json @@ -320,6 +320,11 @@ "type": "typeCombo", "label": "Type" }, + "except": { + "key": "except", + "type": "combo", + "label": "Exceptions" + }, "fax": { "key": "fax", "type": "tel", diff --git a/data/presets/fields/except.json b/data/presets/fields/except.json new file mode 100644 index 000000000..38458d088 --- /dev/null +++ b/data/presets/fields/except.json @@ -0,0 +1,5 @@ +{ + "key": "except", + "type": "combo", + "label": "Exceptions" +} \ No newline at end of file diff --git a/data/presets/presets.json b/data/presets/presets.json index db8be2222..407d0418b 100644 --- a/data/presets/presets.json +++ b/data/presets/presets.json @@ -7964,9 +7964,66 @@ "name": "Restriction", "icon": "restriction", "fields": [ - "restriction" + "restriction", + "except" ] }, + "type/restriction/no_left_turn": { + "name": "No Left Turn", + "geometry": [ + "relation" + ], + "tags": { + "type": "restriction", + "restriction": "no_left_turn" + }, + "fields": [ + "except" + ], + "icon": "restriction" + }, + "type/restriction/no_right_turn": { + "name": "No Right Turn", + "geometry": [ + "relation" + ], + "tags": { + "type": "restriction", + "restriction": "no_right_turn" + }, + "fields": [ + "except" + ], + "icon": "restriction" + }, + "type/restriction/no_straight_on": { + "name": "No Straight On", + "geometry": [ + "relation" + ], + "tags": { + "type": "restriction", + "restriction": "no_straight_on" + }, + "fields": [ + "except" + ], + "icon": "restriction" + }, + "type/restriction/no_u_turn": { + "name": "No U Turn", + "geometry": [ + "relation" + ], + "tags": { + "type": "restriction", + "restriction": "no_u_turn" + }, + "fields": [ + "except" + ], + "icon": "restriction" + }, "type/route": { "geometry": [ "relation" diff --git a/data/presets/presets/type/restriction.json b/data/presets/presets/type/restriction.json index 416a0add1..3ebf5e58a 100644 --- a/data/presets/presets/type/restriction.json +++ b/data/presets/presets/type/restriction.json @@ -8,6 +8,7 @@ "name": "Restriction", "icon": "restriction", "fields": [ - "restriction" + "restriction", + "except" ] } \ No newline at end of file diff --git a/data/presets/presets/type/restriction/no_left_turn.json b/data/presets/presets/type/restriction/no_left_turn.json new file mode 100644 index 000000000..aa9bcaf95 --- /dev/null +++ b/data/presets/presets/type/restriction/no_left_turn.json @@ -0,0 +1,14 @@ +{ + "name": "No Left Turn", + "geometry": [ + "relation" + ], + "tags": { + "type": "restriction", + "restriction": "no_left_turn" + }, + "fields": [ + "except" + ], + "icon": "restriction" +} diff --git a/data/presets/presets/type/restriction/no_right_turn.json b/data/presets/presets/type/restriction/no_right_turn.json new file mode 100644 index 000000000..cb0f6698c --- /dev/null +++ b/data/presets/presets/type/restriction/no_right_turn.json @@ -0,0 +1,14 @@ +{ + "name": "No Right Turn", + "geometry": [ + "relation" + ], + "tags": { + "type": "restriction", + "restriction": "no_right_turn" + }, + "fields": [ + "except" + ], + "icon": "restriction" +} diff --git a/data/presets/presets/type/restriction/no_straight_on.json b/data/presets/presets/type/restriction/no_straight_on.json new file mode 100644 index 000000000..fe2927d79 --- /dev/null +++ b/data/presets/presets/type/restriction/no_straight_on.json @@ -0,0 +1,14 @@ +{ + "name": "No Straight On", + "geometry": [ + "relation" + ], + "tags": { + "type": "restriction", + "restriction": "no_straight_on" + }, + "fields": [ + "except" + ], + "icon": "restriction" +} diff --git a/data/presets/presets/type/restriction/no_u_turn.json b/data/presets/presets/type/restriction/no_u_turn.json new file mode 100644 index 000000000..6f1f40cd3 --- /dev/null +++ b/data/presets/presets/type/restriction/no_u_turn.json @@ -0,0 +1,14 @@ +{ + "name": "No U Turn", + "geometry": [ + "relation" + ], + "tags": { + "type": "restriction", + "restriction": "no_u_turn" + }, + "fields": [ + "except" + ], + "icon": "restriction" +} diff --git a/dist/locales/en.json b/dist/locales/en.json index ae9659154..8fff93692 100644 --- a/dist/locales/en.json +++ b/dist/locales/en.json @@ -598,6 +598,9 @@ "entrance": { "label": "Type" }, + "except": { + "label": "Exceptions" + }, "fax": { "label": "Fax", "placeholder": "+31 42 123 4567" @@ -2825,6 +2828,22 @@ "name": "Restriction", "terms": "" }, + "type/restriction/no_left_turn": { + "name": "No Left Turn", + "terms": "" + }, + "type/restriction/no_right_turn": { + "name": "No Right Turn", + "terms": "" + }, + "type/restriction/no_straight_on": { + "name": "No Straight On", + "terms": "" + }, + "type/restriction/no_u_turn": { + "name": "No U Turn", + "terms": "" + }, "type/route": { "name": "Route", "terms": ""