Add support for configurable pixel sizes #851
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Connects to #810
Included in this pr is a system to assign
class
es to features. Based on earlier conversations, I assume that we want to expose these properties in the tiles themselves. If we don't, we should rename tomz_class
and they will get dropped. I also just made them integers for now; but they can be changed to whatever is easier to work with. Something else to consider is that the wordclass
might not be the smartest choice because it's a keyword in many languages. However, I tried it in a node.js repl and didn't seem to have any problems with it though.The implementation here re-uses the csv machinery to specify and assign these properties. The idea is that the
mz_min_pixels
spreadsheets will define the rules for the configurable pixel sizes, and a transform is configured that drops any features with areas that don't meet this threshold. The transform assumes that the thresholds will be in pixel values, and calculates the required area for the feature based on the zoom level. Having the capability to assignclass
values could be useful to determine the pixel thresholds.Note that there aren't any rules specified, but the pieces are in place to honor any subsequent changes.
@zerebubuth, @nvkelso could you review please?