Azzera filtri
Azzera filtri

Raster reference object to Reference matrix

4 visualizzazioni (ultimi 30 giorni)
stav marzuk
stav marzuk il 11 Nov 2021
Risposto: KSSV il 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!

Risposte (1)

KSSV
KSSV il 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) ;

Categorie

Scopri di più su Lighting, Transparency, and Shading in Help Center e File Exchange

Prodotti


Release

R2021a

Community Treasure Hunt

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

Start Hunting!

Translated by