powered by
Geo-coding converts a named place, such as a street name into a lng/lat pair.
otp_geocode( otpcon = NULL, query = NULL, autocomplete = FALSE, stops = TRUE, clusters = FALSE, corners = TRUE, type = "SF" )
Returns a data.frame of SF POINTS or Coordinates of all the locations that match `query`
OTP connection object produced by otp_connect()
Character, The query string we want to geocode
logical Whether we should use the query string to do a prefix match, default FALSE
Logical, Search for stops, either by name or stop code, default TRUE
Logical, Search for clusters by their name, default FALSE
Logical, Search for street corners using at least one of the street names, default TRUE
Character, How should results be returned can be "SF" or "Coordinates" or "Both", Default "SF"
OTP will return a maximum of 10 results
Other routing: otp_isochrone(), otp_plan(), otp_pointset(), otp_routing_options(), otp_validate_routing_options()
otp_isochrone()
otp_plan()
otp_pointset()
otp_routing_options()
otp_validate_routing_options()
if (FALSE) { locations <- otp_geocode(otpcon, "High Street") }
Run the code above in your browser using DataLab