Encode whichever space-filling curve the schema declares for cells.
(schema: &ArraySchema, coord: &[CoordValue])
| 31 | |
| 32 | /// Encode whichever space-filling curve the schema declares for cells. |
| 33 | pub fn encode_cell_prefix(schema: &ArraySchema, coord: &[CoordValue]) -> ArrayResult<u64> { |
| 34 | match schema.cell_order { |
| 35 | CellOrder::Hilbert | CellOrder::RowMajor | CellOrder::ColMajor => { |
| 36 | encode_hilbert_prefix(schema, coord) |
| 37 | } |
| 38 | CellOrder::ZOrder => encode_zorder_prefix(schema, coord), |
| 39 | } |
| 40 | } |
| 41 | |
| 42 | /// Encode whichever curve the schema declares for tile boundaries. |
| 43 | pub fn encode_tile_prefix_with_order( |