Learn R Programming

⚠️There's a newer version (1.7-83) of this package.Take me there.

terra (version 0.5-2)

Classes and Methods for Spatial Data

Description

Classes and methods for spatial data, especially raster data. Methods allow for low-level data manipulation as well as high-level global, local, zonal, and focal computation. The predict and interpolate methods facilitate the use of regression type (interpolation, machine learning) models for spatial prediction. The user-interface is very similar to that of the 'raster' package; but it is simpler and faster. Processing of very large files is supported. See the manual and tutorials on to get started.

Copy Link

Version

Install

install.packages('terra')

Monthly Downloads

183,196

Version

0.5-2

License

GPL (>= 3)

Issues

Pull Requests

Stars

Forks

Maintainer

Last Published

March 20th, 2020

Functions in terra (0.5-2)

area

Area and perimeter
SpatExtent-class

Class "SpatExtent"
as.data.frame

Get the attributes of a SpatVector
SpatVector-class

Class "SpatVector"
atan2

Two argument arc-tangent
classify

Classify (or reclassify) cell values
adjacent

Adjacent cells
coerce

Coercion to other object types
as.character

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

Apply a function to the cells of a SpatRaster
SpatRaster-class

SpatRaster class
clamp

Clamp values
aggregate

Aggregate raster cells
cover

Cover (replace) NA values with values of another raster
extend

Extend
collapse

Collapse cell values from a multi-layer SpatRaster
buffer

Create a buffer around vector objects or raster patches
align

Align a SpatExtent with a SpatRaster
hist

Histogram
compareGeom

Compare geometries of SpatRaster objects
SpatDataFrame-class

C++ classes
draw

Draw a polygon, line, extent, or points
isLonLat

Check for longitude/latitude crs
distance

Geographic distance
crs

Get or set a coordinate reference system (projection)
contour

Contour plot
c

Combine
boundaries

Detect boundaries (edges)
density

Density plot
factors

Factors
click

Query by clicking on a map
extract

Extract values from a SpatRaster
merge

Merge SpatRaster or SpatExtent objects, or a SpatVector with a data.frame
persp

Perspective plot
dimensions

Dimensions of a SpatRaster or SpatVector
writeVector

Write vector data to a file
geomtype

Geometry type of a SpatVector
interpolate

Interpolate
freq

Frequency table
select

Geometric subsetting
disaggregate

Disaggregate raster cells
tapp

Apply a function to subsets of layers of a SpatRaster
geom

Get the geometry (coordinates) of a SpatVector
spatSample

Take a regular sample
plot

Plot a SpatRaster or SpatVector
local

Local statistics
mask

Mask values in a SpatRaster
project

Change the coordinate reference system
crop

Cut out a geographic subset
range

Get or compute the minimum and maximum cell values
global

global statistics
extent

Create, get or set a SpatExtent
subset-vector

Subset of a SpatVector
pack

pack a Spat* object
flip

Flip a raster
shift

Shift
head and tail

Show the head or tail of a Spat* object
trim

Trim a SpatRaster
ifel

ifelse for SpatRaster objects
tmpFiles

Temporary files
values

Get cell values
focal

Focal values
rasterize

Rasterize vector data
vector-attributes

Get or replace attribute values of a SpatVector
predict

Spatial model predictions
subset

Subset of a SpatRaster
pairs

Pairs plot (matrix of scatterplots)
rotate

Rotate a SpatRaster along longitude
unique

Unique values
slope

Compute slopes
modal

modal value
quantile

SpatRaster local quantiles
zonal

Zonal statistics
transpose

Transpose
initialize

Initialize a SpatRaster with values
plotRGB

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

Create SpatVector objects
xmin

Get or set single values of an extent
sources

Data sources of a SpatRaster
text

Add labels to a map
read and write

Read from, or write to, file
math

Mathematical operations with SpatRaster objects
warp

Transfer values of a SpatRaster to another one with a different geometry
SpatOptions-class

Inspect of set general options for "terra"
rast

Create a SpatRaster
xyRowColCell

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

Overlay SpatRaster objects
zoom

Zoom in on a map
names

Names of Spat objects
terra-package

The "terra" package
writeRaster

Write raster data to a file