pub struct CRS { /* private fields */ }Expand description
Representation of a Coordinate Reference System
Implementations§
Source§impl CRS
impl CRS
Sourcepub fn new(code: &str) -> Result<Self, MyError>
pub fn new(code: &str) -> Result<Self, MyError>
Try constructing a new instance and ensure that CRS has a non-trivial extent of validity which will be later used to validate geometry coordinates.
Sourcepub fn from_epsg(code: NonZero<usize>) -> Result<Self, MyError>
pub fn from_epsg(code: NonZero<usize>) -> Result<Self, MyError>
Construct a new instance from the given code assuming EPSG Authority if it’s a valid one (known by Proj).
Sourcepub fn check_point(&self, coord: &[f64]) -> Result<(), MyError>
pub fn check_point(&self, coord: &[f64]) -> Result<(), MyError>
Check if the given point coordinates are w/in the area-of-validity of this.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for CRS
impl RefUnwindSafe for CRS
impl !Send for CRS
impl !Sync for CRS
impl Unpin for CRS
impl UnwindSafe for CRS
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more