diff --git a/src/crop.jl b/src/crop.jl index f8fc40d..0491abb 100644 --- a/src/crop.jl +++ b/src/crop.jl @@ -120,7 +120,7 @@ function cropHighway!(nodes::Dict, bounds::Bounds, highway::Highway, valids::Bit if !(Geodesy.onBounds(prev_node, bounds) || Geodesy.onBounds(node, bounds)) new_node = Geodesy.boundaryPoint(prev_node, node, bounds) - new_id = addNewNode(nodes, new_node) + new_id = addNewNode!(nodes, new_node) insert!(highway.nodes, ni + !valid, new_id) ni += 1 end diff --git a/src/intersections.jl b/src/intersections.jl index 70c7970..1040a51 100644 --- a/src/intersections.jl +++ b/src/intersections.jl @@ -162,7 +162,7 @@ function findIntersectionClusters( nodes::Dict{Int,ENU}, if length(clusters_nodes[k]) > 1 n = [clusters_nodes[k]...] c = centroid(nodes,n) - cluster_node_id = addNewNode(nodes,c) + cluster_node_id = addNewNode!(nodes,c) for j = 1:length(n) cluster_map[n[j]] = cluster_node_id diff --git a/src/nodes.jl b/src/nodes.jl index 91a68df..5d69b50 100644 --- a/src/nodes.jl +++ b/src/nodes.jl @@ -69,9 +69,9 @@ function nodesWithinRange{T<:Union(ENU,ECEF)}(nodes::Dict{Int,T}, end ### Add a new node ### -function addNewNode{T<:Union(LLA,ENU)}(nodes::Dict{Int,T}, - loc::T, - start_id::Int=abs(int(hash(loc))) ) +function addNewNode!{T<:Union(LLA,ENU)}(nodes::Dict{Int,T}, + loc::T, + start_id::Int=abs(int(hash(loc))) ) id = start_id while id <= typemax(Int) if !haskey(nodes, id)