Exemple #1
0
 public function testCreate()
 {
     $triangle1 = Triangle::fromText('TRIANGLE ((1 1, 1 2, 2 2, 1 1))');
     $triangle2 = Triangle::fromText('TRIANGLE ((1 1, 2 2, 2 1, 1 1))');
     $tin = TIN::of($triangle1, $triangle2);
     $this->assertWktEquals($tin, 'TIN (((1 1, 1 2, 2 2, 1 1)), ((1 1, 2 2, 2 1, 1 1)))');
 }
Exemple #2
0
 /**
  * Loads the underlying geometry.
  *
  * @return void
  *
  * @throws GeometryIOException         If the proxy data is not valid.
  * @throws CoordinateSystemException   If the resulting geometry contains mixed coordinate systems.
  * @throws InvalidGeometryException    If the resulting geometry is not valid.
  * @throws UnexpectedGeometryException If the resulting geometry is not an instance of the proxied class.
  */
 private function load()
 {
     $this->proxyGeometry = $this->proxyIsBinary ? Triangle::fromBinary($this->proxyData, $this->proxySRID) : Triangle::fromText($this->proxyData, $this->proxySRID);
 }