1

I have a folder with more than 9,000 subfolders, each with ESRI GRID files. Here's the setup of the directories and subdirectories.

Data-folder - be_rasters -- 692500_725000 --- dblbnd.adf --- hdr.adf --- metadata.xml --- prj.adf --- sta.adf --- w001001.adf --- w001001x.adf -- (thousands more folders with this naming convention format and files within them named the same thing) 

I'm trying to work in QGIS 3.8 to open the 9000+ w001001.adf files in the folders in be_rasters directory. In QGIS, I go to Layers >> Add Vector Layer, then choose "Directory" as a Source Type and "Arc/Binary Coverage" in the "Source" section. Then under "Vector Dataset(s)" I select be_rasters.

But when I click "Add," I get this error.

Invalid Data Source: path/to/Data-folder/be_rasters is not a valid or recognized data source. 

How do I load all the w001001.adf files into QGIS?

4
  • While some folders with .adf files are vectors, those with wNNNMMM prefixes are rasters. Commented Aug 29, 2019 at 11:27
  • @user2856 What would such a code look like using gdalbuildvrt? Or would you recommend using another program? Commented Aug 31, 2019 at 21:36
  • @Username Windows or MacOS/Linux? Commented Aug 31, 2019 at 22:05
  • @user2856 Arch Linux Commented Aug 31, 2019 at 23:32

1 Answer 1

1

"Layers >> Add Vector Layer" only works with vector data. However, you have Arc/INFO binary GRIDs, which are rasters not vectors.

An Arc/INFO binary GRID is a directory of related files stored in a parent directory (workspace) with an INFO database directory:

enter image description here

GDAL can read Arc/INFO binary GRIDs either by using the GRID directory name or GRID/hdr.adf (or w001001.adf)

You can create a virtual mosaic by creating a list of all the GRID directories (excluding the INFO directory) and using the gdalbuildvrt command.

For absolute paths:

ls -d /path/to/Data-folder/be_rasters/* | grep -i -v info > gridlist.txt 

Or to use relative paths:

cd /path/to/Data-folder/be_rasters ls -d * |grep -i -v info > gridlist.txt 

Then:

gdalbuildvrt -input_file_list gridlist.txt your_new_mosaic.vrt 

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.