<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
</head>
<body>
<p>Idan,</p>
<p>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
<a class="moz-txt-link-freetext" href="https://github.com/OSGeo/gdal/blob/3302b5c9cb62191df3409676aa97fced07c92c3b/gdal/apps/gdalwarp_lib.cpp#L3017">https://github.com/OSGeo/gdal/blob/3302b5c9cb62191df3409676aa97fced07c92c3b/gdal/apps/gdalwarp_lib.cpp#L3017</a>
. GDALWarpResolveWorkingDataType() should likely be used instead<br>
</p>
<p>Even<br>
</p>
<div class="moz-cite-prefix">Le 23/08/2021 à 00:58, Idan Miara a
écrit :<br>
</div>
<blockquote type="cite"
cite="mid:CAEDrt39p8ruN9BtNQAhbveGbLTo7cLk0KYBu+HXsjU+jgJQWHA@mail.gmail.com">
<div dir="auto">Hi all,
<div dir="auto"><br>
</div>
<div dir="auto">I was trying to warp a ds with a byte band and
an int16 band and got a ds with two byte band.</div>
<div dir="auto">Is warp using the first band data type for all
the output bands?</div>
<div dir="auto">Is that a bug? </div>
<div dir="auto"><br>
</div>
<div dir="auto">If multiple band types are not supported - maybe
max(band types) could be a better default (assuming no
explicit output type) ?</div>
<div dir="auto"><br>
</div>
<div dir="auto">Kind regards, </div>
<div dir="auto">Idan </div>
<div dir="auto"><br>
</div>
</div>
<br>
<fieldset class="mimeAttachmentHeader"></fieldset>
<pre class="moz-quote-pre" wrap="">_______________________________________________
gdal-dev mailing list
<a class="moz-txt-link-abbreviated" href="mailto:gdal-dev@lists.osgeo.org">gdal-dev@lists.osgeo.org</a>
<a class="moz-txt-link-freetext" href="https://lists.osgeo.org/mailman/listinfo/gdal-dev">https://lists.osgeo.org/mailman/listinfo/gdal-dev</a>
</pre>
</blockquote>
<pre class="moz-signature" cols="72">--
<a class="moz-txt-link-freetext" href="http://www.spatialys.com">http://www.spatialys.com</a>
My software is free, but my time generally not.</pre>
</body>
</html>