I am trying to extract various attributes of a large ArcGIS grid file similar to this forestry map
Even using a smaller cropped version of the file, the operation is slow, but more importantly, it requires a lot of temporary GB file, which ultimately runs out of my hard drive, which leads to the failure of the operation. I have about 35 GB of free space on this drive.
foo <- raster("grid/w001001.adf")
allLayers <- deratify(foo)
Using the cropped version of the aforementioned file, you can extract one attribute level, but this still requires a temporary file with several GB when the cropped ArcGIS grid file directory is only ~ 160 MB. Specifying a file name in a function does not improve the amount of hard disk space used.
allLayers <- deratify(fooCropped, att="BA_GE_3")
I would like to extract several layers and then do pixel calculations using these attributes. Is there a way to extract an attribute table as a data framework, perform calculations, and relink it to a raster?
System Information:
> R.Version()
$platform
[1] "x86_64-apple-darwin15.3.0"
$arch
[1] "x86_64"
$os
[1] "darwin15.3.0"
$system
[1] "x86_64, darwin15.3.0"
...
‘raster’ version 2.5-2
R version 3.2.4
Peter source
share