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

Even Rouault even.rouault at spatialys.com
Tue Jan 26 14:57:31 PST 2016

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 ordering, but the QgsConstWkbPtr class used by the various 
Qgs{Geometry]v2::fromWkb() methods seem to support byte swapping when WKB 
endianness != host endianness. So you might just need to fix 
QgsGeometryFactory::geomFromWkb() to make that work. 

> We have other alternatives but were just wondering.
> ---
> This email has been checked for viruses by Avast antivirus software.
> https://www.avast.com/antivirus
> _______________________________________________
> Qgis-developer mailing list
> Qgis-developer at lists.osgeo.org
> List info: http://lists.osgeo.org/mailman/listinfo/qgis-developer
> Unsubscribe: http://lists.osgeo.org/mailman/listinfo/qgis-developer

Spatialys - Geospatial professional services

More information about the Qgis-developer mailing list