mapbox / mapbox/vtfx

labelgrid

Open
#2 10 comments 0 reactions 1 assignee View on GitHub

@ian29 is already working on this.

Since Sep 19, 2014.

Dominant language
JavaScript
Stars
4
Forks
2
PR merge metrics
No merged PRs in 30d

Description

- set up a new fx file in this dir https://github.com/mapbox/vtfx/blob/master/fx/drop.js
- add it to list of processors https://github.com/mapbox/vtfx/blob/master/index.js#L16-L17
- add a test for it so you can actually see the result of the processor as geojson https://github.com/mapbox/vtfx/blob/master/test/test.js#L17-L29
- then start hammering on it : )

vtfx currently doesn't turn the encoded geometries into something easier to work with. See ref here for how to interpret geom values https://github.com/mapbox/mapnik-vector-tile/blob/master/proto/vector_tile.proto#L41-L62. Luckily point geoms should be easy to interpret (`[ 9 x y]`).

My guess is the flow of the processor will basically be:
- Set up an object to collect features by grid coord
- Iterate through features bucketing them in said object by nearest grid coord
- Grab the first feature from each bucket and push into a new features array
- Replace old features array on layer with new

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.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.