[a,R]=geotiffread('NDVI.tif');%读取投影信息
info=geotiffinfo('NDVI.tif');
excel=xlsread('randommap.xlsx');
lon=excel(:,2);
lat=excel(:,3);
[x1,y1] =projfwd(info,lat,lon);
[row, col] =map2pix(info.RefMatrix,x1,y1);
s=zeros(400,2);
s(:,1)=round(row);
s(:,2)=round(col);
网友评论