[][src]Struct tile_grid::Grid

pub struct Grid {
    pub extent: Extent,
    pub srid: i32,
    pub units: Unit,
    pub origin: Origin,
    // some fields omitted
}

Tile grid

Fields

extent: Extent

The geographical extent covered by the grid, in ground units (e.g. meters, degrees, feet, etc.). Must be specified as 4 floating point numbers ordered as minx, miny, maxx, maxy. The (minx,miny) point defines the origin of the grid, i.e. the pixel at the bottom left of the bottom-left most tile is always placed on the (minx,miny) geographical point. The (maxx,maxy) point is used to determine how many tiles there are for each zoom level.

srid: i32

Spatial reference system (PostGIS SRID).

units: Unit

Grid units

origin: Origin

Grid origin

Methods

impl Grid[src]

pub fn wgs84() -> Grid[src]

WGS84 grid

pub fn web_mercator() -> Grid[src]

Web Mercator grid (Google maps compatible)

pub fn new(
    width: u16,
    height: u16,
    extent: Extent,
    srid: i32,
    units: Unit,
    resolutions: Vec<f64>,
    origin: Origin
) -> Grid
[src]

pub fn nlevels(&self) -> u8[src]

pub fn maxzoom(&self) -> u8[src]

pub fn pixel_width(&self, zoom: u8) -> f64[src]

pub fn scale_denominator(&self, zoom: u8) -> f64[src]

pub fn tile_extent(&self, xtile: u32, ytile: u32, zoom: u8) -> Extent[src]

Extent of a given tile in the grid given its x, y, and z in TMS adressing scheme

pub fn ytile_from_xyz(&self, ytile: u32, zoom: u8) -> u32[src]

reverse y tile for XYZ adressing scheme

pub fn tile_extent_xyz(&self, xtile: u32, ytile: u32, zoom: u8) -> Extent[src]

Extent of a given tile in XYZ adressing scheme

pub fn tile_limits(&self, extent: Extent, tolerance: i32) -> Vec<ExtentInt>[src]

Tile index limits covering extent

Trait Implementations

impl Debug for Grid[src]

Auto Trait Implementations

impl Sync for Grid

impl Unpin for Grid

impl Send for Grid

impl UnwindSafe for Grid

impl RefUnwindSafe for Grid

Blanket Implementations

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> From<T> for T[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

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

The type returned in the event of a conversion error.

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> Any for T where
    T: 'static + ?Sized
[src]