Exemple #1
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 ? CurvePolygon::fromBinary($this->proxyData, $this->proxySRID) : CurvePolygon::fromText($this->proxyData, $this->proxySRID);
 }
Exemple #2
0
 /**
  * @dataProvider providerInteriorRingN
  *
  * @param string      $curvePolygon  The WKT of the CurvePolygon to test.
  * @param integer     $n             The ring number.
  * @param string|null $interiorRingN The WKT of the expected interior ring, or NULL if an exception is expected.
  * @param integer     $srid          The SRID of the geometries.
  */
 public function testInteriorRingN($curvePolygon, $n, $interiorRingN, $srid)
 {
     if ($interiorRingN === null) {
         $this->setExpectedException(NoSuchGeometryException::class);
     }
     $ring = CurvePolygon::fromText($curvePolygon, $srid)->interiorRingN($n);
     $this->assertWktEquals($ring, $interiorRingN, $srid);
 }