<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
</head>
<body>
<p>Andrew,</p>
<p>Data type conversion is done by GDALCopyWords[64]:
<a class="moz-txt-link-freetext" href="https://gdal.org/api/raster_c_api.html#_CPPv415GDALCopyWords64PKv12GDALDataTypeiPv12GDALDataTypei10GPtrDiff_t">https://gdal.org/api/raster_c_api.html#_CPPv415GDALCopyWords64PKv12GDALDataTypeiPv12GDALDataTypei10GPtrDiff_t</a></p>
<p>The doc was a bit outdated, regarding conversion from floating
point data types to integer data types. I've just adjusted it in
<a class="moz-txt-link-freetext" href="https://github.com/OSGeo/gdal/commit/139e891b9b4a7b928c66e3daef83361fa530e6ac">https://github.com/OSGeo/gdal/commit/139e891b9b4a7b928c66e3daef83361fa530e6ac</a></p>
<p>Website should be refreshed soon</p>
<p>Even<br>
</p>
<div class="moz-cite-prefix">Le 20/05/2024 à 17:01, Andrew Bell via
gdal-dev a écrit :<br>
</div>
<blockquote type="cite"
cite="mid:CACJ51z1vOFrK8j7Xa_YMZZwQigp5N1Nt0amBCsedT=rGSdLVhw@mail.gmail.com">
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
<div dir="ltr">Hi,
<div><br>
</div>
<div>The documentation for GDALRasterBand::RasterIO says that it
will convert data from the source data type to the destination
data type. I searched the source code a bit I'm not sure I
located the bit that does this conversion. I'm trying to
understand what happens in this conversion process. Is this a
numeric conversion as would be done with a C/C++ cast or is
this conversion simply add or truncate bytes in order to fit
in a destination data type. Or perhaps something else?<br>
</div>
</div>
</blockquote>
<br>
<blockquote type="cite"
cite="mid:CACJ51z1vOFrK8j7Xa_YMZZwQigp5N1Nt0amBCsedT=rGSdLVhw@mail.gmail.com">
<div dir="ltr">
<div><br>
Thanks,<br>
<div><br>
</div>
<span class="gmail_signature_prefix">-- </span><br>
<div dir="ltr" class="gmail_signature"
data-smartmail="gmail_signature">Andrew Bell<br>
<a href="mailto:andrew.bell.ia@gmail.com" target="_blank"
moz-do-not-send="true" class="moz-txt-link-freetext">andrew.bell.ia@gmail.com</a></div>
</div>
</div>
<br>
<fieldset class="moz-mime-attachment-header"></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>