[gdal-dev] can GDAL render two images as if over-plotted?
Even Rouault
even.rouault at spatialys.com
Tue Jul 9 02:25:58 PDT 2024
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 <mdsumner at 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: mdsumner at gmail.com
>
>
>
> --
> Michael Sumner
> Research Software Engineer
> Australian Antarctic Division
> Hobart, Australia
> e-mail: mdsumner at gmail.com
>
> _______________________________________________
> gdal-dev mailing list
> gdal-dev at lists.osgeo.org
> https://lists.osgeo.org/mailman/listinfo/gdal-dev
--
http://www.spatialys.com
My software is free, but my time generally not.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/gdal-dev/attachments/20240709/29f1aafb/attachment.htm>
More information about the gdal-dev
mailing list