Skip to content

buildings_from_file KeyError: key "relation" not found #75

Description

@agerlach

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions