
This package is no longer developed and only receives minimal maintenance. 
Please use the "terra" package instead. 

--- 18-September-2022, version 3.6-3

raster no longer uses rgdal

--- 14-August-2022, version 3.5-29

raster no longer uses rgeos

--- 5-October-2021, version 3.5-1

raster now imports terra (instead of the other way around) such that the two packages can be used together; and to allow replacing rgdal and rgeos functionality with functions from terra.

--- 17-July-2020, version 3.3-13

overhaul of crs to be ready for PROJ6
several bug fixes (see https://github.com/rspatial/raster/issues?q=is%3Aissue+)

--- 18-April-2020, version 3.1-5
improvements:

new arguments "smin", "smax" and "samplesize" to "stretch"; and bug fixes. See https://github.com/rspatial/raster/issues/70

layer names in GTiff files are now read from file. Requested by Kyle Taylor
https://github.com/rspatial/raster/issues/88

bug fixes:

parallel version of extract with polygons and "fun" messed up the order of the values (reported by Jacory). https://github.com/rspatial/raster/issues/79

raster::predict bug when using factors (reported by vvirkki). https://github.com/rspatial/raster/issues/73

distanceFromPoints with large files: https://github.com/rspatial/raster/issues/103

colortable lost when cropping RasterBrick: https://github.com/rspatial/raster/issues/105

Error in stack() when providing both bands and varname: https://github.com/rspatial/raster/issues/97

rasterize and multi-polygon containing hole: https://github.com/rspatial/raster/issues/93

Upside down raster: https://github.com/rspatial/raster/issues/95 (a warning is given, not really fixed yet)

Extract to data.frame bug: https://stackoverflow.com/questions/61174280/r-rasterextract-fails-to-create-data-frame

--- 24-September-2019, version 3.0-7
Bug fixes: 
predict with character label factor variables returned NA only https://github.com/rspatial/raster/issues/68

cellFromPolygons now ignores possible incompatible (integer) user-specified default datatype (reported by John Baums, https://github.com/rspatial/raster/issues/69)


--- 22-August-2019, version: 3.0-2
Bug fixes: 
calc failed when writing to disk if the supplied function returned multiple layers as a vector. Reported by Antoine Stevens
reclassify bug reported by Jacub Nowasad. https://github.com/rspatial/raster/issues/62
extract failed for sf objects with a Z dimension. https://github.com/rspatial/raster/issues/64

More generics and namespace exports for compatibility with "terra"

--- 10-July-2019, version: 2.9-22
New (hidden) function ".ifel", that is, ifelse for Raster objects (this is the R implementation of the arcpy "Con" method)
Lots of namespace export additions for compatibility with "terra"
Old .Call code replaced with Rcpp based code

Bug fixes: 
netcdf writing for multi-layer objects was no working. Reported by Philipp Buehler https://github.com/rspatial/raster/issues/53
better handling of factor variables in raster::predict

--- 14-May-2019, version: 2.9-5
new argument "margins" to plotRGB to allow plotting whitespace around images.
The crs is now written to ncdf files, using proj4=" "
reclassify now keeps the layer names (suggested by Matthieu Stigler)
modal of a single layer now returns that layer with a warning instead of throwing an error (suggested by Ben Tupper)

Bug fixes: 
writing very large Raster objects that were entirely in memory could fail with a "long vectors not supported yet". https://github.com/rspatial/raster/issues/33
When creating a RasterLayer from an ascii file using the native driver and the file specifies xllcenter. Problem reported by Ram: https://stackoverflow.com/questions/54373701/error-in-if-xn-xx-missing-value-where-true-false-needed
Error coercing raster with one non-NA value to SpatialPixelsDataFrame (ickf.se)
https://gis.stackexchange.com/questions/314472/error-coercing-raster-with-one-non-na-value-to-spatialpixelsdataframe/
mask with sf object ignored other arguments (Jakub Nowasad)
improved handling of factors in "predict". Fixed a bug with gbm models (dismo) reported by Jane Elith. Also removes factor levels that are not in model for GLM (predictions become NA).
show(Spatial*) could have the order of the min max values wrong on linux due to prepended spaces by as.matrix in apply(x, 2, range). Reported by Barry Rowlingson. 
Fixed bug in rasterFromXYZ (if multiple layers and writing to disk) reported by Mike Nosal https://github.com/rspatial/raster/issues/49


--- 29-Jan-2019, version: 2.8-19

higher precision extract with weights for small polygons. See https://stackoverflow.com/questions/53854910/issue-with-estimating-weighted-mean-from-raster-for-a-polygon-shape-in-r/

fixed error with rasterize when counting overlapping polygons with holes, reported by Boris Leroy. See:
https://gis.stackexchange.com/questions/307770/inconsistencies-in-r-rasterize-polygons-packages-raster-and-sf

fixed sf to sp coercion problem for degenerate Spatial*DataFrame with zero variables. Problem reported by Jakub Nowasad https://github.com/rspatial/raster/issues/29

fixed SRTM download in getData (new URL) and uppercase issue reported by tatianic
https://github.com/rspatial/raster/issues/34
raster::isLonLat("+init=epsg:4326") now returns TRUE. Suggested by Mike Sumner https://github.com/rspatial/raster/issues/32

faster rasterization of polygons (introduced in previous versions, but, by mistake, was not used in most cases)

faster handling of GMT ncdf files by Mike Sumner
new argument "na.last" to "unique" suggsted by Marco Sciaini. https://github.com/rspatial/raster/issues/23 

crosstab for small objects returned a data.frame instead of a table with long=FALSE. Reported by Jakub Nowosad

Refined matching CF crs descriptions (in climate ncdf files) with proj, with suggestions from Paul Newell

Improvement to raster::predict suggested by Roeland Kindt

--- 2-Nov-2018, version: 2.8-4
Improved estimation of available RAM with contributions by Lorenzo Busetto. RAM available is now computed on windows, linux and mac. No more that 60% of available RAM is used (if the estimated RAM needed is not too low). Not more than raster:::.maxmemory() is used; but it should now be safe to set this to Inf. If canProcessInMemory() returns FALSE, chunksize is set 25% of available RAM, or raster:::.chunksize(), whichever is lower. (set options via rasterOptions())

testthat unit tests introduced by Mike Sumner and Jakub Nowosad

as.character() for Raster objects to create the R code to re-create the Raster skeleton in examples.

Reading point values via GDAL has become slower in 2.7-15, reverted to previous function. Thanks to Andrew Brown and Dylan Beaudette for identifying the problem.

Bare negate with a Raster* (e.g. -r) now works. https://github.com/rspatial/raster/issues/21

Bug fixes:
fixed the link for GADM countries download. Bug reported by Loic Dutrieux
fixed corner-case bug in alignExtent (for a small extent, touching a grid cell), affecting crop; reported by 
Judith Mourant and Paul Fenimore
fixed problem with subs reported by Andy Craig https://github.com/rspatial/raster/issues/17
Previous version had a maxmemory value that was too high (reported by Lorenzo Busetto)

--- 16-Oct-2018, version: 2.7-15
faster extraction for points via GDAL (reverted to previous code in version 2.8-4)

Bug fixes:
buffer did not work with values in memory. Bug reported and solution proposed by Carlos Alberto Arnillas
extract with point and smaller single cell buffer failed when an aggregation function was provided. Reported by Lucas
https://stackoverflow.com/questions/52335522/r-why-does-raster-extract-give-dim-error/52338639#52338639
 

--- 11-Nov-2017, version: 2.6-6
New:
new extent objects created from a vector of coordinates are now checked for being valid. Suggested by Mike Sumner
buffer for lon/lat points
erase for SpatialLines with Polygons
kernelDensity function (hidden)
output from freq is always ordered (whether computed from disk or from in memory values). Requested by Benjamin Leutner

Bug fixes:
as.data.frame from file based rasters ingored na.rm=TRUE (unless xy=TRUE). Reported by Jean-Gabriel Elie
getValuesBlock with lyrs argument. Reported by Antoine Stevens
In approxNA with large files NAs were ignored and the NArule was ignored. Reported by Pablo Timoner
isValid(raster()) failed. Reported by dww on http://stackoverflow.com/questions/37869271/how-to-dput-a-raster/37871930
zapply passes on ... arguments to stackApply
res() for rotated rasters was wrong https://gis.stackexchange.com/questions/259321/opening-rotated-raster-in-r (fix suggested by Spacedman)
cover with RasterStackBrick objects could not write to file (reported by L. Wasser https://stackoverflow.com/questions/44295842/r-raster-cover-function-error-with-landsat-stacks 
Raster Attribute Tables with labels with a colon it could not be written because the colon was used as delimiter in the grd file.
https://stackoverflow.com/questions/46832976/why-is-crop-sometimes-introducing-nas-on-a-categorical-raster
An error was thrown if "rasterToPoints" returned no points, and "spatial=TRUE". Instead an empty SpatialPointsDataFrame is now returned (reported and suggested by Arnaud Mosnier)
Another error when rasterToPoints was used on a single-pixel multi-layer raster object (reported by Daniele Baisero)
rasterize polygons bugged in some cases if a polygon node was exactly in the center of a cell. Reported by Marco Sciaini  https://gis.stackexchange.com/questions/252210/rasterize-a-spatialpolygonsdataframe-error-in-if-x2a-rxmn
bug in projectRaster related to dateline: https://stackoverflow.com/questions/47047623/projectraster-raster-projection-of-bathymetry-data-noaa-nc-in-the-pacific
raster::pring of a SpatialPointsDataFrame showed an error message if the data.frame had zero columns (reported by Bart Branstauber)
Really bad bug: for Raster 'r', 'r < 50' was not equivalent to '50 > r' (the latter being wrong!). Reported by Jonathan Proctor
Error in the correction for the standard deviation with asSample=FALSE. Reported and fix provided by Benjamin Leutner
raster::colSums gave false results when !canProcessInMemory(x). Reported and fix provided by Peter Kullberg
zonal(  ,stat='                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                 