# Classes and Methods for Spatial Data

## Documentation for package ‘terra’ version 0.5-2

- DESCRIPTION file.

## Help Pages

A B C D E F G H I L M N O P Q R S T U V W X Y Z misc

terra-package | The "terra" package

## -- A --

adjacent | Adjacent cells
adjacent-method | Adjacent cells
aggregate | Aggregate raster cells
aggregate-method | Aggregate raster cells
align | Align a SpatExtent with a SpatRaster
align-method | Align a SpatExtent with a SpatRaster
app | Apply a function to the cells of a SpatRaster
app-method | Apply a function to the cells of a SpatRaster
area | Area and perimeter
area-method | Area and perimeter
Arith-method | Mathematical operations with SpatRaster objects
Arith-methods | Mathematical operations with SpatRaster objects
as.array | Coercion to other object types
as.array-method | Coercion to other object types
as.character-method | Create a text representation of (the skeleton of) an object
as.contour | Contour plot
as.contour-method | Contour plot
as.data.frame | Get the attributes of a SpatVector
as.data.frame-method | Get the attributes of a SpatVector
as.data.frame-method | Coercion to other object types
as.factor | Factors
as.factor-method | Factors
as.lines | Coercion to other object types
as.lines-method | Coercion to other object types
as.matrix | Coercion to other object types
as.matrix-method | Coercion to other object types
as.points | Coercion to other object types
as.points-method | Coercion to other object types
as.polygons | Coercion to other object types
as.polygons-method | Coercion to other object types
as.vector | Coercion to other object types
as.vector-method | Coercion to other object types
atan2 | Two argument arc-tangent
atan2-method | Two argument arc-tangent

## -- B --

bbox-method | Create, get or set a SpatExtent
boundaries | Detect boundaries (edges)
boundaries-method | Detect boundaries (edges)
buffer | Create a buffer around vector objects or raster patches
buffer-method | Create a buffer around vector objects or raster patches

## -- C --

c | Combine
c-method | Combine
cellFromRowCol | Coordinates from a row, column or cell number and vice versa
cellFromRowCol-method | Coordinates from a row, column or cell number and vice versa
cellFromRowColCombine | Coordinates from a row, column or cell number and vice versa
cellFromRowColCombine-method | Coordinates from a row, column or cell number and vice versa
cellFromXY | Coordinates from a row, column or cell number and vice versa
cellFromXY-method | Coordinates from a row, column or cell number and vice versa
clamp | Clamp values
clamp-method | Clamp values
classify | Classify (or reclassify) cell values
classify-method | Classify (or reclassify) cell values
click | Query by clicking on a map
click-method | Query by clicking on a map
colFromCell | Coordinates from a row, column or cell number and vice versa
colFromCell-method | Coordinates from a row, column or cell number and vice versa
colFromX | Coordinates from a row, column or cell number and vice versa
colFromX-method | Coordinates from a row, column or cell number and vice versa
collapse | Collapse cell values from a multi-layer SpatRaster
collapse-method | Collapse cell values from a multi-layer SpatRaster
Compare-method | Mathematical operations with SpatRaster objects
Compare-methods | Mathematical operations with SpatRaster objects
compareGeom | Compare geometries of SpatRaster objects
compareGeom-method | Compare geometries of SpatRaster objects
contour | Contour plot
contour-method | Contour plot
couldBeLonLat | Check for longitude/latitude crs
couldBeLonLat-method | Check for longitude/latitude crs
cover | Cover (replace) 'NA' values with values of another raster
cover-method | Cover (replace) 'NA' values with values of another raster
crop | Cut out a geographic subset
crop-method | Cut out a geographic subset
crs | Get or set a coordinate reference system (projection)
crs-method | Get or set a coordinate reference system (projection)
crs<- | Get or set a coordinate reference system (projection)
crs<--method | Get or set a coordinate reference system (projection)

## -- D --

