필터 지우기
필터 지우기

Raster reference object to Reference matrix

조회 수: 4 (최근 30일)
stav marzuk
stav marzuk 2021년 11월 11일
답변: KSSV 2021년 11월 12일
Hi,
I need to get the reference matrix of my TIF file, im working on MATLAB R2021A.
I know 'geotiffread' should give this but it doesnt work anymore, I tried using 'readgeoraster' but it returns a raster reference object.
I saw there is a way to covert a refernce matrix to a raster object, but I need it the other way around, is it possible?
this is what i have:
[chm,refmat,~] = geotiffread('myfile.tif');
[crh, xyh] = canopyPeaks(double(chm), ...
refmat, ...
but again, 'geotiffread' doesn't work.
Please, I really need the refernce matrix and I cant find a way to get it now, any help is highly appreciated!

답변 (1개)

KSSV
KSSV 2021년 11월 12일
[A,R] = readgeoraster('myfile.tif');
mapshow(A,R)
x = linspace(R.XWorldLimits(1),R.XWorldLimits(2),R.RasterSize(1));
y = linspace(R.YWorldLimits(1),R.YWorldLimits(2),R.RasterSize(2));
[X,Y] = meshgrid(x,y) ;

카테고리

Help CenterFile Exchange에서 Lighting, Transparency, and Shading에 대해 자세히 알아보기

제품


릴리스

R2021a

Community Treasure Hunt

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

Start Hunting!

Translated by