[−][src]Struct tile_grid::Grid
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]
width: u16,
height: u16,
extent: Extent,
srid: i32,
units: Unit,
resolutions: Vec<f64>,
origin: Origin
) -> Grid
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
Auto Trait Implementations
impl Sync for Grid
impl Send for Grid
impl Unpin for Grid
impl RefUnwindSafe for Grid
impl UnwindSafe for Grid
Blanket Implementations
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,