SpatialSubset: Subsets a list of points according to a given extent.

Description Usage Arguments Value Author(s) See Also Examples

Description

Takes latitude and longitude values, as well as an extent object (generated dynamically by the user) and returns the indices of the points that fall within the extent.

Usage

1
SpatialSubset(latitude, longitude, e)

Arguments

latitude

the latitude coordinates of points to be subset.

longitude

the longitude coordinates of points to be subset.

e

the extent for the subsetting. This should come from creating an extent dynamically, through drawExtent

Value

A list of indices of points in the input set that were within the spatial extent.

Author(s)

Amelia McNamara

See Also

subset, drawExtent, MakeMap

Examples

1
2
3
4
5
6
7
lat = runif(10, 32, 42)
lon = runif(10, -124, -114)
MakeMap(lat, lon)
# Dynamically generate extent using the drawExtent() function
e = drawExtent()

SpatialSubset(lat, lon, e)

mobilizingcs/MobilizePrime documentation built on May 23, 2019, 5:07 a.m.