density | Density plot
density-method | Density plot
dim | Dimensions of a SpatRaster or SpatVector
dim-method | Dimensions of a SpatRaster or SpatVector
dim<--method | Dimensions of a SpatRaster or SpatVector
disaggregate | Disaggregate raster cells
disaggregate-method | Disaggregate raster cells
distance | Geographic distance
distance-method | Geographic distance
draw | Draw a polygon, line, extent, or points
draw-method | Draw a polygon, line, extent, or points

## -- E --

ext | Create, get or set a SpatExtent
ext-method | Create, get or set a SpatExtent
ext<- | Create, get or set a SpatExtent
ext<--method | Create, get or set a SpatExtent
extend | Extend
extend-method | Extend
extract | Extract values from a SpatRaster
extract-method | Extract values from a SpatRaster

## -- F --

flip | Flip a raster
flip-method | Flip a raster
focal | Focal values
focal-method | Focal values
freq | Frequency table
freq-method | Frequency table

## -- G --

geom | Get the geometry (coordinates) of a SpatVector
geom-method | Get the geometry (coordinates) of a SpatVector
geomtype | Geometry type of a SpatVector
geomtype-method | Geometry type of a SpatVector
global | global statistics
global-method | global statistics

## -- H --

hasValues | Data sources of a SpatRaster
hasValues-method | Data sources of a SpatRaster
head | Show the head or tail of a Spat* object
head-method | Show the head or tail of a Spat* object
hist | Histogram
hist-method | Histogram

## -- I --

ifel | ifelse for SpatRaster objects
ifel-method | ifelse for SpatRaster objects
image | Plot a SpatRaster or SpatVector
image-method | Plot a SpatRaster or SpatVector
init | Initialize a SpatRaster with values
init-method | Initialize a SpatRaster with values
interpolate | Interpolate
interpolate-method | Interpolate
is.factor | Factors
is.factor-method | Factors
isGlobalLonLat | Check for longitude/latitude crs
isGlobalLonLat-method | Check for longitude/latitude crs
isLonLat | Check for longitude/latitude crs
isLonLat-method | Check for longitude/latitude crs

## -- L --

length-method | Dimensions of a SpatRaster or SpatVector
levels | Factors
levels-method | Factors
levels<- | Factors
levels<--method | Factors
lines-method | Plot a SpatRaster or SpatVector

## -- M --

mask | Mask values in a SpatRaster
mask-method | Mask values in a SpatRaster
Math-method | Mathematical operations with SpatRaster objects
Math-methods | Mathematical operations with SpatRaster objects
Math2-method | Mathematical operations with SpatRaster objects
Math2-methods | Mathematical operations with SpatRaster objects
max-method | Local statistics
mean-method | Local statistics
merge | Merge SpatRaster or SpatExtent objects, or a SpatVector with a data.frame
merge-method | Merge SpatRaster or SpatExtent objects, or a SpatVector with a data.frame
min-method | Local statistics
minmax | Get or compute the minimum and maximum cell values
minmax-method | Get or compute the minimum and maximum cell values
modal | modal value
modal-method | modal value

## -- N --

names | Names of Spat objects
names-method | Names of Spat objects
names<- | Names of Spat objects
names<--method | Names of Spat objects
ncell | Dimensions of a SpatRaster or SpatVector
ncell-method | Dimensions of a SpatRaster or SpatVector
ncol | Dimensions of a SpatRaster or SpatVector
ncol-method | Dimensions of a SpatRaster or SpatVector
ncol<- | Dimensions of a SpatRaster or SpatVector
ncol<--method | Dimensions of a SpatRaster or SpatVector
nlyr | Dimensions of a SpatRaster or SpatVector
nlyr-method | Dimensions of a SpatRaster or SpatVector
nlyr<- | Dimensions of a SpatRaster or SpatVector
nlyr<--method | Dimensions of a SpatRaster or SpatVector
nrow | Dimensions of a SpatRaster or SpatVector
nrow-method | Dimensions of a SpatRaster or SpatVector
nrow<- | Dimensions of a SpatRaster or SpatVector
nrow<--method | Dimensions of a SpatRaster or SpatVector
nsrc | Dimensions of a SpatRaster or SpatVector
nsrc-method | Dimensions of a SpatRaster or SpatVector

## -- O --

