Skip to content

Commit

Permalink
fix #48
Browse files Browse the repository at this point in the history
  • Loading branch information
rCarto committed Jul 12, 2019
1 parent 2f1606b commit 6a6f926
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions R/osrmIsochrone.R
Original file line number Diff line number Diff line change
Expand Up @@ -137,9 +137,12 @@ osrmIsochrone <- function(loc, breaks = seq(from = 0,to = 60, length.out = 7),
sgrid$durations <- unlist(lapply(inter, function(x)mean(rpt[["durations"]][x], na.rm=TRUE)))
sgrid[is.nan(sgrid$durations), "durations"] <- tmax+1
sgrid[sgrid$durations>tmax, "durations"] <- tmax+1
if(min(sgrid$durations)>tmax){
e <- "Use lower values for 'breaks' or increase 'res'"
stop(e, call. = FALSE)
}
########### END OF QUICK FIX ################

# computes isopolygones
# computes isopolygones
iso <- isopoly(x = sgrid, breaks = breaks, var = "durations")

# proj mgmnt
Expand Down

0 comments on commit 6a6f926

Please sign in to comment.