Re: [gdal-dev] Reading a double from file

2020-06-16 Thread Andrew C Aitchison
Thanks to you both. On Tue, 16 Jun 2020, Even Rouault wrote: On mardi 16 juin 2020 11:02:55 CEST Mateusz Loskot wrote: On Tue, 16 Jun 2020 at 10:08, Andrew C Aitchison wrote: Does gdal have a standard, endian-independent, way to read floating point values from file ? Specifically IEEE-754 l

Re: [gdal-dev] Reading a double from file

2020-06-16 Thread Even Rouault
On mardi 16 juin 2020 11:02:55 CEST Mateusz Loskot wrote: > On Tue, 16 Jun 2020 at 10:08, Andrew C Aitchison > wrote: > > Does gdal have a standard, endian-independent, > > way to read floating point values from file ? > > Specifically IEEE-754 little-endian 64bit values. > > > > So far my drive

Re: [gdal-dev] Reading a double from file

2020-06-16 Thread Mateusz Loskot
On Tue, 16 Jun 2020 at 10:08, Andrew C Aitchison wrote: > > Does gdal have a standard, endian-independent, > way to read floating point values from file ? > Specifically IEEE-754 little-endian 64bit values. > > So far my driver has used a union to "cast" 8 bytes to a double, > but I now discover t

[gdal-dev] Reading a double from file

2020-06-16 Thread Andrew C Aitchison
Does gdal have a standard, endian-independent, way to read floating point values from file ? Specifically IEEE-754 little-endian 64bit values. So far my driver has used a union to "cast" 8 bytes to a double, but I now discover that, whilst this is valid C, it is not valid C++. I am looking for a