Retrieves any location name in the World from geographic coordinates (longitude and latitude) using the OpenStreetMap Data Search Engine Nominatim http://nominatim.openstreetmap.org.

coords_to_address(coords)

Arguments

coords

a numeric of length 2. The first element is the latitude and the second the longitude.

Value

A character of length 1 with the OSM name of the location.

Examples

coords_to_address(c(43.61277, 3.873486))
#> [1] "5, Rue de l'École de Médecine, Centre Historique, Centre, Montpellier, Hérault, Occitanie, France métropolitaine, 34062, France"
coords_to_address(c(29.75894, -95.3677))
#> [1] "One Shell Plaza, 910, Louisiana Street, Houston, Harris County, Texas, 77002, United States"