longitude-one / spatial-encoder
This library encode any spatial interfaces into different binary or string format.
Fund package maintenance!
1.0.0-RC.0
2026-09-22 19:03 UTC
Requires
- php: ^8.4
- longitude-one/spatial-types: 0.0.1-alpha.2
Requires (Dev)
- jetbrains/phpstorm-attributes: ^1.1
- phpunit/phpunit: ^13
Suggests
None
Provides
None
Conflicts
None
Replaces
None
This package is auto-updated.
Last update: 2026-09-22 19:16:04 UTC
README
The encoder module provides an interface for encoding any SpatialInterface into other formats.
This library provides five strategies for encoding spatial interfaces into other formats:
- A strategy for encoding any spatial interface into Extended Well-Known Binary (EWKB).
- A strategy for encoding any spatial interface into ISO Well-Known Binary (WKB).
- A strategy for encoding spatial interfaces into the internal MySQL storage format.
- A strategy for encoding spatial interfaces into Well-Known Text (WKT).
- A strategy for encoding spatial interfaces into Extended Well-Known Text (EWKT), including a non-zero SRID.
Feel free to provide additional strategies for encoding spatial interfaces into other formats.
See the strategy guide for a comparison of the five formats, usage examples, implementation limitations, and links to reference documentation.
Current status
Installation
composer require longitude-one/spatial-encoder:1.0.0-RC.0