function [long, lat] = rowcol2latlon(hh, vv, row, col)
R = 6371007.181000; %%%% earth radius 6371007.181000 m
ul_x = -20015109.354; %%%% earth half perimeter;
ul_y = 10007554.677; %%% latitude 0-90 distance
% Tile width or height = earth width / 36 = (20015109.354 + 20015109.354) /
% 36 = 1111950.5196666666 m
Tile_width = 1111950.5196666666;
tile_rows = 1200; % 1 Km tile
% Cell size = tile width / cells = 1111950.5196666666 / 2400 = 463.31271652777775 m
Cell_size = Tile_width/tile_rows;
ul_x = ul_x + Tile_width * hh; %%%% earth half perimeter;
ul_y = ul_y - Tile_width * vv;
point_x = ul_x + (col - 0.5) * Cell_size;
point_y = ul_y - (row - 0.5) * Cell_size;
lat = point_y/(R*pi) * 180;
long = point_x/(R*pi * cos(lat/180*pi)) * 180;
评论0