You are here

function WKB::getPoint in geoPHP 7

Same name and namespace in other branches
  1. 8 geoPHP/lib/adapters/WKB.class.php \WKB::getPoint()
1 call to WKB::getPoint()
WKB::getGeometry in geoPHP/lib/adapters/WKB.class.php

File

geoPHP/lib/adapters/WKB.class.php, line 87

Class

WKB
PHP Geometry/WKB encoder/decoder

Code

function getPoint(&$mem) {
  $point_coords = unpack("d*", fread($mem, $this->dimension * 8));
  if (!empty($point_coords)) {
    return new Point($point_coords[1], $point_coords[2]);
  }
  else {
    return new Point();

    // EMPTY point
  }
}