Skip to contents

gets the sf that specifies the region of an rtoi.

Usage

region(x)

# S4 method for rtoi
region(x)

region(x) <- value

# S4 method for rtoi,sf
region(x) <- value

# S4 method for 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

if (FALSE) {
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
}