Borrar filtros
Borrar filtros

How to convert .mat file to .tif file?

24 visualizaciones (últimos 30 días)
Pichawut Manopkawee
Pichawut Manopkawee el 15 de Nov. de 2016
Editada: Eyale Bayable Tegegne el 22 de Jun. de 2017
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

Respuesta aceptada

KSSV
KSSV el 15 de Nov. de 2016
Editada: KSSV el 15 de Nov. de 2016
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 comentarios
KSSV
KSSV el 20 de Jun. de 2017
You have to post your data and the code which you tried.
Eyale Bayable Tegegne
Eyale Bayable Tegegne el 22 de Jun. de 2017
Editada: Eyale Bayable Tegegne el 22 de Jun. de 2017
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);

Iniciar sesión para comentar.

Más respuestas (0)

Community Treasure Hunt

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

Start Hunting!

Translated by