pub struct Affine {
pub x_scale: f64,
pub x_skew: f64,
pub x_origin: f64,
pub y_skew: f64,
pub y_scale: f64,
pub y_origin: f64,
}Expand description
Affine transform from (row, col) pixel indices to world (x, y) coordinates.
The fields follow the rasterio/affine tuple order (a, b, c, d, e, f), i.e.
tuple(transform)[:6] in Python, not GDAL’s GetGeoTransform order:
x = a * col + b * row + c and y = d * col + e * row + f.
Projected coordinates are in metres; geographic coordinates are longitude (x) and
latitude (y) in degrees.
Fields§
§x_scale: f64Pixel width (a).
x_skew: f64Rotation/skew term (b), usually 0.
x_origin: f64Top-left corner X (c).
y_skew: f64Rotation/skew term (d), usually 0.
y_scale: f64Pixel height (e), negative if north-up.
y_origin: f64Top-left corner Y (f).
Implementations§
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Affine
impl RefUnwindSafe for Affine
impl Send for Affine
impl Sync for Affine
impl Unpin for Affine
impl UnsafeUnpin for Affine
impl UnwindSafe for Affine
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> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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