Search code examples
rspatialr-raster

How to properly load these adf files?


I am trying to use the LandScan population dataset, which comes as a series of .adf files. I thought that the largest file would be the one with the data, and this does seem to be the case, but when loaded as a raster, it doesn't seem quite right, and if I try to plot it, it is empty.

I see that the data is contained in @data@attributes, although I seem unable to access individual columns. Do I need to load multiple files together? How can I actually use this?

I tried to include images, but apparently my reputation is too low. The files are dblbnd.adf, hdr.adf, metadata.xml, prj.adf, sta.adf, vat.adf, w001001.adf, and w001001x.adf. w001001.adf is 158000 KB, while the second-largest file, w001001x.adf, is only 7000 KB.


Solution

  • The adf files are part of a single ESRI GRID raster. It should not matter which one you take, and you can probably also use the folder name (that is really the intention).

    If the display does not work perhaps first multiply the object with 1. You can also try the terra package instead, using rast("filename")