Skip to content

Commit

Permalink
Merge branch 'rspatial:master' into master
Browse files Browse the repository at this point in the history
  • Loading branch information
see24 authored Jul 6, 2023
2 parents d1c9efc + dda7edf commit adae5a2
Show file tree
Hide file tree
Showing 78 changed files with 1,297 additions and 891 deletions.
6 changes: 3 additions & 3 deletions DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
Package: terra
Type: Package
Title: Spatial Data Analysis
Version: 1.7-40
Date: 2023-06-23
Version: 1.7-41
Date: 2023-07-04
Depends: R (>= 3.5.0)
Suggests: parallel, tinytest, ncdf4, sf (>= 0.9-8), deldir, XML, leaflet, htmlwidgets
LinkingTo: Rcpp
Expand All @@ -11,7 +11,7 @@ SystemRequirements: C++17, GDAL (>= 2.2.3), GEOS (>= 3.4.0), PROJ (>= 4.9.3), sq
Encoding: UTF-8
Language: en-US
Maintainer: Robert J. Hijmans <r.hijmans@gmail.com>
Description: 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/terra/> to get started. 'terra' replaces the 'raster' package ('terra' can do more, and it is faster and easier to use).
Description: 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).
License: GPL (>=3)
URL: https://rspatial.org/
BugReports: https://github.com/rspatial/terra/issues/
Expand Down
26 changes: 21 additions & 5 deletions NEWS.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,20 @@
# version 1.7-40
# version 1.7-41

## bug fixes

