Esempio n. 1
0
 protected function toGeometry($value)
 {
     $factory = new Generator();
     $parser = new WKTParser($factory);
     return $parser->parse($value);
 }
Esempio n. 2
0
 public function testParseThrowsExceptionForInvalidSRID()
 {
     $this->setExpectedException('GeoIO\\WKT\\Parser\\Exception\\ParserException');
     $parser = new Parser(Mockery::mock('GeoIO\\Factory')->shouldIgnoreMissing());
     $parser->parse('SRID=1.2;POINT(1 2)');
 }