geo-io/wkb-parser

已知的二进制(WKB)解析器。

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

This package is auto-updated.

Last update: 2024-09-20 15:31:06 UTC


README

Build Status Coverage Status

将已知的二进制(WKB)表示转换为几何对象的解析器。

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)

安装

通过 Composer 安装。请查看 Packagist 页面 以获取所有可用版本。

composer require geo-io/wkb-parser

许可协议

版权所有 (c) 2014-2022 Jan Sorgalla。在 MIT 许可协议 下发布。