labelgrid
@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
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Assessment
This issue has not been assessed yet.