I am trying to extract the 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 requires a many GB temp file that eventually exhausts my harddrive causing the operation to fail. I have approximately 35 GB of free space on this drive.
foo <- raster("grid/w001001.adf")
allLayers <- deratify(foo)
It is possible with a cropped version of the above file to extract a single attribute layer, but this still requires a multi-GB temp file when the cropped ArcGIS grid file directory is only ~160MB. Specifying a filename in the function doesn't seem to improve the amount of harddrive space used.
allLayers <- deratify(fooCropped, att="BA_GE_3")
I would like to extract several layers and then do pixel by pixel calculations using those attributes. Is a way to extract the attribute table as a dataframe, do calculations on that and re-associate it with the 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