From 6dfdec06ad0e3b64b0f47799bdad4bb05d3712ed Mon Sep 17 00:00:00 2001 From: Bryan Housel Date: Mon, 4 Nov 2019 10:53:36 -0500 Subject: [PATCH] Ignore `junction` in areaKeys code and remove the unsearchable presets (closes #6933) We should not be adding unsearchable junction presets for every kind of junction as a hacky workaround to let `junction=yes` be an area. This should remove the special treatment of junction tag. * `junction=*` will not be treated as an area by default * `junction=*` will not trigger validator warnings that they should be closed * `junction=yes` mapped as an area _will_ need an `area=yes` now, which iD will add (afaik this is the only junction tag that should be treated as an area) --- data/presets.yaml | 9 --------- data/presets/presets.json | 3 --- data/presets/presets/junction/_circular.json | 14 -------------- data/presets/presets/junction/_jughandle.json | 13 ------------- data/presets/presets/junction/_roundabout.json | 14 -------------- data/taginfo.json | 6 +++--- dist/locales/en.json | 9 --------- modules/presets/index.js | 2 +- 8 files changed, 4 insertions(+), 66 deletions(-) delete mode 100644 data/presets/presets/junction/_circular.json delete mode 100644 data/presets/presets/junction/_jughandle.json delete mode 100644 data/presets/presets/junction/_roundabout.json diff --git a/data/presets.yaml b/data/presets.yaml index 29c8fd6ca..ed56e425c 100644 --- a/data/presets.yaml +++ b/data/presets.yaml @@ -5174,15 +5174,6 @@ en: # junction=yes name: Junction terms: '' - junction/circular: - # junction=circular - name: Traffic Circle - junction/jughandle: - # junction=jughandle - name: Jughandle - junction/roundabout: - # junction=roundabout - name: Roundabout landuse: # landuse=* name: Land Use diff --git a/data/presets/presets.json b/data/presets/presets.json index b555c5f63..00376aead 100644 --- a/data/presets/presets.json +++ b/data/presets/presets.json @@ -582,9 +582,6 @@ "indoor/wall": {"icon": "temaki-wall", "fields": ["level", "height"], "geometry": ["line"], "tags": {"indoor": "wall"}, "terms": ["indoor barrier", "room divider", "room partition"], "name": "Indoor Wall"}, "internet_access/wlan": {"icon": "fas-wifi", "geometry": ["point", "area"], "fields": ["internet_access/ssid", "internet_access/fee"], "moreFields": ["level"], "terms": ["wi-fi", "wifi", "hotspot"], "tags": {"internet_access": "wlan"}, "matchScore": 0.25, "name": "Wi-Fi Hotspot"}, "junction": {"icon": "temaki-junction", "fields": ["name"], "geometry": ["vertex", "area"], "tags": {"junction": "yes"}, "name": "Junction"}, - "junction/circular": {"geometry": ["vertex", "line"], "fields": ["name"], "tags": {"junction": "circular"}, "name": "Traffic Circle", "searchable": false}, - "junction/jughandle": {"geometry": ["line"], "fields": ["name"], "tags": {"junction": "jughandle"}, "name": "Jughandle", "searchable": false}, - "junction/roundabout": {"geometry": ["vertex", "line"], "fields": ["name"], "tags": {"junction": "roundabout"}, "name": "Roundabout", "searchable": false}, "landuse/basin": {"icon": "maki-water", "fields": ["name", "basin", "intermittent_yes"], "geometry": ["area"], "tags": {"landuse": "basin"}, "name": "Basin", "searchable": false}, "landuse/farm": {"icon": "maki-farm", "fields": ["name", "operator", "crop"], "geometry": ["point", "area"], "tags": {"landuse": "farm"}, "name": "Farmland", "searchable": false}, "landuse/pond": {"icon": "maki-water", "fields": ["name", "intermittent"], "geometry": ["area"], "tags": {"landuse": "pond"}, "name": "Pond", "searchable": false}, diff --git a/data/presets/presets/junction/_circular.json b/data/presets/presets/junction/_circular.json deleted file mode 100644 index 19c6d911c..000000000 --- a/data/presets/presets/junction/_circular.json +++ /dev/null @@ -1,14 +0,0 @@ -{ - "geometry": [ - "vertex", - "line" - ], - "fields": [ - "name" - ], - "tags": { - "junction": "circular" - }, - "name": "Traffic Circle", - "searchable": false -} diff --git a/data/presets/presets/junction/_jughandle.json b/data/presets/presets/junction/_jughandle.json deleted file mode 100644 index 6e2bf50a3..000000000 --- a/data/presets/presets/junction/_jughandle.json +++ /dev/null @@ -1,13 +0,0 @@ -{ - "geometry": [ - "line" - ], - "fields": [ - "name" - ], - "tags": { - "junction": "jughandle" - }, - "name": "Jughandle", - "searchable": false -} diff --git a/data/presets/presets/junction/_roundabout.json b/data/presets/presets/junction/_roundabout.json deleted file mode 100644 index 96c99d4e9..000000000 --- a/data/presets/presets/junction/_roundabout.json +++ /dev/null @@ -1,14 +0,0 @@ -{ - "geometry": [ - "vertex", - "line" - ], - "fields": [ - "name" - ], - "tags": { - "junction": "roundabout" - }, - "name": "Roundabout", - "searchable": false -} diff --git a/data/taginfo.json b/data/taginfo.json index e3a896dca..7690b3688 100644 --- a/data/taginfo.json +++ b/data/taginfo.json @@ -564,9 +564,6 @@ {"key": "indoor", "value": "wall", "description": "🄿 Indoor Wall", "object_types": ["way"], "icon_url": "https://cdn.jsdelivr.net/gh/bhousel/temaki/icons/wall.svg"}, {"key": "internet_access", "value": "wlan", "description": "🄿 Wi-Fi Hotspot, 🄵 Internet Access", "object_types": ["node", "area"], "icon_url": "https://cdn.jsdelivr.net/gh/openstreetmap/iD@master/svg/fontawesome/fas-wifi.svg"}, {"key": "junction", "value": "yes", "description": "🄿 Junction", "object_types": ["node", "area"], "icon_url": "https://cdn.jsdelivr.net/gh/bhousel/temaki/icons/junction.svg"}, - {"key": "junction", "value": "circular", "description": "🄿 Traffic Circle (unsearchable), 🄵 Junction", "object_types": ["node", "way"]}, - {"key": "junction", "value": "jughandle", "description": "🄿 Jughandle (unsearchable), 🄵 Junction", "object_types": ["way"]}, - {"key": "junction", "value": "roundabout", "description": "🄿 Roundabout (unsearchable), 🄵 Junction", "object_types": ["node", "way"]}, {"key": "landuse", "value": "basin", "description": "🄿 Basin (unsearchable), 🄳 ➜ natural=water + water=basin", "object_types": ["area"], "icon_url": "https://cdn.jsdelivr.net/gh/mapbox/maki/icons/water-15.svg"}, {"key": "landuse", "value": "farm", "description": "🄿 Farmland (unsearchable), 🄳 ➜ landuse=farmland", "object_types": ["node", "area"], "icon_url": "https://cdn.jsdelivr.net/gh/mapbox/maki/icons/farm-15.svg"}, {"key": "landuse", "value": "pond", "description": "🄿 Pond (unsearchable), 🄳 ➜ natural=water + water=pond", "object_types": ["area"], "icon_url": "https://cdn.jsdelivr.net/gh/mapbox/maki/icons/water-15.svg"}, @@ -1501,6 +1498,9 @@ {"key": "internet_access:fee", "description": "🄵 Internet Access Fee"}, {"key": "internet_access:ssid", "description": "🄵 Wifi Network Name"}, {"key": "interval", "description": "🄵 Interval"}, + {"key": "junction", "value": "roundabout", "description": "🄵 Junction"}, + {"key": "junction", "value": "circular", "description": "🄵 Junction"}, + {"key": "junction", "value": "jughandle", "description": "🄵 Junction"}, {"key": "junction:ref", "description": "🄵 Junction Number"}, {"key": "kerb", "description": "🄵 Curb"}, {"key": "kerb:height", "description": "🄵 Height"}, diff --git a/dist/locales/en.json b/dist/locales/en.json index 9e871b83b..4001f7bab 100644 --- a/dist/locales/en.json +++ b/dist/locales/en.json @@ -6912,15 +6912,6 @@ "name": "Junction", "terms": "" }, - "junction/circular": { - "name": "Traffic Circle" - }, - "junction/jughandle": { - "name": "Jughandle" - }, - "junction/roundabout": { - "name": "Roundabout" - }, "landuse/basin": { "name": "Basin" }, diff --git a/modules/presets/index.js b/modules/presets/index.js index 03cb31e8a..df6b8dc72 100644 --- a/modules/presets/index.js +++ b/modules/presets/index.js @@ -114,7 +114,7 @@ export function presetIndex(context) { // and the subkeys form the blacklist. all.areaKeys = function() { var areaKeys = {}; - var ignore = ['barrier', 'highway', 'footway', 'railway', 'type']; // probably a line.. + var ignore = ['barrier', 'highway', 'footway', 'railway', 'junction', 'type']; // probably a line.. // ignore name-suggestion-index and deprecated presets var presets = all.collection.filter(function(p) {