geo-io/wkb-parser
Parse Well-Known Binary (WKB) geometry data in PHP with geo-io/wkb-parser. This lightweight library decodes binary spatial geometries into usable objects, making it easy to work with WKB data from databases, APIs, and GIS files in PHP applications.
ST_AsGeoJSON, ST_AsText) or a tile/map service own it. This package supports the "decode in PHP" option when the DB is MySQL, when the API layer must remain database-agnostic, or when raw WKB arrives from third-party feeds or message queues.Adopt when most of the following hold:
GEOMETRY/POINT columns, spatial exports, or binary geometry fields in third-party APIs and event payloads.Look elsewhere when:
For executives: This is a small, MIT-licensed utility that lets us read the standard binary geometry format used by our database and by external data partners. It is the cheapest possible path to shipping location-aware features: no GIS platform license, no specialized infrastructure, no new operational surface. It is deliberately narrow — it reads geometry, it does not compute on it — which keeps the commitment reversible. If we later need heavier spatial analysis, we swap the implementation behind an internal interface rather than rewriting the product.
For engineering: The package is a focused, spec-compliant WKB decoder. It removes a tedious, error-prone parsing task — byte order, geometry type dispatch, nested collections, dimensional flags — from our backlog. The integration is deliberately contained: we wrap it behind a single GeometryDecoder interface so the dependency is confined to one adapter and can be replaced by a database-side conversion or a full geometry library later. The trade-off is explicit: no geometry math, no reprojection, no alternative formats. If a requirement demands any of those, we should make that a separate, deliberate decision rather than stretching this dependency. Maintenance risk is modest — the format is frozen by specification and the code surface is small — but we should pin the version and be prepared to vendor it.
How can I help you explore Laravel packages today?