[gdal-dev] Data Type Conversion
Even Rouault
even.rouault at spatialys.com
Mon May 20 08:19:42 PDT 2024
Andrew,
Data type conversion is done by GDALCopyWords[64]:
https://gdal.org/api/raster_c_api.html#_CPPv415GDALCopyWords64PKv12GDALDataTypeiPv12GDALDataTypei10GPtrDiff_t
The doc was a bit outdated, regarding conversion from floating point
data types to integer data types. I've just adjusted it in
https://github.com/OSGeo/gdal/commit/139e891b9b4a7b928c66e3daef83361fa530e6ac
Website should be refreshed soon
Even
Le 20/05/2024 à 17:01, Andrew Bell via gdal-dev a écrit :
> Hi,
>
> 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?
>
> Thanks,
>
> --
> Andrew Bell
> andrew.bell.ia 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/20240520/83509ef0/attachment.htm>
More information about the gdal-dev
mailing list