They increase within rows, from left to right, and then row by row from top to bottom. Computing row, column, cell numbers and coordinatesĬell numbers start at 1 in the upper-left corner. Set the NA value (for reading from a file with insufficient metadata) Get the filename(s) to which a SpatRaster is linkedĪre the data sources in memory (or on disk)? Test if an object has (or may have) a longitude/latitude coordinate reference system The coordinate reference system (map projection) Get or set the extent (minimum and maximum x and y coordinates ("bounding box") The number of cells (can not be set directly, only via ncol or nrow) Similarly, with crs you can set the coordinate reference system, but this does not transform the data (see project for that). This is not the case when the extent is changed (as the number of columns and rows will not be affected). If there are values associated with a SpatRaster object (either in memory or via a link to a file) these are lost when you change the number of columns or rows or the resolution. Get or set basic parameters of SpatRasters. a correlation coeffient) to focal values for pairs of layersĬompute slope, aspect and other terrain characteristics from elevation dataĬompute vieshed (showing areas that are visible from a particular locationĬompute hill shade from slope and aspect layersĬompute global or local spatial autocorrelation Regression between layers for focal areasĪpply a function (e.g. Three dimensional (row, col, lyr) focal functionsįaster focal by using custom C++ functions Shortest distance considering cell-varying frictionĭirection (azimuth) to or from cells that are not NAįocal (neighborhood moving window) functions Shortest distance through adjacent grid cells Shortest distance to a cell that is not NA or to or from a vector object Identify cells that are adjacent to a set of cells of a SpatRaster Situation (spatial context) based methods At the bottom of this page there is a table that shows differences in the methods between the two packages.īelow is a list of some of the most important methods grouped by theme. terra has a very similar, but simpler, interface, and it is faster than raster. The terra package is conceived as a replacement of the raster package. Generally, you should use writeRaster to save SpatRaster objects to disk (and pass a filename or cell values to cluster nodes). They cannot be recovered from a saved R session either or directly passed to nodes on a computer cluster. These classes hold a C++ pointer to the data "reference class" and that creates some limitations. There is also a SpatGraticule class to assist in adding a longitude/latitude lines and labels to a map with another coordinate reference system. Each sub-dataset is a SpatRaster with possibly many layers, and may, for example, represent different weather variables and SpatRasterCollection and SpatVectorCollection that are equivalent to lists of SpatRaster or SpatVector objects. SpatVector supports all types of geometric operations such as intersections.Īdditional classes include SpatExtent, which is used to define a spatial extent (bounding box) SpatRasterDataset, which represents a collection of sub-datasets for the same area. SpatRaster supports handling large raster files that cannot be loaded into memory local, focal, zonal, and global raster operations polygon, line and point to raster conversion integration with modeling methods to make spatial predictions and more. The package implements two main classes (data types): SpatRaster and SpatVector. In contrast, "vector" spatial data (points, lines, polygons) are typically used to represent discrete spatial entities, such as a road, country, or bus stop. Satellite images also have this data structure, and in that context grid cells are often referred to as pixels. Raster data divide space into rectangular grid cells and they are commonly used to represent spatially continuous phenomena, such as elevation or the weather. Terra provides methods to manipulate geographic (spatial) data in "raster" and "vector" form. Terra-package: Description of the methods in the terra package Description
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |