stationFromExtent: Identify GSOD stations within user-drawn extent

Description Usage Arguments Value Author(s) See Also Examples

View source: R/stationFromExtent.R

Description

This function allows the selection of a subset of GSOD stations based on a user-drawn map extent.

Usage

1
stationFromExtent(mapRegion = "world", bb = NULL, ...)

Arguments

mapRegion

Character, default is "world". The geographic extent of the displayed map on which the intended bounding box is to be drawn. See mapGriddedData for details. Note: in case the user supplies an object of class extent, this argument will automatically be ignored.

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.

...

Additional arguments. Currently not in use.

Value

An object of class SpatialPointsDataFrame.

Author(s)

Florian Detsch

See Also

mapGriddedData, crop

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
# Predefined bounding box around Mt. Kilimanjaro region
kili <- extent(c(37, 37.72, -3.4, -2.84))
gsod_shp_kili <- stationFromExtent(bb = kili)

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

# User-drawn bounding box in Germany
gsod_shp_dtl <- stationFromExtent(mapRegion = "Germany")
points(gsod_shp_dtl, col = "red")

environmentalinformatics-marburg/GSODTools documentation built on May 13, 2017, 6:09 p.m.