Struct slippy_map_tiles::BBox
[−]
[src]
pub struct BBox { /* fields omitted */ }
A Bounding box
Methods
impl BBox
[src]
fn new(top: f32, left: f32, bottom: f32, right: f32) -> Option<BBox>
[src]
Construct a new BBox from the given max and min latitude and longitude. Returns None
if
the lat or lon is invalid, e.g. a lon of 200
fn new_from_string(string: &str) -> Option<BBox>
[src]
Given a string like "$MINLON $MINLAT $MAXLON $MAXLAT" parse that into a BBox. Returns None if there is no match.
fn new_from_points(topleft: &LatLon, bottomright: &LatLon) -> BBox
[src]
Given two points, return the bounding box specified by those 2 points
fn new_from_tile(tile: &Tile) -> Self
[src]
Construct a BBox from a tile
fn contains_point(&self, point: &LatLon) -> bool
[src]
Return true iff this point is in this bbox
fn overlaps_bbox(&self, other: &BBox) -> bool
[src]
Returns true iff this bbox and other
share at least one point
fn tiles(&self) -> BBoxTilesIterator
[src]
Iterate over all the tiles from z0 onwards that this bbox is in
fn metatiles(&self, scale: u8) -> MetatilesIterator
[src]
Iterate over all the metatiles from z0 onwards that this bbox is in
fn top(&self) -> f32
[src]
Return the top value of this bbox
fn bottom(&self) -> f32
[src]
Return the bottom value of this bbox
fn left(&self) -> f32
[src]
Return the left value of this bbox
fn right(&self) -> f32
[src]
Return the right value of this bbox
Trait Implementations
impl PartialEq for BBox
[src]
fn eq(&self, __arg_0: &BBox) -> bool
[src]
This method tests for self
and other
values to be equal, and is used by ==
. Read more
fn ne(&self, __arg_0: &BBox) -> bool
[src]
This method tests for !=
.