Skip to main content

Topology

Struct Topology 

Source
pub struct Topology {
    pub arc_coords: Vec<Arc>,
    pub ring_refs: Vec<Vec<u32>>,
    pub structure: Vec<Vec<Vec<usize>>>,
}
Expand description

The shared-arc topology itself, before any serialization: this is what the container encoder (encode.rs) consumes. Arc coords are f64 and already RDP-simplified.

Fields§

§arc_coords: Vec<Arc>§ring_refs: Vec<Vec<u32>>

The signed arc refs of each ring (id << 1 | reversed).

§structure: Vec<Vec<Vec<usize>>>

The feature → polygon → ring nesting; the innermost values index into ring_refs.

Implementations§

Source§

impl Topology

Source

pub fn reconstruct( &self, feats: &[Feat], arc_coords: &[Vec<(f64, f64)>], ) -> Vec<Feat>

Reconstructs feature geometry from (possibly re-quantized) arc coords.

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

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

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.