feature_states: get the states that features overlap with

Description Usage Arguments Details Value Examples

View source: R/extract_spatial.R

Description

summarize the spatial extent of data relative to overlap w/ US states

Usage

1

Arguments

obj

a spatial object from the sf package or sp package

Details

not all sf or sp spatial classes are supported. If you run into one that you need, file an issue https://github.com/USGS-R/meddle/issues

Value

a list with states field

Examples

1
2
3
4
library(sf)
sfc = st_sfc(st_point(c(-89, 45)), st_point(c(-109, 42)), crs = 4326)
sf = st_sf(data.frame(val = c('WI_point', 'WY_point'), geom=sfc))
feature_states(sf)

USGS-R/meddle documentation built on Nov. 21, 2020, 7:44 p.m.