if (FALSE) {
# Inputs are data frames
apotheke.df <- read.csv(system.file("csv/apotheke.csv", package = "valh"))
# Extract the first point and compute isochrones at 3, 6, 9 and 12 kilometers,
# using the "auto" costing model
pt1 <- apotheke.df[1, c("lon", "lat")]
iso1 <- vl_isochrone(loc = pt1, distances = c(3, 6, 9, 12), costing = "auto")
# Inputs are sf points
library(sf)
apotheke.sf <- st_read(system.file("gpkg/apotheke.gpkg", package = "valh"),
quiet = TRUE
)
# Extract the first point and compute isochrones at 15, 30, 45 and 60 minutes
# using the "bicycle" costing model
pt2 <- apotheke.sf[1, ]
iso2 <- vl_isochrone(loc = pt2, times = c(15, 30, 45, 60), costing = "bicycle")
}
Run the code above in your browser using DataLab