Skip to content
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

Open
temospena opened this issue Dec 5, 2019 · 4 comments
Open

Geocode e routing com Gmaps #5

temospena opened this issue Dec 5, 2019 · 4 comments
Assignees
Labels
geo operações geoespaciais

Comments

@temospena
Copy link
Owner

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!

@temospena temospena self-assigned this Dec 5, 2019
@temospena temospena pinned this issue Dec 5, 2019
temospena added a commit that referenced this issue Feb 10, 2020
@temospena
Copy link
Owner Author

temospena commented Feb 10, 2020

Adicionar o Cyclestreets na parte da bicicleta, com um exemplo do tipo de resultados que retribui
https://www.rdocumentation.org/packages/cyclestreets/versions/0.1.5

@temospena
Copy link
Owner Author

Adicionar link para a comparação entre o HereR e o Google Maps
http://web.tecnico.ulisboa.pt/~rosamfelix/gis/geocode/geocodeHereGmaps.html

@temospena temospena added the geo operações geoespaciais label Sep 19, 2020
@temospena
Copy link
Owner Author

Example with ors_directions()

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
}

@temospena
Copy link
Owner Author

example of ors_isochrones(), but ignoring the ones with errors:

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
Labels
geo operações geoespaciais
Projects
None yet
Development

No branches or pull requests

1 participant