Exemplo n.º 1
0
 /**
  * {@inheritdoc}
  */
 public function isMeasured()
 {
     if ($this->proxyGeometry === null) {
         $this->load();
     }
     return $this->proxyGeometry->isMeasured();
 }
Exemplo n.º 2
0
 /**
  * @dataProvider providerConstructorEmpty
  *
  * @param boolean $is3D
  * @param boolean $isMeasured
  * @param integer $srid
  */
 public function testConstructorEmpty($is3D, $isMeasured, $srid)
 {
     $cs = new CoordinateSystem($is3D, $isMeasured, $srid);
     $polygon = new Polygon($cs);
     $this->assertTrue($polygon->isEmpty());
     $this->assertSame($is3D, $polygon->is3D());
     $this->assertSame($isMeasured, $polygon->isMeasured());
     $this->assertSame($srid, $polygon->SRID());
 }
Exemplo n.º 3
0
 /**
  * @param array   $coords     The expected coordinates of the Polygon as returned by toArray().
  * @param boolean $is3D       Whether the Polygon is expected to contain Z coordinates.
  * @param boolean $isMeasured Whether the Polygon is expected to contain M coordinates.
  * @param Polygon $polygon    The Polygon to test.
  */
 protected final function assertPolygonEquals(array $coords, $is3D, $isMeasured, Polygon $polygon)
 {
     $this->castToFloat($coords);
     $this->assertSame($coords, $polygon->toArray());
     $this->assertSame($is3D, $polygon->is3D());
     $this->assertSame($isMeasured, $polygon->isMeasured());
 }