[−][src]Struct h3ron_ndarray::transform::Transform
affine geotransfrom
ported from affine library (used by rasterio) https://github.com/sgillies/affine/blob/master/affine/init.py
a, b, c, d, e, f : float Coefficients of an augmented affine transformation matrix | x' | | a b c | | x | | y' | = | d e f | | y | | 1 | | 0 0 1 | | 1 |
a
, b
, and c
are the elements of the first row of the matrix. d
, e
, and f
are the elements of the second row.
other sources:
- GDAL geotransform: https://gdal.org/tutorials/geotransforms_tut.html
- rasterio 1.0+ vs. GDAL: https://rasterio.readthedocs.io/en/latest/topics/migrating-to-v1.html#affine-affine-vs-gdal-style-geotransforms
Implementations
impl Transform
[src]
pub fn new(a: f64, b: f64, c: f64, d: f64, e: f64, f: f64) -> Self
[src]
pub fn from_rasterio(transform: &[f64; 6]) -> Self
[src]
create from an f64 slice in the ordering used by rasterio
pub fn from_gdal(transform: &[f64; 6]) -> Self
[src]
create from an f64 slice in the ordering used by gdal
pub fn determinant(&self) -> f64
[src]
The determinant of the transform matrix
pub fn is_degenerate(&self) -> bool
[src]
True if this transform is degenerate.
Which means that it will collapse a shape to an effective area of zero. Degenerate transforms cannot be inverted.
pub fn invert(&self) -> Result<Self, Error>
[src]
Trait Implementations
impl Clone for Transform
[src]
impl Debug for Transform
[src]
impl Mul<&'_ Coordinate<f64>> for &Transform
[src]
apply the transformation to a coordinate
type Output = Coordinate<f64>
The resulting type after applying the *
operator.
pub fn mul(self, rhs: &Coordinate<f64>) -> Self::Output
[src]
impl Mul<&'_ Rect<f64>> for &Transform
[src]
apply the transformation to a rect
type Output = Rect<f64>
The resulting type after applying the *
operator.
pub fn mul(self, rhs: &Rect<f64>) -> Self::Output
[src]
impl PartialEq<Transform> for Transform
[src]
impl StructuralPartialEq for Transform
[src]
Auto Trait Implementations
impl RefUnwindSafe for Transform
[src]
impl Send for Transform
[src]
impl Sync for Transform
[src]
impl Unpin for Transform
[src]
impl UnwindSafe for Transform
[src]
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> Pointable for T
pub const ALIGN: usize
type Init = T
The type for initializers.
pub unsafe fn init(init: <T as Pointable>::Init) -> usize
pub unsafe fn deref<'a>(ptr: usize) -> &'a T
pub unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T
pub unsafe fn drop(ptr: usize)
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
pub fn to_owned(&self) -> T
[src]
pub fn clone_into(&self, target: &mut T)
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,