Binary to double without loosing precision?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Spatial Joys!

Quite simply I need to unpack wkb binary from mysql back to it's double-precision...

problem is this:
Array
(
    [order] => 0
    [type] => 16777216
    [latitude] => -7.1466311596962E-292
    [longitude] => 1.7568969921627E-47
)
should be:
Array
(
    [order] => 0
    [type] => 16777216
    [latitude] => 3144.1639291789037156
    [longitude] => 4044.3600286609968055
)

when using:
unpack("corder/Ltype/dlatitude/dlongitude", $mysqlwkb);

any idea's just how to get the wkb back to something usable with php?

Nathan

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux