Encode whichever curve the schema declares for tile boundaries.
(
schema: &ArraySchema,
tile_indices: &[u64],
bits: u32,
)
| 41 | |
| 42 | /// Encode whichever curve the schema declares for tile boundaries. |
| 43 | pub fn encode_tile_prefix_with_order( |
| 44 | schema: &ArraySchema, |
| 45 | tile_indices: &[u64], |
| 46 | bits: u32, |
| 47 | ) -> ArrayResult<u64> { |
| 48 | match schema.tile_order { |
| 49 | TileOrder::Hilbert | TileOrder::RowMajor | TileOrder::ColMajor => { |
| 50 | hilbert::encode(tile_indices, bits) |
| 51 | } |
| 52 | TileOrder::ZOrder => zorder::encode(tile_indices, bits), |
| 53 | } |
| 54 | } |
| 55 | |
| 56 | #[cfg(test)] |
| 57 | mod tests { |
no test coverage detected