unboost: Cast a BoostGeometries object as a sfc object

Description Usage Arguments Value Examples

Description

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

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
unboost(x, ...)

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

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

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

Arguments

x

A BoostGeometries object.

...

Currently not used.

Value

A sfc object.

Examples

1
2
3
4
5
6
7
## 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))

hunzikp/velox documentation built on June 6, 2021, 2:40 a.m.