Main Content

matlab.io.hdfeos.gd.readBlkSomOffset

包: matlab.io.hdfeos.gd

读取分块 SOM 偏移量

语法

offset = readBlkSomOffset(GID)

说明

offset = readBlkSomOffset(GID) 从标准 SOM(Space Oblique Mercator,空间斜轴墨卡托)投影读取分块 SOM 偏移值。offset 是 SOM 投影数据的偏移值向量。此例程只能用于使用 SOM 投影的网格。

此函数对应于 HDF-EOS 库 C API 中的 GDblkSOMoffset 函数。

示例

import matlab.io.hdfeos.*
gfid = gd.open('myfile.hdf','create');
lowright = [30521379.68485 1152027.64253];
upleft = [-11119487.42844 8673539.24806];
gridID = gd.create(gfid,'SOM',120,60,upleft,lowright);
projparm(1) = 6378137;
projparm(2) = 0.006694348;
projparm(4) = 98096360;  % 98.161 in DDDMMMSSS
projparm(5) = 87069061;  % 87.112 in DDDMMMSSS
projparm(9) = 0.068585416*1440;
projparm(10) = 0.0;
projparm(12) = 6;
gd.defProj(gridID,'som',[],[],projparm);
gd.writeBlkSomOffset(gridID,[5 10 12 8 2]);
gd.detach(gridID);
gd.close(gfid);
gfid = gd.open('myfile.hdf');
gridID = gd.attach(gfid,'SOM');
blk = gd.readBlkSomOffset(gridID);
gd.detach(gridID);
gd.close(gfid);