Posted by Gufo Rosso on 08/20/06 16:57
http://mysql.com/doc/refman/5.0/en/gis-wkb-format.html
<?php
// $wkb is the value retrieved from MySQL using AsBinary(g)
$wkb = '0101000000000000000000F03F000000000000F03F';
$geometry = unpack(corder/Ltype/dlatitude/dlongitude, $wkb); // error
division by 0
$geometry = unpack('corder/Ltype/dlatitude/dlongitude', $wkb); // not
return 1 and 1
if ($geometry['type'] == 1) {
$latitude = $geometry['latitude'];
$longitude = $geometry['longitude'];
}
?>
Navigation:
[Reply to this message]
|