I am using: ">gdal_translate -of XYZ w010101.adf ASCII.txt" in the command window to try to get a file with coordinates and elevations from a raster I downloaded from The National Map.
This is the error message I get: "w010101.adf not recognized as a supported file format" However, on TNM website, they show an example that uses a .adf file as the input file (link).
I have checked to make sure that the gdal_translate and the .adf file are located in the right place.
I have seen other questions related to getting XYZ files from .tif files, but not from .adf, and I'm not sure what I'm missing.
Best Answer
When you downloaded the data, you had the option of ArcGRID, GridFloat and IMG. Any of those is readable by GDAL. Of those formats, I prefer the IMG as it's a single file. ArcGRID is a really old format that requires a complete directory structure and is quite fragile (you can easily break them using standard file managers without realising).
That said, you have Arc GRID data. When you extracted, you should have something like:
You would then run gdal_translate and pass either the directory name, the hdr.adf or the w001001.adf. I just use the directory name, it's shorter...