geo-io/wkb-parser

Well-known binary (WKB) Parser.

Installs: 4 325 625

Dependents: 52

Suggesters: 0

Security: 0

Stars: 74

Watchers: 4

Forks: 4

Open Issues: 0

v1.0.2 2022-01-15 16:29 UTC

This package is auto-updated.

Last update: 2024-04-20 14:40:43 UTC


README

Build Status Coverage Status

A parser which transforms Well-known binary (WKB) representations into geometric objects.

class MyFactory implements GeoIO\Factory
{
    public function createPoint($dimension, array $coordinates, $srid = null)
    {
        return MyPoint($coordinates['x'], $coordinates['y']);
    }

    // ...
}

$factory = MyFactory();
$parser = new GeoIO\WKB\Parser\Parser($factory);

$myPoint = $parser->parse('000000000140000000000000004010000000000000'); // POINT(2.0 4.0)

Installation

Install through composer. Check the packagist page for all available versions.

composer require geo-io/wkb-parser

License

Copyright (c) 2014-2022 Jan Sorgalla. Released under the MIT License.