필터 지우기
필터 지우기

How to convert .mat file to .tif file?

조회 수: 24 (최근 30일)
Pichawut Manopkawee
Pichawut Manopkawee 2016년 11월 15일
편집: Eyale Bayable Tegegne 2017년 6월 22일
Hi all,
Is there any way to convert .mat file to .tif file? Since I had made some change in the grid cell and save as .mat file, I need to convert the .mat to .tif file for ArcGIS. However, I cannot find the effective way to convert this.
I highly appreciate your help and assistance.
Thanks, Pich

채택된 답변

KSSV
KSSV 2016년 11월 15일
편집: KSSV 2016년 11월 15일
You have to load data from .mat into matlab and then convert it into .tif.
Let data be your matrix and xmin, xmax , ymin, ymax be minimum and maximum longitudes and latitudes respectively. You can convert this data into .tif file using:
% Write the data into geotiff
R = georasterref('RasterSize',size(data),'LatitudeLimits',[ymin,ymax],'LongitudeLimits',[xmin,xmax]);
geotiffwrite('myfile.tif',data,R)
%%Read geotiff file
[A, R] = geotiffread(tiffile);
figure
mapshow(A, R);
  댓글 수: 3
KSSV
KSSV 2017년 6월 20일
You have to post your data and the code which you tried.
Eyale Bayable Tegegne
Eyale Bayable Tegegne 2017년 6월 22일
편집: Eyale Bayable Tegegne 2017년 6월 22일
The code is yours and I simply chnage the maximum and minimum limits of latitude and longitude, Sir. here it is.
% Write the data into geotiff R = georasterref('RasterSize',size(T),'LatitudeLimits',[7,12.57],'LongitudeLimits',[34,39.87]); geotiffwrite('myfile.tif',data,R) %% Read geotiff file [A, R] = geotiffread(tiffile); figure mapshow(A, R);

댓글을 달려면 로그인하십시오.

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Data Import and Export에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by