Skip to content

Commit

Permalink
[FIX] Ensure "lanes" tag for railway type is converted to Int8
Browse files Browse the repository at this point in the history
  • Loading branch information
captchanjack committed Apr 13, 2023
1 parent d9dda71 commit 6442955
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.2.8"
version = "0.2.9"

[deps]
DataStructures = "864edb3b-99cc-5e75-8d2d-829cb0a9cfe8"
Expand Down
5 changes: 3 additions & 2 deletions src/parse.jl
Original file line number Diff line number Diff line change
Expand Up @@ -201,7 +201,8 @@ function parse_osm_network_dict(osm_network_dict::AbstractDict, network_type::Sy
U = DEFAULT_OSM_INDEX_TYPE
T = DEFAULT_OSM_ID_TYPE
W = DEFAULT_OSM_EDGE_WEIGHT_TYPE

L = DEFAULT_OSM_LANES_TYPE

ways = Dict{T,Way{T}}()
highway_nodes = Set{Int}([])
for way in osm_network_dict["way"]
Expand All @@ -222,7 +223,7 @@ function parse_osm_network_dict(osm_network_dict::AbstractDict, network_type::Sy
tags["gauge"] = get(tags, "gauge", nothing)
tags["usage"] = get(tags, "usage", "unknown")
tags["name"] = get(tags, "name", "unknown")
tags["lanes"] = get(tags, "tracks", 1)
tags["lanes"] = L(get(tags, "tracks", 1))
tags["maxspeed"] = maxspeed(tags)
tags["oneway"] = is_oneway(tags)
tags["reverseway"] = is_reverseway(tags)
Expand Down

2 comments on commit 6442955

@captchanjack
Copy link
Collaborator Author

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/81579

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.2.9 -m "<description of version>" 6442955055eddf8ee2ab946127ed5d038bb610eb
git push origin v0.2.9

Please sign in to comment.