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.

AttachmentSize
geo_byte_order.patch2.72 KB

#1

bec - June 2, 2009 - 18:28

Updated the patch to reflect recent Geo development.

AttachmentSize
geo_byte_order.patch 2.72 KB

#2

bec - July 29, 2009 - 17:18

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/

AttachmentSize
geo_byte_order_1.patch 2.89 KB

#3

Allie Micka - August 5, 2009 - 02:57
Status:needs review» fixed

Committed - thanks becw!

#4

bec - August 5, 2009 - 03:21

Thank YOU, Allie!!

#5

System Message - August 19, 2009 - 03:30
Status:fixed» closed

Automatically closed -- issue fixed for 2 weeks with no activity.

#6

zazzu - September 22, 2009 - 05:17

#7

bec - September 28, 2009 - 14:18

the patch has been committed, so my patched branch is no longer necessary :)

 
 

Drupal is a registered trademark of Dries Buytaert.