Struct roaring_landmask::mask::RoaringMask
source · pub struct RoaringMask { /* private fields */ }
Implementations
sourceimpl RoaringMask
impl RoaringMask
pub fn from_compressed<P: AsRef<Path>>(path: P) -> Result<Self>
sourceimpl RoaringMask
impl RoaringMask
pub fn dx(&self) -> f64
pub fn dy(&self) -> f64
sourcepub fn contains(&self, x: f64, y: f64) -> bool
pub fn contains(&self, x: f64, y: f64) -> bool
Check if point (x, y) is on land.
x
is longitude, [-180, 180] east
y
is latitude, [- 90, 90] north
The check is optimistic, it will yield true
for points that are closer to the shore
than the resolution of the landmask. The positive points should be checked against the
vectorized land shapes.
Returns true
if the point is on land or close to the shore.
pub fn contains_many(
&self,
py: Python<'_>,
x: PyReadonlyArrayDyn<'_, f64>,
y: PyReadonlyArrayDyn<'_, f64>
) -> Py<PyArray<bool, Ix1>>
pub fn contains_many_par(
&self,
py: Python<'_>,
x: PyReadonlyArrayDyn<'_, f64>,
y: PyReadonlyArrayDyn<'_, f64>
) -> Py<PyArray<bool, IxDyn>>
Trait Implementations
sourceimpl Clone for RoaringMask
impl Clone for RoaringMask
sourcefn clone(&self) -> RoaringMask
fn clone(&self) -> RoaringMask
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresourceimpl Debug for RoaringMask
impl Debug for RoaringMask
sourceimpl Default for RoaringMask
impl Default for RoaringMask
sourcefn default() -> RoaringMask
fn default() -> RoaringMask
Returns the “default value” for a type. Read more
sourceimpl IntoPy<Py<PyAny>> for RoaringMask
impl IntoPy<Py<PyAny>> for RoaringMask
sourceimpl PyClass for RoaringMask
impl PyClass for RoaringMask
sourceimpl PyClassImpl for RoaringMask
impl PyClassImpl for RoaringMask
sourceconst IS_BASETYPE: bool = false
const IS_BASETYPE: bool = false
#[pyclass(subclass)]
sourceconst IS_SUBCLASS: bool = false
const IS_SUBCLASS: bool = false
#[pyclass(extends=…)]
sourceconst IS_MAPPING: bool = false
const IS_MAPPING: bool = false
#[pyclass(mapping)]
sourceconst IS_SEQUENCE: bool = false
const IS_SEQUENCE: bool = false
#[pyclass(sequence)]
type Layout = PyCell<RoaringMask>
type Layout = PyCell<RoaringMask>
Layout
type ThreadChecker = ThreadCheckerStub<RoaringMask>
type ThreadChecker = ThreadCheckerStub<RoaringMask>
This handles following two situations: Read more
type PyClassMutability = <<PyAny as PyClassBaseType>::PyClassMutability as PyClassMutability>::MutableChild
type PyClassMutability = <<PyAny as PyClassBaseType>::PyClassMutability as PyClassMutability>::MutableChild
Immutable or mutable
type Dict = PyClassDummySlot
type Dict = PyClassDummySlot
Specify this class has
#[pyclass(dict)]
or not.type WeakRef = PyClassDummySlot
type WeakRef = PyClassDummySlot
Specify this class has
#[pyclass(weakref)]
or not.type BaseNativeType = PyAny
type BaseNativeType = PyAny
The closest native ancestor. This is
PyAny
by default, and when you declare
#[pyclass(extends=PyDict)]
, it’s PyDict
. Read morefn items_iter() -> PyClassItemsIter
fn dict_offset() -> Option<isize>
fn weaklist_offset() -> Option<isize>
sourceimpl<'a, 'py> PyFunctionArgument<'a, 'py> for &'a RoaringMask
impl<'a, 'py> PyFunctionArgument<'a, 'py> for &'a RoaringMask
sourceimpl<'a, 'py> PyFunctionArgument<'a, 'py> for &'a mut RoaringMask
impl<'a, 'py> PyFunctionArgument<'a, 'py> for &'a mut RoaringMask
sourceimpl PyMethods<RoaringMask> for PyClassImplCollector<RoaringMask>
impl PyMethods<RoaringMask> for PyClassImplCollector<RoaringMask>
fn py_methods(self) -> &'static PyClassItems
sourceimpl PyTypeInfo for RoaringMask
impl PyTypeInfo for RoaringMask
type AsRefTarget = PyCell<RoaringMask>
type AsRefTarget = PyCell<RoaringMask>
Utility type to make Py::as_ref work.
sourcefn type_object_raw(py: Python<'_>) -> *mut PyTypeObject
fn type_object_raw(py: Python<'_>) -> *mut PyTypeObject
Returns the PyTypeObject instance for this type.
sourcefn type_object(py: Python<'_>) -> &PyType
fn type_object(py: Python<'_>) -> &PyType
Returns the safe abstraction over the type object.
sourcefn is_type_of(object: &PyAny) -> bool
fn is_type_of(object: &PyAny) -> bool
Checks if
object
is an instance of this type or a subclass of this type.sourcefn is_exact_type_of(object: &PyAny) -> bool
fn is_exact_type_of(object: &PyAny) -> bool
Checks if
object
is an instance of this type.Auto Trait Implementations
impl RefUnwindSafe for RoaringMask
impl Send for RoaringMask
impl Sync for RoaringMask
impl Unpin for RoaringMask
impl UnwindSafe for RoaringMask
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more