Skip to main content

encode

Function encode 

Source
pub const fn encode(tile: TileCoord, layer: Layer, feature_sort: i32) -> u64
Expand description

Encode a tile coordinate + layer + feature sort key into a single u64.

Creates a total ordering where tiles are grouped together, then layers within a tile, then features within a layer.

§Panics

Does not panic. Zoom values > 15 are silently masked to 4 bits.