Michael,

I'm not totally sure if image composition really belongs to gdaldem. It feels it is more generic than that, although making nice looking DEM rendering is definitely a common use case. There's this long existing Python script at https://github.com/OSGeo/gdal/blob/master/swig/python/gdal-utils/osgeo_utils/samples/hsv_merge.py that combines the hillshade and color-relief together.

In the ecosystem at large, ImageMagick has also a lot of compositing operators: https://imagemagick.org/Usage/compose/

If we added a utility in GDAL, it would have to be decided if it allows different georeferencing/extent of images to be composed together. That would likely brings a bit of complexity, although using on-the-fly VRT underneath could help making images with the same size, resolution, extent.

There's also the question of if we would need this to be able to operate in a VRT-ish way (a new subset of VRT would then be needed), because that would have a strong impact on the design, compared to having a utility that materializes the output in a regular file format.

Even


Le 09/07/2024 à 03:12, Michael Sumner via gdal-dev a écrit :
Just an update, I have found out how to do this numerically.    Will consider a PR for gdaldem if I can make it work at some point.

Thanks, Mike



On Tue, Jul 9, 2024 at 7:31 AM Michael Sumner <mdsum...@gmail.com> wrote:

    Is it possible to "layer" one image over another, the first at
    full transparency and the second with partial transparency?

    I'm thinking of combining a hillshade and a (partially)
    transparent color-relief image, a visual enhancement technique. 
     (I know how to do this downstream in R and Python or similar, I'd
    like to stay in C++'s warm embrace. )

    I can go and find out what "over plot" means when it comes to
    colour imagery, just wondering if there's anything in-built
    already.   This might be a nice additional mode to gdaldem (and is
    what I thought "color-relief" meant,  at first).

    Cheers, Mike


-- Michael Sumner
    Research Software Engineer
    Australian Antarctic Division
    Hobart, Australia
    e-mail: mdsum...@gmail.com



--
Michael Sumner
Research Software Engineer
Australian Antarctic Division
Hobart, Australia
e-mail: mdsum...@gmail.com

_______________________________________________
gdal-dev mailing list
gdal-dev@lists.osgeo.org
https://lists.osgeo.org/mailman/listinfo/gdal-dev

--
http://www.spatialys.com
My software is free, but my time generally not.
_______________________________________________
gdal-dev mailing list
gdal-dev@lists.osgeo.org
https://lists.osgeo.org/mailman/listinfo/gdal-dev

Reply via email to