MATLAB: Overlay geotiffs with transparency using different colormaps

geoshowgeotiffMapping Toolbox

If I have one geotiff plotted (using geoshow) in color how do I overlay another geotiff in black and white and make it partially tranparent?

Best Answer

I do this often when I overlay semitransparent ice speed over satellite images of glaciers. That image was created with these steps:
  1. Plot the satellite image in grayscale.
  2. Use freezeColors to allow a second color map.
  3. Plot ice speed using pcolorm(lat,lon,speed,'facealpha',.3).
  4. Set the second color map to jet(256).
The same can be done with geoshow instead of pcolorm as Bruno pointed out. However, if you're using Matlab pre-2014b, there's a bug that might make Matlab crash when pairing geoshow texture maps with marker data. pcolorm is not ideal because it discards a row and a column of data, and plots data offset by half a pixel, but if your data is dense enough it should not be a problem, and it's better than risking a total crash.