geo-io / wkt-parser
Well-known text (WKT) Parser.
Installs: 29 410
Dependents: 1
Suggesters: 0
Security: 0
Stars: 5
Watchers: 2
Forks: 0
Open Issues: 0
Requires
- php: >=5.3.3
- geo-io/interface: ~1.0
- jms/parser-lib: ~1.0
Requires (Dev)
- mockery/mockery: ~0.9.0
README
A parser which transforms Well-known text (WKT) representations into geometric objects.
class MyFactory implements GeoIO\Factory { public function createPoint($dimension, array $coordinates, $srid = null) { return MyPoint($coordinates['x'], $coordinates['y']); } public function createLineString($dimension, array $points, $srid = null) { return MyLineString($points); } // ... } $factory = MyFactory(); $parser = new GeoIO\WKT\Parser\Parser($factory); $myLineString = $parse->parse('LINESTRING(1 2, 2 2, 1 1)');
Installation
Install through composer. Check the packagist page for all available versions.
composer require geo-io/wkt-parser
License
Copyright (c) 2014-2022 Jan Sorgalla. Released under the MIT License.