필터 지우기
필터 지우기

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

조회 수: 4 (최근 30일)
yunji song
yunji song 2021년 12월 27일
편집: yunji song 2021년 12월 27일
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

답변 (1개)

KSSV
KSSV 2021년 12월 27일
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);
  댓글 수: 4
yunji song
yunji song 2021년 12월 27일
i know that i can find min and max but i think it is not appropriate in this case.
isn't it possible when lon (lat) have same grid in each raw(colum) like below example?
ex) lon=[170,170,170,170;171,171,171,171;172,172,172,172;173,173,173,173]
if i use your code, geo information which saved in tiff file is different with raw data.

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

카테고리

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