/** * 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 ? MultiSurface::fromBinary($this->proxyData, $this->proxySRID) : MultiSurface::fromText($this->proxyData, $this->proxySRID); }
/** * @dataProvider providerPointOnSurface * * @param string $multiMultiSurface The WKT of the MultiSurface to test. */ public function testPointOnSurface($multiMultiSurface) { $this->requiresGeometryEngine(); if ($this->isMySQL() || $this->isMariaDB()) { // MySQL and MariaDB do not support ST_PointOnSurface() $this->setExpectedException(GeometryEngineException::class); } $multiSurface = MultiSurface::fromText($multiMultiSurface); $this->skipIfUnsupportedGeometry($multiSurface); $pointOnSurface = $multiSurface->pointOnSurface(); $this->assertInstanceOf(Point::class, $pointOnSurface); $this->assertTrue($multiSurface->contains($pointOnSurface)); }