17 Commits

Author SHA1 Message Date
Martin Raifer
11dfbe804c fix splitting of (route) relation member ways
instead of fully re-sorting the whole relation every time a member is split, perform a local operation: This works under the assumption that the relation is already sorted properly. The new way is inserted into the relation before or after the existing member, depending on how the old/new way connect to their neighboring members.

for cases where two ways form a loop, a additional look-ahead is implemented to disambiguate the order
2024-03-04 19:02:31 +01:00
Thomas Petillon
3ff06f9045 Fix relation handling on way split
Depending on which way is the longest, the new way is inserted into the
relation before the existing one. This case must be explicitly handled
for the relation to remain correct.
2021-12-06 21:25:23 +01:00
Bryan Housel
734957f283 Handle variants of 'stop' and 'platform' when identifying PTv2 members
(closes #4946)
2018-03-27 21:52:52 -04:00
Bryan Housel
aa1565baf8 Avoid reordering stops and platforms in PTv2 routes
(closes #4864)
2018-03-10 00:12:46 -05:00
Bryan Housel
be9bbd9271 Add tests for member ordering: node, way, relation 2018-01-18 15:21:38 -05:00
Bryan Housel
d6afd399fc Revised and expanded actionSplit tests to cover route splitting 2018-01-18 14:34:34 -05:00
Bryan Housel
3be577d8db However we fix actionAddMember, it needs to work for incomplete relations 2018-01-16 21:37:43 -05:00
Bryan Housel
be46e85ec0 Move insert way pairing code from osmJoinWays to actionAddMember
(tests for actionAddMember now passing!)
2018-01-16 17:41:14 -05:00
Bryan Housel
221158e918 WIP: Add insertHint to actionAddMember, actionSplit 2018-01-15 23:13:59 -05:00
Bryan Housel
8f6cb207fc Much expanded tests for osmJoinWays 2018-01-11 21:42:29 -05:00
Bryan Housel
07262fa711 Add tests for #4589 2018-01-09 23:57:44 -05:00
Bryan Housel
b3842d97f4 Remove lodash from the test suite
(closes #4378)
2017-10-18 14:37:39 -04:00
Bryan Housel
87950fd472 Fix lib export, flatten names in tests and docs 2016-10-04 21:56:09 -04:00
Kushan Joshi
4609282e04 Making spec/actions lint free 2016-06-14 16:34:52 +05:30
Kushan Joshi
6ef52256f3 Migrating to lodash v4 2016-05-17 12:37:25 +05:30
John Firebaugh
14bfc52e33 Remove repetition of entity IDs in tests
There were several places where the key and entity id
didn't match up.
2013-10-31 15:57:47 -07:00
John Firebaugh
7ec1222402 Try to insert relation members at a sensible index (#1539) 2013-06-05 16:00:53 -07:00