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
specified by the
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
coordinateSystemType contradicts the type of
coordinate reference system defined in the projection file.
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 gridcharacter string
Name of file containing the grid, specified as a character string.
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 strings in the following table.
|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 set2-D array
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 informationraster reference object | referencing matrix
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.