The Feature Filter API
Feature filters are spark sqlColumn types that resolve to a boolean value. They are evaluated for each feature/tile
combo where a True value means the feature is included in the tile and a False value means the feature is excluded. The
columns that can be referenced in a feature filter are a superset of the columns in the features dataframe that is passed
into the generate function. In addition to the columns provided as input, The following are available:
- tile: struct - contains the x, y and z of the tile this feature is in
- x: int - the x coordinate of the tile
- y: int - the y coordinate of the tile
- z: int - the z coordinate, or zoom, of the tile
- length: double - the length of the unclipped feature in terms of the tile’s units. If the feature is the length of the tile, this will be 1. Clipping of the feature does not come into play in this value. For example, if a feature runs from the left edge of one tile to the right edge of the tile to the right, the value would be 2.
- area: double - the area of the unclipped feature in terms of the tile’s units. If the feature is the area of the tile, this will be 1. Clipping of the feature does not come into play in this value. For example, if a feature is a square that completely covers 4 tiles, the area will be 4.

