USDAForestService / FIESTAutils

5 stars 2 forks source link

Modernize raster code part 1 #17

Closed ctoney closed 7 months ago

ctoney commented 7 months ago

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.