Re: [Qgis-developer] WKB support is only little-endian?

2016-01-30 Thread David Adler
I looked into this and tried to fix it although it still didn't work. The basic problem is in QgsGeometryFactory::geomFromWkb which has the logic: //find out type (bytes 2-5) int type; memcpy( , wkb + 1, sizeof( int ) ); QgsAbstractGeometryV2* geom = nullptr; geom = geomFromWkbType(

[Qgis-developer] WKB support is only little-endian?

2016-01-26 Thread David Adler
We just realized that DB2 on z/OS uses big-endian, first byte = x'00'. This doesn't appear to work with the QgsGeometry->fromWkb() function. We have other alternatives but were just wondering. --- This email has been checked for viruses by Avast antivirus software.

Re: [Qgis-developer] WKB support is only little-endian?

2016-01-26 Thread Even Rouault
Le mardi 26 janvier 2016 23:11:28, David Adler a écrit : > We just realized that DB2 on z/OS uses big-endian, first byte = x'00'. > > This doesn't appear to work with the QgsGeometry->fromWkb() function. Looking quickly it seems that indeed QgsGeometryFactory::geomFromWkb() assumes host