2017 © Pedro Peláez
 

library wkb-parser

Parser for well-known binary (WKB/EWKB) object data

image

creof/wkb-parser

Parser for well-known binary (WKB/EWKB) object data

  • Monday, May 23, 2016
  • by djlambert
  • Repository
  • 3 Watchers
  • 13 Stars
  • 375,330 Installations
  • PHP
  • 5 Dependents
  • 0 Suggesters
  • 1 Forks
  • 3 Open issues
  • 8 Versions
  • 11 % Grown

The README.md

creof/wkb-parser

Build Status Code Climate Test Coverage Coverage Status, (*1)

Parser library for 2D, 3D, and 4D Open Geospatial Consortium (OGC) WKB or PostGIS EWKB spatial object data., (*2)

Usage

There are two use patterns for the parser. The value to be parsed can be passed into the constructor, then parse() called on the returned Parser object:, (*3)

$parser = new Parser($input);

$value = $parser->parse();

If many values need to be parsed, a single Parser instance can be used:, (*4)

$parser = new Parser();

$value1 = $parser->parse($input1);
$value2 = $parser->parse($input2);

Input value

Encoding

The parser currently supports 3 WKB encodings:, (*5)

  • OGC v1.1
  • OGC v1.2
  • PostGIS EWKB

Format

The parser supports a number of input formats:, (*6)

  • Binary string (as returned from database or pack('H*', $hexString))
  • Bare hexadecimal text string ('01010000003D0AD7A3.....')
  • Hexadecimal test string prepended with x, X, 0x, or 0X ('0x01010000003D0AD7A3.....', etc.)

Return

The parser will return an array with the keys type, value, srid, and dimension. - type string, the uppercase spatial object type (POINT, LINESTRING, etc.) without any dimension. - value array, contains integer or float values for points, nested arrays containing these based on spatial object type, or empty array for EMPTY geometry. - srid integer, the SRID if present in EWKB value, null otherwise. - dimension string, will contain Z, M, or ZM for the respective 3D and 4D objects, null otherwise., (*7)

Exceptions

The Reader and Parser will throw exceptions implementing interface CrEOF\Geo\WKB\Exception\ExceptionInterface., (*8)

References

  • PostGIS EWKB - https://github.com/postgis/postgis/blob/svn-trunk/doc/ZMSgeoms.txt
  • OGC Simple Feature Access, Part 1 - http://www.opengeospatial.org/standards/sfa
  • OGC Simple Feature Access, Part 2 - http://www.opengeospatial.org/standards/sfs

The Versions

23/05 2016

dev-master

9999999-dev

Parser for well-known binary (WKB/EWKB) object data

  Sources   Download

MIT

The Requires

  • php >=5.3.3
  • ext-spl *

 

The Development Requires

by Derek J. Lambert

parser text string geometry geography spatial wkb ewkb

23/05 2016

v2.3.0

2.3.0.0

Parser for well-known binary (WKB/EWKB) object data

  Sources   Download

MIT

The Requires

  • php >=5.3.3
  • ext-spl *

 

The Development Requires

by Derek J. Lambert

parser text string geometry geography spatial wkb ewkb

20/05 2016

dev-develop

dev-develop

Parser for well-known binary (WKB/EWKB) object data

  Sources   Download

MIT

The Requires

  • php >=5.3.3
  • ext-spl *

 

The Development Requires

by Derek J. Lambert

parser text string geometry geography spatial wkb ewkb

03/05 2016

2.2.0

2.2.0.0

Parser for well-known binary (WKB/EWKB) object data

  Sources   Download

MIT

The Requires

  • php >=5.3.3
  • ext-spl *

 

The Development Requires

by Derek J. Lambert

parser text string geometry geography spatial wkb ewkb

18/02 2016

2.1.0

2.1.0.0

Parser for well-known binary (WKB/EWKB) object data

  Sources   Download

MIT

The Requires

  • php >=5.3.3
  • ext-spl *

 

The Development Requires

by Derek J. Lambert

parser text string geometry geography spatial wkb ewkb

18/11 2015

2.0.0

2.0.0.0

Parser for well-known binary (WKB/EWKB) object data

  Sources   Download

MIT

The Requires

  • php >=5.3.3
  • ext-spl *

 

The Development Requires

by Derek J. Lambert

parser text string geometry geography spatial wkb ewkb

17/11 2015

1.0.1

1.0.1.0

Parser for well-known binary (WKB/EWKB) object data

  Sources   Download

MIT

The Requires

  • php >=5.3.3
  • ext-spl *

 

The Development Requires

by Derek J. Lambert

parser text string geometry geography spatial wkb ewkb

16/11 2015

1.0.0

1.0.0.0

Parser for well-known binary (WKB/EWKB) object data

  Sources   Download

MIT

The Requires

  • php >=5.3.3
  • ext-spl *

 

The Development Requires

by Derek J. Lambert

parser text string geometry geography spatial wkb ewkb