0

How to batch import Esri Grid files to QGIS?

I have received Bare Earth DEM files for a large swath of land. Each file has a unique identifier referencing a certain ESRI grid (eg. be_ef_001,be_EF_002, etc). Each grid is 1/2 mile X 1/2 mile.

In order to import each grid in QGIS I open the selected folder and select the .adf file. There are over 1,000 files that I am working with and it seems that I have to do this individually for each one.

ArcGIS Desktop can view each folder as a directory and I can simply select all and import. I do not have access to ArcMap or ArcGIS Pro, only QGIS. This is something that will likely be a reoccurring issues, and I would like to find a way where I don't have to import each grid manually.

6
  • One approach is to put all the DEM files in the same folder (I think this process is called "flattening the file structure" or something similar). I'm sure there's an automated way to do that; it's probably been explained already on one of the other SE sites (maybe stackoverflow, or super user).
    – csk
    Commented Feb 1, 2019 at 18:37
  • @csk on Windows, I use the FreeCommander XE file manager to do this, it lets you view a folder tree as a flat file, then copy any files you select to a new folder as a flat file (without copying the folder structure).
    – Dan C
    Commented Feb 1, 2019 at 19:38
  • Thanks all. I tried flattening the file and saved each subsequent file with an increasing number. (i.e. hdr.adf, hdr (1).adf, hdr (2).adf). Each file within each folder was named similarily. I was excited, thought it would work! However, when I import, it imports 10 copies and labels the raster the file name it is in. Am I missing something?
    – Dan Kaler
    Commented Feb 1, 2019 at 20:34
  • My guess is that the space in your file name is the problem. It might be a good idea to retain the unique identifier as the file name - can you name them be_ef_001.adf, be_EF_002.adf, etc? If not, try just naming them hdr(1).adf, hdr(2).adf, etc.
    – csk
    Commented Feb 1, 2019 at 20:41
  • Don't rename or move the ESRI grid files, you'll corrupt them. They have a very specific required file and folder structure.
    – user2856
    Commented Feb 1, 2019 at 21:41

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Browse other questions tagged or ask your own question.