Skip to content

Commit

Permalink
Stop add_indexed_restrictions! from reversing order of nodes in way o…
Browse files Browse the repository at this point in the history
…bject
  • Loading branch information
Mal Miller authored and mmiller-max committed Sep 28, 2021
1 parent 4f8684a commit 68039e4
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
2 changes: 1 addition & 1 deletion Project.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
name = "LightOSM"
uuid = "d1922b25-af4e-4ba3-84af-fe9bea896051"
authors = ["Jack Chan <[email protected]>"]
version = "0.1.16"
version = "0.1.17"

[deps]
DataStructures = "864edb3b-99cc-5e75-8d2d-829cb0a9cfe8"
Expand Down
5 changes: 3 additions & 2 deletions src/graph.jl
Original file line number Diff line number Diff line change
Expand Up @@ -306,8 +306,9 @@ function add_indexed_restrictions!(g::OSMGraph{U,T,W}) where {U <: Integer,T <:
to_node = adjacent_node(g, to_via_intersection_node, r.to_way)::T

if to_via_intersection_node == via_way_nodes[end]
# Ordering matters, see doc string
reverse!(via_way_nodes)
# Ordering matters, see doc string, but
# we don't want to reorder the array in the Way object
via_way_nodes = reverse(via_way_nodes)
end

indices = [g.node_to_index[n] for n in [to_node, via_way_nodes..., from_node]]
Expand Down

2 comments on commit 68039e4

@mmiller-max
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@JuliaRegistrator
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Registration pull request created: JuliaRegistries/General/45660

After the above pull request is merged, it is recommended that a tag is created on this repository for the registered package version.

This will be done automatically if the Julia TagBot GitHub Action is installed, or can be done manually through the github interface, or via:

git tag -a v0.1.17 -m "<description of version>" 68039e43eef861752d3d03c350b6dfaaef6db8c0
git push origin v0.1.17

Please sign in to comment.