Stacking several Geo-tiff into 3d array.
Afficher commentaires plus anciens
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.
Réponses (1)
Chad Greene
le 13 Oct 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 commentaires
Chad Greene
le 13 Oct 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.
Catégories
En savoir plus sur Create Plots on Maps dans Centre d'aide et File Exchange
Produits
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!