Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[FIX] Ensure "lanes" tag for railway type is converted to Int8 #93

Merged
merged 1 commit into from
Apr 13, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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