flip(direction="vertical")
failed in some cases #1518 by Ed
Carnellzonal(as.raster=TRUE)
failed when the zonal raster was
categorical 1514 by Jessi L
Browndistance<data.frame,data.frame>
and
<matrix,matrix>
ignored the unit argument. #1545 by
Wencheng Lau-Medranosplit<SpatVector>
only worked well if the split
field was of type character. #1530 by Igor
GraczykowskigridDist
(and probably some other methods) emitted a
“cannot overwrite existing file” error when processing large datasets #1522 by Clare
Pearsonterrain
did not accept multiple variables #1561 by
Michael Mahoneyrotate
was vulnerable to an integer overflow #1562 by Sacha
RuzzantegetTileExtents
could return overlapping tiles or tiles
with gaps due to floating point imprecision. #1564 by
Michael Sumneras.list<SpatRasterDataset>
sets the names of the
list #1513fill_range
to plotplot<SpatVector>
to use the color of the extreme
values of the specified range #1553 by Mike
Koontzmap-region
returns the coordinates of the axes position
of a map created with plot<Spat*>
https://github.com/rspatial/terra/issues/1517
by Daniel Schuchpolys<leaflet>
method #1543 by Márcia
Barbosaplot<SpatVectorCollection>
method #1532 by
jedgroevadd_mtext
to add text around the margins of a map. #1567 by Daniel
SchuchReleased 2023-05-22
writeVector
and readVector
better handle
empty geopackage layers #1426 by Andrew
Gene Brown.writeCDF
only wrote global variables if there was more
than one #1443 by Daniel
Schlaepferrasterize
with “by” returned odd layernames #1435 by
Philippe MassicotteconvHull
, minCircle
and
minRect
with a zero-row SpatVector crashed R #1445 by Andrew
Gene BrownrangeFill
with argument circular=TRUE
did
not work properly #1460 by
Alicecrs(describe = TRUE)
returned an mis-ordered extent #1485 by
Dimitri Falktapp
with a custom function and an index like
“yearmonths” could shift time for not considering the time zone. #1483 by Finn
Robertsplot<SpatRaster>
could fail when there were
multiple values with very small differences #1491 by
srfallas.data.frame<SpatRaster>
with “xy=TRUE” and
“wide=FALSE” could fail if coordinates were very similar #1476 by Pascal
OettlirasterizeGeom
now returns the correct layer name #1472 by
HRodenhizercellSize
with “mask=TRUE” failed if the output was to
be written to a temp file #1496 by Pascal
Sauerext<SpatVectorProxy>
did not return the full
extent #1501
by erkent-carbextract
has new argument “small=TRUE” to allow for
strict use of “touches=FALSE” #1419 by Floris
Vanderhaeghe.as.list<SpatRaster>
has new argument
“geom=NULL”rast<list>
now recognizes (x, y, z) base R
“image” structures stackoverflow
by Ignacio Marzan.inset
has new arguments “offset” and “add” #1422 by
Armand-CTexpanse<SpatRaster>
has argument
usenames
#1446 by Bappa
Dasterra::map.pal("viridis")
instead of
terrain.colors
. The default can be changes with
options(terra.pal=...)
#1474 by Derek
Friendas.list<SpatRasterDataset>
now returns a named
list. #1513
by Eric R. ScottbestMatch<SpatRaster>
methodcells
https://github.com/rspatial/terra/issues/1487
by Floris Vanderhaegheadd_grid
to add a grid to a mapReleased 2023-01-31
layerCor
with a custom function did not work anymore #1387 by Jakub
Nowosadplet
broke when using “panel=TRUE” #1384 by Elise
Hellwigplot<SpatRaster>(add=TRUE)
sampled the raster
data without considering the extent of the map. #1394 by Márcia
Barbosaplot<SpatRaster>(add=TRUE)
now only considers the
first layer of a multi-layer SpatRaster 1395 by Márcia
Barbosaset.cats
failed with a tibble was used instead of a
data.frame #1406 by Mike
Koontzpolys
argument “alpha” was ignored if a single color
was used. #1413 by Derek
Friendquery
ignore the “vars” argument if all rows were
selected. #1398 by
erkent-carb.spatSample
ignored “replace=TRUE” with random sampling,
na.rm=TRUE, and a sample size larger than the non NA cells. #1411 by Babak
NaimispatSample
sometimes returned fewer values than
requested and available for lonlat rasters. #1396 by Márcia
Barbosa.vect<character>
now has argument “opts” for GDAL
open options, e.g. to declare a file encoding. #1389 by Mats
Blomqvistplot(plg=list(tic=""))
now allows choosing alternative
continuous legend tic-mark styles (“in”, “out”, “through” or
“none”)makeTiles
has new argument “buffer” #1408 by Joy
Flowers.prcomp<SpatRaster>
method #1361
by Jakub Nowosadadd_box
to add a box around the map. The box is drawn
where the axes are, not around the plotting region.getTileExtents
provides the extents of tiles. These may
be used in parallelization. See #1391 by Alex
Ilich.Released 2023-12-15
flip
with argument direction="vertical"
filed in some cases with large rasters processed in chunks 0b714b0
by Dulci on stackoveflowNA & FALSE
and
NA | TRUE
#1316 by John
Baumsset.names
wasn’t working properly for SpatRasterDataset
or SpatRasterCollection #1333 by Derek
Friendextract
with argument “layer” not NULL shifted the
layers #1332
by Ewan WakefieldterraOptions
did not capture “memmin” on stackoverflow
by dwwrasterize
with points and a built-in function could
crash if no field was used #1369 by
anjelinejelinemosaic
can now use fun="modal"
rast<matrix> and rast<data.frame>
now have
option ’type=“xylz” #1318 by
Agustin Loboextract<SpatRaster,SpatVector>
can now use
multiple summarizing functions #1335 by Derek
Frienddisagg
and focal
have more optimistic
memory requirement estimation #1334 by Mikko
Kuronenk_means<SpatRaster>
method #1314 by
Agustin Loboprincomp<SpatRaster>
method #1361 by Alex
Ilichhas.time<SpatRaster>
methodrast
, sds
, and
sprc
to allow ignoring scale and offset 1354 by Insang
SongReleased 2023-10-14
mosaic
ignored the filename argument if the
SpatRasterCollection only had a single SpatRaster #1267 by
Michael Mahoneyextract
with a raster file that had
been deleted crashed R. #1268 by Derek
Friendsplit<SpatVector,SpatVector>
did not work well in
all cases. #1256 by Derek
Corcoran Barriosintersect
with two SpatVectors crashed R if there was a
date/time variable #1273 by Dave
DixonspatSample<SpatRaster>(method="weights")
#1275 by
François Rousseucoltab<-
again works with a list as value #1280 by Diego
Hernangómezstretch
with histogram equalization was not memory-safe
#1305 by
Evan Hershplot
now resets the “mar” parameter #1297 by Márcia
BarbosaplotRGB
ignored the “smooth” argument #1307 by
Timothée Giraudproject
was renamed to “use_gdal” #1269 by Stuart
Brown.plot<SpatVector>
now uses an “interval” legend
when breaks are supplied #1303 by
Gonzalo Rizzocrop<SpatRaster>
now keeps more metadata,
including variable names #1302 by
rhgofextract(fun="table")
now returns an easier to use
data.frame #1294 by
Fernando Aramburu.metags<-
and metags
to set arbitrary
SpatRaster/file level metadata #1304 by
Francesco ChianucciReleased 2023-09-06
plot<SpatVector>
used the wrong main label in
some cases #1210 by Márcia
BarbosaplotRGB
failed with an “ext=” argument #1228 by Dave
Edgerast<array>
failed badly when the array had less
than three dimensions. #1254 by
andreimirt.all.equal
for a SpatRaster with multiple layers #1236 by Sarah
Endicottzonal(wide=FALSE)
could give wrong results if the zonal
SpatRaster had “layer” as layername. #1251 by Jeff
Hansonpanel
now support argument “range” #141 by Jakub
Nowosadrasterize
with by=
returned wrong
layernames if the by field was not sorted #1266 by
Sebastian Dunnettmosaic
with multiple layers was not correct #1262 by
Jean-Romainwrap<SpatRaster>
now stores color tables #1215 by
Patrick Brownglobal
now has a “maxcell” argument #1213 by Alex
IlichlayerCor
with fun=‘pearson’ now returns output with the
layer names #1206vrt
now has argument “set_names” #1244 by
sam-a-levyvrt
now has argument “return_filename” #1258 by
Krzysztof Dybaproject<SpatRaster>
has new argument “by_util”
exposing the GDAL warp utility #1222 by Michael
Sumner.compareGeom
for list and SpatRasterCollection #1207 by Sarah
Endicottis.rotated<SpatRaster>
method #1229 by Andy
LyonsforceCCW<SpatVector>
method to force
counter-clockwise orientation of polygons #1249 by
srfall.vrt_tiles
returns the filenames of the tiles in a vrt
file #1261
by Derek FriendextractAlong
to extract raster cell values for a line
that are ordered along the line. #1257 by
adamkc.Released 2023-06-23
RGB<-
and coltab<-
so that terra can be installed with R-devel (after a bug fix
https://bugs.r-project.org/show_bug.cgi?id=18538)Released 2023-06-18
rasterize
with points and a custom function did not
work for large rasters. #1127 by Skip
Woolleycrop<SpatRaster, SpatVector>
with “mask=TRUE” did
not work well if the raster had a scale/offset #1128 by Monika
Anna Tomaszewskazonal<SpatRaster>
with a custom function always
removed NAs. #1133 by
Matthias Weigandwrap<SpatRaster>
lost changed layer names if the
source was from disk; and information on some time-step in some cases.
#1144 by
Pascal Führlichglobal(fun="isNA")
was not correct when the SpatRaster
had multiple layers #1141 by Robin
FreemaninterpIDW
with near=TRUE
did not work
properly (near=TRUE is now the default). #1186 by Hugh
Grahampanel
for categorical SpatRasters. #1143 by Jason
Flowerplot<SpatRaster>
can now also
expand the plot. #1136 by Jakub
Nowosad.overwrite=FALSE
to makeTiles
. #1167 by Gray
Martin.<plet,SpatVector
>. #1177 by
Agustin Lobo.vect
and svc
. #1160 by Mike
Sumner.sql
to
query<SpatVectorProxy>
. #1157 by Carl
Boettigerwrap<SpatRasterDataset>
and
wrap<SpatRasterCollection>
methods. #954 by James
CamacReleased 2023-04-22
regress<SpatRaster,numeric>
to get regression
model coefficients for each cell, with a fixed “X”.regress<SpatRaster,SpatRaster>
to get regression
model coefficients for each cell.lapp<SpatRasterDataset>
is now more flexible in
that it can now also use functions that are vectorized by cell, not by
chunk. See #1029project<SpatVector>
has new argument
“partial=FALSE” that can be used to keep geometries that can only be
partially included in the output crs.global
with fun=“notNA” was wrong #111 by Jeffrey
Hansonextract<SpatRaster,SpatVector>
with “bind=TRUE”
did not workextract<SpatRaster,SpatVector>
with point
geometries and a “fun” returned values in the wrong orderplot<SpatRaster>
argument “colNA” did not work
when “alpha” was also set #1102 by Márcia
Barbosacrop<SpatRaster>
with “extend=TRUE” did not
extend the SpatRaster if the input had no cell values. #1114 by Jasper
van DoninckfocalMat
did not work well when using
terraOptions(todisk=T) #1116Released 2023-04-08
halo
function for adding halo-ed text to plots is
now exposedadd_legend
to allow using a keyword such as “topleft”
to position a custom legend. #1053 by Márcia
Barbosasame.crs
function is now exportedcountNA<SpatRaster>
methodsplit<SpatVector,SpatVector>
to split polygons
with linesclamp<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”rasterize<SpatRaster,SpatVector>
now accepts
fun=“table” to tabulate cells by cell valuerast<character>
has new argument “snap” to snap
the window in or out. #1094 by Derek
Friendplot
has new argument “clip=TRUE” that can be set to
FALSE to avoid clipping the axes to the mapped area #1080 by Márcia
BarbosawriteCDF<SpatRaster>
had new argument “split”
allowing to treat each layer as a subdataset #1077 by Andrea
Manicaglobal
now accepts multiple summarizing functionssieve
was not able to write to file #1061 by
leorasterize
did not work with sf objects #1054 by Jakub
Nowosadquery
did not work for hyphenated layer names #1058 by Robbie
Pricefocal3D
na.policy did not work #1057 by Flávio
MotalayerCor
with na.rm=TRUE
failed for a
SpatRaster with more than 2 layers #1056 by Alex
Ilich.compareGeom
did not work for multiple SpatRasters #1063viewshed
could not handle a filename argument. #1100 by
kamistickReleased 2023-03-06
order=FALSE
to
sort<SpatRaster>
sort<SpatVector>
(and
<data.frame>
methodby=NULL
to rasterize>
#986 by Sam
Webermeta<SpatRaster>
method to get metadatacompare<SpatRaster>
and
logic<SpatRaster>
methodsvect<SpatExtent>
methodpanel<SpatRaster>
for “panel” plots (multiple
layers, single legend)is.lonlat
#1006 by Andrew
Gene Brownna.rm
to
merge<SpatRaster>
plot
are now snug around
the mapped area, instead of at the limits of the graphics figure
region..empty()
instead of .size()==0
). [#1013-1017]
by Michael Chiricorasterize
with lines and polygons can now use the “fun”
argument (for min, max, mean, and sum) #1041 by Bart
Huntleyplet
was not always correct. #983 by Simon
RolphspatSample<SpatRaster>(regular=TRUE)
failed with
providing two numbers (row, col) as sample size. #991 by
srfallmerge<SpatRaster>
did not ignore NAs #1002 by
jmmonnet.writeCDF
failed when using argument force_v4 #1009 by R.
Kyle Bocinskypredict
better handling of rasters with many NAs #988 by Lucas
JohnsonlayerCor
did not handle NAs well if they were in
different cells across layers #1034 by
François Rousseu.Released 2023-01-24
w
to
zonal<SpatRaster,SpatRaster>
to compute weighted
meanszonal<SpatRaster,SpatVector>
methodclamp_ts
methodsplit<SpatVector>
. #979 by
srfallspatSample
with as.df=FALSE
returned a
data.frame instead of a matrix #982 by Alex
IlichReleased 2023-01-17
shade
is now vectorized for arguments
angle
and direction
to facilitate generating
multiple hillshades that can be combined for a better result #948 by Jürgen
NiedballasharedPaths
now uses spatial indices #960 by Jeff
Hansonpredict
has better support for models such as ranger
that do not return anything for missing values #968 by Alex
IlichwriteCDF
now supports writing yearly time steps #926 by Andrea
Manicaas.contour
now works for a single level #966 by Johannes
SignerReleased 2022-12-02
roll<SpatRaster>
method for rolling (moving)
average and other rolling functionsnoNA<SpatRaster>
method to identify cells that
are not NA (across layers)rangeFill<SpatRaster>
methodexhaustive
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 argument “intercept=TRUE”.
[#916] by Jordan Adamsoncrs(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.writeRaster
[#900] by Kyle Davidcrosstab
now shows the labels names for a categorical
SpatRaster. [895] by Derek Corcoran BarriosmakeTiles
can now take a SpatVector to define the
tiles. [920] by Tristan GoodbodyfocalPairs
and focalReg
now work for
custom windows [#907] by Fabian Fischerplot<SpatVector>
was not
working properly. [#906] by Márcia Barbosa.time<-
with time-step “years” could not handle
negative years. [#911] by Andrea Manicawrap
/unwrap
(and by extension
saveRDS
/readRDS
) did not handle categorical
rasters well [#912] by Christine Anderson.interpIDW
failed with GDAL 3.6 [#910] by Roger
BivandspatSample
with strata bug fix “unable to find an
inherited method for function ‘trim’” [#919] by Alfredo Ascaniomerge
/mosaic
did not handle NAs when using
two layers [#913] by Joao Carreiras.Released 2022-11-18
[
and [<-
for SpatRaster now have a
third index k
for subsetting or assigning values by
layeranyNA
and allNA
for SpatRasterunwrap
to restore a PackedSpatVector or
PackedSpatRasterrasterizeWin
method for rasterization with a moving
window (circle, ellipse, rectangle, buffer)interpIDW
method for inverse-distance-weighted
interpolation of points with a moving windowinterpNear
method for nearest neighbor interpolation of
points with a moving windowviewshed
method for SpatRasterupdate
method for SpatRaster to write new names or a
new extent or crs to an existing raster file.sieve
filter for SpatRastersegments=FALSE
to
disagg<SpatRaster>
sprc<character>
method to create a
SpatRasterCollection from a file with subdatasetsgraticule
function to create a SpatGraticule and
related methods plot<SpatGraticule>
and
crop<SpatGraticule>
elongate
method for SpatVector linesmosaic
and merge<SpatRaster>
[#577] by Jean-Romainwrap<SpatRaster>
now uses file references if the
data is deemed too large to all load into memory. [#801] by
Jean-RomainreadRDS
and unserialize
now return a
SpatRaster or SpatVector (instead of a PackedSpat*)clamp
can now take low and high values for each
layerpax
argument in plot
now provides more
control over what to draw on each axis via parameters side
,
tick
and lab
pax
argument in plot
now has argument
retro
to use a sexagesimal notation of degreesextend
has a new argument fill=NA
c
ombining SpatRasters with
different CRSs. [#818] by Andrew MarxplotRGB
now accounts for the value of zlim when
stretching; allowing to use the same coloring scheme across SpatRasters
[#810] by Agustin Lobo.spin
is now vectorizedError in x$.self$finalize() : attempt to apply non-function
is now suppressed in most cases. [#218] by Charlie Joey Hadley. This
problem should go away altogether when a new version of “Rcpp” is
released (ETA Jan 2023) thanks to a fix by Kevin Ushey [#30]spatSample
with na.rm
and SpatRasters with
multiple layers did not work. [#800] by Andrea Manicaadjacent<SpatRaster>
with
pairs=TRUE, include=TRUE
ignored include=TRUE
[#808] by Joseph Lewisrasterize
did not accept “NA” as value for updating
[#809] by Márcia Barbosaextract
with a perfectly vertical or horizontal line
failed in some cases [#823] by Dimitri Falkwrap<SpatVector>
failed if there was a single
point geometry [#815] by Patrick Schaeferextract<SpatRaster>
with
weights=TRUE
did not return values [#814] by Jean-Luc
Dupouey.x[["newname"]] <- r
for SpatRasters x
and r
did not work [#795] by Jim ShadycostDistance
-> costDist
to avoid
conflict with {gdistance}gridDistance
-> gridDist
for
consistencyReleased 2022-09-10
droplevels
for SpatRaster. [#757] by Rodolfo
Jaffe.normalize.longitude
for SpatVector.scoff
to get and scoff<-
to set the
scale (gain) and offset of a SpatRaster.raw=FALSE
to
extract<SpatRaster>
[#776] by Thomas Roh.as.data.frame
now takes na.rm=NA
to only
remove rows that are NA for all layers. The default value changed from
TRUE
to NA
. [#792] by Ed Carnelldistance<SpatRaster>
has new arguments “target”
and “exclude”. [#560] by Bernardo Brandão Niebuhrsparse=FALSE
for
`relate<SpatVector,SpatVector>.usenames=FALSE
for
lapp<SpatRasterDataset>
[#793] by Colin Brust.vect<character>
now reports that a file is
non-existent [#784] by John Baumsrelate
[#716] by Krzysztof Dybafocal3D
now checks if all the window’s dimensions are
odd [#772] by Neander Marcel Hemingall.equal
bug [#756] fixed by John Baumsextract<"SpatRaster","sf">
ignored the ID
argument. [#755] by Dainius Masiliūnas.vrt
is no longer constrained by the maximum number of
files that can be opened [#780] by 8Ginette8weighted.mean
crashed with numeric weights and
na.rm=TRUE [#777] by David Holstiusproject<SpatRaster>
did not consider an extent
that was set by the user [#775] by Philippe MassicottefocalCor
failed for large rasters [#607] by John
Clarkfocal
with expand=TRUE
was prone to run
out of memory [#610] by Nathan Elliottcrop<SpatVector>
did not work well when the
second argument were points or lines [#782] by Márcia Barbosaadjacent
with pairs=TRUE
now respects the
include=TRUE
argument [808] by Joseph LewisReleased 2022-08-07
blocks
to guide reading raster data in chunks.
[#748] by John Baumsextract
were simplified. [#736] by
François Rousseufocal
where not correct if the input
SpatRaster had multiple layers and a “custom” function. [#727] by
Jean-Luc Dupouey.plot<SpatRaster>
did not honor argument
legend=FALSE
. [#738] by Grzegorz Sapijaszkoexpanse
failed when processing in chunks [#741] by
Gareth Daviescrop<SpatRaster,SpatExtent>
with argument
snap="out"
could lead to a crash if the extent was beyond
the SpatRaster. [#740] by Mauricio Zambrano-BigiariniReleased 2022-07-25
subst
no longer uses values that it changed earlier on.
[#639] by Paul Smithas.points<SpatRaster>
could return wrong factor
labels. [#640] by Attilio Beninimask<SpatRaster,SpatVector>
crashed when the
results were written to disk. [#646] by Monika Anna Tomaszewskaextract<SpatRaster,SpatVector(points)>(xy=TRUE)
returned the locations of the points, not the xy-coordinates of the
cells. [#650] by Ward Fonteynwrap<SpatRaster>
did not return the correct
labels for some categorical rasters. [#652] by Jakub Nowosadsubst
can now substitute the values from multiple input
layers with a single output value (layer)subset<SpatVector>
now behaves like
subset<data.frame>
[#648] by Andrew Gene Brownfreq
now provides the labels of factors, even if
bylayer=FALSE
. It now always returns a
data.frame
(it used to return a matrix
in some
cases. [#687] by Rodolfo Jaffédisagg
and aggregate
now return a warning
instead of an error when using a (dis)aggregation factor of 1.[#684] by
Justin Fain.project
crashed when erroneously projecting raster data
from one celestial body to another [#688] by Mike Sumnerplot
. [#673] by Jakub Nowosad.extract(method="bilinear")
. [#693] by swooping-magpieas.raster
to
unique<SpatRaster>
to create a categorical raster
with the unique combinations in the layers of the input raster. The
default for argument na.rm
was changed to
FALSE
sort<SpatRaster>
to sort cell values across
layers.has.colors
and has.RGB
for SpatRastercover
can now combine categorical rastersconcats
to combine the levels of two SpatRaster into
new categories [#663] by Alex Ilichzonal<SpatVector,SpatVector>
method to aggregate
SpatVector attributes by polygonsReleased 2022-06-09
extract
. [#580] by André M. Bellvéweighted.mean
did not adjust the weights if there were
NA
s in the values. [#574] by Lars Dalbystretch
option in plotRGB
[#550] by
Agustin LobospatSample
with cells=TRUE
failed for
planar data [#544] by Benjamin MisiukcompareGeom(x, y, stopOnError=FALSE)
did not remove the
error messages stored in x
leading to unexpected warnings
later on. [#568] by David Hofmann.layerCor
does not create temp files anymore. [#551] by
Christine Andersonres
and origin
to
project<SpatRaster>
method. [#596] by Alex Ilichinside=TRUE
to centroids
to
get a centroid-like point that is guaranteed to be on the geometry
(“point on surface”). [#588] by Márcia Barbosakeepgeom=FALSE
to
vect<data.frame>
that allows setting (keeping) the
geometry as an attribute. [#586] by Márcia BarbosasaveRDS
and serialize
methods for
SpatRaster and SpatVector. [#549] by Andrei MîrțxFromCol
and yFromCol
now have a
<SpatRaster,missing>
method. [#583] by Michael
Sumner.svc<sf>
method to deal with GeometryCollection
types. [#585] by Sarah Endicottas.points<SpatRaster>
and
as.polygons<SpatRaster>
have a new argument
na.all=FALSE
that affects the interpretation of
na.rm
. [#548] by Jean-Luc Dupouey.setGDALconfig
and getGDALconfig
to set
GDAL configuration options. [#608] by Erik Bolch.circular
to rapp
to allow the
start to be after the end (for if layers represent days of the
year)costDistance<SpatRaster>
where.min
and where.max
for
SpatRaster
to get the cell numbers for the extreme values
in a SpatRaster.emptyGeoms<SpatVector>
to get the
indices of empty (null) geometriesrasterizeGeom
to rasterize the geometry
count or the area of (small) polygons or the length of lines.not.na
for SpatRaster
which is
a shortcut for !is.na(x)
.as.list
implemented for
<SpatRasterDataset>
.sources
implemented for
<SpatRasterDataset>
, <SpatVector>
and <SpatVectorProxy>
[#638] by Andrew Gene
BrownReleased 2022-02-17
writeVector
and vect
now work with GPGK if
the path has non-ascii characters [#518]predict
with cores > 1
and more than one output variable were garbledzonal
dropped category names when using an external (R)
function [#527] by Jakub Nowosadxy=TRUE
in as.data.frame
normalized
the names [#538] by Kodi Arferoptions
to vrt
[#629] by
Monika Tomaszewska.makeTiles
has new arguments extend
and
na.rm
[#520] by by L. Dalbyproject<SpatRaster>
now uses nearest neighbor as
default method for RGB rastersna.rm=TRUE
to unique
. [#561]
by Matthieu StiglerReleased 2022-01-30
app<SpatRasterDataset>
ignored the filename.
[#498] by jszhaovect<data.frame>
failed silently if xy
coordinates were integers [#496] by Márcia Barbosaaggregate<SpatRaster>
was malformed
when nrow(x) %% fact != 0
. [#492] by Jean-François
BourdonNA
s in SpatVector attributes where only
recognized on Windows [#491] by Márcia Barbosaplot<SpatVector>
failed when using a character
variable with many unique values. [#489] by Márcia Barbosarotate
failed on large files. Reported by Ujjawal
Singhcrds
replicated the coordinates [#504] by Murray
Effordas.data.frame<SpatRaster>
returned integers if
the file stored values as integers, even if there was a scale/offset
that creates decimal numbers [#509] by Kodi Arferproject
opened the input raster file in read/write mode
instead of read mode. That did not work with files that cannot be
updated.distance
, gridDistance
,
direction
and patches
now process all layers
of the input SpatRaster. [#503] by Chris Haak()<-
methods.
in-place updating available with set.
methods such as
set.names
and set.values
. [#493] by Jean
Romain and [#511] by Bryan Fuentesaggregate<SpatRaster>
now accepts functions that
return more than one value per aggregated cellwriteVector
has new argument insert
to add
a layer to an existing file (e.g. GPKG).method="weights"
for
spatSample<SpatRaster>
mask<SpatVector,SpatVector>
method to select
intersecting geometriesis.related
values<SpatRaster>
has new option
na.rm=TRUE
. [#490] by Henk HarmsenSpatVectorProxy
to provide access to large
vector databases that cannot or should not be read into memory in its
entirety.proxy=FALSE
to vect
to create
a SpatVectorProxy objectquery<SpatVectorProxy>
to extract
parts of a SpatVectorProxyvector_layers
that returns, and can delete,
vector format layers from a database/file such as GPKGTo avoid name clashes with tidyverse
For consistency
Released 2022-01-13
setValues
and init
failed (or even crashed
R) when using a single value on a largish raster. [#414]sfc
to SpatVector
lost the
crs. [#415] by Jean-Luc Dupoueybuffer
on a SpatRaster with no values caused a crash
[#416] by Sebastian BrinkmannwriteVector
now assumes “traditional GIS order”
(long/lat) if the CRS specifies lat/long. [#333]( by Agustin Lobomain
was ignored in density
when
using a single layer SpatRaster [#424] by dvictorimin
and
mean
, when used with multiple SpatRasters and numbers,
ignored additional SpatRasters [#426] by Zhuonan Wangclassify
with right=FALSE
ignored
include.lowest=TRUE
[#442] by Alex Ilichpatches
now combines patches that connect across the
data line [#366] by Hirschtpatches(directions=8)
now connects in NE/SW direction
[#451] by Jean-François Bourdon.centroids
now considers cases where SpatVector parts
are nearest to each other when crossing the date line instead of the
zero-meridian [#366] by Hirschtterrain
created empty (NA
) rows between
chunks used for processing large rasters. [#453] by Robert Ritson.inset
did not draw the “box” correctly. [#457] by
Márcia Barbosaas.lines
now works with a points SpatVector [#464] by
Márcia Barbosavalues(x)<-
now accepts (hex coded) colors as
valuesfocal
now wraps around the dateline like raster::focal
[#242] by Alexander Marbleraggregate
now does not show a progress bar in all cases
[#249] by Lachlanas.data.frame<SpatRaster> or <SpatVector>
are now also implemented as S3 methods to assure correct dispatch by
other S3 methods such as data.table::as.data.table
. See
[#284] by Patrick Schratzcrs
now shows the correct authority if it is not EPSG.
[#419] by Matthew Williamsonrast<filename>
has a new argument
lyrs
to subset the layers and open the file in one
step.rast<array>
now has a crs and extent argument.
[#439] by RS-ecotype="xyz"
is now default in
rast<data.frame>
. [#438] by RS-ecoclassify
has a new argument brackets
to
show if a side of an interval is open or closed.freq
and
as.data.frame
. [#441] ngould7vect<matrix>
and
vect<data.frame>
are now much faster. [#413] by
BastienFRextract
with points provided as a matrix or cell
numbers is not much faster. [#341]focal
has a new argument na.policy
that
can be set to one of “all” (default), “only” or “omit”. argument
na.only
has been removed, as you can now use
na.policy="only"
inset
argument border
changed to
perimeter
to allow passing border
on to
plot<Spat*>
. [#456] by Márcia Barbosamemfrac
can now be set to zero (in stead
of not lower than 0.1). [#476] by Matt Strimas-MackeyallowGaps
in patches
to
disallow gaps between patch IDs. See [#478] by Dunbar Carpenter.mergeTime
to combine multiple rasters,
perhaps partly overlapping in time, into a single time seriesfillTime
that can add empty layers in
between existing layers to assure that the time step between layers is
constantapproximate
to fill in missing values by
cell across layersis.bool
and as.bool
for
SpatRaster and explicit recognition of Boolean raster data in various
places (e.g., extract, plot)is.int
and as.int
for
SpatRaster.layerCor
(like
raster::layerStats
). [#420] by Alex IlichfocalCor
(like
raster::corLocal
). [#427] by Zhuonan Wangall.equal
for SpatRaster
. See
[#428] by Dongdong Kongmath
for SpatRaster
that
implements the Math-generic methods and accepts a filenamesds<array>
rasterize<matrix>
, see [#413] by
BastienFRcolorize
to transform color
representationsarrow
to draw a (North) arrow on a map.
[#461] by Márcia Barbosadensify
to insert nodes between existing
nodes of a line or polygon SpatVectordirection
for SpatRaster. [#462] by Márcia
Barbosafocal3D
to compute focal values for a
three-dimensional (row, column, layer) windowmakeVRT
to create a vrt file for a file
that needs a header to be read.method="stratified"
for
spatSample<SpatRaster>
. [#470] by Michael
Mahoneymemmax
to cap the amount of RAM that
terra can be used in raster processing [#476] by Matt
Strimas-MackeygridDistance
to compute distances traversing
a raster, perhaps with obstacles. [#477] by Márcia BarbosaReleased 2021-11-24
focal
now has ellipses (...
) to allow for
providing additional arguments to fun
. For this reason it
does not have a na.rm
argument anymore as that can be
supplied via the ellipses. In practice this means that the default will
be na.rm=FALSE
for the standard functions such as
mean
and sum
.app
grossly overestimated RAM needed, slowing it down.
Reported by Jerry Nelsonterra
now installs, again, with older versions of GEOS
[#406] by fparyaniterra
did not install with Clang on CRAN/OSX due to
using C++13 idiom.lapp
and tapp
now have a
cores
argument (as do app
and
predict
). Suggested by Dongdong Kong [#365]focal
now also works with a function that returns
multiple values. See [#318] by Alex Ilich.focal
can now process multiple layers in one step.stars
objects
[#220] by Jakub NowosadfocalCpp
takes a C++ function that iterates over cells
to speed up computation by avoiding apply
(see [#318] by
Alex Ilich).focalReg
for focal OLS regression models between
layersReleased 2021-11-16
terra
did not install with versions of GDAL below 3
[#402] by Alex Ilich.distance
between two SpatVectors or matrices with
pairwise=FALSE
returned a matrix that was filled by column
instead of by row [#403] by Paul SmithReleased 2021-11-15
rast
with some NetCDF files failed because of bad
parsing of dates. [#361] by Juan Carlos Zamora-Pereiradistance<SpatRaster>
with lon/lat data was not
correct. [#368] by Greg Schmidtas.polygons<SpatRaster>
failed with a SpatRaster
and a categorical layer that is not the first layer. [#370] by Patrick
Schratzrasterize
was not ignored,
also causing errors when writing to temporary files. [#377] by Robbie
Pricerast<character>
crashed if the sds was an empty
character string. [#381] by Dan Bastonplot<SpatVector>
now responds to the
range
argument [#385] by Márcia Barbosazonal
failed for user-defined functions. [#393] by
mqueinnecselectHighest
to select n cell values with
the highest or lowest values.vect<list>
to append SpatVectors
(faster than do.call(rbind, x)
)align=FALSE
to project
to
align to the template SpatRaster but ignore the resolutiongdalCache
to set the GDAL cache size,
contributed by Dan Baston [#387]fileBlocksize
options
to writeVector
to
pass layer creation options to GDALmergeLines
,
snap
, makeNodes
, removeDupNodes
,
gaps
, simplify
width
and
clearance
terra
now installs with older versions of GEOS
[#363]terra
now installs on CentOS 7 with GDAL 2.1.4 and a
C++ compiler that does not support std::regexp. [#384] by Ariel
PaulsonReleased 2021-10-11
setValues
now has two arguments
(x
and values
), just like raster
had; to avoid reverse dependency problems with raster
Released 2021-10-07
To avoid name conflicts with sp
(via
raster
) disaggregate
is now called
disagg
and bbox,SpatRaster
and
bbox<SpatVector>
have been removed (but could be
resurrected in raster
or under another name).
project
and resample
now choose the
resampling method based on the first layer, using “near” for categorical
data. Thanks to Matthew Lewis [#355]hist
failed with small samples. Issue [#356] by Martin
QueinnecReleased 2021-10-05
terra
no longer depends on raster
. To avoid
name clashes between these two packages, and to allow replacing methods
from rgeos
and rgdal
in raster
,
raster
now depends on terra
instead.
freq
has a new argument usenames
. See
issue [#309] by Bappa Dasrast<character>
has a new argument
opts
that can be used to pass GDAL open options. See issue
[#314]rast<SpatRaster>
now takes arguments
names
and vals
. See issue [#323] by Dongdong
Kongcrs<-
now warns if an unsupported datum is used. See
issue [#317]spatSample
now returns factor values if a SpatRaster
layer is.factor except when using as.df=FALSE
origin<-
to set the origin of a
SpatRaster. See issue [#326] by Jakub Nowosadcrs
has a new argument parse
. See
[#344]plot<SpatRaster,missing>
has a new argument
reset=FALSE
that allows resetting the par()$mar parameters
after plotting. See issue [#340] by Derek Friendcrds
has a new argument na.rm
. See [#338]
by Kodi Arfershow(Spat*)
now prints the name and EPSG code of a crs
if available. See [#317] by Jakub NowosadplotRGB
failed if there were NA
s. Issue
[#308] by Jakub NowosadwriteVector
crashed R when used with a SpatVector with
no geometries. Reported by Timothy White in issue [#319]summary<SpatRaster>
now returns counts for the
classes (instead of a numerical summary of the indices) [#324] by Jakub
Nowosadtapp
with a character index now returns a SpatRaster
with the correct names [#345] by Stuart Brownrasterize
with a character variable now adds the ID
column to the categories [#337] by Tate BraselcellSize
now masks values in all cases (when requested
with mask=TRUE
). Issue [#339] by Jean-Luc Dupoueybuffer<SpatVector>
no longer treats lines like
polygons [#332] by Márcia Barbosaplot
now passes the layer index to fun
[#310] by Ben Tupperto_id
in nearest
was sometimes wrong.
See [#328] by Shawn Ligockifocal
did not reset initial values for NA cells when
processing chunks. [#312] by Jeffrey Evansfocal
could run out of memory when using a large window
and user-defined function, and was inexact at the chunk boundary
[#347]zonal
with as.raster=TRUE
failed for
categorical SpatRasters [#348] by Jakub NowosadReleased 2021-08-20
time(x) <- d
is set with a Date
class object, time(x)
now returns a Date
object instead of a POSIXct
object. Issue [#256] by
Mauricio Zambrano-Bigiarinirast<data.frame>
method to avoid confusion with
the matrix
and list
methods in response to a
SO question by
StackbeanswriteCDF
now also writes the time dimensions if there
is only one time-step. See this SO questionvect<character>
(filename) now has argument
layer
to select a layer from a multi-layer file / database,
and arguments query
, extent
and
filter
for reading a subsetsubst
can now create multiple output layers See [issue
276] by Agustin Loboclassify
can now create different multiple output
layers See [issue 276] by Agustin Loboalpha
of plot<SpatRaster>
can now be a SpatRaster
. See this SO question by
James McCarthyfilename
and overwrite
arguments were
ignored in rasterize
project
. Reported by
Fabian Fischerrasterize<SpatRaster,SpatVector>
with
inverse=TRUE
crashed the R session. Issue [#264] by
Jean-Luc Dupoueymerge
and mosaic
was not
correct for large rasters (only the first rows were used). Reported by
Zavud Baghirov in [#271]as.points,SpatRaster
did not remove NA
’s
correctly and shifted values. Issues [#269] and [#273] by Julian
Hagenauerrast<matrix>
rotated values when using an
equal-sided matrix [#274] by Jakub Nowosadproject
with a crs argument. [#283] by Timothée Giraudclassify
, argument right
had TRUE and
FALSE reversed.terrain
had edge effects [#303] by Andrew Gene
Brown.terrain
can now compute multiple variables at once
[#286] by Žan Kuraltwrap<SpatRaster>
changed factors into numeric
[#302] by Patrick SchratzwriteVector
failed with “FlatGeobuf” (and probably
other formats as well) for not using a proper MultiPolygon [#299] by L
DalbyspatSample
is now
much more regular [#289] by Jakub NowosadReleased 2021-06-20
na.omit<SpatVector>
to remove empty geometries
and/or attribute records that have an NA
src
to create a
SpatRasterCollection
(a loose collection of tiles).merge
and mosaic
now have methods for a
SpatRasterCollection
. To avoid the (inefficient) use of
do.call
. #210 by Matthew Talluto.activeCat
and activeCat<-
to get or set
the “active” category if there are multiple categories (raster
attributes)as.numeric
and catalyze
to transfer
categories to numeric cell valuesrange
and mean
for (the attributes of) a SpatVector
shade
, to compute hill shadingna.rm
) are now used by
rasterize
with point geometries. #209 by Jakub Nowosadgstat
models
by interpolate
. #208 by Jakub Nowosadcpkgs
to predict
to list the
packages that need to be exported to the cores if argument
cores
is larger than one. ?predict
now shows
different approaches to parallelize predict
(based on
examples in issue. #178 by by Matthew Coghill.freq
now returns labels for categorical layersadjacent
now has a pairs
argument. #239 by
Kenneth Blake Vernonadjacent
now also takes a matrix to specify adjacent
cellsmean
and other summarize methods now take a
filename
argument and disallow non-recognized named
arguments. #238 by Jessica Nephinvat.dbf
file is now ignored if it only has the counts
of the values. #234 by Julleegdal=""
write
options and use BIGTIFF if necessary (suggested by Ani Ghosh)layer
in the
extract-SpatRaster,SpatVector
method to extract values for
a single layers specified for each geometry (see this question).extract
with points and cells=TRUE
or
xy=TRUE
gave garbled outputas.character<SpatRaster>
(called by
wrap
) did not capture the layer names. [#213] by Pascal
Titlefocal
mirrored the weight matrix, thus affecting the
results when using an asymmetrical weight matrix. Reported by Sebastiano
Trevisaniterra::terraOptions
now works without attaching the
package. [#229] by Karl Dunkle Wernerapp
with ncores > 0
and a function that
returns multiple layers now works. [#240] by BastienFR.autocor
(local) can now handle NA
values.
[#245] by Jakub Nowosad .mask
with a SpatVector and a large (out of memory)
multi-layer SpatRaster only worked for the first layer. Reported by
Monika Tomaszewska.Released 2021-05-13
as.lines
method for SpatRasteras.polygons
method for SpatVector linesautocor<numeric>
has new methods
mean
, to compute the local mean, and locmor
,
for the local Moran’s IsharedPaths
method for SpatVector (lines and
polygons)RGB2col
method to reduce a three-layer RGB SpatRaster
to a single layer SpatRaster with a color-table (with <= 256
colors)split
methods for SpatVector and SpatRasterrast<Raster*>
now takes the crs from the Raster
object, not from the file it may point to. [#200] by Floris
Vanderhaegheconvhull
has a new argument by=""
to make
convex hulls for sub-sets of a SpatVector.extract
with multiple layers could return a data.frame
where the values were not in the correct order (by row instead of by
column)crop
works again with sf
objects. [#201]
by Sebastian Brinkmannvect<sf>
now also works for lines, and should be
fastervect<character>
crashed R if a file had empty
geometries. [#202] by consumereextract(points, bilinear=TRUE, cells=TRUE)
now works.
[#203] by fab4appzonal
now works for min
and
max
. [#207] Reported by Jakub NowosadTo avoid name conflicts with the spatstat
package
area,SpatRaster-method(x, sum=FALSE)
->
cellSize(x)
area,SpatRaster/SpatVector-method(x, sum=TRUE)
->
expanse(x)
convexhull
-> convHull
perimeter
-> perim
tiles
-> makeTiles
coords
-> crds
Released 2021-04-30
trim
has a new argument value
that allows
trimming rows and columns with other values than the default
NA
rapp
has a new argument clamp
that allows
clamping start and end values to 1:nlyr(x)
, avoiding that
all values are considered NA
spatSample<SpatRaster>
has new arguments
as.points
and values
. Getting values, cells
and coordinates is no longer mutually exclusive. In response to [#191]
by Agustin Loboarea<SpatRaster>
has a new argument
mask=FALSE
classify
can now take a single number to request that
many cutsmosaic
and merge
now warn and resample if
rasters are not alignedextract
has a new argument exact
to get
the fraction covered for each cellflip(x, direction="vertical")
no longer reverses the
order of the layersextract
did not work for horizontal or vertical lines
as their extent was considered invalid. Reported by Monika
Tomaszewskaautocor
did not handle NA values [#192] by Laurence
Hawkernearest
now works for angular coordinatesslope
in terrain
was not
correct (the tangent was returned instead of the slope), [#196] by Sven
Alderquantile
now works for rasters that have cells that are
all NA
. Reported by Jerry NelsonTo avoid name conflicts with tidyverse
with deprecation warning:
without deprecation warning:
Released 2021-04-14
c<SpatVector>
now returns a list.
rbind
is used to append SpatVector objectsrats
has been removed,
and levels
and cats
have changed