Provides reliable conversion of "crwIS"
and "crwPredict"
objects
into simple features objects supported in the "sf"
package. Both
"sf"
objects with "POINT" geometry and "sfc_LINESTRING"
objects
are created. Coercion of "crwPredict"
objects to "sfc_LINESTRING"
has an option "group"
argument when the "crwPredict"
object
includes predictions from multiple deployments. The grouping column will be
used and a tibble of multiple "sf_LINESTRING"
objects will be returned
crw_as_sf(data, ftype, locType, group)# S3 method for crwIS
crw_as_sf(data, ftype, locType = c("p", "o", "f"), group = NULL, ...)
# S3 method for crwPredict
crw_as_sf(data, ftype, locType = c("p", "o", "f"), group = NULL, ...)
# S3 method for list
crw_as_sf(data, ftype, locType = c("p", "o", "f"), ...)
an object of class "crwIS"
or "crwPredict"
character of either "POINT" or "LINESTRING" specifying the feature type
character vector of location points to include ("p","o")
(optional) character specifying the column to group by for multiple LINESTRING features
Additional arguments that are ignored
crw_as_sf(crwIS)
: coerce crwIS object to sf (POINT or
LINESTRING geometry)
crw_as_sf(crwPredict)
: coerce crwPredict object to sf (POINT or
LINESTRING geometry)
crw_as_sf(list)
: coerce list of crwIS objects to sf (LINESTRING or
MULTILINESTRING geometry)