terra1.7-83 package

Spatial Data Analysis

k_means

k_means

lapp

Apply a function to layers of a SpatRaster, or sub-datasets of a SpatR...

layerCor

Correlation and (weighted) covariance

legend

add a custom legend

linearUnits

Linear units of the coordinate reference system

mergeTime

merge SpatRasters by timelines to create a single timeseries

meta

meta

metags

Set or get metadata

minmax

Get or compute the minimum and maximum cell values

modal

modal value

replace_layers

Replace layers or variables

replace_values

Replace values of a SpatRaster

sieve

Sieve filter

simplify

simplifyGeom geometries

sort

Sort a SpatRaster or SpatVector

clamp_ts

clamp time series data

activeCat

Active category

add_mtext

draw a box

add

Add (in place) a SpatRaster to another SpatRaster or to a SpatRasterDa...

as.polygons

Conversion to a SpatVector of polygons

as.raster

Coerce to a "raster" object

atan2

Two argument arc-tangent

boxplot

Box plot of SpatRaster data

hist

Histogram

identical

Compare two SpatRasters for equality

ifelse

ifelse for SpatRasters

image

SpatRaster image method

impose

Impose the geometry of a SpatRaster to those in a SpatRasterCollection...

clamp

Clamp values

classify

Classify (or reclassify) cell values

compareGeom

Compare geometries of SpatRasters

concats

Concatenate categorical rasters

crosstab

Cross-tabulate

crs

Get or set a coordinate reference system

datatype

Data type of a SpatRaster or SpatVector

deepcopy

Deep copy

direction

Direction

extractAlong

extract values along lines

adjacent

Adjacent cells

aggregate

Aggregate raster or vector data

align

Align a SpatExtent

all.equal

Compare two SpatRasters for equality

animate

Animate a SpatRaster

app

Apply a function to the cells of a SpatRaster

approximate

Estimate values for cell values that are NA by interpolating between...

arith-generic

Arithmetic

as.character

Create a text representation of (the skeleton of) an object

as.data.frame

SpatRaster or SpatVector to data.frame

as.lines

Conversion to a SpatVector of lines

as.list

Coerce a Spat* object to a list

as.points

Conversion to a SpatVector of points

autocor

Spatial autocorrelation

barplot

Bar plot of a SpatRaster

bestMatch

bestMatch

boundaries

Detect boundaries (edges)

box

draw a box

centroids

Centroids

buffer

Create a buffer around vector geometries or raster patches

c

Combine SpatRaster or SpatVector objects

cartogram

Cartogram

catalyze

Factors to numeric

cells

Get cell numbers

cellSize

Area covered by each raster cell

click

Query by clicking on a map

coerce

Coercion to vector, matrix or array

collapse

tighten SpatRaster or SpatRasterDataset objects

colors

Color table

combineGeoms

Combine geometries

compare-generics

Compare and logical methods

crop

Cut out a geographic subset

contour

Contour plot

convhull

Convex hull, minimal bounding rotated rectangle, and minimal bounding ...

costDist

Cost-distance

cover

Replace values with values from another object

crds

Get the coordinates of SpatVector geometries or SpatRaster cells

densify

Add additional nodes to lines or polygons

density

Density plot

deprecated

deprecated methods

depth

depth of SpatRaster layers

describe

describe

diff

Lagged differences

dimensions

Dimensions of a SpatRaster or SpatVector and related objects

forceCCW

force counter-clockwise polygons

disaggregate

Disaggregate raster cells or vector geometries

distance

Geographic distance

dots

Make a dot-density map

draw

Draw a polygon, line, extent, or points

elongate

elongate lines

tapp

Apply a function to subsets of layers of a SpatRaster

erase

Erase parts of a SpatVector object

expanse

Get the expanse (area) of individual polygons or for all (summed) rast...

ext

Create, get or set a SpatExtent

extend

Extend

extract

Extract values from a SpatRaster

is.valid

Check or fix polygon or extent validity

extractRange

Extract values for a range of layers from a SpatRaster

factors

Categorical rasters

fill

Remove holes from polygons

fillTime

Fill time gaps in a SpatRaster

flip

Flip or reverse a raster

flowAccumulation

Flow accumulation

focal

Focal values

focal3D

Three-dimensional focal values

focalCpp

Compute focal values with an iterating C++ function

focalMat

Focal weights matrix

focalPairs

Focal function across two layers

focalReg

Focal regression

focalValues

Get focal values

freq

Frequency table

gaps

Find gaps between polygons

gdal

GDAL version, supported file formats, and cache size

geometry

Get the geometry (coordinates) of a SpatVector

geomtype

Geometry type of a SpatVector

replace_dollar

Replace with $<-

global

global statistics

graticule

Create a graticule

grid

add a grid to a map made with terra

gridDist

Distance on a grid

halo

Add halo-ed text to a plot

headtail

head and tail of a SpatRaster or SpatVector

init

Initialize a SpatRaster with values

inplace

Change values in-place

inset

Make an inset map

interpIDW

Interpolate points using a moving window

vector_layers

List or remove layers from a vector file

interpNear

Nearest neighbor interpolation

interpolate

Spatial interpolation

intersect

Intersection

is.bool

Raster value types

is.empty

Check if a SpatExtent or SpatVector is empty

is.lonlat

Check for longitude/latitude crs

is.rotated

Check for rotation

lines

Add points, lines, or polygons to a map

