/** * Returns the WKT representation of this geometry. * * @noproxy * * @return string */ public function asText() { static $wktWriter; if ($wktWriter === null) { $wktWriter = new WKTWriter(); } return $wktWriter->write($this); }
/** * @dataProvider providerWriteEmptyGeometryCollection * * @param string $wkt The WKT to test. */ public function testWriteEmptyGeometryCollection($wkt) { $writer = new WKTWriter(); $geometry = GeometryCollection::fromText($wkt); $this->assertSame($wkt, $writer->write($geometry)); }