nominatim: Locality Descriptions from OpenStreetMap Web Service

nominatimR Documentation

Locality Descriptions from OpenStreetMap Web Service

Description

Query OpenStreetMap server for locality descriptions.

Usage

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

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 Feb. 6, 2025, 1:12 a.m.