예제 #1
0
파일: GeometryProxy.php 프로젝트: brick/geo
 /**
  * {@inheritdoc}
  */
 public function toArray()
 {
     if ($this->proxyGeometry === null) {
         $this->load();
     }
     return $this->proxyGeometry->toArray();
 }
예제 #2
0
 /**
  * @param Geometry $g      The Geometry to test.
  * @param array    $coords The expected raw coordinates of the geometry.
  * @param boolean  $hasZ   Whether the geometry is expected to contain Z coordinates.
  * @param boolean  $hasM   Whether the geometry is expected to contain M coordinates.
  * @param integer  $srid   The expected SRID of the geometry.
  */
 protected final function assertGeometryContents(Geometry $g, array $coords, $hasZ = false, $hasM = false, $srid = 0)
 {
     $this->castToFloat($coords);
     $this->assertSame($coords, $g->toArray());
     $this->assertSame($hasZ, $g->is3D());
     $this->assertSame($hasM, $g->isMeasured());
     $this->assertSame($srid, $g->SRID());
 }