Fix path around Garcia Lorca

This commit is contained in:
Mattéo Delabre 2020-07-25 01:16:36 +02:00
parent 075105393d
commit 38afb5a60d
Signed by: matteo
GPG Key ID: AE3FBD02DC583ABB
2 changed files with 305 additions and 6 deletions

View File

@ -203,13 +203,15 @@ ${name} is one-way and cannot be used in reverse.`);
for (let stopIdx = 0; stopIdx + 1 < lineStops.length; ++stopIdx)
{
const begin = elements[lineStops[stopIdx]].tags.ref;
const beginIdx = path.indexOf(lineStops[stopIdx]);
const end = elements[lineStops[stopIdx + 1]].tags.ref;
const endIdx = path.indexOf(
lineStops[stopIdx + 1],
beginIdx
) + 1;
const id = `${begin}-${end}`;
const nodesIds = path.slice(
path.indexOf(lineStops[stopIdx]),
path.indexOf(lineStops[stopIdx + 1]) + 1,
);
const nodesIds = path.slice(beginIdx, endIdx);
if (id in segments)
{

View File

@ -5703,7 +5703,118 @@
]
},
"43219-44105": {
"nodes": [],
"nodes": [
{
"lat": 43.5935375,
"lon": 3.8958178,
"distance": 0
},
{
"lat": 43.5935191,
"lon": 3.8955107,
"distance": 25
},
{
"lat": 43.5935012,
"lon": 3.8953812,
"distance": 36
},
{
"lat": 43.5934697,
"lon": 3.8952767,
"distance": 45
},
{
"lat": 43.5933489,
"lon": 3.8949563,
"distance": 74
},
{
"lat": 43.592631,
"lon": 3.8932396,
"distance": 234
},
{
"lat": 43.5925335,
"lon": 3.8930149,
"distance": 255
},
{
"lat": 43.5924934,
"lon": 3.8929227,
"distance": 264
},
{
"lat": 43.5923978,
"lon": 3.892746,
"distance": 282
},
{
"lat": 43.5922818,
"lon": 3.8925466,
"distance": 303
},
{
"lat": 43.5921108,
"lon": 3.8922726,
"distance": 332
},
{
"lat": 43.5920905,
"lon": 3.8922401,
"distance": 335
},
{
"lat": 43.5920541,
"lon": 3.8921839,
"distance": 341
},
{
"lat": 43.5920243,
"lon": 3.8921406,
"distance": 346
},
{
"lat": 43.5917409,
"lon": 3.8917478,
"distance": 391
},
{
"lat": 43.5916244,
"lon": 3.8916128,
"distance": 408
},
{
"lat": 43.5915041,
"lon": 3.891482,
"distance": 425
},
{
"lat": 43.5914163,
"lon": 3.8913754,
"distance": 438
},
{
"lat": 43.5914001,
"lon": 3.8913509,
"distance": 441
},
{
"lat": 43.5913911,
"lon": 3.8913381,
"distance": 442
},
{
"lat": 43.5913774,
"lon": 3.8913183,
"distance": 444
},
{
"lat": 43.5911314,
"lon": 3.8909614,
"distance": 484
}
],
"routes": [
[
"4",
@ -8918,7 +9029,193 @@
]
},
"43135-44201": {
"nodes": [],
"nodes": [
{
"lat": 43.590299,
"lon": 3.8852278,
"distance": 0
},
{
"lat": 43.5902239,
"lon": 3.8854361,
"distance": 19
},
{
"lat": 43.5901892,
"lon": 3.8855375,
"distance": 28
},
{
"lat": 43.5901327,
"lon": 3.885682,
"distance": 41
},
{
"lat": 43.5900335,
"lon": 3.8859856,
"distance": 68
},
{
"lat": 43.5899336,
"lon": 3.8863286,
"distance": 98
},
{
"lat": 43.589668,
"lon": 3.8873572,
"distance": 186
},
{
"lat": 43.5896289,
"lon": 3.8875274,
"distance": 200
},
{
"lat": 43.5896112,
"lon": 3.8876199,
"distance": 208
},
{
"lat": 43.5895991,
"lon": 3.8877002,
"distance": 215
},
{
"lat": 43.5895757,
"lon": 3.8878353,
"distance": 226
},
{
"lat": 43.5895655,
"lon": 3.888084,
"distance": 246
},
{
"lat": 43.5894875,
"lon": 3.8891102,
"distance": 329
},
{
"lat": 43.5894845,
"lon": 3.8892336,
"distance": 339
},
{
"lat": 43.5894875,
"lon": 3.8892979,
"distance": 344
},
{
"lat": 43.5894913,
"lon": 3.8893445,
"distance": 348
},
{
"lat": 43.589497,
"lon": 3.8893914,
"distance": 352
},
{
"lat": 43.5895101,
"lon": 3.8894492,
"distance": 357
},
{
"lat": 43.5895171,
"lon": 3.8894783,
"distance": 359
},
{
"lat": 43.5895575,
"lon": 3.8895791,
"distance": 368
},
{
"lat": 43.5896606,
"lon": 3.8897616,
"distance": 387
},
{
"lat": 43.5897996,
"lon": 3.8899827,
"distance": 411
},
{
"lat": 43.5898332,
"lon": 3.8900295,
"distance": 416
},
{
"lat": 43.5898698,
"lon": 3.8900696,
"distance": 421
},
{
"lat": 43.5899323,
"lon": 3.8901171,
"distance": 429
},
{
"lat": 43.5900012,
"lon": 3.8901601,
"distance": 437
},
{
"lat": 43.5900503,
"lon": 3.8901742,
"distance": 443
},
{
"lat": 43.5902268,
"lon": 3.8901683,
"distance": 463
},
{
"lat": 43.5903954,
"lon": 3.8901753,
"distance": 482
},
{
"lat": 43.590471,
"lon": 3.890199,
"distance": 491
},
{
"lat": 43.5905266,
"lon": 3.8902301,
"distance": 498
},
{
"lat": 43.5905875,
"lon": 3.8902704,
"distance": 506
},
{
"lat": 43.5906684,
"lon": 3.890362,
"distance": 518
},
{
"lat": 43.5907491,
"lon": 3.8904661,
"distance": 530
},
{
"lat": 43.5907848,
"lon": 3.8905169,
"distance": 536
},
{
"lat": 43.5908608,
"lon": 3.8906311,
"distance": 549
},
{
"lat": 43.5912294,
"lon": 3.8911652,
"distance": 608
}
],
"routes": [
[
"4",