feature_states: get the states that features overlap with

View source: R/extract_spatial.R

feature_statesR Documentation

get the states that features overlap with

Description

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

Usage

feature_states(obj)

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

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 April 29, 2023, 11:50 a.m.