Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add framework to post-process layers #22

Merged
merged 6 commits into from
Sep 9, 2015
Merged

Conversation

zerebubuth
Copy link
Member

This adds a post-processing step which comes after the functions for transforming and sorting the individual layers. The post-processing step has access to the whole tile, and so it can modify existing layers or create new layers based on existing layers. This allows us to "intercut" one layer with another, see tilezen/TileStache#37, or create layers based purely on already-queried data (e.g: centroids).

Note: this is part of trying to solve tilezen/vector-datasource#136.

params = step['params']

layer = fn(feature_layers, **params)
if layer is not None:
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Now that the intercut function won't return None, should we eliminate this check? Or do you foresee other processing functions that may want to signal failures by returning None, and we should keep this around?

zerebubuth added a commit that referenced this pull request Sep 9, 2015
Add framework to post-process layers
@zerebubuth zerebubuth merged commit a5495f5 into master Sep 9, 2015
@rmarianski rmarianski deleted the post-process-layers branch September 17, 2015 20:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants