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 to TRUE.
- ...
ignored