Learn R Programming

velox (version 0.2.0)

unboost: Cast a BoostGeometries object as a sfc object

Description

unboost creates a sfc object from a BoostGeometries object. Note that all sfc objects created by unboost are of type MULTI.

Usage

unboost(x, ...)

# S3 method for BoostMultiPolygons unboost(x, ...)

# S3 method for BoostMultiLines unboost(x, ...)

# S3 method for BoostMultiPoints unboost(x, ...)

Arguments

x

A BoostGeometries object.

...

Currently not used.

Value

A sfc object.

Examples

Run this code
# NOT RUN {
## Make sfc_MULTIPOINT
sfc <- sf::st_sfc(sf::st_multipoint(cbind(0,1)))
## Cast to BoostPoints
boostPoints <- boost(sfc)
## Unboost
sfc2 <- unboost(boostPoints)
print(identical(sfc, sfc2))

# }

Run the code above in your browser using DataLab