Borrar filtros
Borrar filtros

Raster reference object to Reference matrix

4 visualizaciones (últimos 30 días)
stav marzuk
stav marzuk el 11 de Nov. de 2021
Respondida: KSSV el 12 de Nov. de 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!

Respuestas (1)

KSSV
KSSV el 12 de Nov. de 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) ;

Categorías

Más información sobre Lighting, Transparency, and Shading en Help Center y File Exchange.

Productos


Versión

R2021a

Community Treasure Hunt

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

Start Hunting!

Translated by