`plot<SpatVector>` used the wrong main label in some cases [#1210](https://github.com/rspatial/terra/issues/1210) by Márcia Barbosa


## enhancements

`wrap<SpatRaster>` now stores color tables [#1215](https://github.com/rspatial/terra/issues/1215) by Patrick Brown
`global` now has a "maxcell" argument [#1213](https://github.com/rspatial/terra/issues/1213) by Alex Ilich
`layerCor` with fun='pearson' now returns output with the layer names [#1206](https://github.com/rspatial/terra/issues/1206)


## new
`compareGeom` for list and SpatRasterCollection [#1207](https://github.com/rspatial/terra/issues/1207) by Sarah Endicott



# version 1.7-39
Expand Down Expand Up @@ -36,7 +52,7 @@ Released 2023-06-18
- legend options for `<plet,SpatVector`>. [#1177](https://github.com/rspatial/terra/issues/1177) by Agustin Lobo.
- better handling of mixed geometry type vector data by `vect` and `svc`. [#1160](https://github.com/rspatial/terra/issues/1160) by Mike Sumner.
- new argument `sql` to `query<SpatVectorProxy>`. [#1157](https://github.com/rspatial/terra/issues/1157) by Carl Boettiger
- support for writing raster data to a vitual file system [#1209](https://github.com/rspatial/terra/issues/1209) by Carl Boettiger

## new
- `wrap<SpatRasterDataset>` and `wrap<SpatRasterCollection>` methods. [#954](https://github.com/rspatial/terra/issues/954) by James Camac
Expand Down Expand Up @@ -85,7 +101,7 @@ Released 2023-04-08

- better support for other color spaces than RGB [#1060](https://github.com/rspatial/terra/issues/1060) by Dominic Royé
- path expansion in writeVector [#1055](https://github.com/rspatial/terra/issues/1055) by Andrew Gene Brown.
- `clamp<SpatRaster>` now also accepts cSpatRasters to set the lower and upper boundaries.
- `clamp<SpatRaster>` now also accepts SpatRasters to set the lower and upper boundaries.
- `freq` has new arguments "zones=NULL" and "wide=FALSE", to allow tabulation of values by zone.
- `expanse<SpatRaster>` has new arguments "zones=NULL" and "wide=FALSE", to allow tabulation of values by zone.
- `unique<SpatRaster>` has new argument "digits=NA"
Expand Down Expand Up @@ -199,7 +215,7 @@ Released 2022-12-02

- argument `exhaustive` to `spatSample<SpatRaster>` for large sparse rasters. [#905] by PetiteTong.
- `focalPairs` and `focalReg` can now use the values in custom windows as weights. [#907] by Fabian Fischer.
- `focalReg` now has additional arugment "intercept=TRUE". [#916] by Jordan Adamson
- `focalReg` now has additional argument "intercept=TRUE". [#916] by Jordan Adamson
- `crs(x, warn=TRUE)<-` now emits a warning about the difference between transforming and setting a crs when x already had a crs. [#897] by Márcia Barbosa.
- it is now possible to write a scale and offset with `writeRaster` [#900] by Kyle David
- `crosstab` now shows the labels names for a categorical SpatRaster. [895] by Derek Corcoran Barrios
Expand Down Expand Up @@ -250,7 +266,7 @@ Released 2022-11-18
- `readRDS` and `unserialize` now return a SpatRaster or SpatVector (instead of a PackedSpat*)
- better support for a "local" arbitrary Euclidean crs [#797] by Agustin Lobo
- `clamp` can now take low and high values for each layer
- The `pax` argument in `plot` now provides more control over what to draw on each axis via paramters `side`, `tick` and `lab`
- The `pax` argument in `plot` now provides more control over what to draw on each axis via parameters `side`, `tick` and `lab`
- The `pax` argument in `plot` now has argument `retro` to use a sexagesimal notation of degrees
- `extend` has a new argument `fill=NA`
- A warning is now given when `c`ombining SpatRasters with different CRSs. [#818] by Andrew Marx
Expand Down
56 changes: 28 additions & 28 deletions R/Aclasses.R
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,13 @@

setClass("SpatRaster",
representation (
ptr = "C++Object"
pnt = "C++Object"
),
prototype (
ptr = NULL
pnt = NULL
),
validity = function(object) {
if (is.null(object@ptr) || is(object@ptr, "Rcpp_SpatRaster")){
if (is.null(object@pnt) || is(object@pnt, "Rcpp_SpatRaster")){
return(TRUE)
} else {
return(FALSE)
Expand All @@ -22,13 +22,13 @@ setClass("SpatRaster",

setClass("SpatRasterDataset",
representation (
ptr = "C++Object"
pnt = "C++Object"
),
prototype (
ptr = NULL
pnt = NULL
),
validity = function(object) {
if (is.null(object@ptr) || is(object@ptr, "Rcpp_SpatRasterStack")){
if (is.null(object@pnt) || is(object@pnt, "Rcpp_SpatRasterStack")){
return(TRUE)
} else {
return(FALSE)
Expand All @@ -38,13 +38,13 @@ setClass("SpatRasterDataset",

setClass("SpatRasterCollection",
representation (
ptr = "C++Object"
pnt = "C++Object"
),
prototype (
ptr = NULL
pnt = NULL
),
validity = function(object) {
if (is.null(object@ptr) || is(object@ptr, "Rcpp_SpatRasterCollection")){
if (is.null(object@pnt) || is(object@pnt, "Rcpp_SpatRasterCollection")){
return(TRUE)
} else {
return(FALSE)
Expand All @@ -55,13 +55,13 @@ setClass("SpatRasterCollection",

setClass("SpatVector",
representation (
ptr = "C++Object"
pnt = "C++Object"
),
prototype (
ptr = NULL
pnt = NULL
),
validity = function(object) {
if (is.null(object@ptr) || is(object@ptr, "Rcpp_SpatVector")){
if (is.null(object@pnt) || is(object@pnt, "Rcpp_SpatVector")){
return(TRUE)
} else {
return(FALSE)
Expand All @@ -71,13 +71,13 @@ setClass("SpatVector",

setClass("SpatVectorProxy",
representation (
ptr = "C++Object"
pnt = "C++Object"
),
prototype (
ptr = NULL
pnt = NULL
),
validity = function(object) {
if (is.null(object@ptr) || is(object@ptr, "Rcpp_SpatVectorProxy")){
if (is.null(object@pnt) || is(object@pnt, "Rcpp_SpatVectorProxy")){
return(TRUE)
} else {
return(FALSE)
Expand All @@ -88,13 +88,13 @@ setClass("SpatVectorProxy",

setClass("SpatVectorCollection",
representation (
ptr = "C++Object"
pnt = "C++Object"
),
prototype (
ptr = NULL
pnt = NULL
),
validity = function(object) {
if (is.null(object@ptr) || is(object@ptr, "Rcpp_SpatVectorCollection")){
if (is.null(object@pnt) || is(object@pnt, "Rcpp_SpatVectorCollection")){
return(TRUE)
} else {
return(FALSE)
Expand All @@ -106,13 +106,13 @@ setClass("SpatVectorCollection",

setClass("SpatExtent",
representation (
ptr = "C++Object"
pnt = "C++Object"
),
prototype (
ptr = NULL
pnt = NULL
),
validity = function(object) {
if (is.null(object@ptr) || is(object@ptr, "Rcpp_SpatExtent")){
if (is.null(object@pnt) || is(object@pnt, "Rcpp_SpatExtent")){
return(TRUE)
} else {
return(FALSE)
Expand All @@ -123,13 +123,13 @@ setClass("SpatExtent",

setClass("SpatOptions",
representation (
ptr = "C++Object"
pnt = "C++Object"
),
prototype (
ptr = NULL
pnt = NULL
),
validity = function(object) {
if (is.null(object@ptr) || is(object@ptr, "Rcpp_SpatOptions")){
if (is.null(object@pnt) || is(object@pnt, "Rcpp_SpatOptions")){
return(TRUE)
} else {
return(FALSE)
Expand All @@ -141,15 +141,15 @@ setClass("SpatOptions",

setClass("SpatGraticule",
representation (
ptr = "C++Object",
pnt = "C++Object",
box = "C++Object"
),
prototype (
ptr = NULL,
ptr = NULL
pnt = NULL,
pnt = NULL
),
validity = function(object) {
if (is.null(object@ptr) || is(object@ptr, "Rcpp_SpatVector")){
if (is.null(object@pnt) || is(object@pnt, "Rcpp_SpatVector")){
return(TRUE)
} else {
return(FALSE)
Expand Down
Loading

0 comments on commit adae5a2

Please sign in to comment.