Filter löschen
Filter löschen

Raster reference object to Reference matrix

4 Ansichten (letzte 30 Tage)
stav marzuk
stav marzuk am 11 Nov. 2021
Beantwortet: KSSV am 12 Nov. 2021
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!

Antworten (1)

KSSV
KSSV am 12 Nov. 2021
[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) ;

Kategorien

Mehr zu Lighting, Transparency, and Shading finden Sie in Help Center und File Exchange

Produkte


Version

R2021a

Community Treasure Hunt

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

Start Hunting!

Translated by