How can i make geotiff file with 2D longitude, 2D latitude and 2D data

7 views (last 30 days)
yunji song
yunji song on 27 Dec 2021
Edited: yunji song on 27 Dec 2021
longitude, latitude and data are all 3413x2464 double matrix and i want to save this data as geotiff file.
Because i have to read this data by use ENVI program.
i'm sorry i can't give the data sample because it is secret information

Answers (1)

KSSV on 27 Dec 2021
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' ;
%% Read geotiff file
[A, R] = geotiffread(tiffile);

Sign in to comment.

Community Treasure Hunt

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

Start Hunting!