Description Format Construction Fields Public Methods Note
For storing spatial data. The data is stored as a data.table but has methods to transform the object back to its intiail sf format.
R6::R6Class object inheriting from DataBackendDataTable<-DataBackendDataFrame<-DataBackend.
1 | x <- DataBackendSpatialFeature$new(data)
|
data
:: sf::sf
The input must be an object of class sf::sf (Simple feature) from the sf package.
key
:: NULL
|character(1)
The key of .data
.
NULL
add(.data)
(a sf::sf data.frame) -> NULL
Add data.
get_sf()
Get data as an sf::sf object.
This class could be furthur improved by using a data.table to store non-spatial information of the data object and another just to store the spatial features. Both objects are linkable through a id column. To make sure both spatial and non-spatial information always match we can invoke a consistency check between the two everytime the user or its methods try to access private$.data.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.