pub struct QuantAffine {
pub x0: f64,
pub y0: f64,
pub sx: f64,
pub sy: f64,
pub z0: Option<f64>,
pub sz: Option<f64>,
}Expand description
Per-layer coordinate-quantization affine. Coordinates ship as i32 grid
indices; the decoder reconstructs lon = x0 + qx*sx, lat = y0 + qy*sy.
sx/sy (degrees per quantum) are sized from a target ground precision in
meters at the layer’s mid-latitude, so the worst-case error is ≤ half a
quantum (~meters/2). This trades GeoArrow self-describing Float64 for size
(coords are the dominant, near-incompressible column) and is opt-in.
Fields§
§x0: f64§y0: f64§sx: f64§sy: f64§z0: Option<f64>Z-axis origin/step (metres), present ONLY for 3D point geometry
(FixedSizeList<i32,3>). None ⇒ plain 2D coords, byte-identical to the
historical affine (the z0/sz keys are simply omitted from the JSON).
sz: Option<f64>Implementations§
Source§impl QuantAffine
impl QuantAffine
Sourcepub fn from_json(s: &str) -> Option<QuantAffine>
pub fn from_json(s: &str) -> Option<QuantAffine>
Parse the affine from its STT_QUANT_META_KEY JSON value. The TS
reader applies the identical reconstruction (tile.ts).
Trait Implementations§
Source§impl Clone for QuantAffine
impl Clone for QuantAffine
Source§fn clone(&self) -> QuantAffine
fn clone(&self) -> QuantAffine
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreimpl Copy for QuantAffine
Source§impl Debug for QuantAffine
impl Debug for QuantAffine
Source§impl PartialEq for QuantAffine
impl PartialEq for QuantAffine
Source§fn eq(&self, other: &QuantAffine) -> bool
fn eq(&self, other: &QuantAffine) -> bool
Tests for
self and other values to be equal, and is used by ==.impl StructuralPartialEq for QuantAffine
Auto Trait Implementations§
impl Freeze for QuantAffine
impl RefUnwindSafe for QuantAffine
impl Send for QuantAffine
impl Sync for QuantAffine
impl Unpin for QuantAffine
impl UnsafeUnpin for QuantAffine
impl UnwindSafe for QuantAffine
Blanket Implementations§
impl<T> Allocation for T
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> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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>
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