TileFetcher

Trait TileFetcher 

Source
pub trait TileFetcher<P: Clone + Default, D: Clone + Default, T: TileReader<P, D>> {
    // Required methods
    fn new<R: AsRef<Path>>(path: R, threshold: Option<u8>) -> Self;
    fn get_metadata(&self) -> &Metadata;
    fn has_tile_wm(&self, zoom: u8, x: u32, y: u32) -> bool;
    fn has_tile_s2(&self, face: Face, zoom: u8, x: u32, y: u32) -> bool;
    fn get_tile_wm(&self, zoom: u8, x: u32, y: u32) -> T;
    fn get_tile_s2(&self, face: Face, zoom: u8, x: u32, y: u32) -> T;

    // Provided method
    fn is_s2(&self) -> bool { ... }
}
Available on crate feature std only.
Expand description

Tile Fetching Mechanism

Required Methods§

Source

fn new<R: AsRef<Path>>(path: R, threshold: Option<u8>) -> Self

Creates a new file reader from a file path

Source

fn get_metadata(&self) -> &Metadata

Get the Tile Store’s Metadata

Source

fn has_tile_wm(&self, zoom: u8, x: u32, y: u32) -> bool

Check if a WebMercator tile exists

Source

fn has_tile_s2(&self, face: Face, zoom: u8, x: u32, y: u32) -> bool

Check if an S2 Geometry tile exists

Source

fn get_tile_wm(&self, zoom: u8, x: u32, y: u32) -> T

Get a WebMercator tile

Source

fn get_tile_s2(&self, face: Face, zoom: u8, x: u32, y: u32) -> T

Get an S2 Geometry tile

Provided Methods§

Source

fn is_s2(&self) -> bool

Check if it is S2 tile

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§