pub struct TileZBox {
pub zoom: u8,
pub min: Point2d<u32>,
pub max: Point2d<u32>,
}Expand description
A struct representing a bbox of tiles at a specific zoom level
Fields§
§zoom: u8§min: Point2d<u32>§max: Point2d<u32>Implementations§
Source§impl TileZBox
impl TileZBox
Sourcepub const fn new(
min_x: u32,
max_x: u32,
min_y: u32,
max_y: u32,
zoom: u8,
) -> Self
pub const fn new( min_x: u32, max_x: u32, min_y: u32, max_y: u32, zoom: u8, ) -> Self
Create a new TileZBox
pub const fn dx(&self) -> u32
pub const fn width(&self) -> u32
pub const fn dy(&self) -> u32
pub const fn height(&self) -> u32
pub const fn dxdy(&self) -> (u32, u32)
Sourcepub const fn dimensions(&self) -> (u32, u32)
pub const fn dimensions(&self) -> (u32, u32)
Return dimensions of the TileZBox
Sourcepub fn flipy(&self) -> Self
pub fn flipy(&self) -> Self
Return a new TileZBox with the y values flipped for the given zoom level
Sourcepub fn contains_tile<T: TileLike>(&self, tile: &T) -> bool
pub fn contains_tile<T: TileLike>(&self, tile: &T) -> bool
Return whether the TileZBox contains the given tile-like input
Sourcepub fn mbtiles_sql_where_prefix(&self, prefix: Option<&str>) -> String
pub fn mbtiles_sql_where_prefix(&self, prefix: Option<&str>) -> String
Return the SQL WHERE clause for tms mbtiles like db with optional prefix for column names
Sourcepub fn mbtiles_sql_where(&self) -> String
pub fn mbtiles_sql_where(&self) -> String
Return the SQL WHERE clause for an mbtiles database
Sourcepub fn from_tiles(tiles: &[Tile]) -> UtilesCoreResult<Self>
pub fn from_tiles(tiles: &[Tile]) -> UtilesCoreResult<Self>
Returns zbox struct from ref to array of tiles
§Errors
Error when there are no tiles in the array or zoom level(s) of tiles do not match
Sourcepub const fn zoom_depth(&self, depth: u8) -> Self
pub const fn zoom_depth(&self, depth: u8) -> Self
Return new zbox one zoom level lower/up z3 -> z2
Trait Implementations§
impl Copy for TileZBox
impl Eq for TileZBox
Source§impl From<TileZBox> for TileZBoxIterator
impl From<TileZBox> for TileZBoxIterator
Source§impl From<TileZBox> for TileZBoxes
impl From<TileZBox> for TileZBoxes
Source§impl IntoIterator for TileZBox
impl IntoIterator for TileZBox
impl StructuralPartialEq for TileZBox
Auto Trait Implementations§
impl Freeze for TileZBox
impl RefUnwindSafe for TileZBox
impl Send for TileZBox
impl Sync for TileZBox
impl Unpin for TileZBox
impl UnsafeUnpin for TileZBox
impl UnwindSafe for TileZBox
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.