[][src]Struct h3ron_ndarray::transform::Transform

pub struct Transform { /* fields omitted */ }

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.

impl Mul<&'_ Rect<f64>> for &Transform[src]

apply the transformation to a rect

type Output = Rect<f64>

The resulting type after applying the * operator.

impl PartialEq<Transform> for Transform[src]

impl StructuralPartialEq for Transform[src]

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> Pointable for T

type Init = T

The type for initializers.

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.