mapbox / mapbox/geobuf

Split analysis and encoding steps

Open
#117 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
JavaScript
Stars
1k
Forks
86
PR merge metrics
No merged PRs in 30d

Description

I feel like the analysis step should return recommended options, which the encoder should consume.
If someone has a huge dataset with known precision and dimension (for example, because they just generated it), they should be able to skip the analysis phase (for performance reasons).

This could even be a feature, in that someone could use geobuf.encode(obj, {precision:4, dimensions:2}) to simplify their coordinates (also see https://github.com/mapbox/geobuf/issues/96#issuecomment-576001554).
Additionally, if the offered precision can not be handled by the encoder, then one could fallback to things like JSON.stringify. An actual use-case for this can be found in https://github.com/maplibre/maplibre-gl-js/issues/106#issuecomment-802834969.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by tracing the analysis step, the encoder, and the geobuf.encode(obj, {precision, dimensions}) entry point; the issue names no files or tests. Done means callers can provide known precision and dimensions without analysis, analysis recommendations can reach the encoder, and unsupported precision has the proposed fallback behavior.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript
Domain
data
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.