Struct tile_grid::Grid [−][src]
Tile grid
Fields
extent: ExtentThe 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: i32Spatial reference system (PostGIS SRID).
units: UnitGrid units
origin: OriginGrid origin
Implementations
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 RefUnwindSafe for Grid[src]
impl Send for Grid[src]
impl Sync for Grid[src]
impl Unpin for Grid[src]
impl UnwindSafe for Grid[src]
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized, [src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized, [src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized, [src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T[src]
impl<T> From<T> for T[src]
impl<T, U> Into<U> for T where
U: From<T>, [src]
U: From<T>,
impl<T> ToOwned for T where
T: Clone, [src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
pub fn to_owned(&self) -> T[src]
pub fn clone_into(&self, target: &mut T)[src]
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.
pub 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>,