Expand description
Represents a rectangular boundary of LonLat
points. After building one of these, LonLat
s
can be transformed into Pt2D
s, treating the top-left of the boundary as (0, 0), and growing
to the right and down (screen-drawing order, not Cartesian) in meters.
Fields
min_lon: f64
min_lat: f64
max_lon: f64
max_lat: f64
Implementations
sourceimpl GPSBounds
impl GPSBounds
sourcepub fn get_max_world_pt(&self) -> Pt2D
pub fn get_max_world_pt(&self) -> Pt2D
The bottom-right corner of the boundary, in map-space.
sourcepub fn try_convert(&self, pts: &[LonLat]) -> Option<Vec<Pt2D>>
pub fn try_convert(&self, pts: &[LonLat]) -> Option<Vec<Pt2D>>
Convert all points to map-space, failing if any points are outside this boundary.
sourcepub fn convert(&self, pts: &[LonLat]) -> Vec<Pt2D>ⓘNotable traits for Vec<u8, A>impl<A> Write for Vec<u8, A> where
A: Allocator,
pub fn convert(&self, pts: &[LonLat]) -> Vec<Pt2D>ⓘNotable traits for Vec<u8, A>impl<A> Write for Vec<u8, A> where
A: Allocator,
A: Allocator,
Convert all points to map-space. The points may be outside this boundary.
Trait Implementations
sourceimpl<'de> Deserialize<'de> for GPSBounds
impl<'de> Deserialize<'de> for GPSBounds
sourcefn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error> where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error> where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
impl StructuralPartialEq for GPSBounds
Auto Trait Implementations
impl RefUnwindSafe for GPSBounds
impl Send for GPSBounds
impl Sync for GPSBounds
impl Unpin for GPSBounds
impl UnwindSafe for GPSBounds
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T> ToOwned for T where
T: Clone,
impl<T> ToOwned for T where
T: Clone,
type Owned = T
type Owned = T
The resulting type after obtaining ownership.
sourcefn clone_into(&self, target: &mut T)
fn clone_into(&self, target: &mut T)
🔬 This is a nightly-only experimental API. (
toowned_clone_into
)Uses borrowed data to replace owned data, usually by cloning. Read more