mapbox / mapbox/vtfx

filterbyfield

Open
#3 1 comment 0 reactions 1 assignee View on GitHub

@camilleanne 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

From @ian29's notes:

> drop_features field, {<,>,<=,>=}, value

I'm guessing he's imagining a filter that drops features that don't match a certain filter constraint (e.g. `class = 'park'`.

Same setup notes as https://github.com/mapbox/vtfx/issues/2 -- the challenge you'll have is that other than parsing the protobuf the main vtfx loop is not reconstructing features for you. So you'll see features have a set of "tags" that reference their attribute values but the values are actually elsewhere -- you'll have to do a lookup to grab them.

See https://github.com/mapbox/mapnik-vector-tile/blob/master/proto/vector_tile.proto as reference.

Depending on how this goes for you I think it'll give us some sense of whether we should reconstruct feature attributes outside of each processor and do more work to make processors have more convenient logic.

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.