Search by

longitude-one / spatial-encoder

Alexandre-T

This library encode any spatial interfaces into different binary or string format.

Package info

github.com/longitude-one/spatial-encoder

pkg:composer/longitude-one/spatial-encoder

Fund package maintenance!

Ko Fi

Statistics

Installs: 0

Dependents: 0

Suggesters: 0

Stars: 1

Open Issues: 0

1.0.0-RC.0 2026-09-22 19:03 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

longitude-one/spatial--encoder Stable release Minimum PHP Version Packagist License

Last integration test Downloads codecov

Installation

composer require longitude-one/spatial-encoder:1.0.0-RC.0