コード例 #1
0
ファイル: Geometry.php プロジェクト: brick/geo
 /**
  * Returns the WKB representation of this geometry.
  *
  * @noproxy
  *
  * @return string
  */
 public function asBinary()
 {
     static $wkbWriter;
     if ($wkbWriter === null) {
         $wkbWriter = new WKBWriter();
     }
     return $wkbWriter->write($this);
 }
コード例 #2
0
ファイル: WKBWriterTest.php プロジェクト: brick/geo
 /**
  * @dataProvider providerWriteEmptyPointThrowsException
  * @expectedException \Brick\Geo\Exception\GeometryIOException
  *
  * @param Point $point
  */
 public function testWriteEmptyPointThrowsException(Point $point)
 {
     $writer = new WKBWriter();
     $writer->write($point);
 }