-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Geocode e routing com Gmaps #5
Labels
geo
operações geoespaciais
Comments
Adicionar o Cyclestreets na parte da bicicleta, com um exemplo do tipo de resultados que retribui |
Adicionar link para a comparação entre o HereR e o Google Maps |
Example with ROUTES = data.frame() # initial empty data frame
# loop - the origin (i) is the survey location, and the IST is always the same destination
for (i in 1:nrow(SURVEYsample)){
ROUTES1 = ors_directions(
data.frame(lon = c(SURVEYsample$coordinates[i,1], IST$coordinates[1,1]),
lat = c(SURVEYsample$coordinates[i,2], IST$coordinates[1,2])),
profile = "foot-walking", # driving-car or other
preference = "fastest",
output = "sf"
)
ROUTES = rbind(ROUTES, ROUTES1) # to keep adding in the same df
}
|
example of ISOCist = data.frame() # initial empty data frame
for (i in 1:nrow(coor)) {
ISOCist_i =
tryCatch(
ors_isochrones(
coor[i, ],
profile = "foot-walking",
range_type = "time", # or distance
range = 20*60, # 20 minutes in seconds
interval = 5*60, # to have intervals of 5 minutes
output = "sf"
),
error=function(e){cat("Error: Openrouteservice API request failed")} # trick to ignore the ones that return errors
)
ISOCist = rbind(ISOCist, ISOCist_i)
}
|
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
melhorar o capítulo do geocoding
acrescentar o geocode do DV
#alerta para remover os que têm O=D quando se exporta a shp para correr o ORS tools no QGIS!
The text was updated successfully, but these errors were encountered: