Collect coord x-values from a SparseTile (single-dim schema).
(tile: &SparseTile)
| 409 | |
| 410 | /// Collect coord x-values from a SparseTile (single-dim schema). |
| 411 | fn ceiling_x_values(tile: &SparseTile) -> Vec<i64> { |
| 412 | let rows = decode_sparse_rows(tile).unwrap(); |
| 413 | let mut xs: Vec<i64> = rows |
| 414 | .iter() |
| 415 | .map(|r| match r.coord[0] { |
| 416 | CoordValue::Int64(x) => x, |
| 417 | _ => panic!("unexpected coord type"), |
| 418 | }) |
| 419 | .collect(); |
| 420 | xs.sort_unstable(); |
| 421 | xs |
| 422 | } |
| 423 | |
| 424 | /// Collect RowKinds from ceiling tile rows, keyed by coord. |
| 425 | fn ceiling_kinds(tile: &SparseTile) -> HashMap<i64, RowKind> { |