From f2cde0bfef0f9190e342c5612107d8835a10984c Mon Sep 17 00:00:00 2001 From: Bryan Housel Date: Mon, 6 Jun 2016 20:45:14 -0400 Subject: [PATCH 01/18] Limit number of pages to fetch from Mapillary search API (closes #3149) --- js/id/services/mapillary.js | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/js/id/services/mapillary.js b/js/id/services/mapillary.js index 68e926a0b..1506c385c 100644 --- a/js/id/services/mapillary.js +++ b/js/id/services/mapillary.js @@ -6,6 +6,7 @@ iD.services.mapillary = function() { viewerjs = 'https://npmcdn.com/mapillary-js@1.3.0/dist/mapillary-js.min.js', clientId = 'NzNRM2otQkR2SHJzaXJmNmdQWVQ0dzo1ZWYyMmYwNjdmNDdlNmVi', maxResults = 1000, + maxPages = 10, tileZoom = 14; @@ -185,6 +186,7 @@ iD.services.mapillary = function() { if (err || !data.features || !data.features.length) return; var features = [], + nextPage = page + 1, feature, loc, d; for (var i = 0; i < data.features.length; i++) { @@ -202,8 +204,8 @@ iD.services.mapillary = function() { if (which === 'images') dispatch.loadedImages(); if (which === 'signs') dispatch.loadedSigns(); - if (data.features.length === maxResults) { - loadTilePage(which, url, tile, ++page); + if (data.features.length === maxResults && nextPage < maxPages) { + loadTilePage(which, url, tile, nextPage); } } ); From 8a99e3de7e39fc66996d7127026180b526aa6fd3 Mon Sep 17 00:00:00 2001 From: Bryan Housel Date: Tue, 7 Jun 2016 12:56:06 -0400 Subject: [PATCH 02/18] Transifex API is now https --- data/update_locales.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/data/update_locales.js b/data/update_locales.js index c6fbeb3ad..5e308cc0f 100644 --- a/data/update_locales.js +++ b/data/update_locales.js @@ -7,7 +7,7 @@ var request = require('request'), var resources = ['core', 'presets']; var outdir = './dist/locales/'; -var api = 'http://www.transifex.com/api/2/'; +var api = 'https://www.transifex.com/api/2/'; var project = api + 'project/id-editor/'; /* From 8a578fc1d8310934906e3662870e3e889f69509f Mon Sep 17 00:00:00 2001 From: Bryan Housel Date: Tue, 7 Jun 2016 14:41:33 -0400 Subject: [PATCH 03/18] Slow down Transifex per: http://docs.transifex.com/api/#api-rate-limits Rackspace seems to rate limit GET requests to 5/sec --- data/update_locales.js | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/data/update_locales.js b/data/update_locales.js index 5e308cc0f..10f7c80d7 100644 --- a/data/update_locales.js +++ b/data/update_locales.js @@ -1,6 +1,6 @@ /* Downloads the latest translations from Transifex */ -var request = require('request'), +var request = require('request').defaults({maxSockets: 1}), yaml = require('js-yaml'), fs = require('fs'), _ = require('../js/lib/lodash.js'); @@ -10,6 +10,7 @@ var outdir = './dist/locales/'; var api = 'https://www.transifex.com/api/2/'; var project = api + 'project/id-editor/'; + /* * Transifex oddly doesn't allow anonymous downloading * @@ -67,18 +68,20 @@ function getLanguage(resource) { code = code.replace(/-/g, '_'); var url = resource + 'translation/' + code; if (code === 'vi') url += '?mode=reviewed'; - request.get(url, { auth : auth }, - function(err, resp, body) { + request.get(url, { auth : auth }, function(err, resp, body) { if (err) return callback(err); + console.log(resp.statusCode + ': ' + url); callback(null, yaml.load(JSON.parse(body).content)[code]); }); }; } function getLanguages(resource, callback) { - request.get(resource + '?details', { auth: auth }, + var url = resource + '?details'; + request.get(url, { auth: auth }, function(err, resp, body) { if (err) return callback(err); + console.log(resp.statusCode + ': ' + url); callback(null, JSON.parse(body).available_languages.map(function(d) { return d.code.replace(/_/g, '-'); }).filter(function(d) { From e0dac9457de5b3f153517410d80c6787854b75f8 Mon Sep 17 00:00:00 2001 From: Bryan Housel Date: Tue, 7 Jun 2016 14:42:55 -0400 Subject: [PATCH 04/18] make translations --- dist/locales/ar.json | 1 - dist/locales/bg-BG.json | 3 -- dist/locales/ca.json | 12 ++++++- dist/locales/cs.json | 2 +- dist/locales/da.json | 9 ++++- dist/locales/de.json | 6 ++-- dist/locales/en-GB.json | 1 - dist/locales/es.json | 2 +- dist/locales/fi.json | 1 - dist/locales/fr.json | 13 ++++--- dist/locales/hr.json | 2 +- dist/locales/hu.json | 2 +- dist/locales/it.json | 2 +- dist/locales/ja.json | 78 ++++++++++++++++++++--------------------- dist/locales/ko.json | 7 +++- dist/locales/nl.json | 8 ++--- dist/locales/pl.json | 52 +++++++++++++++++---------- dist/locales/pt-BR.json | 39 +++++++++++++++++++-- dist/locales/pt.json | 26 +++++++++++--- dist/locales/ru.json | 1 - dist/locales/sv.json | 2 +- dist/locales/uk.json | 1 - dist/locales/vi.json | 2 +- dist/locales/zh-HK.json | 1 - dist/locales/zh-TW.json | 28 +++++++-------- 25 files changed, 190 insertions(+), 111 deletions(-) diff --git a/dist/locales/ar.json b/dist/locales/ar.json index 52688da3c..46d3d7264 100644 --- a/dist/locales/ar.json +++ b/dist/locales/ar.json @@ -420,7 +420,6 @@ "title": "صورة الخلفية من خدمة (Mapillary)" }, "mapillary_signs": { - "tooltip": "معلومات اشارات المرور من خدمة Mapillary", "title": "صورة الخلفية لاشارات المرور من خدمة (Mapillary)" }, "mapillary": { diff --git a/dist/locales/bg-BG.json b/dist/locales/bg-BG.json index a770b6d04..ab15ffab1 100644 --- a/dist/locales/bg-BG.json +++ b/dist/locales/bg-BG.json @@ -475,9 +475,6 @@ "mapillary_images": { "tooltip": "Снимки за ниво на улицата от Mapillary" }, - "mapillary_signs": { - "tooltip": "Пътни знаци от Mapillary" - }, "mapillary": { "view_on_mapillary": "Вижте тази снимка на Mapillary" }, diff --git a/dist/locales/ca.json b/dist/locales/ca.json index 6ca07e33d..c05332875 100644 --- a/dist/locales/ca.json +++ b/dist/locales/ca.json @@ -330,6 +330,7 @@ "percent_brightness": "{opacity}% brillantor", "none": "Cap", "best_imagery": "Font d'imatgeria millor coneguda per a aquesta ubicació", + "switch": "Senyals de trànsit ", "custom": "Personalitzar", "custom_button": "Editar el fons personalitzat", "custom_prompt": "Introduïu una plantilla d'URL de casella. Els paràmetres vàlids són {z}, {x}, {y} per a l'esquema Z/X/Y i {u} per a l'esquema quadtile.", @@ -511,7 +512,7 @@ "title": "Superposició de fotos (Mapillary)" }, "mapillary_signs": { - "tooltip": "Senyals de Trànsit de Mapillary", + "tooltip": "Senyals de trànsit de Mapillary (cal activar la capa de fotografies).", "title": "Superposició de Senyals de Trànsit (Mapillary)" }, "mapillary": { @@ -612,6 +613,9 @@ }, "presets": { "categories": { + "category-barrier": { + "name": "Característiques de Barrera" + }, "category-building": { "name": "Característiques d'Edificació" }, @@ -1935,6 +1939,9 @@ "name": "Barrera per a ciclistes", "terms": "Barrera per a ciclistes, Ciclisme, Bicicleta, Ruta cicloturista, Valla, Tanca, Tancament, Tanca per a bicicletes" }, + "barrier/ditch": { + "name": "Trinxera" + }, "barrier/entrance": { "name": "Entrada", "terms": "Entrada, Porta, Portes, Portalada, Accés" @@ -3597,6 +3604,9 @@ "type/route/hiking": { "name": "Ruta senderista" }, + "type/route/horse": { + "name": "Ruta de conducció" + }, "type/route/pipeline": { "name": "Traçat d'una canonada" }, diff --git a/dist/locales/cs.json b/dist/locales/cs.json index 93c02e4ef..2dbad3909 100644 --- a/dist/locales/cs.json +++ b/dist/locales/cs.json @@ -512,7 +512,7 @@ "title": "Vrstva fotografií (Mapillary)" }, "mapillary_signs": { - "tooltip": "Dopravní značky z Mapillary", + "tooltip": "Dopravní značky z Mapillary (nutné povolit Vrstvu fotografií)", "title": "Vrstva dopravních značek (Mapillary)" }, "mapillary": { diff --git a/dist/locales/da.json b/dist/locales/da.json index ac78d36fc..1f832e7e4 100644 --- a/dist/locales/da.json +++ b/dist/locales/da.json @@ -512,7 +512,7 @@ "title": "Billedelag (Mapillary)" }, "mapillary_signs": { - "tooltip": "Trafikskilte fra Mapillary", + "tooltip": "Trafikskilte fra Mapillary (fotolag skal være slået til)", "title": "Trafikskiltelag (Mapillary)" }, "mapillary": { @@ -613,6 +613,9 @@ }, "presets": { "categories": { + "category-barrier": { + "name": "Barrierer objekter" + }, "category-building": { "name": "Bygningsegenskaber" }, @@ -1998,6 +2001,10 @@ "name": "Cykelbarriere", "terms": "Cykelbarriere" }, + "barrier/ditch": { + "name": "Grøft", + "terms": "Grøft" + }, "barrier/entrance": { "name": "Indgang", "terms": "Indgang, Indgangsparti" diff --git a/dist/locales/de.json b/dist/locales/de.json index b47ada15b..ce29c6c90 100644 --- a/dist/locales/de.json +++ b/dist/locales/de.json @@ -512,7 +512,7 @@ "title": "Photo-Überlagerung (Mapillary)" }, "mapillary_signs": { - "tooltip": "Verkehrszeichen von Mapillary", + "tooltip": "Verkehrsschilder von Mapillary (bei aktivierter Fotoebene)", "title": "Verkehrszeichen-Überlagerung (Mapillary)" }, "mapillary": { @@ -1742,8 +1742,8 @@ "terms": "Tankstelle, Tanke" }, "amenity/grave_yard": { - "name": "Friedhof", - "terms": "Friedhof" + "name": "Gräberfeld", + "terms": "Gräberfeld, kleiner Friedhof" }, "amenity/grit_bin": { "name": "Streugutkiste", diff --git a/dist/locales/en-GB.json b/dist/locales/en-GB.json index b6393f49e..5d48cdf61 100644 --- a/dist/locales/en-GB.json +++ b/dist/locales/en-GB.json @@ -512,7 +512,6 @@ "title": "Photo Overlay (Mapillary)" }, "mapillary_signs": { - "tooltip": "Traffic signs from Mapillary", "title": "Traffic Sign Overlay (Mapillary)" }, "mapillary": { diff --git a/dist/locales/es.json b/dist/locales/es.json index e2769655b..41f57aacc 100644 --- a/dist/locales/es.json +++ b/dist/locales/es.json @@ -512,7 +512,7 @@ "title": "Superposición de fotos (Mapillary)" }, "mapillary_signs": { - "tooltip": "Señales de tráfico de Mapillary", + "tooltip": "Señales de tráfico de Mapillary (debe permitir superposición de fotos)", "title": "Superposición de señal de tráfico (Mapillary)" }, "mapillary": { diff --git a/dist/locales/fi.json b/dist/locales/fi.json index bc6cec5f8..e9976d6f4 100644 --- a/dist/locales/fi.json +++ b/dist/locales/fi.json @@ -497,7 +497,6 @@ "title": "Valokuvat kartalla (Mapillary)" }, "mapillary_signs": { - "tooltip": "Liikennemerkit (Mapillary)", "title": "Liikennemerkit kartalla (Mapillary)" }, "mapillary": { diff --git a/dist/locales/fr.json b/dist/locales/fr.json index c7fe10eb2..8c39c2035 100644 --- a/dist/locales/fr.json +++ b/dist/locales/fr.json @@ -512,7 +512,6 @@ "title": "Surcouche photo (Mapillary)" }, "mapillary_signs": { - "tooltip": "Signaux routiers de Mapillary", "title": "Surcouche de signaux routiers (Mapillary)" }, "mapillary": { @@ -2055,7 +2054,7 @@ }, "building/apartments": { "name": "Résidence", - "terms": "Appartements" + "terms": "appartements" }, "building/barn": { "name": "Grange", @@ -2122,8 +2121,8 @@ "terms": "Hôpital, Clinique" }, "building/hotel": { - "name": "Hôtel", - "terms": "Hôtel" + "name": "Bâtiment d'hôtel", + "terms": "hôtel,hotel" }, "building/house": { "name": "Maison", @@ -2850,8 +2849,8 @@ "terms": "Piste de course à pied" }, "leisure/slipway": { - "name": "Plan incliné", - "terms": "Cale de lancement, Cale, Cale de mise à l'eau" + "name": "Mise à l'eau", + "terms": "Cale de lancement, Cale, Cale de mise à l'eau, Rampe de mise à l'eau" }, "leisure/sports_centre": { "name": "Centre sportif / Salle de gymnastique", @@ -3851,7 +3850,7 @@ }, "tourism/hotel": { "name": "Hôtel", - "terms": "Hôtel" + "terms": "bâtiment d'hôtel,hotel" }, "tourism/information": { "name": "Informations", diff --git a/dist/locales/hr.json b/dist/locales/hr.json index a846df799..622811a46 100644 --- a/dist/locales/hr.json +++ b/dist/locales/hr.json @@ -512,7 +512,7 @@ "title": "Foto preklop (Mapillary)" }, "mapillary_signs": { - "tooltip": "Prometni znakovi s Mapillary servisa", + "tooltip": "Prometni znakovi s Mapillary servisa (mora biti uključen foto preklop)", "title": "Preklop prometnih znakova (Mapillary)" }, "mapillary": { diff --git a/dist/locales/hu.json b/dist/locales/hu.json index 7d2dc9314..e4ef2df11 100644 --- a/dist/locales/hu.json +++ b/dist/locales/hu.json @@ -512,7 +512,7 @@ "title": "Fotó réteg (Mapillary)" }, "mapillary_signs": { - "tooltip": "Közlekedési táblák a Mapillary-ből", + "tooltip": "Közlekedési táblák a Mapillaryről (be kell kapcsolni a fotó réteget)", "title": "Közlekedési tábla réteg (Mapillary)" }, "mapillary": { diff --git a/dist/locales/it.json b/dist/locales/it.json index a9b5e78ca..70a788606 100644 --- a/dist/locales/it.json +++ b/dist/locales/it.json @@ -512,7 +512,7 @@ "title": "Livello Foto (Mapillary)" }, "mapillary_signs": { - "tooltip": "Segnali stradali da Mapillary", + "tooltip": "Segnali stradali da Mapillary (necessita attivazione Livello Foto)", "title": "Livello Segnali Stradali (Mapillary)" }, "mapillary": { diff --git a/dist/locales/ja.json b/dist/locales/ja.json index 4382e15ad..38387a4b9 100644 --- a/dist/locales/ja.json +++ b/dist/locales/ja.json @@ -287,7 +287,8 @@ "no_results_worldwide": "検索結果がありません" }, "geolocate": { - "title": "編集画面を現在地へ移動" + "title": "編集画面を現在地へ移動", + "locating": "位置情報を取得中です。しばらくお待ちください。" }, "inspector": { "no_documentation_combination": "このタグの組み合わせに関する解説はありません", @@ -356,6 +357,7 @@ "tooltip": "地点情報" }, "traffic_roads": { + "description": "公道", "tooltip": "道路、街路など" }, "service_roads": { @@ -363,7 +365,7 @@ "tooltip": "私道、駐車場内経路、農道など" }, "paths": { - "description": "山道", + "description": "歩道・小道", "tooltip": "歩道、自転車道など" }, "buildings": { @@ -510,7 +512,6 @@ "title": "写真の重ね合わせ (Mapillary)" }, "mapillary_signs": { - "tooltip": "Mapillary から交通標識を取得します", "title": "交通標識の重ね合わせ (Mapillary)" }, "mapillary": { @@ -611,6 +612,9 @@ }, "presets": { "categories": { + "category-barrier": { + "name": "障害物" + }, "category-building": { "name": "建物" }, @@ -935,9 +939,6 @@ "entrance": { "label": "タイプ" }, - "except": { - "label": "例外" - }, "fax": { "label": "FAX", "placeholder": "+31 42 123 4567" @@ -1280,9 +1281,6 @@ "restriction": { "label": "タイプ" }, - "restrictions": { - "label": "進行方向制限" - }, "route": { "label": "タイプ" }, @@ -1677,7 +1675,7 @@ "terms": "時計" }, "amenity/college": { - "name": "大学の敷地", + "name": "短大・高専・専門学校の敷地", "terms": "キャンパス" }, "amenity/community_centre": { @@ -1812,6 +1810,10 @@ "name": "郵便局", "terms": "郵便局" }, + "amenity/prison": { + "name": "刑務所の敷地", + "terms": "刑務所, 刑務所の敷地, 監獄, 拘置所, 少年院" + }, "amenity/pub": { "name": "居酒屋", "terms": "パブ, 居酒屋, 焼き鳥屋" @@ -1916,6 +1918,9 @@ "name": "新聞自動販売機", "terms": "新聞, 自動販売機, 自販機" }, + "amenity/vending_machine/parcel_pickup_dropoff": { + "terms": "自動販売機, 自販機" + }, "amenity/vending_machine/parking_tickets": { "name": "パーキングチケット発給機", "terms": "パーキングチケット, パーキングメーター, 駐車券, 券売機, 自動券売機, 自動販売機, 自販機, 自動発券機, 発券機" @@ -1940,6 +1945,14 @@ "name": "ゴミ箱", "terms": "ゴミ箱, ごみ箱" }, + "amenity/waste_disposal": { + "name": "ゴミ収集ボックス", + "terms": "ゴミステーション, ゴミ集積所, ゴミ捨て場, ゴミ置き場, ゴミ, ゴミ箱, ゴミコンテナ, ゴミ回収, ダストボックス" + }, + "amenity/water_point": { + "name": "キャンピングカー用の給水施設", + "terms": "給水, 補給, 給水所, キャンピングカー, 給水塔, 飲料水, 飲水, 飲み水, キャンプ場, オートキャンプ場" + }, "area": { "name": "エリア", "terms": "エリア, 領域, 範囲" @@ -1972,6 +1985,10 @@ "name": "自転車止め", "terms": "自転車止め" }, + "barrier/ditch": { + "name": "塹壕・空堀", + "terms": "塹壕, 空堀, 堀, 溝, 谷" + }, "barrier/entrance": { "name": "出入口", "terms": "出入口" @@ -2049,8 +2066,8 @@ "terms": "教会" }, "building/college": { - "name": "大学の建物", - "terms": "大学の建物" + "name": "短大・高専・専門学校の建物", + "terms": "短大, 高専, 高等専門学校, 短期大学, 専門, 専門学校" }, "building/commercial": { "name": "オフィスビル", @@ -3337,7 +3354,8 @@ "terms": "古美術品店, アンティークショップ" }, "shop/art": { - "name": "美術品販売店" + "name": "美術品販売店", + "terms": "現代美術の商店" }, "shop/baby_goods": { "name": "赤ちゃん用品店", @@ -3424,7 +3442,8 @@ "terms": "衣料品店, 洋服店, 呉服店" }, "shop/coffee": { - "name": "コーヒー豆販売店" + "name": "コーヒー豆販売店", + "terms": "コーヒー豆専門店" }, "shop/computer": { "name": "コンピューター店", @@ -3622,6 +3641,10 @@ "name": "新聞・雑誌店", "terms": "新聞, 雑誌, マガジン, ニュース, スタンド" }, + "shop/nutrition_supplements": { + "name": "栄養サプリ販売店", + "terms": "栄養サプリメント販売店, サプリ専門店, サプリメント専門店" + }, "shop/optician": { "name": "メガネ", "terms": "メガネ, 眼鏡, メガネ屋, 眼鏡屋" @@ -3755,7 +3778,8 @@ "terms": "銃砲店" }, "shop/window_blind": { - "name": "ブラインドカーテン専門店" + "name": "ブラインドカーテン専門店", + "terms": "ブラインド販売店" }, "shop/wine": { "name": "ワイン店", @@ -3865,30 +3889,6 @@ "name": "進行方向制限", "terms": "進行方向制限" }, - "type/restriction/no_left_turn": { - "name": "左折禁止", - "terms": "左折禁止" - }, - "type/restriction/no_right_turn": { - "name": "右折禁止", - "terms": "右折禁止" - }, - "type/restriction/no_straight_on": { - "name": "直進禁止", - "terms": "直進禁止" - }, - "type/restriction/no_u_turn": { - "name": "転回禁止", - "terms": "転回禁止, Uターン禁止" - }, - "type/restriction/only_left_turn": { - "name": "左折のみ可", - "terms": "左折のみ可" - }, - "type/restriction/only_right_turn": { - "name": "右折のみ可", - "terms": "右折のみ可" - }, "type/restriction/only_straight_on": { "name": "直進のみ可", "terms": "直進のみ可" diff --git a/dist/locales/ko.json b/dist/locales/ko.json index 0f9cc99c3..0d4537575 100644 --- a/dist/locales/ko.json +++ b/dist/locales/ko.json @@ -506,7 +506,6 @@ "title": "사진 겹치기 (Mapillary)" }, "mapillary_signs": { - "tooltip": "Mapillary에서 교통 표지판", "title": "교통 표지판 겹치기 (Mapillary)" }, "mapillary": { @@ -852,6 +851,12 @@ "description": "일방 통행로에 양방향으로 이동하는 자전거 차선", "title": "역방향 통행 자전거 도로" }, + "opposite_lane": { + "description": "교통 흐름의 방향을 거슬러 향하는 자전거 전용 도로" + }, + "share_busway": { + "description": "버스 전용 차선을 겸하는 자전거 도로" + }, "track": { "title": "자전거 트랙" } diff --git a/dist/locales/nl.json b/dist/locales/nl.json index 73801a162..a5ba19072 100644 --- a/dist/locales/nl.json +++ b/dist/locales/nl.json @@ -512,7 +512,7 @@ "title": "Foto-laag (Mapillary)" }, "mapillary_signs": { - "tooltip": "Verkeerslichten uit Mapillary", + "tooltip": "Verkeerslichten uit Mapillary (foto-laag moet geactiveerd zijn)", "title": "Herkende-verkeersborden-laag (Mapillary)" }, "mapillary": { @@ -2033,7 +2033,7 @@ }, "building/apartments": { "name": "Appartementen", - "terms": "flatgebouw,flats,appartementsgebouw,wolkenkrabber,woongebouw,residentie" + "terms": "flatgebouw,flats,appartementsgebouw,wolkenkrabber,woongebouw,residentie,apartementen" }, "building/barn": { "name": "Schuur", @@ -2097,7 +2097,7 @@ }, "building/hotel": { "name": "Hotelgebouw", - "terms": "hotel" + "terms": "hotel,kamers" }, "building/house": { "name": "Huis", @@ -3632,7 +3632,7 @@ }, "tourism/hotel": { "name": "Hotel", - "terms": "hotel" + "terms": "hotelgebouw,kamers" }, "tourism/information": { "name": "Informatie", diff --git a/dist/locales/pl.json b/dist/locales/pl.json index 97d1da828..99c3b2a48 100644 --- a/dist/locales/pl.json +++ b/dist/locales/pl.json @@ -511,7 +511,6 @@ "title": "Nakładka zdjęć (Mapillary)" }, "mapillary_signs": { - "tooltip": "Znaki drogowe z serwisu Mapillary", "title": "Nakładka z znakami drogowymi (Mapillary)" }, "mapillary": { @@ -2225,7 +2224,8 @@ "name": "Tapicer" }, "craft/watchmaker": { - "name": "Zegarmistrz" + "name": "Zegarmistrz", + "terms": "zegarki" }, "craft/window_construction": { "name": "Montaż okien" @@ -2256,7 +2256,8 @@ "name": "Przejście dla pieszych" }, "footway/crosswalk": { - "name": "Przejście dla pieszych z zebrą" + "name": "Przejście dla pieszych z zebrą", + "terms": "zebra" }, "footway/sidewalk": { "name": "Chodnik", @@ -2341,7 +2342,8 @@ "terms": "rampa,wjazd,wyjazd,zjazd" }, "highway/raceway": { - "name": "Tor wyścigowy" + "name": "Tor wyścigowy", + "terms": "tor samochodowy" }, "highway/residential": { "name": "Droga lokalna", @@ -2381,7 +2383,8 @@ "name": "Dojazd dla służb ratowniczych" }, "highway/service/parking_aisle": { - "name": "Uliczka parkingowa" + "name": "Uliczka parkingowa", + "terms": "podjazd parkingowy" }, "highway/services": { "name": "Miejsce Obsługi Podróżnych (MOP)", @@ -2408,7 +2411,8 @@ "terms": "rampa,wjazd,wyjazd,zjazd" }, "highway/track": { - "name": "Droga polna lub leśna" + "name": "Droga polna lub leśna", + "terms": "trakt leśny" }, "highway/traffic_signals": { "name": "Sygnalizacja świetlna", @@ -2466,7 +2470,8 @@ "terms": "kapliczka,przydrożna" }, "junction": { - "name": "Skrzyżowanie" + "name": "Skrzyżowanie", + "terms": "krzyżówka" }, "landuse": { "name": "Zagospodarowanie terenu", @@ -2485,7 +2490,8 @@ "terms": "cmentarz" }, "landuse/churchyard": { - "name": "Dziedziniec kościelny" + "name": "Dziedziniec kościelny", + "terms": "Plac kościelny" }, "landuse/commercial": { "name": "Obszar biurowo-biznesowy" @@ -2499,7 +2505,8 @@ "terms": "ziemia uprawna,grunty rolne" }, "landuse/farmland": { - "name": "Pola uprawne" + "name": "Pola uprawne", + "terms": "Uprawy" }, "landuse/farmyard": { "name": "Teren z zabudowaniami rolniczymi", @@ -2510,14 +2517,16 @@ "terms": "Las" }, "landuse/garages": { - "name": "Garaże" + "name": "Garaże", + "terms": "garaże" }, "landuse/grass": { "name": "Trawa", "terms": "trawa, trawnik, " }, "landuse/industrial": { - "name": "Obszar przemysłowy" + "name": "Obszar przemysłowy", + "terms": "Teren przemysłowy" }, "landuse/landfill": { "name": "Wysypisko", @@ -2544,7 +2553,8 @@ "terms": "kamieniołom, żwirownia, kruszywo,kopalnia odkrywkowa" }, "landuse/residential": { - "name": "Zabudowa mieszkaniowa" + "name": "Zabudowa mieszkaniowa", + "terms": "Teren zamieszkały" }, "landuse/retail": { "name": "Obszar handlowy" @@ -2565,10 +2575,12 @@ "name": "Czatownia ornitologiczna" }, "leisure/bowling_alley": { - "name": "Kręgielnia" + "name": "Kręgielnia", + "terms": "Kręgle" }, "leisure/dog_park": { - "name": "Park dla psów" + "name": "Park dla psów", + "terms": "psi park" }, "leisure/firepit": { "name": "Miejsce na ognisko", @@ -2678,7 +2690,8 @@ "name": "Obiekty sztuczne" }, "man_made/adit": { - "name": "Sztolnia" + "name": "Sztolnia", + "terms": "Tunel kopalniany" }, "man_made/breakwater": { "name": "Falochron", @@ -2710,7 +2723,8 @@ "terms": "latarnia" }, "man_made/mast": { - "name": "Maszt radiowy" + "name": "Maszt radiowy", + "terms": "Wieża radiowa" }, "man_made/observation": { "name": "Wieża obserwacyjna", @@ -3143,7 +3157,8 @@ "terms": "alkohol" }, "shop/anime": { - "name": "Sklep z anime" + "name": "Sklep z anime", + "terms": "sklep anime" }, "shop/antiques": { "name": "Antykwariat", @@ -3258,7 +3273,8 @@ "terms": "kosmetyki,drogeria" }, "shop/craft": { - "name": "Sklep z rzemiosłem artystycznym" + "name": "Sklep z rzemiosłem artystycznym", + "terms": "rzemiosło artystyczne" }, "shop/curtain": { "name": "Sklep z zasłonami", diff --git a/dist/locales/pt-BR.json b/dist/locales/pt-BR.json index 217e1a1b3..b5fc30399 100644 --- a/dist/locales/pt-BR.json +++ b/dist/locales/pt-BR.json @@ -241,6 +241,7 @@ }, "commit": { "title": "Salvar Alterações", + "description_placeholder": "Breve descrição de suas contribuições (obrigatório)", "message_label": "Comentário para o conjunto de alterações", "upload_explanation": "As alterações que você enviar ficarão visíveis em todos os mapas que usam dados do OpenStreetMap. Atenção: NÃO é permitido copiar nomes de ruas do Google Maps, Bing, mapas impressos ou quaisquer fontes que possuam copyright.", "upload_explanation_with_user": "As alterações que você enviar como {user} estarão visíveis em todos os mapas que usam os dados do OpenStreetMap.

\nAtenção: NÃO é permitido copiar nomes de ruas do Google Maps, Bing, mapas impressos ou quaisquer fontes que possuam copyright.", @@ -315,6 +316,7 @@ "yes": "Sim", "no": "Não" }, + "add": "Adicionar", "none": "Nenhum", "node": "Ponto", "way": "Linha", @@ -328,6 +330,7 @@ "percent_brightness": "Brilho de {opacity}%", "none": "Nenhum", "best_imagery": "Melhor imagem de satélite conhecida para esta localização", + "switch": "Voltar para este fundo de tela", "custom": "Customizado", "custom_button": "Editar fundo de tela personalizado", "custom_prompt": "Informe um modelo de URL de quadrículas. Tokens válidos são {z}, {x}, {y} para o esquema Z/X/Y e {u} para o esquema quadtile.", @@ -509,7 +512,7 @@ "title": "Camada de Fotos (Mapillary)" }, "mapillary_signs": { - "tooltip": "Placas de trânsito do Mapillary", + "tooltip": "Sinais de trânsito do Mapillary (Camada de Foto deve ser habilitada)", "title": "Camada de Placas de Trânsito (Mapillary)" }, "mapillary": { @@ -610,6 +613,9 @@ }, "presets": { "categories": { + "category-barrier": { + "name": "Elementos de Barreira" + }, "category-building": { "name": "Tipos de Edificações" }, @@ -779,6 +785,9 @@ "bicycle_parking": { "label": "Tipo" }, + "bin": { + "label": "Lixeira" + }, "boundary": { "label": "Tipo" }, @@ -850,6 +859,9 @@ "cuisine": { "label": "Culinária" }, + "currency_multi": { + "label": "Tipos de Moeda" + }, "cycleway": { "label": "Ciclofaixas", "options": { @@ -953,6 +965,9 @@ "fuel": { "label": "Combustível" }, + "fuel_multi": { + "label": "Tipos de Combustível" + }, "gauge": { "label": "Bitola" }, @@ -1195,6 +1210,9 @@ "underground": "Subterrâneo" } }, + "payment_multi": { + "label": "Tipos de Pagamento" + }, "phone": { "label": "Telefone", "placeholder": "+55 11 0982 1098" @@ -1252,6 +1270,9 @@ "railway": { "label": "Tipo" }, + "recycling_accepts": { + "label": "Aceita" + }, "ref": { "label": "Código de referência" }, @@ -1573,8 +1594,8 @@ "terms": "Serviço" }, "amenity/arts_centre": { - "name": "Centro/Escola de Artes", - "terms": "Centro de Artes, Escola de Artes, Artes, Centro Artístico, Escola Artística, Teatro, Cinema, Espetáculo, Exposições" + "name": "Centro Cultural", + "terms": "Centro de Artes, Artes, Centro Artístico, Teatro, Cinema, Espetáculo, Exposições, Galeria, Exposição, Cultura, Espaço Cultural, Pintura, Artes Plásticas" }, "amenity/atm": { "name": "Caixa Eletrônico", @@ -1804,6 +1825,10 @@ "name": "Agência de Correios", "terms": "Correios, Encomendas, Transporte, Log, Cargas" }, + "amenity/prison": { + "name": "Presídio", + "terms": "Cela, Cadeia" + }, "amenity/pub": { "name": "Bar", "terms": "Pub, botequim, boteco, buteco" @@ -1976,6 +2001,10 @@ "name": "Barreira para Bicicletas", "terms": "Barreira para Bicicletas" }, + "barrier/ditch": { + "name": "Vala", + "terms": "Fosso, trincheira" + }, "barrier/entrance": { "name": "Entrada", "terms": "Entrada" @@ -3940,6 +3969,10 @@ "name": "Rota de Caminhada", "terms": "Rota de Trekking" }, + "type/route/horse": { + "name": "Rota de Equitação", + "terms": "Rota de Montaria, Trilha de Equitação" + }, "type/route/pipeline": { "name": "Rota de Tubulação", "terms": "Rota de Tubulação, Faixa de Dutos" diff --git a/dist/locales/pt.json b/dist/locales/pt.json index b5b32e56b..1492d77fd 100644 --- a/dist/locales/pt.json +++ b/dist/locales/pt.json @@ -241,6 +241,7 @@ }, "commit": { "title": "Gravar Alterações", + "description_placeholder": "Pequena descrição das tuas contribuições (necessário)", "message_label": "Descrição das alterações", "upload_explanation": "As alterações que enviar ficarão visíveis em todos os mapas que usem dados do OpenStreetMap.", "upload_explanation_with_user": "As alterações que enviar como {user} ficarão visíveis em todos os mapas que usem dados do OpenStreetMap.", @@ -252,7 +253,9 @@ "deleted": "Eliminado", "created": "Criado", "about_changeset_comments": "Sobre comentários de changesets", - "about_changeset_comments_link": "//wiki.openstreetmap.org/wiki/Good_changeset_comments" + "about_changeset_comments_link": "//wiki.openstreetmap.org/wiki/Good_changeset_comments", + "google_warning": "Mencionou o Google no seu comentário: lembre-se que copiar do Google Mapas é estritamente proibido.", + "google_warning_link": "http://www.openstreetmap.org/copyright" }, "contributors": { "list": "Edições de {users}", @@ -313,6 +316,7 @@ "yes": "Sim", "no": "Não" }, + "add": "Adicionar", "none": "Nenhum", "node": "Nó", "way": "Linha", @@ -326,11 +330,14 @@ "percent_brightness": "{opacity}% transparente", "none": "Nenhum", "best_imagery": "Melhor fonte de imagem para esse lugar", + "switch": "Mudar para este fundo", "custom": "Personalizado", "custom_button": "Editar fundo personalizando", "custom_prompt": "Introduzir um URL válido. Tokens válidos são {z}, {x}, {y} para esquemas Z/X/Y e {u} para esquemas QuadTile.", + "fix_misalignment": "Ajudar o alienamento da imagem ", "imagery_source_faq": "De onde vem essa imagem?", "reset": "reiniciar", + "offset": "Arrasta para a área cinzenta abaixo para ajustar o alienamento da imagem, ou insira os valores em metros. ", "minimap": { "description": "Mini-mapa", "tooltip": "Mostra um pequeno mapa com uma área mais abrangente que ajuda a localizar a área que está a editar." @@ -505,7 +512,7 @@ "title": "Camada de Fotos (Mapillary)" }, "mapillary_signs": { - "tooltip": "Placas de trânsito do Mapillary", + "tooltip": "Sinais de trânsito do Mapillary (\"Photo Overlay\" tem de estar ativado)", "title": "Camada de Placas de Trânsito (Mapillary)" }, "mapillary": { @@ -606,6 +613,9 @@ }, "presets": { "categories": { + "category-barrier": { + "name": "Tipos de barreira" + }, "category-building": { "name": "Tipos de edifícios" }, @@ -625,7 +635,7 @@ "name": "Tipos de restrição" }, "category-road": { - "name": "Tipos de Rodovia" + "name": "Tipos de rodovia" }, "category-route": { "name": "Tipos de rota" @@ -1991,6 +2001,10 @@ "name": "Barreira de bicicletas", "terms": "Bicicleta" }, + "barrier/ditch": { + "name": "Fosso / Vala / Trincheira (seca)", + "terms": "Trench" + }, "barrier/entrance": { "name": "Entrada", "terms": "Entrada, Acesso, Abertura, Porta, Pórtico, Portão" @@ -3955,6 +3969,10 @@ "name": "Rota de caminhada", "terms": "Hiking Route, Rota de Escalagem" }, + "type/route/horse": { + "name": "Rota de equitação", + "terms": "Riding Route" + }, "type/route/pipeline": { "name": "Rota de gasoduto / oleoduto", "terms": "Pipeline Route" @@ -4004,7 +4022,7 @@ "terms": "Dam, Usina, Hidrelétrica, Hidroelétrica, Hidro-elétrica, Hidro elétrica" }, "waterway/ditch": { - "name": "Fosso / vala / trincheira", + "name": "Fosso / Vala / Trincheira", "terms": "Vala, Trincheira, Represa" }, "waterway/dock": { diff --git a/dist/locales/ru.json b/dist/locales/ru.json index b876dc49d..9bab61ab4 100644 --- a/dist/locales/ru.json +++ b/dist/locales/ru.json @@ -512,7 +512,6 @@ "title": "Фотографии с Mapillary" }, "mapillary_signs": { - "tooltip": "Дорожные знаки с Mapillary", "title": "Слой дорожных знаков с Mapillary" }, "mapillary": { diff --git a/dist/locales/sv.json b/dist/locales/sv.json index 64a0cc665..c000cbcf9 100644 --- a/dist/locales/sv.json +++ b/dist/locales/sv.json @@ -512,7 +512,7 @@ "title": "Bildlager (Mapillary)" }, "mapillary_signs": { - "tooltip": "Trafikskyltar från Mapillary", + "tooltip": "Trafikskyltar från Mapillary (måste aktivera bildlager)", "title": "Bildlager med trafikskyltar (Mapillary)" }, "mapillary": { diff --git a/dist/locales/uk.json b/dist/locales/uk.json index 0acefd2c8..4eeca75a9 100644 --- a/dist/locales/uk.json +++ b/dist/locales/uk.json @@ -512,7 +512,6 @@ "title": "Фото-шар (Mapillary)" }, "mapillary_signs": { - "tooltip": "Дорожні знаки від Mapillary", "title": "Шар дорожніх знаків (Mapillary)" }, "mapillary": { diff --git a/dist/locales/vi.json b/dist/locales/vi.json index c4f017e09..7c50fac70 100644 --- a/dist/locales/vi.json +++ b/dist/locales/vi.json @@ -512,7 +512,7 @@ "title": "Lớp phủ Hình ảnh (Mapillary)" }, "mapillary_signs": { - "tooltip": "Bảng giao thông do Mapillary cung cấp", + "tooltip": "Bảng giao thông do Mapillary cung cấp (phải bật Lớp phủ Hình ảnh)", "title": "Lớp phủ Bảng Giao thông (Mapillary)" }, "mapillary": { diff --git a/dist/locales/zh-HK.json b/dist/locales/zh-HK.json index c7bb1c93b..f301e98c7 100644 --- a/dist/locales/zh-HK.json +++ b/dist/locales/zh-HK.json @@ -512,7 +512,6 @@ "title": "相片重疊 (Mapillary)" }, "mapillary_signs": { - "tooltip": "來自Mapillary的交通訊號", "title": "交通訊號重疊 (Mapillary)" }, "mapillary": { diff --git a/dist/locales/zh-TW.json b/dist/locales/zh-TW.json index 370c5a376..fcac59194 100644 --- a/dist/locales/zh-TW.json +++ b/dist/locales/zh-TW.json @@ -512,7 +512,7 @@ "title": "照片重疊 (Mapillary)" }, "mapillary_signs": { - "tooltip": "從 Mapillary 來的紅綠燈", + "tooltip": "從 Mapillary 而來的交通號誌(必須啟用照片重疊)", "title": "紅綠燈重疊 (Mapillary)" }, "mapillary": { @@ -860,7 +860,7 @@ "label": "食物種類" }, "currency_multi": { - "label": "外幣種類" + "label": "貨幣種類" }, "cycleway": { "label": "單車道", @@ -1567,7 +1567,7 @@ }, "aeroway/gate": { "name": "登機閘門", - "terms": "機場閘口,機場閘門" + "terms": "機場閘口,機場閘門,登機門,登機口" }, "aeroway/hangar": { "name": "機庫", @@ -1587,7 +1587,7 @@ }, "aeroway/terminal": { "name": "機場航廈", - "terms": "機場大堂" + "terms": "航廈,機場大堂" }, "amenity": { "name": "便利設施", @@ -1639,11 +1639,11 @@ }, "amenity/bureau_de_change": { "name": "外幣兌換", - "terms": "錢幣兌換" + "terms": "錢幣兌換,貨幣兌換" }, "amenity/bus_station": { - "name": "公車轉運站", - "terms": "客運站,轉運站" + "name": "公車客運站", + "terms": "客運站,轉運站,長途客運站" }, "amenity/cafe": { "name": "咖啡廳", @@ -2719,7 +2719,7 @@ }, "landuse/military": { "name": "軍事用地", - "terms": "營區,軍營" + "terms": "營區,軍營,部隊用地,軍事區,軍用地" }, "landuse/orchard": { "name": "果園", @@ -3011,7 +3011,7 @@ }, "military/range": { "name": "軍事靶場", - "terms": "靶場" + "terms": "靶場,軍用靶場, 射擊場" }, "military/training_area": { "name": "訓練場地", @@ -3295,7 +3295,7 @@ }, "railway": { "name": "鐵路", - "terms": "鐵支路,鐵軌" + "terms": "鐵支路,鐵軌,鐵道" }, "railway/abandoned": { "name": "鐵路線遺跡", @@ -3335,7 +3335,7 @@ }, "railway/station": { "name": "火車站", - "terms": "鐵路站" + "terms": "鐵路站,車站,高鐵站" }, "railway/subway": { "name": "捷運", @@ -3343,7 +3343,7 @@ }, "railway/subway_entrance": { "name": "捷運入口", - "terms": "地鐵入口,地下鐵入口" + "terms": "地鐵入口,地下鐵入口,捷運出入口,地鐵出入口,地下鐵出入口" }, "railway/tram": { "name": "電車", @@ -3826,8 +3826,8 @@ "terms": "觀光點" }, "tourism/camp_site": { - "name": "營地", - "terms": "露營地" + "name": "露營營地", + "terms": "露營地,營地" }, "tourism/caravan_site": { "name": "露營車停車場", From 2e43437cf663963d40afba82c9e6b70a123fa602 Mon Sep 17 00:00:00 2001 From: Bryan Housel Date: Tue, 7 Jun 2016 15:11:32 -0400 Subject: [PATCH 05/18] make imagery --- data/imagery.json | 1068 +-------------------------------------------- 1 file changed, 5 insertions(+), 1063 deletions(-) diff --git a/data/imagery.json b/data/imagery.json index 23fc42681..7e164fef8 100644 --- a/data/imagery.json +++ b/data/imagery.json @@ -10648,633 +10648,10 @@ ], "terms_text": "Copyright ©2007-2012 Freemap Slovakia (www.freemap.sk). Some rights reserved." }, - { - "name": "Fugro (Denmark)", - "type": "tms", - "template": "http://{switch:a,b,c}.tile.openstreetmap.dk/fugro2005/{zoom}/{x}/{y}.png", - "scaleExtent": [ - 0, - 19 - ], - "polygon": [ - [ - [ - 8.3743941, - 54.9551655 - ], - [ - 8.3683809, - 55.4042149 - ], - [ - 8.2103997, - 55.4039795 - ], - [ - 8.2087314, - 55.4937345 - ], - [ - 8.0502655, - 55.4924731 - ], - [ - 8.0185123, - 56.7501399 - ], - [ - 8.1819161, - 56.7509948 - ], - [ - 8.1763274, - 57.0208898 - ], - [ - 8.3413329, - 57.0219872 - ], - [ - 8.3392467, - 57.1119574 - ], - [ - 8.5054433, - 57.1123212 - ], - [ - 8.5033923, - 57.2020499 - ], - [ - 9.3316304, - 57.2027636 - ], - [ - 9.3319079, - 57.2924835 - ], - [ - 9.4978864, - 57.2919578 - ], - [ - 9.4988593, - 57.3820608 - ], - [ - 9.6649749, - 57.3811615 - ], - [ - 9.6687295, - 57.5605591 - ], - [ - 9.8351961, - 57.5596265 - ], - [ - 9.8374896, - 57.6493322 - ], - [ - 10.1725726, - 57.6462818 - ], - [ - 10.1754245, - 57.7367768 - ], - [ - 10.5118282, - 57.7330269 - ], - [ - 10.5152095, - 57.8228945 - ], - [ - 10.6834853, - 57.8207722 - ], - [ - 10.6751613, - 57.6412021 - ], - [ - 10.5077045, - 57.6433097 - ], - [ - 10.5039992, - 57.5535088 - ], - [ - 10.671038, - 57.5514113 - ], - [ - 10.6507805, - 57.1024538 - ], - [ - 10.4857673, - 57.1045138 - ], - [ - 10.4786236, - 56.9249051 - ], - [ - 10.3143981, - 56.9267573 - ], - [ - 10.3112341, - 56.8369269 - ], - [ - 10.4750295, - 56.83509 - ], - [ - 10.4649016, - 56.5656681 - ], - [ - 10.9524239, - 56.5589761 - ], - [ - 10.9479249, - 56.4692243 - ], - [ - 11.1099335, - 56.4664675 - ], - [ - 11.1052639, - 56.376833 - ], - [ - 10.9429901, - 56.3795284 - ], - [ - 10.9341235, - 56.1994768 - ], - [ - 10.7719685, - 56.2020244 - ], - [ - 10.7694751, - 56.1120103 - ], - [ - 10.6079695, - 56.1150259 - ], - [ - 10.4466742, - 56.116717 - ], - [ - 10.2865948, - 56.118675 - ], - [ - 10.2831527, - 56.0281851 - ], - [ - 10.4439274, - 56.0270388 - ], - [ - 10.4417713, - 55.7579243 - ], - [ - 10.4334961, - 55.6693533 - ], - [ - 10.743814, - 55.6646861 - ], - [ - 10.743814, - 55.5712253 - ], - [ - 10.8969041, - 55.5712253 - ], - [ - 10.9051793, - 55.3953852 - ], - [ - 11.0613726, - 55.3812841 - ], - [ - 11.0593038, - 55.1124061 - ], - [ - 11.0458567, - 55.0318621 - ], - [ - 11.2030844, - 55.0247474 - ], - [ - 11.2030844, - 55.117139 - ], - [ - 11.0593038, - 55.1124061 - ], - [ - 11.0613726, - 55.3812841 - ], - [ - 11.0789572, - 55.5712253 - ], - [ - 10.8969041, - 55.5712253 - ], - [ - 10.9258671, - 55.6670198 - ], - [ - 10.743814, - 55.6646861 - ], - [ - 10.7562267, - 55.7579243 - ], - [ - 10.4417713, - 55.7579243 - ], - [ - 10.4439274, - 56.0270388 - ], - [ - 10.4466742, - 56.116717 - ], - [ - 10.6079695, - 56.1150259 - ], - [ - 10.6052053, - 56.0247462 - ], - [ - 10.9258671, - 56.0201215 - ], - [ - 10.9197132, - 55.9309388 - ], - [ - 11.0802782, - 55.92792 - ], - [ - 11.0858066, - 56.0178284 - ], - [ - 11.7265047, - 56.005058 - ], - [ - 11.7319981, - 56.0952142 - ], - [ - 12.0540333, - 56.0871256 - ], - [ - 12.0608477, - 56.1762576 - ], - [ - 12.7023469, - 56.1594405 - ], - [ - 12.6611131, - 55.7114318 - ], - [ - 12.9792318, - 55.7014026 - ], - [ - 12.9612912, - 55.5217294 - ], - [ - 12.3268659, - 55.5412096 - ], - [ - 12.3206071, - 55.4513655 - ], - [ - 12.4778226, - 55.447067 - ], - [ - 12.4702432, - 55.3570479 - ], - [ - 12.6269738, - 55.3523837 - ], - [ - 12.6200898, - 55.2632576 - ], - [ - 12.4627339, - 55.26722 - ], - [ - 12.4552949, - 55.1778223 - ], - [ - 12.2987046, - 55.1822303 - ], - [ - 12.2897344, - 55.0923641 - ], - [ - 12.6048608, - 55.0832904 - ], - [ - 12.5872011, - 54.9036285 - ], - [ - 12.2766618, - 54.9119031 - ], - [ - 12.2610181, - 54.7331602 - ], - [ - 12.1070691, - 54.7378161 - ], - [ - 12.0858621, - 54.4681655 - ], - [ - 11.7794953, - 54.4753579 - ], - [ - 11.7837381, - 54.5654783 - ], - [ - 11.1658525, - 54.5782155 - ], - [ - 11.1706443, - 54.6686508 - ], - [ - 10.8617173, - 54.6733956 - ], - [ - 10.8651245, - 54.7634667 - ], - [ - 10.7713646, - 54.7643888 - ], - [ - 10.7707276, - 54.7372807 - ], - [ - 10.7551428, - 54.7375776 - ], - [ - 10.7544039, - 54.7195666 - ], - [ - 10.7389074, - 54.7197588 - ], - [ - 10.7384368, - 54.7108482 - ], - [ - 10.7074486, - 54.7113045 - ], - [ - 10.7041094, - 54.6756741 - ], - [ - 10.5510973, - 54.6781698 - ], - [ - 10.5547184, - 54.7670245 - ], - [ - 10.2423994, - 54.7705935 - ], - [ - 10.2459845, - 54.8604673 - ], - [ - 10.0902268, - 54.8622134 - ], - [ - 10.0873731, - 54.7723851 - ], - [ - 9.1555798, - 54.7769557 - ], - [ - 9.1562752, - 54.8675369 - ], - [ - 8.5321973, - 54.8663765 - ], - [ - 8.531432, - 54.95516 - ] - ], - [ - [ - 11.4577738, - 56.819554 - ], - [ - 11.7849181, - 56.8127385 - ], - [ - 11.7716715, - 56.6332796 - ], - [ - 11.4459621, - 56.6401087 - ] - ], - [ - [ - 11.3274736, - 57.3612962 - ], - [ - 11.3161808, - 57.1818004 - ], - [ - 11.1508692, - 57.1847276 - ], - [ - 11.1456628, - 57.094962 - ], - [ - 10.8157703, - 57.1001693 - ], - [ - 10.8290599, - 57.3695272 - ] - ], - [ - [ - 11.5843266, - 56.2777928 - ], - [ - 11.5782882, - 56.1880397 - ], - [ - 11.7392309, - 56.1845765 - ], - [ - 11.7456428, - 56.2743186 - ] - ], - [ - [ - 14.6825922, - 55.3639405 - ], - [ - 14.8395247, - 55.3565231 - ], - [ - 14.8263755, - 55.2671261 - ], - [ - 15.1393406, - 55.2517359 - ], - [ - 15.1532015, - 55.3410836 - ], - [ - 15.309925, - 55.3330556 - ], - [ - 15.295719, - 55.2437356 - ], - [ - 15.1393406, - 55.2517359 - ], - [ - 15.1255631, - 55.1623802 - ], - [ - 15.2815819, - 55.1544167 - ], - [ - 15.2535578, - 54.9757646 - ], - [ - 14.6317464, - 55.0062496 - ] - ] - ], - "terms_url": "http://wiki.openstreetmap.org/wiki/Fugro", - "terms_text": "Fugro Aerial Mapping" - }, { "name": "Geodatastyrelsen (Denmark)", "type": "tms", - "template": "http://mapproxy.gpweb.dk/tiles/1.0.0/kortforsyningen_ortoforaar/EPSG3857/{zoom}/{x}/{y}.jpeg", + "template": "http://osmtools.septima.dk/mapproxy/tiles/1.0.0/kortforsyningen_ortoforaar/EPSG3857/{zoom}/{x}/{y}.jpeg", "scaleExtent": [ 0, 21 @@ -11892,7 +11269,8 @@ ] ], "terms_url": "http://download.kortforsyningen.dk/content/vilkaar-og-betingelser", - "terms_text": "Geodatastyrelsen og Danske Kommuner" + "terms_text": "Geodatastyrelsen og Danske Kommuner", + "best": true }, { "name": "Geoportal.gov.pl (Orthophotomap)", @@ -34389,444 +33767,8 @@ "type": "tms", "template": "http://openptmap.de/tiles/{zoom}/{x}/{y}.png", "scaleExtent": [ - 5, - 16 - ], - "polygon": [ - [ - [ - 6.4901072, - 53.665658 - ], - [ - 8.5665347, - 53.9848257 - ], - [ - 8.1339457, - 54.709715 - ], - [ - 8.317796, - 55.0952362 - ], - [ - 10.1887438, - 54.7783834 - ], - [ - 10.6321475, - 54.4778841 - ], - [ - 11.2702164, - 54.6221504 - ], - [ - 11.681176, - 54.3709243 - ], - [ - 12.0272473, - 54.3898199 - ], - [ - 13.3250145, - 54.8531617 - ], - [ - 13.9198245, - 54.6972173 - ], - [ - 14.2118221, - 54.1308273 - ], - [ - 14.493005, - 53.2665063 - ], - [ - 14.1577485, - 52.8766495 - ], - [ - 14.7525584, - 52.5819369 - ], - [ - 15.0986297, - 51.0171541 - ], - [ - 14.9364088, - 50.8399279 - ], - [ - 14.730929, - 50.7920977 - ], - [ - 14.4389313, - 50.8808862 - ], - [ - 12.9573138, - 50.3939044 - ], - [ - 12.51391, - 50.3939044 - ], - [ - 12.3084302, - 50.1173237 - ], - [ - 12.6112425, - 49.9088337 - ], - [ - 12.394948, - 49.7344006 - ], - [ - 12.7734634, - 49.4047626 - ], - [ - 14.1469337, - 48.6031036 - ], - [ - 14.6768553, - 48.6531391 - ], - [ - 15.0661855, - 49.0445497 - ], - [ - 16.2666202, - 48.7459305 - ], - [ - 16.4937294, - 48.8741286 - ], - [ - 16.904689, - 48.7173975 - ], - [ - 16.9371332, - 48.5315383 - ], - [ - 16.8384693, - 48.3823161 - ], - [ - 17.2017097, - 48.010204 - ], - [ - 17.1214145, - 47.6997605 - ], - [ - 16.777292, - 47.6585709 - ], - [ - 16.6090543, - 47.7460598 - ], - [ - 16.410228, - 47.6637214 - ], - [ - 16.7352326, - 47.6147714 - ], - [ - 16.5555242, - 47.3589738 - ], - [ - 16.4790525, - 46.9768539 - ], - [ - 16.0355168, - 46.8096295 - ], - [ - 16.0508112, - 46.6366332 - ], - [ - 14.9572663, - 46.6313822 - ], - [ - 14.574908, - 46.3892866 - ], - [ - 12.3954655, - 46.6891149 - ], - [ - 12.1507562, - 47.0550608 - ], - [ - 11.1183887, - 46.9142058 - ], - [ - 11.0342699, - 46.7729797 - ], - [ - 10.4836739, - 46.8462544 - ], - [ - 10.4607324, - 46.5472973 - ], - [ - 10.1013156, - 46.5735879 - ], - [ - 10.2007287, - 46.1831867 - ], - [ - 9.8948421, - 46.3629068 - ], - [ - 9.5966026, - 46.2889758 - ], - [ - 9.2983631, - 46.505206 - ], - [ - 9.2830687, - 46.2572605 - ], - [ - 9.0536537, - 45.7953255 - ], - [ - 8.4265861, - 46.2466846 - ], - [ - 8.4418804, - 46.4736161 - ], - [ - 7.8759901, - 45.9284607 - ], - [ - 7.0959791, - 45.8645956 - ], - [ - 6.7747981, - 46.1620044 - ], - [ - 6.8206811, - 46.4051083 - ], - [ - 6.5453831, - 46.4578142 - ], - [ - 6.3312624, - 46.3840116 - ], - [ - 6.3847926, - 46.2466846 - ], - [ - 5.8953739, - 46.0878021 - ], - [ - 6.1171418, - 46.3681838 - ], - [ - 6.0942003, - 46.5998657 - ], - [ - 6.4383228, - 46.7782169 - ], - [ - 6.4306756, - 46.9298747 - ], - [ - 7.0806847, - 47.3460216 - ], - [ - 6.8436226, - 47.3719227 - ], - [ - 6.9965659, - 47.5012373 - ], - [ - 7.1800979, - 47.5064033 - ], - [ - 7.2336281, - 47.439206 - ], - [ - 7.4553959, - 47.4805683 - ], - [ - 7.7842241, - 48.645735 - ], - [ - 8.1971711, - 49.0282701 - ], - [ - 7.6006921, - 49.0382974 - ], - [ - 7.4477487, - 49.1634679 - ], - [ - 7.2030394, - 49.1034255 - ], - [ - 6.6677378, - 49.1634679 - ], - [ - 6.6371491, - 49.3331933 - ], - [ - 6.3542039, - 49.4576194 - ], - [ - 6.5453831, - 49.8043366 - ], - [ - 6.2471436, - 49.873384 - ], - [ - 6.0789059, - 50.1534883 - ], - [ - 6.3618511, - 50.3685934 - ], - [ - 6.0865531, - 50.7039632 - ], - [ - 5.8800796, - 51.0513752 - ], - [ - 6.1247889, - 51.1618085 - ], - [ - 6.1936134, - 51.491527 - ], - [ - 5.9641984, - 51.7526501 - ], - [ - 6.0253758, - 51.8897286 - ], - [ - 6.4536171, - 51.8661241 - ], - [ - 6.8436226, - 51.9557552 - ], - [ - 6.6906793, - 52.0499105 - ], - [ - 7.0042131, - 52.2282603 - ], - [ - 7.0195074, - 52.4525245 - ], - [ - 6.6983264, - 52.4665032 - ], - [ - 6.6906793, - 52.6524628 - ], - [ - 7.0348017, - 52.6385432 - ], - [ - 7.0730376, - 52.8330151 - ], - [ - 7.2183337, - 52.9852064 - ], - [ - 7.1953922, - 53.3428087 - ], - [ - 7.0042131, - 53.3291098 - ] - ] + 4, + 17 ], "terms_url": "http://openstreetmap.org/", "terms_text": "© OpenStreetMap contributors, CC-BY-SA" From 4289afa6fe0645336d4aedb1b0e4d59cb3b5ce2f Mon Sep 17 00:00:00 2001 From: Bryan Housel Date: Tue, 7 Jun 2016 15:47:20 -0400 Subject: [PATCH 06/18] Keep Mapillary viewer loading animation if canvas not yet created --- js/id/services/mapillary.js | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/js/id/services/mapillary.js b/js/id/services/mapillary.js index 1506c385c..960714b59 100644 --- a/js/id/services/mapillary.js +++ b/js/id/services/mapillary.js @@ -310,6 +310,11 @@ iD.services.mapillary = function() { }; mapillary.setViewerLoading = function(loading) { + var canvas = d3.select('#content') + .selectAll('.mly-wrapper canvas'); + + if (canvas.empty()) return; // viewer not loaded yet + var cover = d3.select('#content') .selectAll('.mly-wrapper .Cover'); From 3f1141af4498a654b88097815d1c29507f643825 Mon Sep 17 00:00:00 2001 From: Bryan Housel Date: Tue, 7 Jun 2016 16:12:22 -0400 Subject: [PATCH 07/18] 1.9.6 --- CHANGELOG.md | 6 ++++++ js/id/id.js | 2 +- package.json | 2 +- 3 files changed, 8 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index ef0a4e0f3..76646a611 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,11 @@ :warning: = Breaking change, may affect downstream projects or sites that embed iD. +## 1.9.6 +##### Jun 7, 2016 +* Embed interactive Mapillary JS viewer instead of static image (#3128, thanks @kepta, @peterneubauer) +* Add "grill" as search term for `amenity=bbq` preset (#3139, thanks @manfredbrandl) +* When setting Wikipedia value, also set corresponding Wikidata tag (#2732, thanks @1ec5) + ## 1.9.5 ##### May 25, 2016 * Clean translated combo value when comparing to display value (#3129) diff --git a/js/id/id.js b/js/id/id.js index d5008ac95..0db72d376 100644 --- a/js/id/id.js +++ b/js/id/id.js @@ -379,7 +379,7 @@ window.iD = function () { }; -iD.version = '1.9.5'; +iD.version = '1.9.6'; (function() { var detected = {}; diff --git a/package.json b/package.json index fb05d88cc..2bad334d5 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "iD", - "version": "1.9.5", + "version": "1.9.6", "description": "A friendly editor for OpenStreetMap", "main": "iD.js", "directories": { From 71a3d3e4f6bf2dd726743e59910fa56685da467d Mon Sep 17 00:00:00 2001 From: Kushan Joshi <0o3ko0@gmail.com> Date: Wed, 8 Jun 2016 18:07:20 +0530 Subject: [PATCH 08/18] Patch d3's mousewheeled function (closes #2773) --- js/lib/d3.v3.js | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/js/lib/d3.v3.js b/js/lib/d3.v3.js index e05ce8547..425122a37 100644 --- a/js/lib/d3.v3.js +++ b/js/lib/d3.v3.js @@ -1820,8 +1820,7 @@ d3.behavior.zoom = function() { } function zoomended(dispatch) { - if (!--zooming) dispatch({type: "zoomend"}); - center0 = null; + if (!--zooming) dispatch({type: "zoomend"}), center0 = null; } function mousedowned() { @@ -1964,7 +1963,7 @@ d3.behavior.zoom = function() { function mousewheeled() { var dispatch = event.of(this, arguments); if (mousewheelTimer) clearTimeout(mousewheelTimer); - else translate0 = location(center0 = center || d3.mouse(this)), d3_selection_interrupt.call(this), zoomstarted(dispatch); + else d3_selection_interrupt.call(this), translate0 = location(center0 = center || d3.mouse(this)), zoomstarted(dispatch); mousewheelTimer = setTimeout(function() { mousewheelTimer = null; zoomended(dispatch); }, 50); d3_eventPreventDefault(); scaleTo(Math.pow(2, d3_behavior_zoomDelta() * .002) * view.k); From 5f7f37825e69f211692038899a0cadde95c22f14 Mon Sep 17 00:00:00 2001 From: Kushan Joshi <0o3ko0@gmail.com> Date: Wed, 8 Jun 2016 18:13:47 +0530 Subject: [PATCH 09/18] add commit 71a3d3e to d3's patch list --- Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Makefile b/Makefile index c22d5a80a..8b9d9bc39 100644 --- a/Makefile +++ b/Makefile @@ -315,7 +315,7 @@ D3_FILES = \ d3: node_modules/.bin/smash $(D3_FILES) > js/lib/d3.v3.js - @echo 'd3 rebuilt. Please reapply 7e2485d, 4da529f, and 223974d' + @echo 'd3 rebuilt. Please reapply 7e2485d, 4da529f, 223974d and 71a3d3e' lodash: node_modules/.bin/lodash --development --output js/lib/lodash.js include="includes,toPairs,assign,bind,chunk,clone,compact,debounce,difference,each,every,extend,filter,find,first,forEach,forOwn,groupBy,indexOf,intersection,isEmpty,isEqual,isFunction,keys,last,map,omit,reject,some,throttle,union,uniq,values,without,flatten,value,chain,cloneDeep,merge,pick,reduce" exports="global,node" From 6314c276e89d20e3787d6bbe5a6583420aa918d8 Mon Sep 17 00:00:00 2001 From: Bryan Housel Date: Fri, 10 Jun 2016 10:36:28 -0400 Subject: [PATCH 10/18] More debug versatility --- css/app.css | 20 +++++++++++++++++++- js/id/id.js | 24 +++++++++++++++--------- js/id/renderer/tile_layer.js | 2 +- js/id/svg/labels.js | 6 +++--- test/spec/id.js | 25 +++++++++++++++++++++++++ 5 files changed, 63 insertions(+), 14 deletions(-) diff --git a/css/app.css b/css/app.css index c1a3ef34c..a243d63aa 100644 --- a/css/app.css +++ b/css/app.css @@ -2356,7 +2356,6 @@ img.tile-removing { z-index: 10; } -.bbox, .map-in-map-bbox { fill: none; stroke: rgba(255, 255, 0, 0.75); @@ -2368,6 +2367,25 @@ img.tile-removing { stroke-width: 5; } + +/* Debug +------------------------------------------------------- */ +.debug { + fill: none; + stroke-width: 2; + shape-rendering: crispEdges; +} +.red { stroke: rgba(255, 0, 0, 0.75); } +.green { stroke: rgba(0, 255, 0, 0.75); } +.blue { stroke: rgba(0, 0, 255, 0.75); } +.yellow { stroke: rgba(255, 255, 0, 0.75); } +.cyan { stroke: rgba(0, 255, 255, 0.75); } +.magenta { stroke: rgba(255, 0, 255, 0.75); } +.orange { stroke: rgba(255, 153, 0, 0.75); } +.pink { stroke: rgba(255, 0, 153, 0.75); } +.purple { stroke: rgba(153, 0, 255, 0.75); } + + /* Info Box ------------------------------------------------------- */ .infobox { diff --git a/js/id/id.js b/js/id/id.js index 0db72d376..050fdcc66 100644 --- a/js/id/id.js +++ b/js/id/id.js @@ -216,18 +216,24 @@ window.iD = function () { /* Debug */ - var debugTile = false, debugCollision = false; - context.debugTile = function(_) { - if (!arguments.length) return debugTile; - debugTile = _; + var debugFlags = { + tile: false, + collision: false, + imagery: false, + imperial: false, + driveLeft: false + }; + context.debugFlags = function() { + return debugFlags; + }; + context.setDebug = function(flag, val) { + if (arguments.length === 1) val = true; + debugFlags[flag] = val; dispatch.change(); return context; }; - context.debugCollision = function(_) { - if (!arguments.length) return debugCollision; - debugCollision = _; - dispatch.change(); - return context; + context.getDebug = function(flag) { + return flag && debugFlags[flag]; }; diff --git a/js/id/renderer/tile_layer.js b/js/id/renderer/tile_layer.js index abeb25472..8ac685979 100644 --- a/js/id/renderer/tile_layer.js +++ b/js/id/renderer/tile_layer.js @@ -78,7 +78,7 @@ iD.TileLayer = function(context) { // rentered when tiles load/error (see #644). function render(selection) { var requests = []; - var showDebug = context.debugTile() && !source.overlay; + var showDebug = context.getDebug('tile') && !source.overlay; if (source.validZoom(z)) { tile().forEach(function(d) { diff --git a/js/id/svg/labels.js b/js/id/svg/labels.js index 4687ed7dc..36d7628d2 100644 --- a/js/id/svg/labels.js +++ b/js/id/svg/labels.js @@ -425,7 +425,7 @@ iD.svg.Labels = function(projection, context) { drawAreaIcons(label, labelled.area, filter, 'arealabel-icon', positions.area); // debug - var showDebug = context.debugCollision(); + var showDebug = context.getDebug('collision'); var debug = label.selectAll('.layer-label-debug') .data(showDebug ? [true] : []); @@ -447,11 +447,11 @@ iD.svg.Labels = function(projection, context) { ]]}; }); - var debugboxes = debug.selectAll('.bbox').data(gj); + var debugboxes = debug.selectAll('.debug').data(gj); debugboxes.enter() .append('path') - .attr('class', 'bbox'); + .attr('class', 'debug yellow'); debugboxes.exit() .remove(); diff --git a/test/spec/id.js b/test/spec/id.js index 393721e52..e232f28ae 100644 --- a/test/spec/id.js +++ b/test/spec/id.js @@ -100,4 +100,29 @@ describe('iD', function() { expect(context.presets().match(way, graph).id).to.eql('mines'); }); }); + + describe('#debug', function() { + it('sets and gets debug flags', function() { + var context = iD(), + flags = { + tile: false, + collision: false, + imagery: false, + imperial: false, + driveLeft: false + }; + + expect(context.debugFlags()).to.eql(flags); + + context.setDebug('tile', true); + expect(context.getDebug('tile')).to.be.true; + + context.setDebug('collision'); + expect(context.getDebug('collision')).to.be.true; + + context.setDebug('tile', false); + expect(context.getDebug('tile')).to.be.false; + }); + }); + }); From e22bd1ecebd906c0d37afe31258deee9a994aef2 Mon Sep 17 00:00:00 2001 From: Bryan Housel Date: Fri, 10 Jun 2016 13:06:28 -0400 Subject: [PATCH 11/18] Pass projection to iD.svg.Layers in tests --- test/rendering.html | 8 ++++---- test/spec/svg/areas.js | 2 +- test/spec/svg/lines.js | 2 +- test/spec/svg/midpoints.js | 2 +- test/spec/svg/points.js | 2 +- test/spec/svg/vertices.js | 2 +- 6 files changed, 9 insertions(+), 9 deletions(-) diff --git a/test/rendering.html b/test/rendering.html index 35d8d8dfa..cf32f9e15 100644 --- a/test/rendering.html +++ b/test/rendering.html @@ -147,7 +147,7 @@ .attr('width', 30) .attr('height', 40) .attr('data-zoom', function (d) { return d.zoom; }) - .call(iD.svg.Layers(context)) + .call(iD.svg.Layers(projection, context)) .each(function (d) { var n = node.update({tags: d}), graph = iD.Graph([n]); @@ -215,7 +215,7 @@ .attr('width', 30) .attr('height', 30) .attr('data-zoom', function (d) { return d.zoom; }) - .call(iD.svg.Layers(context)) + .call(iD.svg.Layers(projection, context)) .each(function (d) { var n = node.update({tags: d.tags}), graph = iD.Graph([n, way]); @@ -303,7 +303,7 @@ .attr('width', 200) .attr('height', 30) .attr('data-zoom', function (d) { return d.zoom; }) - .call(iD.svg.Layers(context)) + .call(iD.svg.Layers(projection, context)) .each(function (d) { var highway = way.update({tags: d.tags}), graph = iD.Graph([a, b, highway]); @@ -365,7 +365,7 @@ .append('svg') .attr('width', 100) .attr('height', 100) - .call(iD.svg.Layers(context)) + .call(iD.svg.Layers(projection, context)) .each(function (datum) { var area = way.update({tags: datum.tags}), graph = iD.Graph([a, b, c, d, area]); diff --git a/test/spec/svg/areas.js b/test/spec/svg/areas.js index 8e6d06fe3..7a43534a6 100644 --- a/test/spec/svg/areas.js +++ b/test/spec/svg/areas.js @@ -7,7 +7,7 @@ describe("iD.svg.Areas", function () { beforeEach(function () { surface = d3.select(document.createElementNS('http://www.w3.org/2000/svg', 'svg')) - .call(iD.svg.Layers(iD())); + .call(iD.svg.Layers(projection, iD())); }); it("adds way and area classes", function () { diff --git a/test/spec/svg/lines.js b/test/spec/svg/lines.js index 27fc0ec10..ab3942209 100644 --- a/test/spec/svg/lines.js +++ b/test/spec/svg/lines.js @@ -7,7 +7,7 @@ describe("iD.svg.Lines", function () { beforeEach(function () { surface = d3.select(document.createElementNS('http://www.w3.org/2000/svg', 'svg')) - .call(iD.svg.Layers(iD())); + .call(iD.svg.Layers(projection, iD())); }); it("adds way and line classes", function () { diff --git a/test/spec/svg/midpoints.js b/test/spec/svg/midpoints.js index 4d012aae3..6889521c2 100644 --- a/test/spec/svg/midpoints.js +++ b/test/spec/svg/midpoints.js @@ -7,7 +7,7 @@ describe("iD.svg.Midpoints", function () { beforeEach(function () { context = iD(); surface = d3.select(document.createElementNS('http://www.w3.org/2000/svg', 'svg')) - .call(iD.svg.Layers(context)); + .call(iD.svg.Layers(projection, context)); }); it("creates midpoint on segment completely within the extent", function () { diff --git a/test/spec/svg/points.js b/test/spec/svg/points.js index 38d043430..669a1771b 100644 --- a/test/spec/svg/points.js +++ b/test/spec/svg/points.js @@ -6,7 +6,7 @@ describe("iD.svg.Points", function () { beforeEach(function () { context = iD().presets(iD.data.presets); surface = d3.select(document.createElementNS('http://www.w3.org/2000/svg', 'svg')) - .call(iD.svg.Layers(context)); + .call(iD.svg.Layers(projection, context)); }); it("adds tag classes", function () { diff --git a/test/spec/svg/vertices.js b/test/spec/svg/vertices.js index 0eec0e45b..3e13daf8b 100644 --- a/test/spec/svg/vertices.js +++ b/test/spec/svg/vertices.js @@ -6,7 +6,7 @@ describe("iD.svg.Vertices", function () { beforeEach(function () { context = iD(); surface = d3.select(document.createElementNS('http://www.w3.org/2000/svg', 'svg')) - .call(iD.svg.Layers(context)); + .call(iD.svg.Layers(projection, context)); }); it("adds the .shared class to vertices that are members of two or more ways", function () { From eb19b17fd78943c3756ae6f4b11e31affbdddc2a Mon Sep 17 00:00:00 2001 From: Bryan Housel Date: Fri, 10 Jun 2016 13:40:52 -0400 Subject: [PATCH 12/18] Add dataset debugging (re: #3158) --- Makefile | 1 + css/app.css | 33 +++++++++------- index.html | 1 + js/id/svg/debug.js | 88 ++++++++++++++++++++++++++++++++++++++++++ js/id/svg/layers.js | 3 +- js/id/ui/map_in_map.js | 33 +++++++++------- test/index.html | 1 + 7 files changed, 129 insertions(+), 31 deletions(-) create mode 100644 js/id/svg/debug.js diff --git a/Makefile b/Makefile index 8b9d9bc39..f8f775db4 100644 --- a/Makefile +++ b/Makefile @@ -166,6 +166,7 @@ dist/iD.js: \ js/id/renderer/tile_layer.js \ js/id/svg.js \ js/id/svg/areas.js \ + js/id/svg/debug.js \ js/id/svg/defs.js \ js/id/svg/gpx.js \ js/id/svg/icon.js \ diff --git a/css/app.css b/css/app.css index a243d63aa..cb482605d 100644 --- a/css/app.css +++ b/css/app.css @@ -2312,7 +2312,6 @@ img.tile-removing { /* Map-In-Map ------------------------------------------------------- */ - .map-in-map { position: absolute; overflow: hidden; @@ -2338,8 +2337,8 @@ img.tile-removing { user-select: none; } -.map-in-map-svg, -.map-in-map-gpx { +.map-in-map-viewport, +.map-in-map-data { top: 0; left: 0; overflow: hidden; @@ -2347,11 +2346,11 @@ img.tile-removing { width: 100%; } -.map-in-map-svg { +.map-in-map-viewport { position: absolute; } -.map-in-map-gpx { +.map-in-map-data { position: relative; z-index: 10; } @@ -2371,19 +2370,23 @@ img.tile-removing { /* Debug ------------------------------------------------------- */ .debug { + stroke: currentColor; fill: none; stroke-width: 2; - shape-rendering: crispEdges; } -.red { stroke: rgba(255, 0, 0, 0.75); } -.green { stroke: rgba(0, 255, 0, 0.75); } -.blue { stroke: rgba(0, 0, 255, 0.75); } -.yellow { stroke: rgba(255, 255, 0, 0.75); } -.cyan { stroke: rgba(0, 255, 255, 0.75); } -.magenta { stroke: rgba(255, 0, 255, 0.75); } -.orange { stroke: rgba(255, 153, 0, 0.75); } -.pink { stroke: rgba(255, 0, 153, 0.75); } -.purple { stroke: rgba(153, 0, 255, 0.75); } +.map-in-map-data .debug { + stroke-width: 1; +} + +.red { color: rgba(255, 0, 0, 0.75); } +.green { color: rgba(0, 255, 0, 0.75); } +.blue { color: rgba(0, 0, 255, 0.75); } +.yellow { color: rgba(255, 255, 0, 0.75); } +.cyan { color: rgba(0, 255, 255, 0.75); } +.magenta { color: rgba(255, 0, 255, 0.75); } +.orange { color: rgba(255, 153, 0, 0.75); } +.pink { color: rgba(255, 0, 153, 0.75); } +.purple { color: rgba(153, 0, 255, 0.75); } /* Info Box diff --git a/index.html b/index.html index d7eb05479..656c00597 100644 --- a/index.html +++ b/index.html @@ -61,6 +61,7 @@ + diff --git a/js/id/svg/debug.js b/js/id/svg/debug.js new file mode 100644 index 000000000..2ca3b0e24 --- /dev/null +++ b/js/id/svg/debug.js @@ -0,0 +1,88 @@ +iD.svg.Debug = function(projection, context) { + + function drawDebug(surface) { + var showsImagery = context.getDebug('imagery'), + showsImperial = context.getDebug('imperial'), + showsDriveLeft = context.getDebug('driveLeft'), + enabled = showsImagery || showsImperial || showsDriveLeft, + path = d3.geo.path().projection(projection); + + var layer = surface.selectAll('.layer-debug') + .data(enabled ? [0] : []); + + layer.enter() + .append('g') + .attr('class', 'layer-debug'); + + layer.exit() + .remove(); + + + var legend = d3.select('#content') + .selectAll('#debugLegend') + .data(enabled ? [0] : []); + + legend.enter() + .append('div') + .attr('id', 'debugLegend') + .attr('class', 'fillD') + .attr('style', 'position:absolute; top:70px; right:80px; padding:5px;'); + + legend.exit() + .remove(); + + + var imagery = layer.selectAll('path.debug-imagery') + .data(showsImagery ? [] : []); // TODO + + imagery.enter() + .append('path') + .attr('class', 'debug-imagery debug orange'); + + imagery.exit() + .remove(); + + + var imperial = layer + .selectAll('path.debug-imperial') + .data(showsImperial ? [iD.data.imperial] : []); + + imperial.enter() + .append('path') + .attr('class', 'debug-imperial debug cyan'); + + imperial.exit() + .remove(); + + + var driveLeft = layer + .selectAll('path.debug-drive-left') + .data(showsDriveLeft ? [iD.data.driveLeft] : []); + + driveLeft.enter() + .append('path') + .attr('class', 'debug-drive-left debug green'); + + driveLeft.exit() + .remove(); + + + // update + layer.selectAll('path') + .attr('d', path); + } + + // This looks strange because `enabled` methods on other layers are + // chainable getter/setters, and this one is just a getter. + drawDebug.enabled = function() { + if (!arguments.length) { + return context.getDebug('imagery') || + context.getDebug('imperial') || + context.getDebug('driveLeft'); + } else { + return this; + } + }; + + return drawDebug; +}; diff --git a/js/id/svg/layers.js b/js/id/svg/layers.js index 34b84e6f1..fea38d417 100644 --- a/js/id/svg/layers.js +++ b/js/id/svg/layers.js @@ -5,7 +5,8 @@ iD.svg.Layers = function(projection, context) { { id: 'osm', layer: iD.svg.Osm(projection, context, dispatch) }, { id: 'gpx', layer: iD.svg.Gpx(projection, context, dispatch) }, { id: 'mapillary-images', layer: iD.svg.MapillaryImages(projection, context, dispatch) }, - { id: 'mapillary-signs', layer: iD.svg.MapillarySigns(projection, context, dispatch) } + { id: 'mapillary-signs', layer: iD.svg.MapillarySigns(projection, context, dispatch) }, + { id: 'debug', layer: iD.svg.Debug(projection, context, dispatch) } ]; diff --git a/js/id/ui/map_in_map.js b/js/id/ui/map_in_map.js index ba4f28987..2d3d525cd 100644 --- a/js/id/ui/map_in_map.js +++ b/js/id/ui/map_in_map.js @@ -6,6 +6,7 @@ iD.ui.MapInMap = function(context) { overlayLayers = {}, projection = iD.geo.RawMercator(), gpxLayer = iD.svg.Gpx(projection, context).showLabels(false), + debugLayer = iD.svg.Debug(projection, context), zoom = d3.behavior.zoom() .scaleExtent([ztok(0.5), ztok(24)]) .on('zoom', zoomPan), @@ -13,7 +14,7 @@ iD.ui.MapInMap = function(context) { panning = false, hidden = true, zDiff = 6, // by default, minimap renders at (main zoom - 6) - tStart, tLast, tCurr, kLast, kCurr, tiles, svg, timeoutId; + tStart, tLast, tCurr, kLast, kCurr, tiles, viewport, timeoutId; function ztok(z) { return 256 * Math.pow(2, z); } function ktoz(k) { return Math.log(k) / Math.LN2 - 8; } @@ -51,7 +52,7 @@ iD.ui.MapInMap = function(context) { tY = (tCurr[1] / scale - tLast[1]) * scale; iD.util.setTransform(tiles, tX, tY, scale); - iD.util.setTransform(svg, 0, 0, scale); + iD.util.setTransform(viewport, 0, 0, scale); transformed = true; queueRedraw(); @@ -112,7 +113,7 @@ iD.ui.MapInMap = function(context) { if (transformed) { iD.util.setTransform(tiles, 0, 0); - iD.util.setTransform(svg, 0, 0); + iD.util.setTransform(viewport, 0, 0); transformed = false; } } @@ -188,33 +189,35 @@ iD.ui.MapInMap = function(context) { .remove(); - var gpx = tiles - .selectAll('.map-in-map-gpx') - .data(gpxLayer.enabled() ? [0] : []); + var dataLayers = tiles + .selectAll('.map-in-map-data') + .data([0]); - gpx.enter() + dataLayers.enter() .append('svg') - .attr('class', 'map-in-map-gpx'); + .attr('class', 'map-in-map-data'); - gpx.exit() + dataLayers.exit() .remove(); - gpx.call(gpxLayer); + dataLayers + .call(gpxLayer) + .call(debugLayer); - // redraw bounding box + // redraw viewport bounding box if (!panning) { var getPath = d3.geo.path().projection(projection), bbox = { type: 'Polygon', coordinates: [context.map().extent().polygon()] }; - svg = wrap.selectAll('.map-in-map-svg') + viewport = wrap.selectAll('.map-in-map-viewport') .data([0]); - svg.enter() + viewport.enter() .append('svg') - .attr('class', 'map-in-map-svg'); + .attr('class', 'map-in-map-viewport'); - var path = svg.selectAll('.map-in-map-bbox') + var path = viewport.selectAll('.map-in-map-bbox') .data([bbox]); path.enter() diff --git a/test/index.html b/test/index.html index 24aa35963..faa84ce6b 100644 --- a/test/index.html +++ b/test/index.html @@ -67,6 +67,7 @@ + From 452df4068ea0868f1de294d7252a0e40f1f7f674 Mon Sep 17 00:00:00 2001 From: Bryan Housel Date: Sat, 11 Jun 2016 01:07:26 -0400 Subject: [PATCH 13/18] Add background imagery debug and debug legend --- css/app.css | 18 +++++++++++- js/id/svg/debug.js | 71 +++++++++++++++++++++++++++++++++++----------- 2 files changed, 72 insertions(+), 17 deletions(-) diff --git a/css/app.css b/css/app.css index cb482605d..c7e574486 100644 --- a/css/app.css +++ b/css/app.css @@ -2158,7 +2158,7 @@ div.full-screen > button:hover { float:right; margin-left: 20px; margin-bottom: 20px; - padding-left: 5px + padding-left: 5px; } .help-wrap .toc li a, @@ -2388,6 +2388,22 @@ img.tile-removing { .pink { color: rgba(255, 0, 153, 0.75); } .purple { color: rgba(153, 0, 255, 0.75); } +.debug-legend { + position: absolute; + top: 70px; + right: 80px; + padding: 5px; + border-radius: 4px; + pointer-events: none; +} + +.debug-legend-item { + padding-right: 5px; +} +.debug-legend-item:before { + content: "\25A0"; + padding: 0 5px; +} /* Info Box ------------------------------------------------------- */ diff --git a/js/id/svg/debug.js b/js/id/svg/debug.js index 2ca3b0e24..51374f708 100644 --- a/js/id/svg/debug.js +++ b/js/id/svg/debug.js @@ -1,14 +1,59 @@ iD.svg.Debug = function(projection, context) { + function multipolygons(imagery) { + return imagery.map(function(data) { + return { + type: 'MultiPolygon', + coordinates: [ data.polygon ] + }; + }); + } + function drawDebug(surface) { var showsImagery = context.getDebug('imagery'), showsImperial = context.getDebug('imperial'), showsDriveLeft = context.getDebug('driveLeft'), - enabled = showsImagery || showsImperial || showsDriveLeft, path = d3.geo.path().projection(projection); + + var debugData = []; + if (showsImagery) { + debugData.push({ class: 'orange', label: 'imagery' }); + } + if (showsImperial) { + debugData.push({ class: 'cyan', label: 'imperial' }); + } + if (showsDriveLeft) { + debugData.push({ class: 'green', label: 'driveLeft' }); + } + + + var legend = d3.select('#content') + .selectAll('.debug-legend') + .data(debugData.length ? [0] : []); + + legend.enter() + .append('div') + .attr('class', 'fillD debug-legend'); + + legend.exit() + .remove(); + + + var legendItems = legend.selectAll('.debug-legend-item') + .data(debugData, function(d) { return d.label; }); + + legendItems.enter() + .append('span') + .attr('class', function(d) { return 'debug-legend-item ' + d.class; }) + .text(function(d) { return d.label; }); + + legendItems.exit() + .remove(); + + var layer = surface.selectAll('.layer-debug') - .data(enabled ? [0] : []); + .data(debugData.length ? [0] : []); layer.enter() .append('g') @@ -18,22 +63,16 @@ iD.svg.Debug = function(projection, context) { .remove(); - var legend = d3.select('#content') - .selectAll('#debugLegend') - .data(enabled ? [0] : []); - - legend.enter() - .append('div') - .attr('id', 'debugLegend') - .attr('class', 'fillD') - .attr('style', 'position:absolute; top:70px; right:80px; padding:5px;'); - - legend.exit() - .remove(); - + var extent = context.map().extent(), + availableImagery = showsImagery && multipolygons(iD.data.imagery.filter(function(source) { + if (!source.polygon) return false; + return source.polygon.some(function(polygon) { + return iD.geo.polygonIntersectsPolygon(polygon, extent, true); + }); + })); var imagery = layer.selectAll('path.debug-imagery') - .data(showsImagery ? [] : []); // TODO + .data(showsImagery ? availableImagery : []); imagery.enter() .append('path') From c08774c2da224d1c22527044df948559f0a3ca02 Mon Sep 17 00:00:00 2001 From: Bryan Housel Date: Sat, 11 Jun 2016 01:20:53 -0400 Subject: [PATCH 14/18] Put tile and collision on the debug legend too --- js/id/svg/debug.js | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) diff --git a/js/id/svg/debug.js b/js/id/svg/debug.js index 51374f708..5e6376e35 100644 --- a/js/id/svg/debug.js +++ b/js/id/svg/debug.js @@ -10,13 +10,21 @@ iD.svg.Debug = function(projection, context) { } function drawDebug(surface) { - var showsImagery = context.getDebug('imagery'), + var showsTile = context.getDebug('tile'), + showsCollision = context.getDebug('collision'), + showsImagery = context.getDebug('imagery'), showsImperial = context.getDebug('imperial'), showsDriveLeft = context.getDebug('driveLeft'), path = d3.geo.path().projection(projection); var debugData = []; + if (showsTile) { + debugData.push({ class: 'red', label: 'tile' }); + } + if (showsCollision) { + debugData.push({ class: 'yellow', label: 'collision' }); + } if (showsImagery) { debugData.push({ class: 'orange', label: 'imagery' }); } @@ -53,7 +61,7 @@ iD.svg.Debug = function(projection, context) { var layer = surface.selectAll('.layer-debug') - .data(debugData.length ? [0] : []); + .data(showsImagery || showsImperial || showsDriveLeft ? [0] : []); layer.enter() .append('g') @@ -115,7 +123,9 @@ iD.svg.Debug = function(projection, context) { // chainable getter/setters, and this one is just a getter. drawDebug.enabled = function() { if (!arguments.length) { - return context.getDebug('imagery') || + return context.getDebug('tile') || + context.getDebug('collision') || + context.getDebug('imagery') || context.getDebug('imperial') || context.getDebug('driveLeft'); } else { From 63fc7c477018c9031acad3f603f0460ec2fc8fb2 Mon Sep 17 00:00:00 2001 From: Bryan Housel Date: Sat, 11 Jun 2016 01:40:20 -0400 Subject: [PATCH 15/18] Fix imperial units test in maxspeed (closes #3156) --- js/id/ui/preset/maxspeed.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/js/id/ui/preset/maxspeed.js b/js/id/ui/preset/maxspeed.js index a0e1cc9e4..a11ee6855 100644 --- a/js/id/ui/preset/maxspeed.js +++ b/js/id/ui/preset/maxspeed.js @@ -31,7 +31,7 @@ iD.ui.preset.maxspeed = function(field, context) { imperial = _.some(iD.data.imperial.features, function(f) { return _.some(f.geometry.coordinates, function(d) { - return iD.geo.pointInPolygon(loc, d[0]); + return iD.geo.pointInPolygon(loc, d); }); }); From 87c321b2fa740016adf1cf74dfb77c0a03d32716 Mon Sep 17 00:00:00 2001 From: Kushan Joshi <0o3ko0@gmail.com> Date: Sat, 11 Jun 2016 17:55:34 +0530 Subject: [PATCH 16/18] Add Macau and Hong Kong to drive-left data --- data/drive-left.json | 109 ++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 108 insertions(+), 1 deletion(-) diff --git a/data/drive-left.json b/data/drive-left.json index 09254986c..c7fe8d6a7 100644 --- a/data/drive-left.json +++ b/data/drive-left.json @@ -1,6 +1,113 @@ { "type": "FeatureCollection", "features": [ + { + "type": "Feature", + "properties": {}, + "geometry": { + "type": "Polygon", + "coordinates": [ + [ + [ + 114.005126953125, + 22.50748229989845 + ], + [ + 114.32647705078125, + 22.570902079599385 + ], + [ + 114.43084716796874, + 22.435148257078577 + ], + [ + 114.41162109375, + 22.1543394041216 + ], + [ + 113.89801025390625, + 22.144163813359707 + ], + [ + 113.74420166015624, + 22.2191914879537 + ], + [ + 113.57357025146483, + 22.099000759798155 + ], + [ + 113.54885101318358, + 22.108225376027747 + ], + [ + 113.54816436767578, + 22.12190214478545 + ], + [ + 113.55022430419922, + 22.138121708335568 + ], + [ + 113.54541778564453, + 22.15084162777174 + ], + [ + 113.53649139404297, + 22.160062850612185 + ], + [ + 113.52859497070312, + 22.176595943458093 + ], + [ + 113.52584838867186, + 22.186769188065732 + ], + [ + 113.5337448120117, + 22.19980258118404 + ], + [ + 113.53614807128906, + 22.206477753086325 + ], + [ + 113.54061126708984, + 22.215377488459303 + ], + [ + 113.5550308227539, + 22.216966667517468 + ], + [ + 113.56121063232422, + 22.21219907633812 + ], + [ + 113.56155395507812, + 22.202981274057798 + ], + [ + 113.56498718261717, + 22.187404991398775 + ], + [ + 113.60858917236328, + 22.19503440693621 + ], + [ + 113.93749237060547, + 22.456408231818937 + ], + [ + 114.005126953125, + 22.50748229989845 + ] + ] + ] + } + }, { "type": "Feature", "properties": {}, @@ -2889,4 +2996,4 @@ } } ] -} \ No newline at end of file +} From 8d6c31deca143804f60eb9a6bd8dc376d773ccc1 Mon Sep 17 00:00:00 2001 From: Bryan Housel Date: Sun, 12 Jun 2016 22:44:21 -0400 Subject: [PATCH 17/18] Add a few points around Macau, Hong Kong, drop precision where not needed --- data/drive-left.json | 974 +++++++++++++++++++++++-------------------- 1 file changed, 533 insertions(+), 441 deletions(-) diff --git a/data/drive-left.json b/data/drive-left.json index c7fe8d6a7..a4ee544c4 100644 --- a/data/drive-left.json +++ b/data/drive-left.json @@ -5,108 +5,296 @@ "type": "Feature", "properties": {}, "geometry": { - "type": "Polygon", - "coordinates": [ - [ - [ - 114.005126953125, - 22.50748229989845 - ], - [ - 114.32647705078125, - 22.570902079599385 - ], - [ - 114.43084716796874, - 22.435148257078577 - ], - [ - 114.41162109375, - 22.1543394041216 - ], - [ - 113.89801025390625, - 22.144163813359707 - ], - [ - 113.74420166015624, - 22.2191914879537 - ], - [ - 113.57357025146483, - 22.099000759798155 - ], - [ - 113.54885101318358, - 22.108225376027747 - ], - [ - 113.54816436767578, - 22.12190214478545 - ], - [ - 113.55022430419922, - 22.138121708335568 - ], - [ - 113.54541778564453, - 22.15084162777174 - ], - [ - 113.53649139404297, - 22.160062850612185 - ], - [ - 113.52859497070312, - 22.176595943458093 - ], - [ - 113.52584838867186, - 22.186769188065732 - ], - [ - 113.5337448120117, - 22.19980258118404 - ], - [ - 113.53614807128906, - 22.206477753086325 - ], - [ - 113.54061126708984, - 22.215377488459303 - ], - [ - 113.5550308227539, - 22.216966667517468 - ], - [ - 113.56121063232422, - 22.21219907633812 - ], - [ - 113.56155395507812, - 22.202981274057798 - ], - [ - 113.56498718261717, - 22.187404991398775 - ], - [ - 113.60858917236328, - 22.19503440693621 - ], - [ - 113.93749237060547, - 22.456408231818937 - ], - [ - 114.005126953125, - 22.50748229989845 - ] - ] + "type": "Polygon", + "coordinates": [ + [ + [ + 113.573, + 22.186 + ], + [ + 114, + 22.5 + ], + [ + 114.05534, + 22.503 + ], + [ + 114.0595, + 22.51422 + ], + [ + 114.07345, + 22.51934 + ], + [ + 114.0786, + 22.53012 + ], + [ + 114.08512, + 22.53228 + ], + [ + 114.09034, + 22.53717 + ], + [ + 114.09611, + 22.53486 + ], + [ + 114.10602, + 22.53472 + ], + [ + 114.1115, + 22.52929 + ], + [ + 114.11522, + 22.5308 + ], + [ + 114.11649, + 22.53418 + ], + [ + 114.11979, + 22.53511 + ], + [ + 114.1244, + 22.5393 + ], + [ + 114.12729, + 22.53947 + ], + [ + 114.13018, + 22.54132 + ], + [ + 114.13807, + 22.5432 + ], + [ + 114.14429, + 22.54176 + ], + [ + 114.14441, + 22.54114 + ], + [ + 114.14846, + 22.54179 + ], + [ + 114.14855, + 22.54397 + ], + [ + 114.15042, + 22.54593 + ], + [ + 114.14964, + 22.54954 + ], + [ + 114.15166, + 22.55168 + ], + [ + 114.15192, + 22.55438 + ], + [ + 114.15642, + 22.55495 + ], + [ + 114.15841, + 22.55909 + ], + [ + 114.16032, + 22.56153 + ], + [ + 114.16162, + 22.56187 + ], + [ + 114.1634, + 22.55931 + ], + [ + 114.16553, + 22.5593 + ], + [ + 114.16733, + 22.56119 + ], + [ + 114.16934, + 22.56093 + ], + [ + 114.17061, + 22.5597 + ], + [ + 114.17702, + 22.56 + ], + [ + 114.17798, + 22.55546 + ], + [ + 114.18401, + 22.5552 + ], + [ + 114.18673, + 22.55468 + ], + [ + 114.1878, + 22.55545 + ], + [ + 114.18979, + 22.55446 + ], + [ + 114.1955, + 22.55564 + ], + [ + 114.19674, + 22.55691 + ], + [ + 114.20005, + 22.55717 + ], + [ + 114.20376, + 22.55623 + ], + [ + 114.20884, + 22.55672 + ], + [ + 114.22438, + 22.55055 + ], + [ + 114.2264, + 22.5476 + ], + [ + 114.22545, + 22.54528 + ], + [ + 114.22661, + 22.54339 + ], + [ + 114.32, + 22.576 + ], + [ + 114.45, + 22.43 + ], + [ + 114.45, + 22.14 + ], + [ + 113.9, + 22.14 + ], + [ + 113.75, + 22.22 + ], + [ + 113.553, + 22.095 + ], + [ + 113.54678, + 22.1207 + ], + [ + 113.5456, + 22.1207 + ], + [ + 113.54076, + 22.12373 + ], + [ + 113.54016, + 22.13618 + ], + [ + 113.54701, + 22.13651 + ], + [ + 113.5475, + 22.14583 + ], + [ + 113.52456, + 22.17978 + ], + [ + 113.53623, + 22.20191 + ], + [ + 113.53299, + 22.21232 + ], + [ + 113.53497, + 22.21351 + ], + [ + 113.53735, + 22.21377 + ], + [ + 113.54156, + 22.21315 + ], + [ + 113.54385, + 22.21709 + ], + [ + 113.55849, + 22.21565 + ], + [ + 113.573, + 22.186 + ] + ] ] - } + } }, { "type": "Feature", @@ -116,24 +304,24 @@ "coordinates": [ [ [ - -75.38818, - 18.62542 + -75, + 18 ], [ - -80.09033, - 20.32402 + -80, + 20.5 ], [ - -82.24365, - 19.26967 + -83, + 19 ], [ - -77.36572, - 16.42555 + -77, + 16 ], [ - -75.38818, - 18.62542 + -75, + 18 ] ] ] @@ -594,8 +782,8 @@ "coordinates": [ [ [ - -14.5459, - -5.92204 + -14.5, + -6 ], [ 11.79657, @@ -1306,24 +1494,24 @@ -0.84042 ], [ - 41.72607, - -1.81244 + 41.7, + -1.8 ], [ - 41.57227, - -48.80686 + 41.7, + -49 ], [ - -27.11426, - -60.23981 + -27, + -60 ], [ - -65.78613, - -52.5897 + -65.7, + -52.5 ], [ - -14.5459, - -5.92204 + -14.5, + -6 ] ] ] @@ -1364,20 +1552,20 @@ "coordinates": [ [ [ - 13.86475, - 36.46105 + 14, + 36.5 ], [ - 15.271, - 35.8935 + 15, + 36 ], [ - 14.17786, - 35.40248 + 14, + 35 ], [ - 13.86475, - 36.46105 + 14, + 36.5 ] ] ] @@ -1391,34 +1579,34 @@ "coordinates": [ [ [ - 0.13184, - 61.89758 + 0, + 62 ], [ - 2.41699, - 51.26191 + 2.5, + 51.3 ], [ - -2.03247, - 49.91763 + -2, + 50 ], [ - -1.90338, - 48.93333 + -1.9, + 49 ], [ - -20.12695, - 53.33087 + -20, + 53 ], [ - 0.13184, - 61.89758 + 0, + 62 ] ] ] } }, - { + { "type": "Feature", "properties": {}, "geometry": { @@ -1427,47 +1615,47 @@ [ [ 180, - -35.35322 + -35 ], [ - 161.41113, - -19.68397 + 161, + -19 ], [ - 167.00317, - -12.26486 + 167, + -12 ], [ 180, - -21.7697 + -22 ], [ 180, - 4.62023 + 4 ], [ - 170.85938, - 3.77656 + 170, + 3.7 ], [ - 127.08435, - 5.74171 + 127, + 5.7 ], [ - 118.21289, - 2.76748 + 118, + 2.7 ], [ - 119.52026, - 5.30977 + 119.5, + 5.4 ], [ - 117.26807, - 7.51498 + 117.2, + 7.5 ], [ - 102.6123, - 8.47781 + 102.6, + 8 ], [ 102.9158, @@ -2462,444 +2650,348 @@ 20.96272 ], [ - 92.18353, - 21.16072 + 92.187, + 21.16 ], [ - 92.21718, - 21.23434 + 92.26, + 21.36 ], [ - 92.19727, - 21.32968 + 92.27, + 21.4328 ], [ - 92.26318, - 21.36485 + 92.62, + 21.43 ], [ - 92.27142, - 21.43326 + 92.6, + 22 ], [ - 92.32635, - 21.41919 + 93.22, + 22.25 ], [ - 92.34695, - 21.47032 + 93.4, + 23.7 ], [ - 92.37717, - 21.48246 + 93.34, + 23.95 ], [ - 92.42592, - 21.43453 + 94.155, + 23.847 ], [ - 92.43073, - 21.3706 - ], - [ - 92.50763, - 21.35654 - ], - [ - 92.51793, - 21.38979 - ], - [ - 92.55913, - 21.37892 - ], - [ - 92.60376, - 21.24074 - ], - [ - 92.68135, - 21.29129 - ], - [ - 92.62642, - 21.43262 - ], - [ - 92.60925, - 21.99908 - ], - [ - 93.21899, - 22.2586 - ], - [ - 93.1366, - 23.05446 - ], - [ - 93.34534, - 23.05952 - ], - [ - 93.43323, - 23.68729 - ], - [ - 93.33572, - 24.07154 - ], - [ - 93.4964, - 23.94359 - ], - [ - 93.62549, - 24.00758 - ], - [ - 94.15524, - 23.84675 - ], - [ - 94.17068, - 23.92821 + 94.17, + 23.92 ], [ 94.25171, 24.07405 ], [ - 94.27952, - 24.17307 - ], - [ - 94.28844, - 24.23037 + 94.28, + 24.23 ], [ 94.30175, 24.2371 ], [ - 94.32561, + 94.3256, 24.2731 ], [ - 94.32587, - 24.32457 + 94.6, + 24.7 ], [ - 94.58199, - 24.72282 + 94.78, + 25.47 ], [ - 94.73648, - 25.13783 + 95.2, + 26 ], [ - 94.78455, - 25.47799 + 95.1, + 26.6 ], [ - 94.88823, - 25.58054 + 97.3, + 27.9 ], [ - 95.14709, - 26.07035 + 96.14, + 29.38 ], [ - 95.1004, - 26.51482 + 95.4, + 29.1 ], [ - 96.3446, - 27.28393 + 94.8, + 29.2 ], [ - 97.36359, - 27.91919 + 92.5, + 27.8 ], [ - 96.14136, - 29.38218 + 91.64, + 27.76 ], [ - 95.41626, - 29.08498 + 91.4, + 28 ], [ - 94.79004, - 29.20971 + 89.58, + 28.18 ], [ - 92.40051, - 27.81964 + 88.9, + 27.32 ], [ - 91.6452, - 27.76376 + 88.74, + 27.47 ], [ - 91.40625, - 28.0138 + 88.9, + 27.86 ], [ - 89.57977, - 28.18824 + 88.7, + 28.1 ], [ - 88.90961, - 27.3242 + 88.1, + 27.87 ], [ - 88.77228, - 27.54602 + 85.93, + 27.942 ], [ - 88.90961, - 27.884 + 81.6, + 30.5 ], [ - 88.70361, - 28.1059 + 81.2, + 30 ], [ - 88.12134, - 27.87793 + 78.73, + 31.5 ], [ - 85.92957, - 27.94103 + 78.77, + 31.99 ], [ - 81.62292, - 30.44157 + 78.4, + 32.5 ], [ - 81.19995, - 30.03343 + 79.3, + 32.5 ], [ - 78.75, - 31.50363 + 79, + 34.3 ], [ - 78.77197, - 31.96148 + 78.3, + 34.6 ], [ - 78.39844, - 32.50513 + 78, + 35.5 ], [ - 78.95325, - 32.37068 + 76.1, + 35.8 ], [ - 79.3158, - 32.49586 + 76, + 36.55 ], [ - 79.16199, - 33.0363 + 75.15, + 37 ], [ - 79.01367, - 34.33436 + 72.5, + 36.9 ], [ - 78.26111, - 34.6558 + 71.1, + 36.1 ], [ - 78.01392, - 35.46067 + 71.65, + 35.44 ], [ - 76.16821, - 35.79108 + 71.45, + 35 ], [ - 76.00342, - 36.5626 + 70.985, + 34.54 ], [ - 75.16846, - 37.01133 + 71.18, + 34.36 ], [ - 74.53674, - 36.99817 + 71.092, + 34.118 ], [ - 72.52075, - 36.84006 + 70.88, + 33.97 ], [ - 71.19141, - 36.08906 + 70.5, + 33.94 ], [ - 71.65283, - 35.44725 + 69.908, + 34.04 ], [ - 71.50452, - 34.9805 + 69.869, + 33.96 ], [ - 70.98541, - 34.54955 + 70, + 33.75 ], [ - 71.17905, - 34.36271 + 70.13, + 33.73 ], [ - 71.09253, - 34.11522 + 70.34, + 33.34 ], [ - 70.8783, - 33.97298 + 70.013, + 33.14 ], [ - 70.51849, - 33.94336 + 69.57, + 33.09 ], [ - 69.90807, - 34.04697 + 69.24, + 32.45 ], [ - 69.86893, - 33.96614 + 69.3, + 31.9 ], [ - 69.97055, - 33.75746 + 68.1, + 31.6 ], [ - 70.13123, - 33.72662 + 66.393, + 30.934 ], [ - 70.33997, - 33.342 + 66.2, + 29.8 ], [ - 70.02136, - 33.13985 + 62.5, + 29.4 ], [ - 69.5723, - 33.09614 + 60.87, + 29.86 ], [ - 69.23859, - 32.46227 + 61.53, + 29.0165 ], [ - 69.31274, - 31.9172 + 61.66, + 28.77 ], [ - 68.11798, - 31.75153 + 61.96, + 28.54 ], [ - 66.39313, - 30.93875 + 62.43, + 28.42 ], [ - 66.26404, - 29.80252 + 62.6, + 28.25 ], [ - 62.49023, - 29.41089 + 62.795, + 28.28 ], [ - 60.87524, - 29.86447 + 62.86, + 27.25 ], [ - 61.5303, - 29.01174 + 63.24, + 27.25 ], [ - 61.65802, - 28.77609 + 63.327, + 27.13 ], [ - 61.96632, - 28.5405 + 63.25, + 27.1 ], [ - 62.43256, - 28.42341 + 63.25, + 26.84 ], [ - 62.6049, - 28.2548 + 63.18, + 26.83 ], [ - 62.7951, - 28.28141 + 63.18, + 26.65 ], [ - 62.86789, - 27.23448 + 62.3, + 26.5 ], [ - 63.25996, - 27.2473 + 62.2, + 26.28 ], [ - 63.32726, - 27.1334 + 61.85, + 26.22 ], [ - 63.25241, - 27.09092 + 61.84, + 25.75 ], [ - 63.25241, - 26.83755 + 61.68, + 25.67 ], [ - 63.18787, - 26.83816 - ], - [ - 63.18993, - 26.65237 - ], - [ - 62.30896, - 26.51974 - ], - [ - 62.21558, - 26.27371 - ], - [ - 61.85303, - 26.22937 - ], - [ - 61.83105, - 25.75042 - ], - [ - 61.68274, - 25.67124 - ], - [ - 56.55762, - -21.18697 + 56.5, + -21 ], [ 180, @@ -2907,7 +2999,7 @@ ], [ 180, - -35.35322 + -35 ] ] ] @@ -2921,32 +3013,32 @@ "coordinates": [ [ [ - 138.75732, - 46.69467 + 138.7, + 46.7 ], [ - 145.5249, - 44.48475 + 145.5, + 44.5 ], [ - 145.27771, - 43.68376 + 145.2, + 43.7 ], [ - 145.86548, - 43.39307 + 146, + 43.3 ], [ - 142.84424, - 18.22935 + 142, + 18 ], [ - 122.09106, - 24.37712 + 122, + 24.3 ], [ - 138.75732, - 46.69467 + 138.7, + 46.7 ] ] ] From 9c1e9c9b118e101fba0fd4f4611e21f793c86256 Mon Sep 17 00:00:00 2001 From: Bryan Housel Date: Mon, 13 Jun 2016 10:56:52 -0400 Subject: [PATCH 18/18] Explicitly test all the highway types for onewayness --- test/spec/core/way.js | 41 +++++++++++++++++++++++++++++------------ 1 file changed, 29 insertions(+), 12 deletions(-) diff --git a/test/spec/core/way.js b/test/spec/core/way.js index 93fd66e15..19118c1af 100644 --- a/test/spec/core/way.js +++ b/test/spec/core/way.js @@ -269,27 +269,44 @@ describe('iD.Way', function() { }); it('returns false when the way has tag oneway=no', function() { - expect(iD.Way({tags: { oneway: 'no' }}).isOneWay()).to.be.false; - expect(iD.Way({tags: { oneway: '0' }}).isOneWay()).to.be.false; + expect(iD.Way({tags: { oneway: 'no' }}).isOneWay(), 'oneway no').to.be.false; + expect(iD.Way({tags: { oneway: '0' }}).isOneWay(), 'oneway 0').to.be.false; }); it('returns true when the way has tag oneway=yes', function() { - expect(iD.Way({tags: { oneway: 'yes' }}).isOneWay()).to.be.true; - expect(iD.Way({tags: { oneway: '1' }}).isOneWay()).to.be.true; - expect(iD.Way({tags: { oneway: '-1' }}).isOneWay()).to.be.true; + expect(iD.Way({tags: { oneway: 'yes' }}).isOneWay(), 'oneway yes').to.be.true; + expect(iD.Way({tags: { oneway: '1' }}).isOneWay(), 'oneway 1').to.be.true; + expect(iD.Way({tags: { oneway: '-1' }}).isOneWay(), 'oneway -1').to.be.true; }); it('returns true when the way has implied oneway tag (waterway=river, waterway=stream, etc)', function() { - expect(iD.Way({tags: { waterway: 'river' }}).isOneWay()).to.be.true; - expect(iD.Way({tags: { waterway: 'stream' }}).isOneWay()).to.be.true; - expect(iD.Way({tags: { highway: 'motorway' }}).isOneWay()).to.be.true; - expect(iD.Way({tags: { highway: 'motorway_link' }}).isOneWay()).to.be.true; - expect(iD.Way({tags: { junction: 'roundabout' }}).isOneWay()).to.be.true; + expect(iD.Way({tags: { waterway: 'river' }}).isOneWay(), 'river').to.be.true; + expect(iD.Way({tags: { waterway: 'stream' }}).isOneWay(), 'stream').to.be.true; + expect(iD.Way({tags: { highway: 'motorway' }}).isOneWay(), 'motorway').to.be.true; + expect(iD.Way({tags: { highway: 'motorway_link' }}).isOneWay(), 'motorway_link').to.be.true; + expect(iD.Way({tags: { junction: 'roundabout' }}).isOneWay(), 'roundabout').to.be.true; + }); + + it('returns false when the way does not have implied oneway tag', function() { + expect(iD.Way({tags: { highway: 'trunk' }}).isOneWay(), 'trunk').to.be.false; + expect(iD.Way({tags: { highway: 'trunk_link' }}).isOneWay(), 'trunk_link').to.be.false; + expect(iD.Way({tags: { highway: 'primary' }}).isOneWay(), 'primary').to.be.false; + expect(iD.Way({tags: { highway: 'primary_link' }}).isOneWay(), 'primary_link').to.be.false; + expect(iD.Way({tags: { highway: 'secondary' }}).isOneWay(), 'secondary').to.be.false; + expect(iD.Way({tags: { highway: 'secondary_link' }}).isOneWay(), 'secondary_link').to.be.false; + expect(iD.Way({tags: { highway: 'tertiary' }}).isOneWay(), 'tertiary').to.be.false; + expect(iD.Way({tags: { highway: 'tertiary_link' }}).isOneWay(), 'tertiary_link').to.be.false; + expect(iD.Way({tags: { highway: 'unclassified' }}).isOneWay(), 'unclassified').to.be.false; + expect(iD.Way({tags: { highway: 'residential' }}).isOneWay(), 'residential').to.be.false; + expect(iD.Way({tags: { highway: 'living_street' }}).isOneWay(), 'living_street').to.be.false; + expect(iD.Way({tags: { highway: 'service' }}).isOneWay(), 'service').to.be.false; + expect(iD.Way({tags: { highway: 'track' }}).isOneWay(), 'track').to.be.false; + expect(iD.Way({tags: { highway: 'path' }}).isOneWay(), 'path').to.be.false; }); it('returns false when oneway=no overrides implied oneway tag', function() { - expect(iD.Way({tags: { junction: 'roundabout', oneway: 'no' }}).isOneWay()).to.be.false; - expect(iD.Way({tags: { highway: 'motorway', oneway: 'no' }}).isOneWay()).to.be.false; + expect(iD.Way({tags: { junction: 'roundabout', oneway: 'no' }}).isOneWay(), 'roundabout').to.be.false; + expect(iD.Way({tags: { highway: 'motorway', oneway: 'no' }}).isOneWay(), 'motorway').to.be.false; }); });