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 fn new(min_x: u32, max_x: u32, min_y: u32, max_y: u32, zoom: u8) -> Self
pub fn new(min_x: u32, max_x: u32, min_y: u32, max_y: u32, zoom: u8) -> Self
Create a new TileZBox
pub fn dx(&self) -> u32
pub fn width(&self) -> u32
pub fn dy(&self) -> u32
pub fn height(&self) -> u32
pub fn dxdy(&self) -> (u32, u32)
Sourcepub fn dimensions(&self) -> (u32, u32)
pub 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 fn zoom_depth(&self, depth: u8) -> Self
pub fn zoom_depth(&self, depth: u8) -> Self
Return new zbox one zoom level lower/up z3 -> z2
Trait Implementations§
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 Copy 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 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