processSDA_WKT: Post-process Well-Known Text from Soil Data Access

View source: R/SDA-spatial.R

processSDA_WKTR Documentation

Post-process Well-Known Text from Soil Data Access

Description

This is a helper function commonly used with SDA_query to extract WKT (well-known text) representation of geometry to an sf or sp object.

Usage

processSDA_WKT(d, g = "geom", crs = 4326, p4s = NULL, as_sf = TRUE)

Arguments

d

data.frame returned by SDA_query, containing WKT representation of geometry

g

name of column in d containing WKT geometry

crs

CRS definition (e.g. an EPSG code). Default 4326 for WGS84 Geographic Coordinate System

p4s

Deprecated: PROJ4 CRS definition

as_sf

Return an sf data.frame? If FALSE return a ⁠Spatial*⁠ object.

Details

The SDA website can be found at https://sdmdataaccess.nrcs.usda.gov. See the SDA Tutorial for detailed examples.

The SDA website can be found at https://sdmdataaccess.nrcs.usda.gov. See the SDA Tutorial for detailed examples.

Value

An sf object or if as_sf is FALSE a ⁠Spatial*⁠ object.

Note

This function requires the sf package.

Author(s)

D.E. Beaudette, A.G. Brown


soilDB documentation built on Sept. 11, 2024, 8:28 p.m.