Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

8.4.0.1 #109

Merged
merged 18 commits into from
Dec 3, 2024
2 changes: 1 addition & 1 deletion .Rbuildignore
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ CODE_OF_CONDUCT.md
^cran-comments\.md$
^fasterRaster.png
^.*\.Rproj$
^\articles$
^articles$
^\.Rproj\.user$
^\.github
^\.vscode
Expand Down
7 changes: 4 additions & 3 deletions DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,18 +1,19 @@
Package: fasterRaster
Type: Package
Title: Faster Raster and Spatial Vector Processing Using 'GRASS GIS'
Version: 8.4.0.0
Date: 2024-11-20
Version: 8.4.0.1
Date: 2024-12-03
Authors@R:
c(
person(
given = c('Adam', 'B.'),
family = 'Smith',
role = c('aut', 'cre'),
role = c('cre', 'aut'),
email = '[email protected]',
comment = c(ORCID = '0000-0002-6420-1659')
)
)
Maintainer: Adam B. Smith <[email protected]>
Description: Processing of large-in-memory/large-on disk rasters and spatial
vectors using 'GRASS GIS'. Most functions in the 'terra' package are
recreated. Processing of medium-sized and smaller spatial objects will
Expand Down
1 change: 1 addition & 0 deletions NEWS.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ o `mow()` can delete a single `GRaster` or `GVector`, a list of rasters and/or v
o `centroids()` locates the center of `GVector`s.
o `coordRef()` returns information about an object's coordinate reference system.
o `project()` is now much faster when projecting a `GRaster` using the `terra` or `fallback` values for `res`.
o `spatSample()` is faster.
o Support for **GRASS** addons and methods based on them!!!

