stationFromExtent: Identify GSOD stations within spatial extent

View source: R/stationFromExtent.R

stationFromExtentR Documentation

Identify GSOD stations within spatial extent

Description

This function allows the selection of a subset of GSOD stations based on a given map extent.

Usage

stationFromExtent(bb, ...)

Arguments

bb

Object of class extent. Usually NULL and constructed from the user-drawn bounding box. If supplied, a subset of GSOD stations will be created without any further user-specified input.

...

Currently not used.

Value

A sf object.

Author(s)

Florian Detsch

See Also

st_crop

Examples

# Predefined bounding box around Mt. Kilimanjaro region
kili <- sf::st_bbox(c(xmin = 37, xmax = 37.72, ymin = -3.4, ymax = -2.84))
gsod_shp_kili <- stationFromExtent(bb = kili)

rworldmap::mapGriddedData(mapRegion = "africa", plotData = FALSE, borderCol = "black", 
               addLegend = FALSE)
points(sf::st_coordinates(gsod_shp_kili), col = "red")


environmentalinformatics-marburg/GSODTools documentation built on Jan. 5, 2024, 12:19 a.m.