Creating a GeoTIFF with 3 large matrices (Latitude, Longitude, Data) [satellite images]

17 views (last 30 days)
Dear all,
I am trying to create a GeoTIFF from 3 matrices, each of 2000x2048. Let's call them:
Lat = 2000x2048
Lon = 2000x2048
Data = 2000x2048
Now, being the coordinates not equally spaced accross the scene, I cannot use the approach where xmin xmax ymin ymax define the 4 corners.
I can do that, but when I export the file to a GeoTIFF, this is wrongly georeferenced, resulting in something "flat" like this (assuming x and y axis had coordinates):
What I am after is exactly what geoshow does. For example I can obtain the image below from:
geoshow(Lat,Lon,Data,'DisplayType', 'surface')
colormap jet, clim([250 320]), colorbar;
And this is what I get:
Now, how can I create something like this, that can be exported as a GeoTIFF?
*Please note, I tried to create meshgrids but unsurprisingsly I get the following error:
Requested 4096000x4096000 (125000.0GB) array exceeds maximum array size preference (13.9GB). This might cause MATLAB to become
Any help would be much appreciated!

Answers (0)




Community Treasure Hunt

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

Start Hunting!