region {rsat} | R Documentation |
Extracts region from an rtoi
Description
gets the sf that specifies the region of an rtoi.
Usage
region(x)
## S4 method for signature 'rtoi'
region(x)
region(x) <- value
## S4 replacement method for signature 'rtoi,sf'
region(x) <- value
## S4 replacement method for signature 'rtoi,'NULL''
region(x) <- value
Arguments
x |
an rtoi object. |
value |
an sf object to define the region in x. |
Value
the sf class with the region of an rtoi
Examples
## Not run:
library(rsat)
# create a copy of navarre
file.copy(from=system.file("ex/Navarre",package="rsat"),
to=tempdir(),
recursive = TRUE)
# load example rtoi
navarre <- read_rtoi(file.path(tempdir(),"Navarre"))
# get the region from rtoi
sf.obj <- region(navarre)
plot(sf.obj)
# asign new region value
region(navarre)<-NULL
region(navarre)<-sf.obj
## End(Not run)
[Package rsat version 0.1.21 Index]