nominatim | R Documentation |
Query OpenStreetMap server for locality descriptions.
nominatim(lng, lat, sp = FALSE)
nominatim2(x)
lng |
Latitude. Geographic coordinates (e.g. 14.136882) |
lat |
Longitude. Geographic coordinates (e.g. 47.510895) |
sp |
If |
x |
object of class |
A nominatim
provides a single coordinate pair interface. nominatim2
allows the query to be based on a SpatialPointsDataFrame
.
A list
or SpatialPointsDataFrame
with CRS("+init=epsg:4326")
. The meaning of columns is as follows: ST
= country (Land), BL
= state (Bundesland), PB
= county (Bezirk), PG
= town/village (Gemeinde).
Roland Kaiser
geocode.austria
r <- nominatim(lng = 14.642202, lat = 47.530278, sp = FALSE)
class(r)
str(r)
r <- nominatim(lng = 14.642202, lat = 47.530278, sp = TRUE)
class(r)
head(r@data)
x <- data.frame(accuracy = 10, x = 13:16, y = 48)
coordinates(x) <- ~x+y
proj4string(x) <- CRS("+init=epsg:4326")
nominatim2(x)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.