extract_feature: extract and summarize spatial data

Description Usage Arguments Value Examples

View source: R/extract_spatial.R

Description

create metadata list from sp object

Usage

1
extract_feature(obj, out)

Arguments

obj

a spatial object from the sf package or sp package or a filepath that can be read in with read_data()

out

desired outputs; must align with valid internal function names Including out a character vector of summary values

Value

a list according to names in spatial lookup tables for tag conversion

Examples

1
2
3
4
5
6
library(sp)
Sr1 = Polygon(cbind(c(-89,-89.5,-89,-88.5,-89),c(42,42,44,44,42)))
Srs1 = Polygons(list(Sr1), "s1")
p = SpatialPolygons(list(Srs1), proj4string=CRS("+init=epsg:4326 +proj=longlat 
+datum=WGS84 +no_defs +ellps=WGS84 +towgs84=0,0,0"))
extract_feature(p)

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