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