pub struct RasterInfoBuilder { /* private fields */ }Expand description
Builder for a RasterInfo instance.
If extent is not provided, it can be inferred from the geo::Geometry when building it.
In this case, a half-pixel buffer is applied to avoid missing points on the border.
The logics dictating the final spatial properties of the rasterized geometries follow those of GDAL.
Implementations§
Source§impl RasterInfoBuilder
impl RasterInfoBuilder
pub fn new() -> Self
Sourcepub fn build(self) -> RusterizeResult<RasterInfo>
pub fn build(self) -> RusterizeResult<RasterInfo>
Build into a RasterInfo with user-defined extent.
Sourcepub fn build_with(self, geoms: &[Geometry<f64>]) -> RusterizeResult<RasterInfo>
pub fn build_with(self, geoms: &[Geometry<f64>]) -> RusterizeResult<RasterInfo>
Same as build, but infer extent from the geometry.
pub fn shape(self, nrows: usize, ncols: usize) -> Self
pub fn extent(self, xmin: f64, ymin: f64, xmax: f64, ymax: f64) -> Self
pub fn resolution(self, xres: f64, yres: f64) -> Self
pub fn with_target_align_pixel(self) -> Self
pub fn epsg(self, epsg: u16) -> Self
Trait Implementations§
Source§impl Default for RasterInfoBuilder
impl Default for RasterInfoBuilder
Source§fn default() -> RasterInfoBuilder
fn default() -> RasterInfoBuilder
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for RasterInfoBuilder
impl RefUnwindSafe for RasterInfoBuilder
impl Send for RasterInfoBuilder
impl Sync for RasterInfoBuilder
impl Unpin for RasterInfoBuilder
impl UnsafeUnpin for RasterInfoBuilder
impl UnwindSafe for RasterInfoBuilder
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
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