revgeo {revgeo}R Documentation

Reverse Geocoding with the Photon Geocoder for OpenStreetMap, Google Maps, and Bing.

Description

Enables the use of the Photon geocoder for OpenStreetMap, Google Maps, and Bing to reverse geocode coordinate pairs. Photon allows for unlimited geocode queries, while Google Maps and Bing provide a little more information for 'out of the way' locations. Google Maps and Bing require an API key, and Google Maps limits users to 2,500 free queries a day.

Usage

revgeo(longitude, latitude, provider = NULL, API = NULL, output = NULL,
  item = NULL)

Arguments

longitude

Required. You must enter a valid longitude coordinate; e.g., -77.0229529

latitude

Required. You must enter a valid latitude coordinate; e.g., 38.89283435

provider

Defaults to NULL, which automatically selects the Photon API. Enter 'google' to use the Google Maps API or 'bing' to use the Bing API.

API

Defaults to NULL. Enter a valid Google Maps or Bing API key to use their service.

output

Defaults to NULL, which returns a reverse geocoded address as a string. Other valid options include 'hash', which returns a hashed string, and 'frame', which returns a dataframe.

item

Defaults to NULL. You can use 'item' in conjunction with 'hash' or 'frame' to return portion of the address; e.g., 'zip' for postal code. Options include 'housenumber', 'street', 'city', 'county', 'state', and 'country'.

Author(s)

Michael Hudecheck, michael.hudecheck@gess.ethz.ch

Source

https://github.com/mhudecheck/revgeo/

Examples

revgeo(longitude=-77.0229529, latitude=38.89283435)
revgeo(longitude=-77.0229529, latitude=38.89283435, output='frame')
revgeo(longitude=-77.0229529, latitude=38.89283435, output='hash', item='zip')

[Package revgeo version 0.15 Index]