WKB byte order
bec - April 9, 2009 - 19:09
| Project: | Geo |
| Version: | 6.x-1.x-dev |
| Component: | Geo API |
| Category: | bug report |
| Priority: | normal |
| Assigned: | bec |
| Status: | closed |
Description
When dealing with WKB, Geo checks the byte order but never references it--the unpack() operations use the byte order of the machine running the code.
Probably the only time this will ever "byte" anyone is if they're moving data between web servers and some trusty old PPC Mac... er, like me. This patch makes sure that Geo uses the byte order specified by the WKB, and reverses binary double data if the encoding byte order is different from the byte order of the machine the code is running on.
| Attachment | Size |
|---|---|
| geo_byte_order.patch | 2.72 KB |

#1
Updated the patch to reflect recent Geo development.
#2
Fixed a bug in the patch where two binary doubles were treated as one string rather than two.
A version of Geo with this patch and others applied is available here:
http://hg.invisibleinstitute.com/drupal/geo_patched/
#3
Committed - thanks becw!
#4
Thank YOU, Allie!!
#5
Automatically closed -- issue fixed for 2 weeks with no activity.
#6
the link to http://hg.invisibleinstitute.com/drupal/geo_patched/ is broken...
#7
the patch has been committed, so my patched branch is no longer necessary :)