Much of the raster processing code in R/raster_analysis.R is quite old. It needs updating for code style consistency, usage of newer functionality in gdalraster, and removal of code that relies on Spatial objects from sp as provided by sf::as_Spatial() . This pull request is part 1 of modernizing along those lines. It reformats for style consistency, changes indentation to spaces instead of hard tabs, and removes trailing whitespace. The function pixelCount() now calls gdalraster::buildRAT() which is faster than calling gdalraster::combine() on one raster layer. getGDALDataTypeName() was removed as no longer needed.
A separate pull request for part 2 will focus on removal of code that relies on Spatial objects from sp.
Much of the raster processing code in
R/raster_analysis.R
is quite old. It needs updating for code style consistency, usage of newer functionality ingdalraster
, and removal of code that relies on Spatial objects fromsp
as provided bysf::as_Spatial()
. This pull request is part 1 of modernizing along those lines. It reformats for style consistency, changes indentation to spaces instead of hard tabs, and removes trailing whitespace. The functionpixelCount()
now callsgdalraster::buildRAT()
which is faster than callinggdalraster::combine()
on one raster layer.getGDALDataTypeName()
was removed as no longer needed.A separate pull request for part 2 will focus on removal of code that relies on Spatial objects from
sp
.