Struct rsgeo::prelude::RecArea[][src]

pub struct RecArea { /* fields omitted */ }

represent a rectangle area


impl RecArea[src]

pub fn new(
    min_lat: f32,
    max_lat: f32,
    min_long: f32,
    max_long: f32
) -> Result<Self, &'static str>

Create a new RecArea.The latitude and longitude should be valid,otherwise.

Trait Implementations

impl Area for RecArea[src]

fn contains(&self, p: &Point) -> bool[src]

judge if a point in a rectangle area


use rsgeo::prelude::{RecArea,Point,Area};
let ra = RecArea::new(35.0, 36.0, 110.0, 115.0).unwrap();
let pa = Point::new(32.0,112.0).unwrap();
let pb = Point::new(35.1,112.0).unwrap();

impl Debug for RecArea[src]

Auto Trait Implementations

impl RefUnwindSafe for RecArea

impl Send for RecArea

impl Sync for RecArea

impl Unpin for RecArea

impl UnwindSafe for RecArea

Blanket Implementations

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

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

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

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.