3

I have some ESRI grid data that I would like to import into Matlab. As a typical ESRI grid data I have the two folders with the *.adf files and *.dat, .nit and.dat files.

I would like to know how can I import the information stored in those files into Matlab.

Tank you all!

1 Answer 1

3

I would convert the GRID to ASCII format first using Raster to ASCII (Conversion). If you have many GRIDs, use the batch conversion by right-clicking on the tool and selecting "batch". Then you can easily bring in the ASCII files into MATLAB using arcgridread. Here's an example from Mathworks:

[Z,R] = arcgridread('MtWashington-ft.grd');
mapshow(Z,R,'DisplayType','surface');
xlabel('x (easting in meters)'); ylabel('y (northing in meters)')
demcmap(Z)

There is also a discussion here that may give you some ideas too.

Another option is to convert your ESRI grids to another format, such as a TIFF, and bring them into MATLAB using imread (source).

1
  • Thank you very much for your response. I have already tried that but it's not working. When I convert it to ASCII I only get like the 'mask' of my data , that is: -9999 and 2 indicating whether there is a value or no data but not the actual value at each given point. Any idea how to retrieve the value?
    – Maria
    Commented Feb 15, 2013 at 11:05

Your Answer

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.