Read gridded data set in ArcGrid ASCII or GridFloat format
[Z,R] = arcgridread(filename)
[Z,R] = arcgridread(filename,coordinateSystemType)
[ imports a grid
in either ArcGrid ASCII or GridFloat format from the file specified
a 2-D array containing the data values, and raster referencing information
R. If the input file is accompanied by a projection
file (with extension
R is a raster reference object whose type
matches the coordinate reference system defined in the projection
R is a referencing matrix.
a raster reference object whose type is consistent with the value
coordinateSystemType. This optional
input argument can be helpful in the absence of a projection file.
The function throws an error if a projection file is present and
the type of coordinate reference system defined in the projection
Read the data.
[Z,R] = arcgridread('MtWashington-ft.grd');
Display the data as a surface. Add two labels to the display and set the colormap.
mapshow(Z,R,'DisplayType','surface') xlabel('x (easting in meters)') ylabel('y (northing in meters)') demcmap(Z)
View the terrain in 3-D.
axis normal view(3) axis equal grid on zlabel('elevation in feet')
filename— Name of file containing the grid
Name of file containing the grid, specified as a character vector.
arcgridread function supports the following
|ArcGrid ASCII||In this format, created by the ArcGIS |
|GridFloat||In this format, created by the ArcGIS |
coordinateSystemType— Coordinate system type identifier
Coordinate system type identifier, specified as one of the following values.
|Returns a geographic cells reference object appropriate to a latitude/longitude system.|
|Returns a map cells reference object appropriate to a projected map coordinate system.|
|Type of raster reference object determined by the file contents.|
Z— Gridded data set
Gridded data set, returned as a 2-D array. The class of the
array depends on the format of the data, described in the following
Z corresponding to null data values
in the grid file.
|Format||Class of Returned Gridded Data|
|ArcGrid ASCII||2-D array of class |
|GridFloat||2-D array of class |
R— Raster referencing information
Raster referencing information, returned as a raster reference
object whose type matches the coordinates reference system defined
in the projection file. If no projection file exists and you do not
a referencing matrix.
arcgridread function does not
import data in the ArcGrid Binary format (also known as ArcGrid, Arc/INFO
Grid, and ESRI ArcInfo Grid). ArcGIS uses this format internally and
it uses multiple files in a folder with standard names such as