geocoding {traveltimeR}R Documentation

Geocoding (Search)

Description

Match a query string to geographic coordinates.

Usage

geocoding(
  query,
  within.country = NA,
  format.name = NA,
  format.exclude.country = NA,
  bounds = NA
)

Arguments

query

A query to geocode. Can be an address, a postcode or a venue.

within.country

Only return the results that are within the specified country. If no results are found it will return the country itself. Optional. Format:ISO 3166-1 alpha-2 or alpha-3

format.name

Format the name field of the response to a well formatted, human-readable address of the location. Experimental. Optional.

format.exclude.country

Exclude the country from the formatted name field (used only if format.name is equal true). Optional.

bounds

Used to limit the results to a bounding box. Expecting a character vector with four floats, marking a south-east and north-west corners of a rectangle: min-latitude,min-longitude,max-latitude,max-longitude. e.g. bounds for Scandinavia c(54.16243,4.04297,71.18316,31.81641). Optional.

Details

See https://docs.traveltime.com/api/reference/geocoding-search/ for details

Value

API response parsed as list and as a raw json

Examples

## Not run: 
geocoding('Parliament square')

## End(Not run)

[Package traveltimeR version 1.2.1 Index]