Coord

Struct Coord 

Source
pub struct Coord { /* private fields */ }
Expand description

Represent a coordinate. The first float is the longitude, or x, and the second is the latitude, or y.

Implementations§

Source§

impl<'a> Coord

Source

pub unsafe fn from_bytes(data: &'a [u8]) -> &'a Self

§Safety

The data must be aligned on 64 bits and contain an two number of f64.

Source

pub unsafe fn from_slice(data: &[f64]) -> &Self

§Safety

The data must contain two f64.

Source

pub unsafe fn from_slice_mut(data: &mut [f64]) -> &mut Self

§Safety

The data must be aligned on 64 bits and contain an even number of f64.

Source

pub fn lng(&self) -> f64

Return the longitude

Source

pub fn lng_mut(&mut self) -> &mut f64

Return a mutable ref to the longitude

Source

pub fn lat(&self) -> f64

Return the latitude

Source

pub fn lat_mut(&mut self) -> &mut f64

Return a mutable ref to the latitude

Source

pub fn x(&self) -> f64

Return x

Source

pub fn y(&self) -> f64

Return y

Source

pub fn to_geo(&self) -> Coord<f64>

Convert the Coord to a geo_types::Coord

Trait Implementations§

Source§

impl Debug for Coord

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl RelationBetweenShapes<Coord> for BoundingBox

Source§

fn relation(&self, other: &Coord, relation: InputRelation) -> OutputRelation

Return the relation between two shapes. The InputRelation lets you specify the kind of relation you want to retrieve. Read more
Source§

fn all_relation(&self, other: &Other) -> OutputRelation

Return all relations with no early return.
Source§

fn any_relation(&self, other: &Other) -> OutputRelation

Return the first relation we find with early return.
Source§

fn contains(&self, other: &Other) -> bool

Return true if Self contains Other.
Source§

fn strict_contains(&self, other: &Other) -> bool

Return true if Self strictly contains Other.
Source§

fn contained(&self, other: &Other) -> bool

Return true if Self is contained in Other.
Source§

fn strict_contained(&self, other: &Other) -> bool

Return true if Self is strictly contained in Other.
Source§

fn intersects(&self, other: &Other) -> bool

Return true if Self intersects with Other.
Source§

fn disjoint(&self, other: &Other) -> bool

Return true if Self is disjoint of Other.
Source§

impl<'a> RelationBetweenShapes<Coord> for Zolygon<'a>

Source§

fn relation(&self, other: &Coord, relation: InputRelation) -> OutputRelation

Return the relation between two shapes. The InputRelation lets you specify the kind of relation you want to retrieve. Read more
Source§

fn all_relation(&self, other: &Other) -> OutputRelation

Return all relations with no early return.
Source§

fn any_relation(&self, other: &Other) -> OutputRelation

Return the first relation we find with early return.
Source§

fn contains(&self, other: &Other) -> bool

Return true if Self contains Other.
Source§

fn strict_contains(&self, other: &Other) -> bool

Return true if Self strictly contains Other.
Source§

fn contained(&self, other: &Other) -> bool

Return true if Self is contained in Other.
Source§

fn strict_contained(&self, other: &Other) -> bool

Return true if Self is strictly contained in Other.
Source§

fn intersects(&self, other: &Other) -> bool

Return true if Self intersects with Other.
Source§

fn disjoint(&self, other: &Other) -> bool

Return true if Self is disjoint of Other.

Auto Trait Implementations§

§

impl Freeze for Coord

§

impl RefUnwindSafe for Coord

§

impl Send for Coord

§

impl !Sized for Coord

§

impl Sync for Coord

§

impl Unpin for Coord

§

impl UnwindSafe for Coord

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more