Kyℓe Hensel
147c785594
fix the turn restriction editor not supporting bidirectional roads ( #10800 )
2025-02-22 10:01:26 +01:00
Kyℓe Hensel
3b24932bda
fix highway=busway not supported in the turn restriction editor ( #9633 )
2023-11-14 09:53:23 +01:00
Martin Raifer
56e92e661c
split function branches to reduce complexity
2022-11-08 13:55:28 +01:00
Martin Raifer
097c6bd774
skip unsupported/invalid restrictions instead of fallback to "no_*"
...
closes #9337 (at least kind of… for a proper solution see #6460 )
2022-10-27 18:36:05 +02:00
Quincy Morgan
ba48a861bc
Enable curly and block-spacing eslint rules
2020-11-10 14:19:11 -05:00
Quincy Morgan
15c8e060f8
Fix tests
2020-10-23 15:49:30 -04:00
Quincy Morgan
3f9ac9105b
Enable no-undef-init eslint rule
2020-10-23 11:33:47 -04:00
Quincy Morgan
c940d827e6
Enable the Split operation for multiple selected nodes ( close #7990 )
2020-09-24 15:13:05 -04:00
Quincy Morgan
5ddcfb0ced
Add parameter to specify which way should keep the history when splitting ways (re: #7795 )
...
Fix code tests
2020-09-14 11:27:20 -04:00
Quincy Morgan
d01bb78707
Reduce circular dependencies caused by importing from indexes, the location of the validation models, and the location of areaKeys ( close #6237 )
2019-04-24 13:45:59 -07:00
Bryan Housel
167824a530
Make sure all nodes have an actual loc property
...
- This is to make difference comparisons easier
- The only nodes that didn't have a `loc` were fake nodes we made for testing
- So this commit also fixes the `osmIntersection` code and tests.
2019-04-03 16:20:45 -04:00
Bryan Housel
5b4aa529de
Replace lodash uniq
...
(re: 6087)
2019-03-27 02:43:25 -04:00
Bryan Housel
5e1ff74199
Replace lodash difference, intersects, union
...
(re: 6087)
2019-03-27 01:22:11 -04:00
Bryan Housel
7a6c63fcc5
Remove lodash extend (re: #6087 )
2019-03-23 00:38:39 -04:00
Bryan Housel
0e90167513
Remove lodash clone
...
(re: #6087 )
2019-03-22 23:18:25 -04:00
Bryan Housel
d20c537e46
Don't match a simple from-via-to restriction by taking a longer path
2018-04-11 22:54:49 -04:00
Martin Raifer
d2d464d9ee
only drop restrictions from FROM towards VIA when adding new only
...
partially adresses bugs in #4968 :
* doesn't crash anymore in complex situations (short FROM ways where both ends connect to a TO way)
* adding a only-restriction at one end of a short FROM doesn't delete restrictions on the other end of the same FROM anymore
2018-04-10 13:19:20 +02:00
Bryan Housel
7e61ef0dc1
Clearer conditional
2018-03-29 16:31:52 -04:00
Bryan Housel
4041ab48fe
Only restriction along viaway can enter either at either end
...
(closes #4951 )
Previously it would only count if the connecting node was the first one.
I guess I was only thinking about oneways only the day I wrote that code.
2018-03-29 16:19:18 -04:00
Bryan Housel
0d262e5bb5
Stricter test for whether a via way restriction matches the path
...
(closes #4928 )
2018-03-28 23:49:08 -04:00
Bryan Housel
d4bf42b6c4
Remove code attempting to extend leaf ways
...
(closes #4869 )
It was causing more rendering issues than it was solving
2018-03-10 17:51:17 -05:00
Bryan Housel
88dea28cf7
only_ restrictions only count if they leave the FROM towards the VIA
...
(closes #4849 )
2018-03-09 22:39:30 -05:00
Bryan Housel
ecd63cdad2
Use maxDistance passed in to osmIntersection() in turn search
...
(closes #4844 )
The maxDistance was previously hardcoded to 30 meters.
Now we pass it in as a parameter when creating the intersection.
But we need to honor that same maxDistance later when walking the graph
to find turns from.
2018-03-02 17:27:57 -05:00
Bryan Housel
7fa27217b6
Return an indirect u-turn restriction for an only restriction
2018-02-23 11:59:44 -05:00
Bryan Housel
156d0fd681
Drop confusing fromOnly code, consolidate path highlighting code
2018-02-21 00:33:41 -05:00
Bryan Housel
200098dff9
Render restriction paths with red/green/blue shadow
2018-02-19 21:30:47 -05:00
Bryan Housel
d940200ef0
osmInferRestriction can just take a turn, instead of from/to
...
This is better because it makes explicit that osmInferRestriction
needs an actual turn now (from/to with vertex, etc)
2018-02-16 13:27:23 -05:00
Bryan Housel
aff9258dee
Indirect restrictions now include only the partial path
...
This lets us properly infer the actual turn taken through the indirect
restriction using osmInferRestriction (an improvement over 5e9db0d )
2018-02-16 11:42:44 -05:00
Bryan Housel
a2b6a3b09b
Flag restriction as indirect if from doesn't match
2018-02-15 22:18:01 -05:00
Bryan Housel
f7e6eae065
Support Only Via paths, render indirect turn restriction with opacity
2018-02-15 17:27:45 -05:00
Bryan Housel
1612326ffa
Move dist/via sliders to bottom, add imperial/metric conversion
2018-02-13 17:25:49 -05:00
Bryan Housel
777585317a
Better inference of u-turns via way
2018-02-12 14:42:39 -05:00
Bryan Housel
957896656a
Detail slider affects turns, but not geometry
...
(I decided that the larger context of the intersection is important and
shouldn't be hidden from the user)
Also
- show detail slider only if the intersection is complex
- hide the restriction editor completely if there is no real intersection
(e.g. junction of `highway=path`)
2018-02-09 22:11:22 -05:00
Bryan Housel
47eb5256cc
WIP: add detail slider to restriction editor
2018-02-09 16:22:49 -05:00
Bryan Housel
0cbff57dc9
Cycle through only_ turn restriction states
...
(re: #2622 )
2018-02-07 19:04:28 -05:00
Bryan Housel
ea4ac80fee
Extend max distance to 30m, but as measured from starting vertex
2018-02-07 09:27:54 -05:00
Bryan Housel
5ca56b6873
Handle situation where nodes have no loc (like in tests)
2018-02-07 01:16:14 -05:00
Bryan Housel
aa7925a918
Extend leaf ways, so they don't stop within the viewport
2018-02-07 00:07:38 -05:00
Bryan Housel
520cfd3276
Fix bug causing improper calc of from/via/to metadata after trimming
...
This is the part of the algorithm where trivial sections get trimmed
from the vgraph. Removing a vertex from `vertexIds` means "stop checking
this one". But there were some situations where it could get removed
twice, so we now just verify that `vertexId` is actually in the array
before calling `splice`.
2018-02-06 14:34:26 -05:00
Bryan Housel
c1378a141f
Add support for complex intersection and via way restrictions
2018-02-02 19:58:09 -05:00
Bryan Housel
855c112ae0
Convert lodah-es and d3 to named imports for osm
2017-09-25 14:14:49 -04:00
Bryan Housel
f50e80d0b5
Refactor Intersection, Multipolygon from geo to osm
2016-10-11 23:09:27 -04:00