pub struct SpatialInfo {
pub bounds: (f64, f64, f64, f64),
pub crs: Option<u32>,
pub resolution: Option<(f64, f64)>,
pub zoom_level: Option<u8>,
}Expand description
Spatial information for geospatial caching
Fields§
§bounds: (f64, f64, f64, f64)Bounding box: (min_x, min_y, max_x, max_y)
crs: Option<u32>Coordinate reference system (EPSG code)
resolution: Option<(f64, f64)>Resolution in CRS units
zoom_level: Option<u8>Zoom level for tile caching
Implementations§
Source§impl SpatialInfo
impl SpatialInfo
Sourcepub fn with_resolution(self, res_x: f64, res_y: f64) -> Self
pub fn with_resolution(self, res_x: f64, res_y: f64) -> Self
Sets the resolution
Sourcepub fn with_zoom_level(self, zoom: u8) -> Self
pub fn with_zoom_level(self, zoom: u8) -> Self
Sets the zoom level
Sourcepub fn intersects(&self, other: &SpatialInfo) -> bool
pub fn intersects(&self, other: &SpatialInfo) -> bool
Checks if this bounding box intersects with another
Sourcepub fn contains_point(&self, x: f64, y: f64) -> bool
pub fn contains_point(&self, x: f64, y: f64) -> bool
Checks if this bounding box contains a point
Trait Implementations§
Source§impl Clone for SpatialInfo
impl Clone for SpatialInfo
Source§fn clone(&self) -> SpatialInfo
fn clone(&self) -> SpatialInfo
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for SpatialInfo
impl RefUnwindSafe for SpatialInfo
impl Send for SpatialInfo
impl Sync for SpatialInfo
impl Unpin for SpatialInfo
impl UnsafeUnpin for SpatialInfo
impl UnwindSafe for SpatialInfo
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreCreates a shared type from an unshared type.