pub struct MapConversion { /* private fields */ }Expand description
How a source’s coordinates map onto a map coordinate reference system.
Implementations§
Source§impl MapConversion
impl MapConversion
Sourcepub fn try_new(
target: Option<String>,
offset: [f64; 3],
x_axis: [f64; 2],
scale: f64,
metres_per_map_unit: Option<f64>,
) -> Result<Self, CoordinateSystemError>
pub fn try_new( target: Option<String>, offset: [f64; 3], x_axis: [f64; 2], scale: f64, metres_per_map_unit: Option<f64>, ) -> Result<Self, CoordinateSystemError>
A map conversion.
offset is easting, northing and orthogonal height in the map’s unit;
x_axis is the direction of the source’s X axis in the map’s plan
(abscissa, ordinate) and is normalized; scale is the factor from
source to map lengths. metres_per_map_unit is None when the map’s
unit is not stated or cannot be resolved exactly, never a guess.
Sourcepub fn target(&self) -> Option<&str>
pub fn target(&self) -> Option<&str>
The name of the target map coordinate reference system, when stated.
Sourcepub fn metres_per_map_unit(&self) -> Option<f64>
pub fn metres_per_map_unit(&self) -> Option<f64>
Metres per map unit, or None when the unit is not known exactly.
Sourcepub fn offset_metres(&self) -> Option<[f64; 3]>
pub fn offset_metres(&self) -> Option<[f64; 3]>
The offset in metres, when the map’s unit is known.
Trait Implementations§
Source§impl Clone for MapConversion
impl Clone for MapConversion
Source§impl Debug for MapConversion
impl Debug for MapConversion
Source§impl PartialEq for MapConversion
impl PartialEq for MapConversion
impl StructuralPartialEq for MapConversion
Auto Trait Implementations§
impl Freeze for MapConversion
impl RefUnwindSafe for MapConversion
impl Send for MapConversion
impl Sync for MapConversion
impl Unpin for MapConversion
impl UnsafeUnpin for MapConversion
impl UnwindSafe for MapConversion
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