Struct roaring_landmask::RoaringLandmask
source · [−]pub struct RoaringLandmask {
pub mask: RoaringMask,
pub shapes: Gshhg,
}
Fields
mask: RoaringMask
shapes: Gshhg
Implementations
sourceimpl RoaringLandmask
impl RoaringLandmask
pub fn new() -> Result<RoaringLandmask>
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
Returns true
if the point is on land or close to the shore.
pub fn contains_many_par(
&self,
py: Python<'_>,
x: PyReadonlyArrayDyn<'_, f64>,
y: PyReadonlyArrayDyn<'_, f64>
) -> Py<PyArray<bool, IxDyn>>
Trait Implementations
sourceimpl IntoPy<Py<PyAny>> for RoaringLandmask
impl IntoPy<Py<PyAny>> for RoaringLandmask
sourceimpl PyClass for RoaringLandmask
impl PyClass for RoaringLandmask
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 more
sourceimpl PyClassImpl for RoaringLandmask
impl PyClassImpl for RoaringLandmask
sourceconst IS_BASETYPE: bool
const IS_BASETYPE: bool
#[pyclass(subclass)]
sourceconst IS_SUBCLASS: bool
const IS_SUBCLASS: bool
#[pyclass(extends=…)]
type ThreadChecker = ThreadCheckerStub<RoaringLandmask>
type ThreadChecker = ThreadCheckerStub<RoaringLandmask>
This handles following two situations: Read more
fn for_all_items(visitor: &mut dyn FnMut(&PyClassItems))
fn dict_offset() -> Option<isize>
fn weaklist_offset() -> Option<isize>
sourceimpl PyMethods<RoaringLandmask> for PyClassImplCollector<RoaringLandmask>
impl PyMethods<RoaringLandmask> for PyClassImplCollector<RoaringLandmask>
fn py_methods(self) -> &'static PyClassItems
sourceimpl PyTypeInfo for RoaringLandmask
impl PyTypeInfo for RoaringLandmask
type AsRefTarget = PyCell<Self>
type AsRefTarget = PyCell<Self>
Utility type to make Py::as_ref work.
sourcefn type_object_raw(py: Python<'_>) -> *mut PyTypeObject
fn type_object_raw(py: Python<'_>) -> *mut PyTypeObject
PyTypeObject instance for this type.
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 RoaringLandmask
impl Send for RoaringLandmask
impl Sync for RoaringLandmask
impl Unpin for RoaringLandmask
impl UnwindSafe for RoaringLandmask
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
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
impl<T> Pointable for T
impl<T> Pointable for T
sourceimpl<T> PyTypeObject for T where
T: PyTypeInfo,
impl<T> PyTypeObject for T where
T: PyTypeInfo,
sourcefn type_object(py: Python<'_>) -> &PyType
fn type_object(py: Python<'_>) -> &PyType
Returns the safe abstraction over the type object.