why reference matrix is shown as empty matrix when I am reading a geo tiff file from matlab 2010a?

I imported modis images(reprojected to geographic coordinate system) in matlab 2010.But, reference matrix is shown as empty one and I cant find geographic coordinate of interesting points. Plz can you explain where I was wrong and give a solution for me. Thanks.

 채택된 답변

I'm guessing your MODIS image is a plain tiff and not a geotiff. Sometimes there's a supporting text file that may have information about the coordinates of the image corners. Sometimes those corner coordinates are called the G-Ring or G-Polygon and you have to build the georeferencing matrix from that information. The landsat function tackles the same problem like this:
% Find G-polygon text in metadata file:
latind = regexp(txt,'G-Ring_Latitude');
lonind = regexp(txt,'G-Ring_Longitude');
% Get values of polygon vertices:
for k = 1:4
lats(k) = str2double(txt(latind(k)+17:latind(k)+27));
lons(k) = str2double(txt(lonind(k)+17:lonind(k)+27));
end
% Create georasterref:
R = georasterref('LatLim',[min(lats) max(lats)],...
'LonLim', [min(lons) max(lons)], ...
'RasterSize', size(I),'ColumnsStartFrom','north');

추가 답변 (0개)

카테고리

도움말 센터File Exchange에서 Logical에 대해 자세히 알아보기

질문:

2014년 12월 18일

댓글:

2014년 12월 20일

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by