필터 지우기
필터 지우기

Plot / Projection for a .tiff satellite image

조회 수: 4 (최근 30일)
MaHa
MaHa 2021년 3월 4일
답변: MaHa 2021년 3월 15일
Hello,
I have a .tiff file of a satellite image (attached a png example), which contains RGB information from a true color algorithm. I also have an other file for this image that has temperature, which I usually display using pcolor / m_pcolor, where I can specify a projection (equidistant cylindrical for example).
I would like to display the RGB image from my tiff file with the same projection as my temperature file, to compare both and eventually see features associated.
For my temperature image, I do :
lat_ex = 10:0.1:20;
lon_ex = -20:0.1:-10;
temperature = rand(size(lat_ex,2),size(lon_ex,2));
figure
m_proj('Equidistant Cylindrical', 'lon', [-20 -10], 'lat', [10 20])
m_pcolor(lon_ex,lat_ex,temperature);
m_gshhs_l('patch',[0.35 0.35 0.35], 'edgecolor','k');
m_grid('box','on', 'tickstyle','dd', 'fontsize',24, 'xtick',8, 'ytick',7)
For my tiff file I do :
Image = 'Example.tiff';
[X,R] = readgeoraster(Image);
info = geotiffinfo(Image);
[x,y]=pixcenters(info);
[lat,lon]=meshgrid(x,y);
X is a N-by-M-by-3 matrix (N = length(lat), M = length(lon), for each R,G,B color). load the .mat file I attached to get it.
figure
geoshow(X,R)
and here I am lost. I need the tiff image to have the same projection as the temperature figure, to be able to display both images with the same projection.
Sadly I can not attach the tiff file (why isn't it supported ?) but I attached a png format of it so you have an idea of what it looks like and saved it as a .mat file so you can load it.
Maybe I am missing a function that would do it very easily ?

답변 (2개)

MaHa
MaHa 2021년 3월 9일
Anyone ?

MaHa
MaHa 2021년 3월 15일

카테고리

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