Skip to content

Commit 6442955

Browse files
committed
[FIX] Ensure "lanes" tag for railway type is converted to Int8
1 parent d9dda71 commit 6442955

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

Project.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
name = "LightOSM"
22
uuid = "d1922b25-af4e-4ba3-84af-fe9bea896051"
33
authors = ["Jack Chan <jchan2@deloitte.com.au>"]
4-
version = "0.2.8"
4+
version = "0.2.9"
55

66
[deps]
77
DataStructures = "864edb3b-99cc-5e75-8d2d-829cb0a9cfe8"

src/parse.jl

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -201,7 +201,8 @@ function parse_osm_network_dict(osm_network_dict::AbstractDict, network_type::Sy
201201
U = DEFAULT_OSM_INDEX_TYPE
202202
T = DEFAULT_OSM_ID_TYPE
203203
W = DEFAULT_OSM_EDGE_WEIGHT_TYPE
204-
204+
L = DEFAULT_OSM_LANES_TYPE
205+
205206
ways = Dict{T,Way{T}}()
206207
highway_nodes = Set{Int}([])
207208
for way in osm_network_dict["way"]
@@ -222,7 +223,7 @@ function parse_osm_network_dict(osm_network_dict::AbstractDict, network_type::Sy
222223
tags["gauge"] = get(tags, "gauge", nothing)
223224
tags["usage"] = get(tags, "usage", "unknown")
224225
tags["name"] = get(tags, "name", "unknown")
225-
tags["lanes"] = get(tags, "tracks", 1)
226+
tags["lanes"] = L(get(tags, "tracks", 1))
226227
tags["maxspeed"] = maxspeed(tags)
227228
tags["oneway"] = is_oneway(tags)
228229
tags["reverseway"] = is_reverseway(tags)

0 commit comments

Comments
 (0)