How can I export a matrix as a geotiff file?
45 次查看(过去 30 天)
显示 更早的评论
I want load this matrix to ArcMap
I did several approach. I tried to convert .mat into ASCII (txt format) but it's not appear, maybe I did something wrong when I did the conversion.
Then I tried to save the file via a tool bar across the top of the figure, click on file, save as.
The result doesn't have correct coordinate system when I open on ArcMap.
Thank you for your help.
Intan
2 个评论
采纳的回答
KSSV
2019-2-1
编辑:KSSV
2019-2-1
Let A be your matrix and (xmin,xmax) be your xlimits and (ymin,ymax) be your y limits.
% Get geo referenced
R = georasterref('RasterSize',size(A),'LatitudeLimits',[ymin,ymax],'LongitudeLimits',[xmin,xmax]);
% write to tiff file
tiffile = 'test.tif' ;
geotiffwrite(tiffile,A,R)
%% Read geotiff file
[A, R] = geotiffread(tiffile);
5 个评论
更多回答(0 个)
另请参阅
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!