### Bug and issue fixes
Expand Down
4 changes: 2 additions & 2 deletions R/addons.r
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#' Test if addons directory exists and if an addon is installed
#'
#' @description This function tests to see if the "addons" directory specified using [faster()] actually exists, and if a particular **GRASS** `addons module is available. The `addons` folder and module must exists for methods that rely on particular **GRASS** `addons` to work.
#' @description This function tests to see if the "addons" directory specified using [faster()] actually exists, and if a particular **GRASS** `addons module is available. The `addons` folder and module must exists for methods that rely on particular **GRASS** `addons` to work. See `vignette("addons", package = "fasterRaster")`.
#'
#' @param x Either `NULL` or a character specifying the name of a **GRASS** addons module. If `NULL`, the existence of the `addonsDir` (see [faster()]) will be tested. If the module name is provided, the existence of the folder and module will be tested.
#'
Expand All @@ -12,7 +12,7 @@
#'
#' @returns Logical.
#'
#' @seealso `vignette("fasterRaster_addons", package = "fasterRaster")`
#' @seealso `vignette("addons", package = "fasterRaster")`
#'
#' @example man/examples/ex_addons.r
#'
Expand Down
4 changes: 3 additions & 1 deletion R/centroids.r
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
#' Centroid(s) of a vector
#'
#' @description This function locates the centroid of each geometry of a `GVector`. **To use this function, you must a) have correctly specified the `addonsDir` option using [faster()], and b) installed the **GRASS** addon `v.centerpoint`.** See [addons()] and `vignette("fasterRaster_addons", package = "fasterRaster")`.
#' @description This function locates the centroid of each geometry of a `GVector`.
#'
#' **To use this function**, you must a) have correctly specified the `addonsDir` option using [faster()], and b) installed the **GRASS** addon `v.centerpoint`. See [addons()] and `vignette("addons", package = "fasterRaster")`.
#'
#' @param x A `GVector`.
#' @param method Character or `NULL` (default): Method used for calculating centroids. The method of calculation depends on whether the input is a `points`, `lines`, or `polygons` `GVector`. If the value is `NULL`, then the default method will be chosen, depending on the geometry type of the `GVector`:
Expand Down
2 changes: 1 addition & 1 deletion R/extract.r
Original file line number Diff line number Diff line change
Expand Up @@ -745,7 +745,7 @@ methods::setMethod(

vals <- strsplit(vals, split = "\\|")
vals <- do.call(rbind, vals)
vals <- vals[ , 4:ncol(vals)]
vals <- vals[ , 4L:ncol(vals)]
vals <- data.table::as.data.table(vals)
names(vals) <- xNames[index]

Expand Down
10 changes: 5 additions & 5 deletions R/fastData.r
Original file line number Diff line number Diff line change
Expand Up @@ -12,17 +12,17 @@
#'
#' Rasters (objects of class `SpatRaster` from the **terra** package, saved as GeoTIFF files):
#' * [madChelsa]: Bioclimatic variables
#' * [madCover]: Land cover (also see `madCoverCats`)
#' * [madElev]: Elevation
#' * [madCover]: Land cover
#' * [`madElev`][madElev]: Elevation
#' * [madForest2000]: Forest cover in year 2000
#' * [madForest2014]: Forest cover in year 2014
#' * [madLANDSAT]: Surface reflectance in 2023
#' * [madPpt], [madTmin], [madTmax]: Rasters of mean monthly precipitation, and minimum and maximum temperature.
#'
#' Data frames
#' * [appFunsTable]: Table of functions usable by [app()].
#' * [madCoverCats]: Land cover values and categories.
#' * [vegIndices]: Vegetation indices that can be calculated with [vegIndex()].
#' * [appFunsTable]: Table of functions usable by [app()]
#' * [madCoverCats]: Land cover values and categories for [madCover]
#' * [vegIndices]: Vegetation indices that can be calculated with [vegIndex()]
#'
#' @return A `SpatRaster`, `sf` spatial vector, or a `data.frame`.
#'
Expand Down
18 changes: 9 additions & 9 deletions R/fasterRaster.r
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,12 @@
#' * The quick-start guide to getting started with **fasterRaster**: `vignette("fasterRaster", package = "fasterRaster")`:
#' * Types of `GRaster`s: `vignette("GRasters", package = "fasterRaster")`
#' * How to speed up **fasterRaster**: `vignette("faster_fasterRaster", package = "fasterRaster")`
#' * Using functions that depend on **GRASS** addons: `vignette("fasterRaster_addons", package = "fasterRaster")`
#' * Using functions that depend on **GRASS** addons: `vignette("addons", package = "fasterRaster")`
#' * [faster()]: Set the directory where **GRASS** is installed on your system, and set or get other package-wide options. This function must be run once before using most **fasterRaster** functions.
#' * [fast()]: Convert a `SpatRaster`, `SpatVector`, or `sf` vector to **fasterRaster**'s raster format (`GRaster`s) or vector format (`GVector`s), or load one from a file
#' * [rast()], [vect()], and [st_as_sf()]: Convert `GRaster`s and `GVector`s to `SpatRaster`s, `SpatVector`s, or `sf` vectors
#' * [writeRaster()] and [writeVector()]: Save `GRaster`s or `GVector`s to disk
#' * [addons()]: Test to see if the `addons` directory is correct and if a particular addon **GRASS** module is installed.
#' * [addons()]: Test if the `addons` directory is correct and if a particular addon **GRASS** module is installed.
#'
#' ## Properties of `GRasters`
#' * [crs()]: Coordinate reference system
Expand All @@ -37,8 +37,8 @@
#' * [nrow()]: Number of rows
#' * [nlevels()]: Number of categories
#' * [res()], [res3d()], [xres()], [yres()], and [zres()]: Spatial resolution
#' * [sources()]: Name of the `GRaster` in **GRASS**
#' * [topology()]: Dimensionality (2D or 3D)
#' * [sources()]: Name of the raster file in the **GRASS** cache
#' * [`topology()`][topology]: Dimensionally (2D or 3D)
#' * [zext()]: Vertical extent
#' * [zres()]: Vertical resolution
#'
Expand Down Expand Up @@ -136,7 +136,7 @@
#' * [flow()]: Identify watershed basins and direction and accumulation of flow
#' * [flowPath()]: Path of water flow across a landscape
#' * [geomorphons()]: Identify terrain feature types
#' * [`hillshade()`][shade]: Create a hillshade `GRaster`
#' * [`hillshade()`][hillshade]: Create a hillshade `GRaster`
#' * [horizonHeight()]: Horizon height
#' * [sun()]: Solar radiance and irradiance
#' * [ruggedness()]: Terrain Ruggedness Index
Expand Down Expand Up @@ -194,9 +194,9 @@
#' * [ncol()]: Number of fields
#' * [ngeom()]: Number of geometries (points, lines, polygons)
#' * [nrow()]: Number of rows in a vector data table
#' * [nsubgeom()]: Number of subgeometries (points, lines, polygons that make up single- and multipart geometries)
#' * [sources()]: Name of the vector in **GRASS**
#' * [topology()]: Dimensionality (2D or 3D)
#' * [nsubgeom()]: Number of sub-geometries (points, lines, polygons that make up single- and multipart geometries)
#' * [`sources()`][sources]: Name of the vector file in the **GRASS** cache
#' * [`topology()`][topology]: Dimensionally (2D or 3D)
#' * [zext()]: Vertical extent
#'
#' ## Subsetting and assigning geometries or rows and columns of `GVector`s
Expand Down Expand Up @@ -234,7 +234,7 @@
#' * [intersect()] or `*`: Intersection of two `GVectors`
#' * [kernel()]: Kernel density estimator of points
#' * [missing.cases()]: Find rows of a `GVector`'s data table that have at least `NA` in them
#' \code{\link[fasterRaster]{names<-}}: Assign names to columns of a `GVector`s data table
#' * \code{\link[fasterRaster]{names<-}}: Assign names to columns of a `GVector`s data table
#' * [project()]: Change coordinate reference system
#' * [rasterize()]: Convert a `GVector` to a `GRaster`
#' * [rbind()]: Combine `GVectors`
Expand Down
2 changes: 0 additions & 2 deletions R/hillshade.r
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,6 @@
#'
#' @returns A `GRaster`.
#'
#' @seealso [terra::shade()]
#'
#' @example man/examples/ex_terrain.r
#'
#' @aliases hillshade
Expand Down
Loading
Loading