bergfex: Locality Descriptions from Bergfex Web Service

bergfexR Documentation

Locality Descriptions from Bergfex Web Service

Description

Query Bergfex server to get locality description for a given longitude and latitude, or query toponym for coordinates.

Usage

bergfex(lng, lat, q, sp = FALSE, first = FALSE)

bergfex2(x, first = TRUE)

Arguments

lng

Latitude. Geographic coordinates (e.g. 14.136882)

lat

Longitude. Geographic coordinates (e.g. 47.510895)

q

Query string.

sp

If ⁠TRUE⁠ return spatial object as defined in sp.

first

If ⁠TRUE⁠ return only a single hit, the top most (nearby) one.

x

Object of class ⁠SpatialPointsDataFrame⁠.

Details

Function ⁠bergfex⁠ provides a single coordinate pair interface. ⁠bergfex2⁠ allows the query to be based on a ⁠SpatialPointsDataFrame⁠.

Value

A ⁠list⁠ or ⁠SpatialPointsDataFrame⁠ with CRS("+init=epsg:4326").

Author(s)

Roland Kaiser

See Also

geocode.austria

Examples

## Not run: 	
r <- bergfex(lng = 14.642202, lat = 47.530278, sp = FALSE)
class(r)
str(r)

r <- bergfex(lng = 14.642202, lat = 47.530278, sp = TRUE)
class(r)
head(r@data)

bergfex(lng = 14.642202, lat = 47.530278, first = TRUE, sp = FALSE)

r <- bergfex(q = "Kölblalm", sp = TRUE)
head(r@data)
coordinates(r)

bergfex(q = "Schwaitlalm", sp = FALSE, first = TRUE)

x <- data.frame(accuracy = 10, x = 13:16, y = 48)
coordinates(x) <- ~x+y
proj4string(x) <- CRS("+init=epsg:4326")

bergfex2(x)

## End(Not run)

kardinal-eros/sabotag-tools documentation built on Feb. 6, 2025, 1:12 a.m.