orphanTmpFiles | Temporary files
overlay | Overlay SpatRaster objects
overlay-method | Overlay SpatRaster objects

## -- P --

pack | pack a Spat* object
pack-method | pack a Spat* object
PackedSpatRaster-class | SpatRaster class
PackedSpatVector-class | Class "SpatVector"
pairs | Pairs plot (matrix of scatterplots)
pairs-method | Pairs plot (matrix of scatterplots)
perimeter | Area and perimeter
perimeter-method | Area and perimeter
persp | Perspective plot
persp-method | Perspective plot
plot | Plot a SpatRaster or SpatVector
plot-method | Plot a SpatRaster or SpatVector
plotRGB | Red-Green-Blue plot of a multi-layered SpatRaster
plotRGB-method | Red-Green-Blue plot of a multi-layered SpatRaster
points-method | Plot a SpatRaster or SpatVector
predict | Spatial model predictions
predict-method | Spatial model predictions
project | Change the coordinate reference system
project-method | Change the coordinate reference system

## -- Q --

quantile | SpatRaster local quantiles
quantile-method | SpatRaster local quantiles

## -- R --

range-method | Local statistics
rast | Create a SpatRaster
rast-method | Create a SpatRaster
rasterize | Rasterize vector data
rasterize-method | Rasterize vector data
RasterSource | SpatRaster class
RasterSource-class | SpatRaster class
rats | Factors
rats-method | Factors
Rcpp_RasterSource-class | SpatRaster class
Rcpp_SpatCategories-class | SpatRaster class
Rcpp_SpatDataFrame-class | C++ classes
Rcpp_SpatExtent-class | Class "SpatExtent"
Rcpp_SpatMessages-class | C++ classes
Rcpp_SpatOptions-class | C++ classes
Rcpp_SpatRaster-class | SpatRaster class
Rcpp_SpatRasterCollection-class | C++ classes
Rcpp_SpatVector-class | Class "SpatVector"
readStart | Read from, or write to, file
readStart-method | Read from, or write to, file
readStop | Read from, or write to, file
readStop-method | Read from, or write to, file
readValues | Read from, or write to, file
readValues-method | Read from, or write to, file
res | Dimensions of a SpatRaster or SpatVector
res-method | Dimensions of a SpatRaster or SpatVector
res<- | Dimensions of a SpatRaster or SpatVector
res<--method | Dimensions of a SpatRaster or SpatVector
rotate | Rotate a SpatRaster along longitude
rotate-method | Rotate a SpatRaster along longitude
rowColFromCell | Coordinates from a row, column or cell number and vice versa
rowColFromCell-method | Coordinates from a row, column or cell number and vice versa
rowFromCell | Coordinates from a row, column or cell number and vice versa
rowFromCell-method | Coordinates from a row, column or cell number and vice versa
rowFromY | Coordinates from a row, column or cell number and vice versa
rowFromY-method | Coordinates from a row, column or cell number and vice versa

## -- S --

select | Geometric subsetting
select-method | Geometric subsetting
setMinMax | Get or compute the minimum and maximum cell values
setMinMax-method | Get or compute the minimum and maximum cell values
setRat | Factors
shift | Shift
shift-method | Shift
show-method | Class "SpatExtent"
show-method | SpatRaster class
show-method | Class "SpatVector"
show-method | C++ classes
show_messages | C++ classes
size | Dimensions of a SpatRaster or SpatVector
size-method | Dimensions of a SpatRaster or SpatVector
slope | Compute slopes
slope-method | Compute slopes
sources | Data sources of a SpatRaster
sources-method | Data sources of a SpatRaster
SpatCategories | SpatRaster class
SpatCategories-class | SpatRaster class
SpatDataFrame | C++ classes
SpatDataFrame-class | C++ classes
SpatExtent | Class "SpatExtent"
SpatExtent-class | Class "SpatExtent"
SpatMessages | C++ classes
SpatMessages-class | C++ classes
SpatOptions | C++ classes
SpatOptions-class | C++ classes
SpatRaster | SpatRaster class
SpatRaster-class | SpatRaster class
SpatRasterCollection | C++ classes
SpatRasterCollection-class | C++ classes
spatSample | Take a regular sample
spatSample-method | Take a regular sample
SpatVector | Class "SpatVector"
SpatVector-class | Class "SpatVector"
staleTmpFiles | Temporary files
stdev | Local statistics
stdev-method | Local statistics
subset | Subset of a SpatRaster
subset-method | Subset of a SpatVector
subset-method | Subset of a SpatRaster
Summary-method | Local statistics
Summary-methods | Local statistics

