pub trait H3IsValid {
// Required methods
fn h3_is_valid(&self) -> BooleanChunked;
fn h3_all_valid(&self) -> bool;
}Required Methods§
Sourcefn h3_is_valid(&self) -> BooleanChunked
fn h3_is_valid(&self) -> BooleanChunked
§Example
use polars::prelude::UInt64Chunked;
use polars_core::prelude::TakeRandom;
use h3ron::{H3Cell, Index};
use h3ron_polars::algorithm::chunkedarray::H3IsValid;
use h3ron_polars::AsH3CellChunked;
let cell = H3Cell::from_coordinate((4.5, 1.3).into(), 6).unwrap();
let ca = UInt64Chunked::from_iter([
Some(cell.h3index()),
Some(55), // invalid
None,
]);
let is_valid_ca = ca.h3cell().h3_is_valid();
assert_eq!(is_valid_ca.len(), ca.len());
assert_eq!(is_valid_ca.get(0), Some(true));
assert_eq!(is_valid_ca.get(1), Some(false));
assert_eq!(is_valid_ca.get(2), None);Sourcefn h3_all_valid(&self) -> bool
fn h3_all_valid(&self) -> bool
Returns true when all contained h3indexes are valid.