[gdal-dev] Warp with different band types?

Even Rouault even.rouault at spatialys.com
Mon Aug 23 01:51:57 PDT 2021


Idan,

The warping kernel works on a multiple band dataset by using a single 
working data type, which should be the "max" of the types of the input 
bands, so here int16. I believe this is working, but here the issue is 
more at the creation of the dataset itself than during the warping. This 
is due to 
https://github.com/OSGeo/gdal/blob/3302b5c9cb62191df3409676aa97fced07c92c3b/gdal/apps/gdalwarp_lib.cpp#L3017 
. GDALWarpResolveWorkingDataType() should likely be used instead

Even

Le 23/08/2021 à 00:58, Idan Miara a écrit :
> Hi all,
>
> I was trying to warp a ds with a byte band and an int16 band and got a 
> ds with two byte band.
> Is warp using the first band data type for all the output bands?
> Is that a bug?
>
> If multiple band types are not supported - maybe max(band types) could 
> be a better default (assuming no explicit output type) ?
>
> Kind regards,
> Idan
>
>
> _______________________________________________
> 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/20210823/de0394b5/attachment.html>


More information about the gdal-dev mailing list