Hi, the following is the code, excepted from OpenStreetMap package. This interesting empty! function confuses me.
type OSMattributes
oneway::Bool
oneway_override::Bool
oneway_reverse::Bool
visible::Bool
lanes::Int
name::UTF8String
class::UTF8String
detail::UTF8String
cycleway::UTF8String
sidewalk::UTF8String
bicycle::UTF8String
# XML elements
element::Symbol # :None, :Node, :Way, :Tag[, :Relation]
parent::Symbol # :Building, :Feature, :Highway
way_nodes::Vector{Int} # for buildings and highways
id::Int # Uninitialized
lat::Float64 # Uninitialized
lon::Float64 # Uninitialized
OSMattributes() = new(false,false,false,false,1,
"","","","","","",:None,:None,[])
end
function reset_attributes!(osm::OSMattributes)
osm.oneway = osm.oneway_override = osm.oneway_reverse = osm.visible = false
osm.lanes = 1
osm.name = osm.class = osm.detail = osm.cycleway = osm.sidewalk = osm.bicycle = ""
osm.element = osm.parent = :None
empty!(osm.way_nodes) # <--- confused
end
I can not find any documentation about this function. Is it because it is deprecated? Any comments are greatly appreciated.