From 18b43d1d4d7edd93f33396850891614f4e22f42f Mon Sep 17 00:00:00 2001 From: Ted Steiner Date: Sat, 11 Jul 2015 11:35:13 -0400 Subject: [PATCH 1/5] Added Coverage.io support. Signed-off-by: Ted Steiner --- .travis.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.travis.yml b/.travis.yml index 4e14b6a..1162f30 100644 --- a/.travis.yml +++ b/.travis.yml @@ -23,3 +23,4 @@ script: - julia -e 'Pkg.test("OpenStreetMap", coverage=true)' after_success: - julia -e 'cd(Pkg.dir("OpenStreetMap")); Pkg.add("Coverage"); using Coverage; Coveralls.submit(Coveralls.process_folder())' + - julia -e 'cd(Pkg.dir("OpenStreetMap")); using Coverage; Codecov.submit(Codecov.process_folder()))' From 24f9318a309b3278fb4d00352d4daa2242f17e2d Mon Sep 17 00:00:00 2001 From: Ted Steiner Date: Sun, 12 Jul 2015 12:26:47 -0400 Subject: [PATCH 2/5] Fixed error in .travis.yml file for coverage report submission. Signed-off-by: Ted Steiner --- .travis.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index 1162f30..b042c4c 100644 --- a/.travis.yml +++ b/.travis.yml @@ -23,4 +23,4 @@ script: - julia -e 'Pkg.test("OpenStreetMap", coverage=true)' after_success: - julia -e 'cd(Pkg.dir("OpenStreetMap")); Pkg.add("Coverage"); using Coverage; Coveralls.submit(Coveralls.process_folder())' - - julia -e 'cd(Pkg.dir("OpenStreetMap")); using Coverage; Codecov.submit(Codecov.process_folder()))' + - julia -e 'cd(Pkg.dir("OpenStreetMap")); using Coverage; Codecov.submit(Codecov.process_folder())' From b50bc7c4e2de0ba3296c70e17a03419f1d4253dd Mon Sep 17 00:00:00 2001 From: Sean Garborg Date: Fri, 25 Sep 2015 20:35:56 -0600 Subject: [PATCH 3/5] Fix distance for empty routes --- src/routing.jl | 6 +++++- test/routes.jl | 3 +++ 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/src/routing.jl b/src/routing.jl index 6f89295..a6dfa85 100644 --- a/src/routing.jl +++ b/src/routing.jl @@ -152,6 +152,10 @@ end ### Compute the distance of a route ### function Geodesy.distance{T<:Union(ENU,ECEF)}(nodes::Dict{Int,T}, route::Vector{Int}) + if length(route) == 0 + return Inf + end + dist = 0.0 prev_point = nodes[route[1]] for i = 2:length(route) @@ -320,4 +324,4 @@ function nodesWithinDrivingTime(network::Network, return nodesWithinDrivingTime(network, nodesWithinRange(network.v, loc, loc_range), limit) -end \ No newline at end of file +end diff --git a/test/routes.jl b/test/routes.jl index 237b082..157e180 100644 --- a/test/routes.jl +++ b/test/routes.jl @@ -56,6 +56,9 @@ fastest_distance = distance(nodesENU, fastest_route) @test fastest_route[20] == 2472339219 @test fastest_route[end] == node1 +# Empty route +@test distance(nodesENU, Int[]) == Inf + # Get route edge list shortest_edges = routeEdges(network, shortest_route) @test length(shortest_edges) == 22 From 1103f50c3646035701b0937cf95486c1d1c0898c Mon Sep 17 00:00:00 2001 From: orthographic-pedant Date: Wed, 30 Sep 2015 13:24:39 -0400 Subject: [PATCH 4/5] Fixed typographical error, changed accomodation to accommodation in README. --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 7863691..00ee259 100644 --- a/README.md +++ b/README.md @@ -18,7 +18,7 @@ This package provides basic functionality for parsing, viewing, and working with * Filter data by various classes: * Ways suitable for driving, walking, or cycling * Freeways, major city streets, residential streets, etc. - * Accomodations, shops, industry, etc. + * Accommodations, shops, industry, etc. * Draw detailed maps using Julia's [Winston](https://github.com/nolta/Winston.jl) graphics package with a variety of options * Compute shortest or fastest driving, cycling, and walking routes using Julia's Graphs package From 61d8fbb21752417c7781cb3c8c1d43a915ef804a Mon Sep 17 00:00:00 2001 From: orthographic-pedant Date: Wed, 30 Sep 2015 15:27:05 -0400 Subject: [PATCH 5/5] Fixed typographical error, changed accomodations to accommodations in README. --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 7863691..00ee259 100644 --- a/README.md +++ b/README.md @@ -18,7 +18,7 @@ This package provides basic functionality for parsing, viewing, and working with * Filter data by various classes: * Ways suitable for driving, walking, or cycling * Freeways, major city streets, residential streets, etc. - * Accomodations, shops, industry, etc. + * Accommodations, shops, industry, etc. * Draw detailed maps using Julia's [Winston](https://github.com/nolta/Winston.jl) graphics package with a variety of options * Compute shortest or fastest driving, cycling, and walking routes using Julia's Graphs package