フィルターのクリア

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 Center および File ExchangeLighting, 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