How can I export a matrix as a geotiff file?

17 ビュー (過去 30 日間)
Intan Antasari
Intan Antasari 2019 年 1 月 31 日
コメント済み: KSSV 2019 年 2 月 1 日
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 件のコメント
Walter Roberson
Walter Roberson 2019 年 1 月 31 日
Is there a reason you have not used geotiffwrite() ?
Intan Antasari
Intan Antasari 2019 年 1 月 31 日
編集済み: Intan Antasari 2019 年 1 月 31 日
I've tried beforehand but I got an error because I choose wrong example. I tried write an image referenced to geographic coordinate.I got some approach from this link https://nl.mathworks.com/help/map/exporting-images-and-raster-grids-to-geotiff.html
Which one should I choose for converting .mat data to projected coordinate system If I already have reference image beforehand?

サインインしてコメントする。

採用された回答

KSSV
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 件のコメント
Intan Antasari
Intan Antasari 2019 年 2 月 1 日
編集済み: Intan Antasari 2019 年 2 月 1 日
Flipping data give the right result than transpose. The figure is result from trasnpose data.
Thank you
Intan
KSSV
KSSV 2019 年 2 月 1 日
Perfect.....good.

サインインしてコメントする。

その他の回答 (0 件)

製品


リリース

R2018b

Community Treasure Hunt

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

Start Hunting!

Translated by