Spatial Data Analysis
k_means
Apply a function to layers of a SpatRaster, or sub-datasets of a SpatR...
Correlation and (weighted) covariance
add a custom legend
Linear units of the coordinate reference system
merge SpatRasters by timelines to create a single timeseries
meta
Set or get metadata
Get or compute the minimum and maximum cell values
modal value
Replace layers or variables
Replace values of a SpatRaster
Sieve filter
simplifyGeom geometries
Sort a SpatRaster or SpatVector
clamp time series data
Active category
draw a box
Add (in place) a SpatRaster to another SpatRaster or to a SpatRasterDa...
Conversion to a SpatVector of polygons
Coerce to a "raster" object
Two argument arc-tangent
Box plot of SpatRaster data
Histogram
Compare two SpatRasters for equality
ifelse for SpatRasters
SpatRaster image method
Impose the geometry of a SpatRaster to those in a SpatRasterCollection...
Clamp values
Classify (or reclassify) cell values
Compare geometries of SpatRasters
Concatenate categorical rasters
Cross-tabulate
Get or set a coordinate reference system
Data type of a SpatRaster or SpatVector
Deep copy
Direction
extract values along lines
Adjacent cells
Aggregate raster or vector data
Align a SpatExtent
Compare two SpatRasters for equality
Animate a SpatRaster
Apply a function to the cells of a SpatRaster
Estimate values for cell values that are NA
by interpolating between...
Arithmetic
Create a text representation of (the skeleton of) an object
SpatRaster or SpatVector to data.frame
Conversion to a SpatVector of lines
Coerce a Spat* object to a list
Conversion to a SpatVector of points
Spatial autocorrelation
Bar plot of a SpatRaster
bestMatch
Detect boundaries (edges)
draw a box
Centroids
Create a buffer around vector geometries or raster patches
Combine SpatRaster or SpatVector objects
Cartogram
Factors to numeric
Get cell numbers
Area covered by each raster cell
Query by clicking on a map
Coercion to vector, matrix or array
tighten SpatRaster or SpatRasterDataset objects
Color table
Combine geometries
Compare and logical methods
Cut out a geographic subset
Contour plot
Convex hull, minimal bounding rotated rectangle, and minimal bounding ...
Cost-distance
Replace values with values from another object
Get the coordinates of SpatVector geometries or SpatRaster cells
Add additional nodes to lines or polygons
Density plot
deprecated methods
depth of SpatRaster layers
describe
Lagged differences
Dimensions of a SpatRaster or SpatVector and related objects
force counter-clockwise polygons
Disaggregate raster cells or vector geometries
Geographic distance
Make a dot-density map
Draw a polygon, line, extent, or points
elongate lines
Apply a function to subsets of layers of a SpatRaster
Erase parts of a SpatVector object
Get the expanse (area) of individual polygons or for all (summed) rast...
Create, get or set a SpatExtent
Extend
Extract values from a SpatRaster
Check or fix polygon or extent validity
Extract values for a range of layers from a SpatRaster
Categorical rasters
Remove holes from polygons
Fill time gaps in a SpatRaster
Flip or reverse a raster
Flow accumulation
Focal values
Three-dimensional focal values
Compute focal values with an iterating C++ function
Focal weights matrix
Focal function across two layers
Focal regression
Get focal values
Frequency table
Find gaps between polygons
GDAL version, supported file formats, and cache size
Get the geometry (coordinates) of a SpatVector
Geometry type of a SpatVector
Replace with $<-
global statistics
Create a graticule
add a grid to a map made with terra
Distance on a grid
Add halo-ed text to a plot
head and tail of a SpatRaster or SpatVector
Initialize a SpatRaster with values
Change values in-place
Make an inset map
Interpolate points using a moving window
List or remove layers from a vector file
Nearest neighbor interpolation
Spatial interpolation
Intersection
Raster value types
Check if a SpatExtent or SpatVector is empty
Check for longitude/latitude crs
Check for rotation
Add points, lines, or polygons to a map
Make tiles or get their extents
Make a VRT header file
Get the coordinates of the extent of a map
Where are the cells with the min or max values?
color palettes for mapping
Mask values in a SpatRaster or SpatVector
Value matching for SpatRasters
General mathematical methods
Memory available and needed
Merge SpatRasters, or merge a SpatVector with a data.frame
Which cells are TRUE?
mosaic SpatRasters
Find and remove geometries that are NA
Set the NA flag
Names of Spat* objects
nearby geometries
Number of immediate adjacent cells flowing into each cell
normalize vector data that crosses the dateline
North arrow
is not NA
Origin
Pairs plot (matrix of scatterplots)
Map panel
Detect patches (clumps) of cells
Perimeter or length
Perspective plot
Pit Finder in a Flow Dir SpatRaster for Watershed Extraction
Plot with leaflet
Plot a SpatExtent
Plot a graticule
Make a map
Red-Green-Blue plot of a multi-layered SpatRaster
SpatRaster PCA with prcomp
Spatial model predictions
SpatRaster PCA with princomp
Change the coordinate reference system
Quantiles of spatial data
Query a SpatVectorProxy object
Fill layers with a range
Range-apply
Create a SpatRaster
Rasterize vector data
Scatterplot of two SpatRaster layers
Rasterize geometric properties of vector data
Rasterize points with a moving window
Combine row, column, and layer numbers
Read from, or write to, file
Rectify a SpatRaster
Cell level regression
Spatial relationships between geometries
Replicate layers
Transfer values of a SpatRaster to another one with a different geomet...
rescale
Layers representing colors
Rolling (moving) functions
Shift
Rotate data along longitude
Compare coordinate reference systems
Take a regular sample
Apply a terra function that takes only a single layer and returns a Sp...
scale bar
Scale values
Scale (gain) and offset
Create a SpatRasterDataset
segregate
Spatial selection
select cells with high or low values
Select the values of a range of layers, as specified by cell values in...
saveRDS and serialize for SpatVector and SpatRaster*
Set the values of raster cells or of geometry attributes
Hill shading
Shared paths
Data sources of a SpatRaster
Class "SpatExtent"
SpatRaster class
Class "SpatVector"
spin a SpatVector
Split
Create a SpatRasterCollection
Stretch
Subset a SpatRaster or a SpatVector
Subset a SpatRaster or a SpatVector
Create a SpatVectorCollection
Extract values from a SpatRaster, SpatVector or SpatExtent
Subset a SpatRaster or a SpatVector
replace cell values
Summarize
summary
Symmetrical difference
Description of the methods in the terra package
terrain characteristics
Options
Add labels to a map
time of SpatRaster layers
Temporary files
Vector topology methods
Transpose
Trim a SpatRaster
Union SpatVector or SpatExtent objects
Unique values
units of SpatRaster or SpatRasterDataSet
Change values in a file
Cell values and geometry attributes
variable and long variable names
Create SpatVector objects
Compute a viewshed
Voronoi diagram and Delaunay triangles
filenames of VRT tiles
Virtual Raster Dataset
Catchment delineation
Weighted mean of layers
SpatVector geometric properties
Set a window
wrap and unwrap
SpatRaster wrap with caching options
Write raster data to a NetCDF file
Write raster data to a file
Write SpatVector data to a file
Apply a function to the cells of a two SpatRasters
Get or set single values of an extent
Coordinates from a row, column or cell number and vice versa
Zonal statistics
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).
Useful links