Example #1
0
 /**
  * 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);
 }
Example #2
0
 /**
  * @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));
 }