On vendredi 25 janvier 2019 14:36:23 CET Christoph Paulik wrote: > Hi, > > We have a VRT file in which some regions overlap. As far as I can tell > a gdal_translate of the VRT into a GTIFF just takes the value of the > first file it encounters for a given target pixel.
Actually, this will be the value of the last (as ordered in the VRT) source that covers the target pixel. > > Is there a way to specify an averaging method for such cases e.g. take > the mean, max, min etc.? > If not possible yet would that be a feature that would be of interest? You could do that in two steps: - for each source, create a VRT from it whose extent is the union of the extents, and set a nodata value. - and then create a VRT of thoses VRT using a derived band: https://www.gdal.org/gdal_vrttut.html#gdal_vrttut_derived_c The existing default pixel functions do not cover your need, so you could use instead a pixel function written in Python: https://www.gdal.org/gdal_vrttut.html#gdal_vrttut_derived_python Even -- Spatialys - Geospatial professional services http://www.spatialys.com _______________________________________________ gdal-dev mailing list [email protected] https://lists.osgeo.org/mailman/listinfo/gdal-dev
