Description Usage Arguments Value Note Examples
Vectorized over osm_type
and osm_id
1 2 3 4 | reverse_geocode_osm(osm_type, osm_id, zoom = 18, address_details = TRUE,
email = getOption("OSM_API_EMAIL", "nominatimrpackage@example.com"),
accept_language = getOption("LANG", "en-US,en;q=0.8"),
key = getOption("OSM_API_KEY", ""))
|
osm_type |
A specific osm node / way / relation to return an address for ( |
osm_id |
A specific osm node / way / relation to return an address for |
zoom |
Level of detail required where 0 is country and 18 is house/building |
address_details |
Include a breakdown of the address into elements (TRUE == include) |
email |
If you are making large numbers of request please include a valid email address
or alternatively include your email address as part of the User-Agent string.
This information will be kept confidential and only used to contact you in the
event of a problem, see Usage Policy for more details. You can pass the value
in directly or set the |
accept_language |
Preferred language order for showing search results
Either uses standard rfc2616 accept-language string or a simple comma separated l
ist of language codes. The |
key |
To access the openstreetmap API you need a valid API key. You can get it for free at https://developer.mapquest.com |
data.frame of reverse geocoded results
A slight delay is introduced between calls as both OpenStreetMap Nominatim & MapQuest Nominatim API calls to reduce load on their servers.
Data (c) OpenStreetMap contributors, ODbL 1.0. http://www.openstreetmap.org/copyright Nominatim Usage Policy: http://wiki.openstreetmap.org/wiki/Nominatim_usage_policy MapQuest Nominatim Terms of Use: http://info.mapquest.com/terms-of-use/
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 | ## Not run:
# Reverse geocode Canadian embassies
# complete list of Canadian embassies here:
# http://open.canada.ca/data/en/dataset/6661f0f8-2fb2-46fa-9394-c033d581d531
embassies <- data.frame(lat=c("34.53311", "41.327546", "41.91534", "36.76148", "-13.83282",
"40.479094", "-17.820705", "13.09511", "13.09511"),
lon=c("69.1835", "19.818698", "12.50891", "3.0166", "-171.76462",
"-3.686115", "31.043559", "-59.59998", "-59.59998"),
osm_type=c("R", "W", "R", "N", "N", "W", "R", "N", "N"),
osm_id=c("3836233", "267586999", "3718093", "501522082", "305640297",
"309487691", "2793217", "501458399", "501458399"),
stringsAsFactors=FALSE)
emb_coded_osm <- reverse_geocode_osm(embassies$osm_type, embassies$osm_id)
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.