Weave Code
Weaver
Helps Laravel developers discover, compare, and choose open-source packages. See popularity, security, maintainers, and scores at a glance to make better decisions.
Feedback
Share your thoughts, report bugs, or suggest improvements.
Subject
Message

Wkb Parser Laravel Package

creof/wkb-parser

A lightweight PHP parser for Well-Known Binary (WKB) geometry data. It converts WKB/EWKB strings into usable PHP geometry objects, making it easy to work with spatial data from databases and GIS tools without heavy dependencies.

Deep Wiki
Context7

Product Decisions This Supports

  • Geo/map features: store locators, delivery and field-service tracking, geofencing, route planning, "near me" search — any of which needs geometry read out of a database or external feed and converted into something a map client can draw.
  • Data interchange: PHP services routinely receive geometries from PostGIS, MySQL 8 spatial columns, SQLite/SpatiaLite, or GeoPackage/Shapefile export pipelines as WKB. A parser is the narrow seam that turns opaque binary blobs into coordinates your product can use.
  • Build vs buy: A correct WKB/EWKB reader is a few hundred lines of byte-level code — endianness handling, 2D/Z/M variants, nested Multi* and GeometryCollection types, EWKB SRID flags. Buying that as an MIT dependency is cheap; the real cost is the maintenance bet, not the code.
  • Architecture lever: Parsing in PHP vs. delegating to the database (ST_AsGeoJSON / ST_AsText) is a genuine product decision. PHP-side keeps SQL portable across Postgres/MySQL/SQLite and lets you cache normalized GeoJSON; it adds CPU cost and a dependency.
  • API contract: If a public API emits GeoJSON, this package (or a thin wrapper around it) defines a stable conversion path so clients never see raw WKB.
  • Roadmap signal: Only worth evaluating if geo is on the near-term roadmap; otherwise it is speculative dependency accumulation.

When to Consider This Package

Consider it when:

  • Geo is a real (even if modest) part of the product, and the datastore holds geometry as WKB/EWKB.
  • The stack is PHP/Laravel and you want a small, single-purpose dependency rather than a full geo toolkit.
  • The need is read/parse only — decode binary into geometry objects or coordinates for serialization.
  • The team is comfortable vendoring or forking a small library if upstream goes quiet.

Look elsewhere when:

  • The database can do the conversion. ST_AsGeoJSON(geom) in PostGIS returns exactly what a map client wants; parsing in PHP is often needless work.
  • You need more than reads. WKT/WKB generation, geometry predicates (intersects, within), buffering, simplification, and reprojection are GEOS/proj territory — brick/geo, geoPHP, geokit, or a dedicated geometry service.
  • Maintenance posture is a hard requirement (regulated builds, security scanning, multi-year support commitments). A last release in March 2022 and a small contributor base mean you should assume the dependency is frozen.
  • Throughput matters. Converting millions of geometries in PHP is memory- and CPU-bound; do it in SQL, in a bounded queue job, or in a service with native bindings.
  • The stack already standardizes on a broader geo library. A second, narrower parser fragments the geometry model.

Net: adoption is low technical risk but should be treated as "vendor and pin," not "adopt and forget."

How to Pitch It (Stakeholders)

Executives: We have a geo requirement currently blocked by a data format our services can't read. This MIT-licensed parser lets our PHP services decode spatial data with no vendor cost and no large platform dependency. It is a tactical enabler, not a strategic bet — roughly a day of integration, wrapped so it can be swapped. The risk is maintenance, not licensing or performance, and we contain it by isolating the library behind an interface and pinning the version.

Engineering: The package is a narrow WKB/EWKB decoder — binary in, geometry objects out — covering endianness, geometry type coverage, and embedded SRIDs. The API surface is small enough to wrap in an adapter in an afternoon. Two cautions: first, the library has been quiet since 2022, so pin it and be ready to fork; the format is a stable spec, which makes a fork viable. Second, prefer database-side conversion (ST_AsGeoJSON) wherever the database can do it, and reserve PHP parsing for cases that need engine portability, cached results, or data arriving outside a spatial database. Recommended plan: wrap, pin, add contract tests against fixtures covering every geometry type plus Z/M and EWKB SRIDs, and revisit the build-vs-buy call if geo grows beyond read-only visualization.

Weaver

How can I help you explore Laravel packages today?

Conversation history is not saved when not logged in.
Prompt
Add packages to context
No packages found.
diephp/sequences
users-au/socialite-provider
twidpay/twid-logger
mrnewport/laravel-plaid
mrnewport/laravel-repo
mrnewport/laravel-docsign
mrnewport/laravel-stow
mrnewport/laravel-flow
mrnewport/laravel-priceable
mrnewport/laravel-nestedterms
fredmeng/laravel-apidoc-generator
itstructure/laravel-multilingual-tools
pdustdar/elasticsearch
markupai/php-sdk
rlacerda83/lumem-microservice-shipment
uni-method/symfony-lib
tacticmedia/scim-server-bundle
neika-ai/symfony-bundle
mattleads/agent-publishing-bundle
glavweb/framework-bundle