-
Notifications
You must be signed in to change notification settings - Fork 14
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
TypeError in graph_from_file #51
Comments
@sstroemer thanks for reporting this. The issue is with one way which has the ID 200655871. It is actually a tram way and therefore shouldn't be downloaded at all. The neighbouring tram ways (e.g. this) are not downloaded, so not sure what is different with this one. @captchanjack any ideas? The actual error message occurs because with roads we check the lane values and ensure they are all A smaller graph that shows the same issue:
|
Concerning speed, downloading as a |
@mmiller-max had a quick look at this, I suspect it's to do with this relation (a turn restriction) https://www.openstreetmap.org/relation/4498380 that is for both a way and the railway/tramway in question. The railroad is being downloaded due to it being part of the relation. This is defintely an edge case, not sure how to even interpret the restriction data, I guess it's for Trams that can be on both normal roads and their dedicated track?? If the data is out of date we can just delete it from the OSM data, as an immediate fix. |
@spcogg nice find! Perhaps then there are two fixes we should make:
|
@mmiller-max @spcogg adding to this as I am trying to work with a rail data set and getting the same issue. To your point 1 @mmiller-max, are there assumptions when reading the map that drive paths are included somehow? download_osm_network( Will be investigating on my side and update |
I've downloaded a graph close to Vienna (AT) using:
LightOSM.download_osm_network(:bbox; network_type=:drive, save_to_file_location="./graph_drive", download_format=:osm, minlat=48.15, maxlat=48.40, minlon=16.20, maxlon=16.58)
Loading this graph using
LightOSM.graph_from_file("graph_drive.osm"; graph_type=:simple_weighted, precompute_dijkstra_states=false)
takes a really long time (just compared to previous tries in osmnx and igraph), and finally fails with
ERROR: TypeError: in typeassert, expected Int8, got a value of type Int64
Stacktrace:
[1] _roundedmean at C:\Users\USER\.julia\packages\LightOSM\Da141\src\graph.jl:218 [inlined]
[2] add_node_tags!(::LightOSM.OSMGraph{Int32,Int64,Float64}) at C:\Users\USER\.julia\packages\LightOSM\Da141\src\graph.jl:230
[3] graph_from_object(::LightXML.XMLDocument; network_type::Symbol, weight_type::Symbol, graph_type::Symbol, precompute_dijkstra_states::Bool, largest_connected_component::Bool) at C:\Users\USER\.julia\packages\LightOSM\Da141\src\graph.jl:36
[4] graph_from_file(::String; network_type::Symbol, weight_type::Symbol, graph_type::Symbol, precompute_dijkstra_states::Bool, largest_connected_component::Bool) at C:\Users\USER\.julia\packages\LightOSM\Da141\src\graph.jl:84
[5] top-level scope at REPL[2]:1
Unfortunately I could not trace that any further. Any ideas?
Using: LightOSM v0.1.18, Julia Version 1.5.2
The text was updated successfully, but these errors were encountered: