Cast geometry of a simple feature object or simple feature collection to another type
Source:R/st_cast_ext.R
st_cast_ext.Rd
Wrapper for sf::st_cast()
that currently supports casting MULTIPOLYGON to
POLYGON or MULTIPOLYGON or POLYGON to POINT or, if simplify = FALSE, can cast
MULTIPOINT to LINESTRING. This is not very different than the basic
functionality of st_cast but further development may improve the utility of
this function.
Arguments
- x
A
sf
orsfc
object to cast to another type.- to
character; target type, if missing, simplification is tried; when
x
is of typesfg
(i.e., a single geometry) thento
needs to be specified.- simplify
If
TRUE
, simplify geometry type; defaults toTRUE
.- ...
Arguments passed on to
sf::st_cast