pub struct Proj { /* private fields */ }Expand description
Lightweight compatibility facade for downstream code that currently expects
a proj::Proj-like flow:
- parse a CRS definition with
Proj::new - build a CRS-to-CRS transform with
Proj::create_crs_to_crs_from_pj - convert coordinates with
Proj::convert
Implementations§
Source§impl Proj
impl Proj
Sourcepub fn new(definition: &str) -> Result<Self>
pub fn new(definition: &str) -> Result<Self>
Parse a single CRS definition in any supported format.
Sourcepub fn new_known_crs(from: &str, to: &str, _area: Option<&str>) -> Result<Self>
pub fn new_known_crs(from: &str, to: &str, _area: Option<&str>) -> Result<Self>
Build a transform directly from two CRS strings.
Sourcepub fn create_crs_to_crs_from_pj(
&self,
target: &Self,
_area: Option<&str>,
_options: Option<&str>,
) -> Result<Self>
pub fn create_crs_to_crs_from_pj( &self, target: &Self, _area: Option<&str>, _options: Option<&str>, ) -> Result<Self>
Build a transform from two parsed CRS definitions.
Sourcepub fn convert<T: Transformable>(&self, coord: T) -> Result<T>
pub fn convert<T: Transformable>(&self, coord: T) -> Result<T>
Transform a coordinate using a CRS-to-CRS transform.
Sourcepub fn convert_3d<T: Transformable3D>(&self, coord: T) -> Result<T>
pub fn convert_3d<T: Transformable3D>(&self, coord: T) -> Result<T>
Transform a 3D coordinate using a CRS-to-CRS transform.
Sourcepub fn convert_coord(&self, coord: Coord) -> Result<Coord>
pub fn convert_coord(&self, coord: Coord) -> Result<Coord>
Transform a coordinate using the native Coord type.
Auto Trait Implementations§
impl Freeze for Proj
impl !RefUnwindSafe for Proj
impl Send for Proj
impl Sync for Proj
impl Unpin for Proj
impl UnsafeUnpin for Proj
impl !UnwindSafe for Proj
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> 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