Trait TileLike

Source
pub trait TileLike {
Show 36 methods // Required methods fn x(&self) -> u32; fn y(&self) -> u32; fn z(&self) -> u8; // Provided methods fn zoom(&self) -> u8 { ... } fn yflip(&self) -> u32 { ... } fn flipy(&self) -> u32 { ... } fn yup(&self) -> u32 { ... } fn xyz_str_fslash(&self) -> String { ... } fn zxy_str_fslash(&self) -> String { ... } fn xyz_str_sep(&self, sep: &str) -> String { ... } fn zxy_str_sep(&self, sep: &str) -> String { ... } fn tile(&self) -> Tile { ... } fn valid(&self) -> bool { ... } fn ul(&self) -> LngLat { ... } fn ur(&self) -> LngLat { ... } fn lr(&self) -> LngLat { ... } fn ll(&self) -> LngLat { ... } fn quadkey(&self) -> String { ... } fn qk(&self) -> String { ... } fn pmtileid(&self) -> u64 { ... } fn pmid(&self) -> u64 { ... } fn row_major_id(&self) -> u64 { ... } fn rmid(&self) -> u64 { ... } fn bbox(&self) -> (f64, f64, f64, f64) { ... } fn geobbox(&self) -> BBox { ... } fn webbbox(&self) -> WebBBox { ... } fn bbox_string(&self) -> String { ... } fn center(&self) -> LngLat { ... } fn json_arr(&self) -> String { ... } fn json_arr_min(&self) -> String { ... } fn json_obj(&self) -> String { ... } fn json(&self) -> String { ... } fn tuple_string(&self) -> String { ... } fn mbtiles_sql_where(&self) -> String { ... } fn zbox(&self) -> TileZBox { ... } fn children_zbox(&self, depth: Option<u8>) -> TileZBox { ... }
}
Expand description

Trait def for tile-like objects/structs/things/whatevers

Required Methods§

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)

Provided Methods§

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)

Implementors§