Feature filters are a powerful tool for controlling the contents of tiles based on the tile identifier (ie the x, y and z of the tile). For example, you can use a feature filter to only include local roads at tiles of higher zoom levels. A less common example might be to only show certain types of features in certain regions. Feature filters are unnecessary for most visualization use cases, but are essential for complex use cases like building a base map or exerting a high degree of control over the contents of tiles across zoom levels.Documentation Index
Fetch the complete documentation index at: https://docs.wherobots.com/llms.txt
Use this file to discover all available pages before exploring further.
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.

