Commit Graph

16 Commits

Author SHA1 Message Date
e01245cb98 Do not use z-coordinate for speed on TRAINLINE or ACCESS
Using the z-coordinate as is is a bad idea. When intersecting, a
new node will be generated. What z-coord should it be? This node
can now be part of two distinct types with different meanings for
it. So we need to implement weight as a path argument.

This commit hardcodes the speed for trains and access pathways as
a temporary workaround.
2021-03-13 13:02:19 +01:00
50c39a52bb Never intersect trainlines 2021-03-13 11:27:50 +01:00
f37ec6d03f Also check access for dijkstra_net_meta_new_to_list 2021-03-04 22:01:13 +01:00
12d5bdc738 Strdup access 2021-03-04 22:00:54 +01:00
faa5d7ca4b Introduce a penalty for entering / leaving the train
Done by upping the cost for walking on an access layer.
2021-02-26 19:33:21 +01:00
aa7256c12e Only allow to start on streets 2021-02-26 19:27:26 +01:00
6ee084472a Implement trainline support 2021-02-26 19:15:48 +01:00
36f4f48287 Fix path intersection algorithm
I forgot that, when splitting a path, I need to also check the newly
generated ("right") segment against all (following) existing path
segments because the original segment is now shrunk to the size of
the new "left" one, and will therefore not intersect every possible
line. (But you still need to keep checking with it because there is
not guarantee that the line we just intersected with was the physi-
cally closest to the starting point, it was just the first in memory.)
2021-02-04 23:36:37 +01:00
5db3ad8759 Add height support
Optional third coordinate in position field. Streets will only
intersect when all 4 coordinates are on the same height.
2021-02-04 20:49:45 +01:00
6e5b86c076 Implement HTTP server for requests 2020-05-03 19:59:12 +02:00
0b755401b8 Fix Dijkstra implementation, add debug prints 2020-05-03 12:09:29 +02:00
d060afea0d Adjust weight after split 2020-05-03 12:08:24 +02:00
7d6082ed68 Fix bugs and implement bugged version of Dijkstra 2020-05-03 00:00:41 +02:00
127e0d23ca Remove stray unused variable 2020-05-02 17:13:45 +02:00
6a546f6138 Automatically calculate weight from distance 2020-05-02 17:13:27 +02:00
087cefb13a Rename dijkstrasearch to dijkstragraph 2020-05-02 17:02:26 +02:00