makeTiles

Make tiles or get their extents

makeVRT

Make a VRT header file

map_extent

Get the coordinates of the extent of a map

where

Where are the cells with the min or max values?

mappal

color palettes for mapping

mask

Mask values in a SpatRaster or SpatVector

match

Value matching for SpatRasters

math-generics

General mathematical methods

mem

Memory available and needed

merge

Merge SpatRasters, or merge a SpatVector with a data.frame

which

Which cells are TRUE?

mosaic

mosaic SpatRasters

na.omit

Find and remove geometries that are NA

NAflag

Set the NA flag

names

Names of Spat* objects

nearby

nearby geometries

NIPD

Number of immediate adjacent cells flowing into each cell

normalize.longitude

normalize vector data that crosses the dateline

north

North arrow

not.na

is not NA

origin

Origin

pairs

Pairs plot (matrix of scatterplots)

panel

Map panel

patches

Detect patches (clumps) of cells

perim

Perimeter or length

persp

Perspective plot

pitfinder

Pit Finder in a Flow Dir SpatRaster for Watershed Extraction

plet

Plot with leaflet

plot_extent

Plot a SpatExtent

plot_graticule

Plot a graticule

plot

Make a map

plotRGB

Red-Green-Blue plot of a multi-layered SpatRaster

prcomp

SpatRaster PCA with prcomp

predict

Spatial model predictions

princomp

SpatRaster PCA with princomp

project

Change the coordinate reference system

quantile

Quantiles of spatial data

query

Query a SpatVectorProxy object

rangeFill

Fill layers with a range

rapp

Range-apply

rast

Create a SpatRaster

rasterize

Rasterize vector data

scatter

Scatterplot of two SpatRaster layers

rasterizeGeom

Rasterize geometric properties of vector data

rasterizeWin

Rasterize points with a moving window

rcl

Combine row, column, and layer numbers

readwrite

Read from, or write to, file

rectify

Rectify a SpatRaster

regress

Cell level regression

relate

Spatial relationships between geometries

rep

Replicate layers

resample

Transfer values of a SpatRaster to another one with a different geomet...

rescale

rescale

RGB

Layers representing colors

roll

Rolling (moving) functions

shift

Shift

rotate

Rotate data along longitude

same.crs

Compare coordinate reference systems

sample

Take a regular sample

sapp

Apply a terra function that takes only a single layer and returns a Sp...

sbar

scale bar

scale

Scale values

scoff

Scale (gain) and offset

sds

Create a SpatRasterDataset

segregate

segregate

select

Spatial selection

selectHigh

select cells with high or low values

selectRange

Select the values of a range of layers, as specified by cell values in...

serialize

saveRDS and serialize for SpatVector and SpatRaster*

setValues

Set the values of raster cells or of geometry attributes

shade

Hill shading

sharedPaths

Shared paths

sources

Data sources of a SpatRaster

SpatExtent-class

Class "SpatExtent"

SpatRaster-class

SpatRaster class

SpatVector-class

Class "SpatVector"

spin

spin a SpatVector

split

Split

sprc

Create a SpatRasterCollection

stretch

Stretch

subset_dollar

Subset a SpatRaster or a SpatVector

subset_double

Subset a SpatRaster or a SpatVector

svc

Create a SpatVectorCollection

subset_single

Extract values from a SpatRaster, SpatVector or SpatExtent

subset

Subset a SpatRaster or a SpatVector

subst

replace cell values

summarize-generics

Summarize

summary

summary

symdif

Symmetrical difference

terra-package

Description of the methods in the terra package

terrain

terrain characteristics

terraOptions

Options

text

Add labels to a map

time

time of SpatRaster layers

tmpFile

Temporary files

topology

Vector topology methods

transpose

Transpose

trim

Trim a SpatRaster

union

Union SpatVector or SpatExtent objects

unique

Unique values

units

units of SpatRaster or SpatRasterDataSet

update

Change values in a file

values

Cell values and geometry attributes

varnames

variable and long variable names

vect

Create SpatVector objects

viewshed

Compute a viewshed

voronoi

Voronoi diagram and Delaunay triangles

vrt_tiles

filenames of VRT tiles

vrt

Virtual Raster Dataset

watershed

Catchment delineation

weighted.mean

Weighted mean of layers

width

SpatVector geometric properties

window

Set a window

wrap

wrap and unwrap

wrapCache

SpatRaster wrap with caching options

writeCDF

Write raster data to a NetCDF file

writeRaster

Write raster data to a file

writeVector

Write SpatVector data to a file

xapp

Apply a function to the cells of a two SpatRasters

xmin

Get or set single values of an extent

xyCellFrom

Coordinates from a row, column or cell number and vice versa

zonal

Zonal statistics

zoom

Zoom in on a map

Methods for spatial data analysis with vector (points, lines, polygons) and raster (grid) data. Methods for vector data include geometric operations such as intersect and buffer. Raster methods include local, focal, global, zonal and geometric operations. The predict and interpolate methods facilitate the use of regression type (interpolation, machine learning) models for spatial prediction, including with satellite remote sensing data. Processing of very large files is supported. See the manual and tutorials on <https://rspatial.org/> to get started. 'terra' replaces the 'raster' package ('terra' can do more, and it is faster and easier to use).

  • Maintainer: Robert J. Hijmans
  • License: GPL (>= 3)
  • Last published: 2024-10-14