Title: | Reverse Geocoding with the Photon Geocoder for OpenStreetMap, Google Maps, and Bing |
---|---|
Description: | Function revgeo() allows you to use the Photon geocoder for OpenStreetMap <http://photon.komoot.de>, Google Maps <http://maps.google.com>, and Bing <https://www.bingmapsportal.com> to reverse geocode coordinate pairs with minimal hassle. |
Authors: | Michael Hudecheck [aut, cre] |
Maintainer: | Michael Hudecheck <[email protected]> |
License: | GPL (>= 3.0) |
Version: | 0.15 |
Built: | 2024-12-02 06:31:10 UTC |
Source: | CRAN |
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.
revgeo(longitude, latitude, provider = NULL, API = NULL, output = NULL, item = NULL)
revgeo(longitude, latitude, provider = NULL, API = NULL, output = NULL, item = NULL)
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'. |
Michael Hudecheck, [email protected]
https://github.com/mhudecheck/revgeo/
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')
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')