pub struct NativeTerrain {
pub path: String,
pub gt: [f64; 6],
pub width: usize,
pub height: usize,
pub block: (usize, usize),
pub nodata: Option<f64>,
pub epsg: u32,
pub crs_identity: &'static str,
pub crs_wkt_fnv1a64: Option<String>,
pub query: QueryConvention,
pub policy: NodataPolicy,
pub cache: TileCache,
/* private fields */
}Fields§
§path: String§gt: [f64; 6]§width: usize§height: usize§block: (usize, usize)§nodata: Option<f64>§epsg: u32§crs_identity: &'static str§crs_wkt_fnv1a64: Option<String>§query: QueryConvention§policy: NodataPolicy§cache: TileCacheImplementations§
Source§impl NativeTerrain
impl NativeTerrain
pub fn open( path: &str, expected_epsg: u32, identity: &CrsIdentity, query: QueryConvention, policy: NodataPolicy, cache_budget: u64, ) -> Result<Self, MapError>
pub fn blocks(&self) -> (usize, usize)
Sourcepub fn block_window(&self, bx: usize, by: usize) -> Window
pub fn block_window(&self, bx: usize, by: usize) -> Window
Pixel window of block (bx, by), clipped to the image. Always within one TIFF chunk.
pub fn max_block_bytes(&self) -> u64
Sourcepub fn decoder_transient_bytes_per_load(&self) -> u64
pub fn decoder_transient_bytes_per_load(&self) -> u64
Estimated transient bytes of one concurrent block decode, outside the cache budget:
terrio window buffer, tiff decoded chunk, compressed chunk (assumed <= decoded size) and
the Arc<[f32]> copy (4 x block bytes), plus terrio’s per-read copies of the full chunk
offset and byte-count tables (16 bytes per chunk). From source reading; not measured.
Sourcepub fn get_block(&self, bx: usize, by: usize) -> Result<Arc<[f32]>, MapError>
pub fn get_block(&self, bx: usize, by: usize) -> Result<Arc<[f32]>, MapError>
Shared decoded block through the cache.
Sourcepub fn hit(&self, xs: f64, ys: f64) -> Hit
pub fn hit(&self, xs: f64, ys: f64) -> Hit
Explicit sampling formula: col = floor((xs - gt0)/gt1), row = floor((ys - gt3)/gt5).
Sourcepub fn floor_index(&self, xs: f64, ys: f64) -> Option<(f64, f64)>
pub fn floor_index(&self, xs: f64, ys: f64) -> Option<(f64, f64)>
Floor index along one axis, unclamped (used for footprint planning).
Sourcepub fn classify(&self, v: f32) -> Option<f64>
pub fn classify(&self, v: f32) -> Option<f64>
Applies the explicit nodata policy to a raw terrain value. NaN is dry. An infinite value that is not a dry sentinel is returned as is; the session rejects it with a typed terrain error (matching the caller_buffer rejection of infinite terrain).
pub fn is_sentinel(&self, v: f32) -> bool
pub fn stats(&self) -> TerrainStats
Auto Trait Implementations§
impl !Freeze for NativeTerrain
impl RefUnwindSafe for NativeTerrain
impl Send for NativeTerrain
impl Sync for NativeTerrain
impl Unpin for NativeTerrain
impl UnsafeUnpin for NativeTerrain
impl UnwindSafe for NativeTerrain
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
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> ⓘ
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> ⓘ
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