## -- T --

t | Transpose
t-method | Transpose
tail | Show the head or tail of a Spat* object
tail-method | Show the head or tail of a Spat* object
tapp | Apply a function to subsets of layers of a SpatRaster
tapp-method | Apply a function to subsets of layers of a SpatRaster
terra | The "terra" package
terraOptions | Inspect of set general options for "terra"
text | Add labels to a map
text-method | Add labels to a map
tmpFiles | Temporary files
transpose | Transpose
transpose-method | Transpose
trim | Trim a SpatRaster
trim-method | Trim a SpatRaster

## -- U --

unique | Unique values
unique-method | Unique values

## -- V --

values | Get cell values
values-method | Get cell values
values<- | Get cell values
values<--method | Get cell values
vect | Create SpatVector objects
vect-method | Create SpatVector objects

## -- W --

warp | Transfer values of a SpatRaster to another one with a different geometry
warp-method | Transfer values of a SpatRaster to another one with a different geometry
writeRaster | Write raster data to a file
writeRaster-method | Write raster data to a file
writeStart | Read from, or write to, file
writeStart-method | Read from, or write to, file
writeStop | Read from, or write to, file
writeStop-method | Read from, or write to, file
writeValues | Read from, or write to, file
writeValues-method | Read from, or write to, file
writeVector | Write vector data to a file
writeVector-method | Write vector data to a file

## -- X --

xFromCell | Coordinates from a row, column or cell number and vice versa
xFromCell-method | Coordinates from a row, column or cell number and vice versa
xFromCol | Coordinates from a row, column or cell number and vice versa
xFromCol-method | Coordinates from a row, column or cell number and vice versa
xmax | Get or set single values of an extent
xmax-method | Get or set single values of an extent
xmax<- | Get or set single values of an extent
xmax<--method | Get or set single values of an extent
xmin | Get or set single values of an extent
xmin-method | Get or set single values of an extent
xmin<- | Get or set single values of an extent
xmin<--method | Get or set single values of an extent
xres | Dimensions of a SpatRaster or SpatVector
xres-method | Dimensions of a SpatRaster or SpatVector
xyFromCell | Coordinates from a row, column or cell number and vice versa
xyFromCell-method | Coordinates from a row, column or cell number and vice versa

## -- Y --

yFromCell | Coordinates from a row, column or cell number and vice versa
yFromCell-method | Coordinates from a row, column or cell number and vice versa
yFromRow | Coordinates from a row, column or cell number and vice versa
yFromRow-method | Coordinates from a row, column or cell number and vice versa
ymax | Get or set single values of an extent
ymax-method | Get or set single values of an extent
ymax<- | Get or set single values of an extent
ymax<--method | Get or set single values of an extent
ymin | Get or set single values of an extent
ymin-method | Get or set single values of an extent
ymin<- | Get or set single values of an extent
ymin<--method | Get or set single values of an extent
yres | Dimensions of a SpatRaster or SpatVector
yres-method | Dimensions of a SpatRaster or SpatVector

## -- Z --

zonal | Zonal statistics
zonal-method | Zonal statistics
zoom | Zoom in on a map
zoom-method | Zoom in on a map

## -- misc --

$ | Get or replace attribute values of a SpatVector
$-method | Get or replace attribute values of a SpatVector
$-method | Subset of a SpatRaster
$<- | Get or replace attribute values of a SpatVector
$<--method | Get or replace attribute values of a SpatVector
[-method | Extract values from a SpatRaster
[-method | Subset of a SpatVector
[[-method | Subset of a SpatVector
[[-method | Subset of a SpatRaster