sits_as_sf | R Documentation |
Return a sits_tibble or raster_cube as an sf object.
sits_as_sf(data, ..., as_crs = NULL)
## S3 method for class 'sits'
sits_as_sf(data, ..., crs = "EPSG:4326", as_crs = NULL)
## S3 method for class 'raster_cube'
sits_as_sf(data, ..., as_crs = NULL)
data |
A sits tibble or sits cube. |
... |
Additional parameters. |
as_crs |
Output coordinate reference system. |
crs |
Input coordinate reference system. |
An sf object of point or polygon geometry.
Felipe Carvalho, felipe.carvalho@inpe.br
Alber Sanchez, alber.ipia@inpe.br
if (sits_run_examples()) {
# convert sits tibble to an sf object (point)
sf_object <- sits_as_sf(cerrado_2classes)
# convert sits cube to an sf object (polygon)
data_dir <- system.file("extdata/raster/mod13q1", package = "sits")
cube <- sits_cube(
source = "BDC",
collection = "MOD13Q1-6.1",
data_dir = data_dir
)
sf_object <- sits_as_sf(cube)
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.