Struct TileData

Source
pub struct TileData {
    pub xyz: Tile,
    pub data: Vec<u8>,
}
Expand description

TileData container with Tile and u8 bytes

Fields§

§xyz: Tile

tile x, y, z

§data: Vec<u8>

tile data

Implementations§

Source§

impl TileData

Source

pub fn new(xyz: Tile, data: Vec<u8>) -> TileData

Create a new TileData

Trait Implementations§

Source§

impl Clone for TileData

Source§

fn clone(&self) -> TileData

Returns a duplicate of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for TileData

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl TileLike for TileData

Source§

fn x(&self) -> u32

x coordinate (column)
Source§

fn y(&self) -> u32

y coordinate (row – flipped for TMS)
Source§

fn z(&self) -> u8

z coordinate (zoom level)
Source§

fn zoom(&self) -> u8

zoom level
Source§

fn yflip(&self) -> u32

x coordinate
Source§

fn flipy(&self) -> u32

both bc I keep forgetting which is which
Source§

fn yup(&self) -> u32

Source§

fn xyz_str_fslash(&self) -> String

Source§

fn zxy_str_fslash(&self) -> String

Source§

fn xyz_str_sep(&self, sep: &str) -> String

Source§

fn zxy_str_sep(&self, sep: &str) -> String

Source§

fn tile(&self) -> Tile

Return Tile struct
Source§

fn valid(&self) -> bool

Return if the tile is valid (x, y is in bounds for zoom level z)
Source§

fn ul(&self) -> LngLat

Return the ul (upper left) corner of the tile
Source§

fn ur(&self) -> LngLat

Return the ur (upper right) corner of the tile
Source§

fn lr(&self) -> LngLat

Return the lr (lower right) corner of the tile
Source§

fn ll(&self) -> LngLat

Return the ll (lower left) corner of the tile
Source§

fn quadkey(&self) -> String

Return the quadkey for the tile
Source§

fn qk(&self) -> String

Return the quadkey for the tile (alias for quadkey)
Source§

fn pmtileid(&self) -> u64

Return the pmtile-id for the tile
Source§

fn pmid(&self) -> u64

Return the pmtile id
Source§

fn row_major_id(&self) -> u64

Return the row major id for the tile
Source§

fn rmid(&self) -> u64

Return the row major id for the tile (alias for row_major_id)
Source§

fn bbox(&self) -> (f64, f64, f64, f64)

Return the geo-bbox tuple for the tile (west, south, east, north)
Source§

fn geobbox(&self) -> BBox

Source§

fn webbbox(&self) -> WebBBox

Source§

fn bbox_string(&self) -> String

Source§

fn center(&self) -> LngLat

Return the center of the tile as a LngLat
Source§

fn json_arr(&self) -> String

Return json array string for tile with spaces after commas
Source§

fn json_arr_min(&self) -> String

Return json array string for tile with no spaces after commas
Source§

fn json_obj(&self) -> String

Return json object string for tile
Source§

fn json(&self) -> String

Return json object string for tile
Source§

fn tuple_string(&self) -> String

Return tuple string for tile (x, y, z)
Source§

fn mbtiles_sql_where(&self) -> String

Return sql WHERE clause for querying mbtiles (y is up)
Source§

fn zbox(&self) -> TileZBox

return zbox for tile-like
Source§

fn children_zbox(&self, depth: Option<u8>) -> TileZBox

Return children-zbox for tile-like at optional depth (default 1)

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.