< p >经度和纬度的每个像素不是存储在HDF文件。但使用< / p > < p >元数据= hdfinfo (file_name.hdf); < / p > < p >你可以得到的信息来生成这些纬度和经度。在元数据。Attibutes你会发现这其中:< / p > < pre > <代码> GridName =“MOD_CMG_Snow_5km”XDim = 7200 YDim = 3600 UpperLeftPointMtrs = (-180000000.000000, 90000000.000000) LowerRightMtrs =(180000000.000000, -90000000.000000)投影= GCTP_GEO < /代码> < / pre > < p >如果你而更多的人类可读的格式,检查< a href = " https://nsidc.org/data/mod10c2 " rel = " nofollow noreferrer " >产品规格MOD10C2 < / >。< / p > < p >这说:< / p > < blockquote > < p > <强>投影< /强> < / p > < p > MODIS发生数据集产生的地理纬度/经度投影。这个简单的投影将地理经度和纬度度就像x - y坐标在一个平面上。图1显示了地理纬度/经度投影称为板Carree,情节经度和纬度度为x和y轴上的坐标,分别为:< / p > < p > < a href = " https://i.stack.imgur.com/FnIpR.png " rel = " nofollow noreferrer " > < img src = " https://i.stack.imgur.com/FnIpR.png " alt = "在这里输入图像描述" > < / > < / p > < p >图1:板Carree投影。< / p > < p > < >强电网< /强> < / p > < p > MODIS康联由7200列3600行。每个细胞都有一个分辨率为0.05度(约5公里)。左上角的左上角单元-180.00度经度,纬度90.00度。右下角单元格的右下角是-180.00度经度,纬度-90.00度……< / p > < /引用> < p >你有足够多的信息来生成纬度和经度向量。 Now you have to decide if you will store the center of each pixel, or one of the corners. Assuming you will store the center of each pixel you can generate the latitude and longitude vectors like this:
gridSize=0.05 % arc degrees lat=-90+(gridSize/2):0.05:90-(gridSize/2); lon=-180+(gridSize/2):0.05:180-(gridSize/2);
And if you want instead matrices with the coordinates of the center of each individual pixel, you do
[lonGrid,latGrid]=meshgrid(lon,lat);