Trait rasters::geometry::BoundsExt[][src]

pub trait BoundsExt {
    fn area(&self) -> f64;
fn intersect(&self, other: &Self) -> Option<Self>
    where
        Self: Sized
;
fn window_from_bounds(&self, dim: RasterDims) -> RasterWindow; }

Utilities to calculate using Bounds.

Required methods

fn area(&self) -> f64[src]

Compute the area represented by the bounds.

fn intersect(&self, other: &Self) -> Option<Self> where
    Self: Sized
[src]

Compute the intersection of self with another bounds. Returns None if the two regions do not intersect.

fn window_from_bounds(&self, dim: RasterDims) -> RasterWindow[src]

Compute the largest valid RasterWindow within the region (including partial pixels). Returns a window with size (0, 0) if the region is completely outside the bounds.

Arguments

  • bounds - the region
  • dim - the dimensions of the raster
Loading content...

Implementors

impl BoundsExt for Bounds[src]

Loading content...