dismo (version 0.5-11)

geocode: Georeferencing with Google

Description

A wrapper around the Google geocoding web-service. It returns 0 to n matches. It is important to be as precise as possible, e.g. always include the country in the locality description.

Usage

geocode(x, boxes='', extent=NULL)

Arguments

x
A vector of locality descriptions
boxes
Character. "", "only", or "one". It it is "", 0 to n localities and bounding boxes are returned. If it is 'only', only a single bounding box is returned (the union of all boxes) for each record in x. It it is 'one', a single bounding box will
extent
An Extent object, or an object that can be coerced to one, to bias the search towards that region

Value

  • matrix

See Also

biogeomancer

Examples

Run this code
# geocode(c('1600 Pennsylvania Ave NW, Washington DC', 'Luca, Italy', 'Kampala'))
# geocode(c('San Jose', 'San Jose, Mexico'))
# geocode(c('San Jose', 'San Jose, Mexico'), boxes='one')

Run the code above in your browser using DataCamp Workspace