Skip to content

work with empty nodes/ways#109

Open
Wikunia wants to merge 1 commit intoJuliaDynamics:masterfrom
Wikunia:bugfix-empty-osm
Open

work with empty nodes/ways#109
Wikunia wants to merge 1 commit intoJuliaDynamics:masterfrom
Wikunia:bugfix-empty-osm

Conversation

@Wikunia
Copy link
Copy Markdown

@Wikunia Wikunia commented Feb 16, 2025

The parsing functionality worked with empty relations but failed for empty nodes or ways. This is now fixed with a small test case.

Comment thread src/parse.jl
ways = Dict{T,Way{T}}()
highway_nodes = Set{T}([])
for way in osm_network_dict["way"]
for way in get(osm_network_dict, "way", Vector{Dict{String, Any}}())
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Hm I'm not sure about deliberately instantiating a Vector{Dict{String, Any}} here stylistically.

Would it be better to skip the loop if !haskey(osm_network_dict, "way") instead?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants