ESRI Grid format 及matlab的打开方法
(2012-10-19 17:09:51)
标签:
教育 |
分类: RS |
Thanks
to:
ArcInfo ASCII Grid format(*.grd的ascii文件),Arc/Info Binary Grid format(.aux.adf....)
An
A
Anon-proprietaryASCII format, also known as
an
The grid defines geographic space as an array of equally
sized square grid points arranged in rows and
columns.Each grid point stores a numeric value
that represents a geographic attribute (such as elevation or
surface slope) for that unit of
space.
ArcInfo ASCII Grid format
ArcInfo
ARC ASCIIGRID refers to a specifc interchange format developed for ARC/INFO rasters in ASCII format.Usually the file extension is .asc, but recent versions of ESRI software also recognize the extension .grd. It looks like this:
ncols 157nrows 171xllcorner -156.08749650000yllcorner 18.870890200000cellsize 0.008333000 0 1 1 1 2 3 3 5 6 8 9 12 14 18 21 25 30 35 41 47 5359 66 73 79 86 92 97 102 106 109 112 113 113 113 111 109 106103 98 94 89 83 78 72 67 61 56 51 46 41 37 32 29 25 22 19etc...Records 1 - 6 Geographic headerCoordinates may be in decimal or integer format. DD:MM:SS format for geodetic coordinates is not supported.
ncols xxxxxncols refers to the number of columns in the grid and xxxxx is the numerical value
nrows xxxxxnrows refers to the number of rows in the grid and xxxxx is the numerical value
xllcorner xxxxxxllcorner refers to the western edge of the grid and xxxxx is the numerical value
yllcorner xxxxxyllcorner refers to the southern edge of the grid and xxxxx is the numerical value
cellsize xxxxxcellsize refers to the resolution of the grid and xxxxx is the numerical value
nodata_value xxxxx
nodata_value refers to the value that represents missing
data and xxxxx is the numerical value.This is
optional
These are the value of individual cell typically representing elevation of a particular area.
xxx xxx xxxval(nox,noy) (f) = individual grid values, column varying fastest in integer format.Grid values are stored as integers but can be read as floating point values.
xllcorner and yllcorner are given as the EDGES of the grid,
NOT the centers of the edge
cells.
%
[Z,R] = arcgridread('MtWashington-ft.grd');
% 利用mapshow显示地图数据
mapshow(Z,R,'DisplayType','surface');
% 标记
xlabel('x (easting in meters)');
ylabel('y (northing in meters)')
colormap(demcmap(Z))
% View the terrain in 3-D
axis normal; view(3);
axis equal;
grid on
zlabel('elevation in feet')
注意:虽然surfer生成的也是grd文件,但是却是二进制文件,因此不能用上面的arcgridread函数打开。
Arc/Info Binary Grid format
The Arc/Info Binary Grid format is the internal working
format of the Arc/Info Grid product.It is also usable and
creatable within the spatial analyst component of
ArcView.It is a tiled format with run length compression
capable of holding raster data of up to 4 byte integers or 4 byte
floating data.
This format should not be confused with the Arc/Info ASCII Grid
format which is the interchange format for
grids.Files can be converted between
binary and ASCII format with the GRIDASCII and ASCIIGRID commands
in Arc/Info.This format is also different than the flat
binary raster output of the GRIDFLOAT command. The Arc/Info binary
float, and ASCII formats are also accessable from within
ArcView.
This format should also not be confused with what I know as ESRI
BIL format. This is really a standard ESRI way of creating a header
file (.HDR) describing the data layout a binary raster file
containing raster data.
Version
I am not sure yet how the versions work for grid files. I have been
working primarily with grid files generated by ArcView 3.x, and
it's associated gridio API. The hdr.adf files I have examined start
with the string GRID1.2 for what that's worth. Certainly the file
naming conventions seem to follow the Arc/Info 7.x conventions
rather than that of earlier versions.
File Set
A grid coverage actually consists of a number of files. A
grid normally lives in it's own directory named after the grid. For
instance, the grid nwgrd1 lives in the directory nwgrd1, and has
the following component files:
-rwxr--r-- 1 warmerda users 32 Jan 22 16:07 nwgrd1/dblbnd.adf
-rwxr--r-- 1 warmerda users 308 Jan 22 16:07 nwgrd1/hdr.adf
-rwxr--r-- 1 warmerda users 32 Jan 22 16:07 nwgrd1/sta.adf
-rwxr--r-- 1 warmerda users 2048 Jan 22 16:07 nwgrd1/vat.adf
-rwxr--r-- 1 warmerda users 187228 Jan 22 16:07
nwgrd1/w001001.adf
-rwxr--r-- 1 warmerda users 6132 Jan 22 16:07
nwgrd1/w001001x.adf
Sometimes datasets will also include a prj.adf files containing the
projection definition in the usual ESRI format. Grids also normally
have associated tables in the info directory. This is beyond the
scope of my discussion for now.
The files have the following roles:
//范围、边界文件
dblbnd.adf:
//头文件 header->hdr
hdr.adf:
//统计数据文件 (最大、最小值,平均值等)
sta.adf>:
//属性表文件
vat.adf:
//数据文件
w001001.adf:
//数据索引文件
w001001x.adf: This is an index file containing pointers to each of
the tiles in the w001001.adf raster file.
喜欢
0
赠金笔