I've written a program in Python with GDAL bindings that generates a single band georeferenced GeoTIFF as output. From there I use the GDAL commandline tool gdaldem
to colorize that image to highlight certain classes of pixels. I'd like to also lay it on top of a basemap DEM as final output but I need to do this procedurally in my program as opposed to load both layers into a GIS tool and blend from there.
Are there any GDAL command line utilities I can use to blend two GeoTIFFs together and output a pretty png?
Here's a specific example with some random datasets:
DEM Pixels
Pixels + DEM Blended (This is what I want to do with command line tools)
Update:
I ended up using the blend
function from PIL like this:
basemap_image = Image.open('basemap.png').convert('RGBA')
overlay_image = Image.open('overlay.png').convert('RGBA')
combined = Image.blend(basemap_image, overlay_image, 0.8)
combined.save("out.png")