revgeo: Reverse Geocoding with the Photon Geocoder for OpenStreetMap,...

Description Usage Arguments Author(s) Source Examples

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

1
2
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

1
2
3
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')

Example output

[1] "Getting geocode data from Photon: http://photon.komoot.de/reverse?lon=-77.0229529&lat=38.89283435"
[[1]]
[1] "House Number Not Found Street Not Found, City Not Found, State Not Found, Postcode Not Found, Country Not Found"

[1] "Getting geocode data from Photon: http://photon.komoot.de/reverse?lon=-77.0229529&lat=38.89283435"
             housenumber           street           city           state
1 House Number Not Found Street Not Found City Not Found State Not Found
                 zip           country
1 Postcode Not Found Country Not Found
[1] "Getting geocode data from Photon: http://photon.komoot.de/reverse?lon=-77.0229529&lat=38.89283435"
$zip
[1] "Postcode Not Found"

revgeo documentation built on May 1, 2019, 10:13 p.m.

Related to revgeo in revgeo...