Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Incorrectly-built routes for the cases when there are multiple waypoints in the input data with the same coordinates #209

Closed
smellyshovel opened this issue Aug 31, 2023 · 0 comments · Fixed by #210
Assignees
Labels
bug Something isn't working semver:patch For non-breaking PR's that don't introduce new features

Comments

@smellyshovel
Copy link
Collaborator

To put it all short:

With the existing implementation, everything works just fine as long as none of the coordinates are repeated in the input waypoints data:

        [7.137154, 49.319755], // 1
        [7.148604, 49.315962], // 2
        [7.149873, 49.319595],
        [7.140321, 49.30794],
        [7.153934, 49.317662],
        [7.144149, 49.310097], // 3
        [7.13242, 49.31679],
        [7.146392, 49.317763], // 4
        [7.156454, 49.322832], // 5
        [7.143664, 49.313397], // 6

        // [7.137154, 49.319755], // 1
        // [7.146392, 49.317763], // 4
        // [7.137154, 49.319755], // 1
        // [7.148604, 49.315962], // 2
        // [7.144149, 49.310097], // 3
        // [7.143664, 49.313397], // 6
        // [7.156454, 49.322832], // 5
        // [7.143664, 49.313397], // 6

Screenshot_20230831_153119

Total route geometry:

iw_lHk~pj@sCkIw@qFj@gUbAk@fJuN~AhAzAcF?yApGiCRgAYkCK}Hg@aDEsCVcBcEiA_BmEsBrD?`B`CtGpDfFAlHiCnFmB`CqFgJ?_AmAaC_EoC_C^`H~PtJpHzAcF?yApGiCRgA[}Cl@@^cA`AMp@|DzAvArBT`DhJfEfInIxKhEpL|CpFdFrMZHbEiD_B_C}D}Ic`@qy@wAmNe@YmA^oCKkD_CqFqAu@u@a@^cBkCx@eAXhAfB|CpFpAjD~BnCJ~@t@nAvLz@ExRla@j@lAwEtG{BxO}@dR@zHu@nMcCzHe@pPWLeBw@k@|DoEnDoENqBjAi@ye@_A}g@Ri]k@qEoAyCeA_A^qA`AcDKcBsAxAaBtDyFcEeBuC_HmRk@oDQ_Gy@oDgBgCiBk@IaDNo@fAi@C[y@{C}BiC|BhCz@hDmAfA@`EhBj@fBfCx@nDP~Fj@nD~GlRhApBtJpHzAcF?yApGiCRgA[}Cl@@^cA`AMp@|DzAvArBT`DhJfEfI`DjEkApEkGqF]LEr@

Reference Valhalla:

Screenshot_20230831_153257

Issues begin with uncommenting at least the 11th coordinate (which duplicates the first one):

        [7.137154, 49.319755], // 1
        [7.148604, 49.315962], // 2
        [7.149873, 49.319595],
        [7.140321, 49.30794],
        [7.153934, 49.317662],
        [7.144149, 49.310097], // 3
        [7.13242, 49.31679],
        [7.146392, 49.317763], // 4
        [7.156454, 49.322832], // 5
        [7.143664, 49.313397], // 6

        [7.137154, 49.319755], // 1
        // [7.146392, 49.317763], // 4
        // [7.137154, 49.319755], // 1
        // [7.148604, 49.315962], // 2
        // [7.144149, 49.310097], // 3
        // [7.143664, 49.313397], // 6
        // [7.156454, 49.322832], // 5
        // [7.143664, 49.313397], // 6

The built route looks the same

Screenshot_20230831_153607

Though the total route's geometry's different:

iw_lHk~pj@sCkIw@qFj@gUbAk@fJuN~AhAzAcF?yApGiCRgAYkCK}Hg@aDEsCVcBcEiA_BmEsBrD?`B`CtGpDfFAlHiCnFmB`CqFgJ?_AmAaC_EoC_C^`H~PtJpHzAcF?yApGiCRgA[}Cl@@^cA`AMp@|DzAvArBT`DhJfEfInIxKhEpL|CpFdFrMZHbEiD_B_C}D}Ic`@qy@wAmNe@YmA^oCKkD_CqFqAu@u@a@^cBkCx@eAXhAfB|CpFpAjD~BnCJ~@t@nAvLz@ExRla@j@lAwEtG{BxO}@dR@zHu@nMcCzHe@pPWLeBw@k@|DoEnDoENqBjAi@ye@_A}g@Ri]k@qEoAyCeA_A^qA`AcDKcBsAxAaBtDyFcEeBuC_HmRk@oDQ_Gy@oDgBgCiBk@IaDNo@fAi@C[y@{C}BiC|BhCz@hDmAfA@`EhBj@fBfCx@nDP~Fj@nD~GlRhApBtJpHzAcF?yApGiCRgA[}Cl@@^cA`AMp@|DzAvArBT`DhJfEfI`DjEkApEkGqF]LEr@Sh@L|F`CvPjF_A}@dR@zHu@nMcCzHe@pPWLeBw@k@|DoEnDoENqBjAwAm_AeFfAwCdDaA`@WqDsA_F

What it should look like (ref)

Screenshot_20230831_153754

If we uncomment all the waypoints, thus adding multiple duplicated waypoints, here's what the difference looks like:

Real: total mess with some weird straight lines here and there

Screenshot_20230831_154034

Ref

Screenshot_20230831_154139

@smellyshovel smellyshovel added bug Something isn't working semver:patch For non-breaking PR's that don't introduce new features labels Aug 31, 2023
@smellyshovel smellyshovel self-assigned this Aug 31, 2023
@smellyshovel smellyshovel mentioned this issue Aug 31, 2023
smellyshovel added a commit that referenced this issue Aug 31, 2023
* Fix #209

* Restore the accidentally-deleted comment
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working semver:patch For non-breaking PR's that don't introduce new features
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant