LightOSM.jl icon indicating copy to clipboard operation
LightOSM.jl copied to clipboard

`buildings_from_file` KeyError: key "relation" not found

Open agerlach opened this issue 1 year ago • 0 comments

I've noticed that for some geographical regions there exists building data without relation data in the downloaded *.osm file.

For reference see https://www.openstreetmap.org/search?query=greenville%20ohio#map=18/40.10042/-84.62916

using LightOSM

download_osm_buildings(:place_name; 
   place_name = "greenville, ohio",    
   metadata = true,
   download_format = :osm,
   save_to_file_location = "buildings.osm")

buildings = buildings_from_file("buildings.osm");
ERROR: KeyError: key "relation" not found
Stacktrace:
 [1] getindex
   @ ./dict.jl:481 [inlined]
 [2] parse_osm_buildings_dict(osm_buildings_dict::Dict{String, Any})
   @ LightOSM ~/.julia/dev/LightOSM/src/buildings.jl:204
 [3] buildings_from_object
   @ ~/.julia/dev/LightOSM/src/buildings.jl:260 [inlined]
 [4] buildings_from_file(file_path::String)
   @ LightOSM ~/.julia/dev/LightOSM/src/buildings.jl:294

agerlach avatar Jul 25 '22 19:07 agerlach