Stacking several Geo-tiff into 3d array.
Mostrar comentarios más antiguos
I have several geotiff from different sources, and I cant figure out how to stack the data properly based on georeferences. I'm hoping someone will point me in right direction, especially which function to use.
I have an access to mapping toolbox.
Respuestas (1)
Chad Greene
el 13 de Oct. de 2014
Can you explain the step you're getting hung up on? If all of your images are the same size and resolution with corners pinned in the same places, it may be as simple as
A(:,:,1) = geotiffread('filename1.tif');
A(:,:,2) = geotiffread('filename2.tif');
.
.
.
A(:,:,N) = geotiffread('filenameN.tif');
That could even be done in a loop if you want to stack several images.
If you have multiple images that only partly overlap,, Aslak Grinsted's geotiffreadregion may be helpful. I have written a slightly more user-friendly version of geotiffreadregion with full documentation which I'd be happy to send you if you're interested. A third option, if you know your grid points in map x/y or lat/lon, is to use geotiffinterp.
2 comentarios
Chad Greene
el 13 de Oct. de 2014
I see. You may be able to load one image, then get the lat/lon of each pixel in that image with pix2latlon, then get values for those those lat/lons for every other image using geotiffinterp.
Categorías
Más información sobre Create Plots on Maps en Centro de ayuda y File Exchange.
Productos
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!