nominatim: Locality Descriptions from OpenStreetMap Web Service

Description Usage Arguments Details Value Author(s) See Also Examples

Description

Query OpenStreetMap server for locality descriptions.

Usage

1
2
3
nominatim(lng, lat, sp = FALSE)

nominatim2(x)

Arguments

lng

Latitude. Geographic coordinates (e.g. 14.136882)

lat

Longitude. Geographic coordinates (e.g. 47.510895)

sp

If TRUE return spatial object as defined in sp; needs package rgdal.

x

object of class SpatialPointsDataFrame.

Details

A nominatim provides a single coordinate pair interface. nominatim2 allows the query to be based on a SpatialPointsDataFrame.

Value

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).

Author(s)

Roland Kaiser

See Also

geocode.austria

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
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)

kardinal-eros/sabotag-tools documentation built on May 20, 2019, 7:21 a.m.