pub struct GeometryValues { /* private fields */ }Expand description
Parsed (decoded) geometry data
Implementations§
Source§impl GeometryValues
impl GeometryValues
pub fn feature_count(&self) -> usize
Sourcepub fn vector_types(&self) -> &[GeometryType]
pub fn vector_types(&self) -> &[GeometryType]
Geometry types for each feature, in insertion order.
Sourcepub fn geometry_offsets(&self) -> Option<&[u32]>
pub fn geometry_offsets(&self) -> Option<&[u32]>
Cumulative offsets into part_offsets for multi-geometry types.
None when no multi-geometry features are present.
Sourcepub fn part_offsets(&self) -> Option<&[u32]>
pub fn part_offsets(&self) -> Option<&[u32]>
Cumulative offsets into ring_offsets (or directly into vertices
for LineString layers without rings).
None for pure Point layers.
Sourcepub fn ring_offsets(&self) -> Option<&[u32]>
pub fn ring_offsets(&self) -> Option<&[u32]>
Cumulative offsets into the vertex buffer (counting whole vertices).
None when no ring-level indirection is needed.
Sourcepub fn index_buffer(&self) -> Option<&[u32]>
pub fn index_buffer(&self) -> Option<&[u32]>
Triangle index buffer produced by Earcut tessellation, three indices per triangle.
Each index names a vertex of the whole layer, so the buffer can go to a GPU as is.
None unless the GeometryValues was created with Self::new_tessellated.
Sourcepub fn triangle_offsets(&self) -> Option<&[u32]>
pub fn triangle_offsets(&self) -> Option<&[u32]>
Cumulative triangle counts, one run per polygon feature, starting at 0.
None unless the GeometryValues was created with Self::new_tessellated.
Sourcepub fn vertices(&self) -> Option<&[i32]>
pub fn vertices(&self) -> Option<&[i32]>
Flat vertex buffer in tile coordinates: [x0, y0, x1, y1, …], or [x0, y0, z0, …] when [Self::z_step] is set.
Sourcepub fn stride(&self) -> usize
pub fn stride(&self) -> usize
How many words of Self::vertices each vertex takes.
Sourcepub fn vertex_range(&self, index: usize) -> MltResult<Range<usize>>
pub fn vertex_range(&self, index: usize) -> MltResult<Range<usize>>
The range of the layer’s vertex sequence that feature index owns.
The sequence is every vertex of every feature in feature order, which is what the vertex buffer holds and what an m-value column runs over. A ring’s closing vertex is not stored, so it is not in the range either.
Sourcepub fn vertex_count(&self, index: usize) -> MltResult<usize>
pub fn vertex_count(&self, index: usize) -> MltResult<usize>
How many vertices feature index owns, see Self::vertex_range.
Source§impl GeometryValues
impl GeometryValues
Sourcepub fn new_tessellated() -> Self
pub fn new_tessellated() -> Self
Returns a GeometryValues with its triangle offsets pre-initialized.
When they are Some, polygon push methods automatically compute and store
Earcut tessellation data as geometries are added.
Use Self::default when tessellation is not required.
Trait Implementations§
Source§impl Analyze for GeometryValues
impl Analyze for GeometryValues
fn collect_statistic(&self, stat: StatType) -> usize
Source§fn for_each_stream(&self, _cb: &mut dyn FnMut(StreamMeta))
fn for_each_stream(&self, _cb: &mut dyn FnMut(StreamMeta))
cb with the StreamMeta of every stream contained in self.
Default implementation is a no-op (types that hold no streams).Source§impl Clone for GeometryValues
impl Clone for GeometryValues
Source§impl Debug for GeometryValues
impl Debug for GeometryValues
Source§impl Default for GeometryValues
impl Default for GeometryValues
impl Eq for GeometryValues
Source§impl PartialEq for GeometryValues
impl PartialEq for GeometryValues
impl StructuralPartialEq for GeometryValues
Auto Trait Implementations§
impl Freeze for GeometryValues
impl RefUnwindSafe for GeometryValues
impl Send for GeometryValues
impl Sync for GeometryValues
impl Unpin for GeometryValues
impl UnsafeUnpin for GeometryValues
impl UnwindSafe for GeometryValues
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> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<T> FmtForward for T
impl<T> FmtForward for T
Source§fn fmt_binary(self) -> FmtBinary<Self>where
Self: Binary,
fn fmt_binary(self) -> FmtBinary<Self>where
Self: Binary,
self to use its Binary implementation when Debug-formatted.Source§fn fmt_display(self) -> FmtDisplay<Self>where
Self: Display,
fn fmt_display(self) -> FmtDisplay<Self>where
Self: Display,
self to use its Display implementation when
Debug-formatted.Source§fn fmt_lower_exp(self) -> FmtLowerExp<Self>where
Self: LowerExp,
fn fmt_lower_exp(self) -> FmtLowerExp<Self>where
Self: LowerExp,
self to use its LowerExp implementation when
Debug-formatted.Source§fn fmt_lower_hex(self) -> FmtLowerHex<Self>where
Self: LowerHex,
fn fmt_lower_hex(self) -> FmtLowerHex<Self>where
Self: LowerHex,
self to use its LowerHex implementation when
Debug-formatted.Source§fn fmt_octal(self) -> FmtOctal<Self>where
Self: Octal,
fn fmt_octal(self) -> FmtOctal<Self>where
Self: Octal,
self to use its Octal implementation when Debug-formatted.Source§fn fmt_pointer(self) -> FmtPointer<Self>where
Self: Pointer,
fn fmt_pointer(self) -> FmtPointer<Self>where
Self: Pointer,
self to use its Pointer implementation when
Debug-formatted.Source§fn fmt_upper_exp(self) -> FmtUpperExp<Self>where
Self: UpperExp,
fn fmt_upper_exp(self) -> FmtUpperExp<Self>where
Self: UpperExp,
self to use its UpperExp implementation when
Debug-formatted.Source§fn fmt_upper_hex(self) -> FmtUpperHex<Self>where
Self: UpperHex,
fn fmt_upper_hex(self) -> FmtUpperHex<Self>where
Self: UpperHex,
self to use its UpperHex implementation when
Debug-formatted.Source§impl<T> Pipe for Twhere
T: ?Sized,
impl<T> Pipe for Twhere
T: ?Sized,
Source§fn pipe<R>(self, func: impl FnOnce(Self) -> R) -> Rwhere
Self: Sized,
fn pipe<R>(self, func: impl FnOnce(Self) -> R) -> Rwhere
Self: Sized,
Source§fn pipe_ref<'a, R>(&'a self, func: impl FnOnce(&'a Self) -> R) -> Rwhere
R: 'a,
fn pipe_ref<'a, R>(&'a self, func: impl FnOnce(&'a Self) -> R) -> Rwhere
R: 'a,
self and passes that borrow into the pipe function. Read moreSource§fn pipe_ref_mut<'a, R>(&'a mut self, func: impl FnOnce(&'a mut Self) -> R) -> Rwhere
R: 'a,
fn pipe_ref_mut<'a, R>(&'a mut self, func: impl FnOnce(&'a mut Self) -> R) -> Rwhere
R: 'a,
self and passes that borrow into the pipe function. Read moreSource§fn pipe_borrow<'a, B, R>(&'a self, func: impl FnOnce(&'a B) -> R) -> R
fn pipe_borrow<'a, B, R>(&'a self, func: impl FnOnce(&'a B) -> R) -> R
Source§fn pipe_borrow_mut<'a, B, R>(
&'a mut self,
func: impl FnOnce(&'a mut B) -> R,
) -> R
fn pipe_borrow_mut<'a, B, R>( &'a mut self, func: impl FnOnce(&'a mut B) -> R, ) -> R
Source§fn pipe_as_ref<'a, U, R>(&'a self, func: impl FnOnce(&'a U) -> R) -> R
fn pipe_as_ref<'a, U, R>(&'a self, func: impl FnOnce(&'a U) -> R) -> R
self, then passes self.as_ref() into the pipe function.Source§fn pipe_as_mut<'a, U, R>(&'a mut self, func: impl FnOnce(&'a mut U) -> R) -> R
fn pipe_as_mut<'a, U, R>(&'a mut self, func: impl FnOnce(&'a mut U) -> R) -> R
self, then passes self.as_mut() into the pipe
function.Source§fn pipe_deref<'a, T, R>(&'a self, func: impl FnOnce(&'a T) -> R) -> R
fn pipe_deref<'a, T, R>(&'a self, func: impl FnOnce(&'a T) -> R) -> R
self, then passes self.deref() into the pipe function.impl<T> Read<Exclusive, BecauseExclusive> for Twhere
T: ?Sized,
Source§impl<T> Tap for T
impl<T> Tap for T
Source§fn tap_borrow<B>(self, func: impl FnOnce(&B)) -> Self
fn tap_borrow<B>(self, func: impl FnOnce(&B)) -> Self
Borrow<B> of a value. Read moreSource§fn tap_borrow_mut<B>(self, func: impl FnOnce(&mut B)) -> Self
fn tap_borrow_mut<B>(self, func: impl FnOnce(&mut B)) -> Self
BorrowMut<B> of a value. Read moreSource§fn tap_ref<R>(self, func: impl FnOnce(&R)) -> Self
fn tap_ref<R>(self, func: impl FnOnce(&R)) -> Self
AsRef<R> view of a value. Read moreSource§fn tap_ref_mut<R>(self, func: impl FnOnce(&mut R)) -> Self
fn tap_ref_mut<R>(self, func: impl FnOnce(&mut R)) -> Self
AsMut<R> view of a value. Read moreSource§fn tap_deref<T>(self, func: impl FnOnce(&T)) -> Self
fn tap_deref<T>(self, func: impl FnOnce(&T)) -> Self
Deref::Target of a value. Read moreSource§fn tap_deref_mut<T>(self, func: impl FnOnce(&mut T)) -> Self
fn tap_deref_mut<T>(self, func: impl FnOnce(&mut T)) -> Self
Deref::Target of a value. Read moreSource§fn tap_dbg(self, func: impl FnOnce(&Self)) -> Self
fn tap_dbg(self, func: impl FnOnce(&Self)) -> Self
.tap() only in debug builds, and is erased in release builds.Source§fn tap_mut_dbg(self, func: impl FnOnce(&mut Self)) -> Self
fn tap_mut_dbg(self, func: impl FnOnce(&mut Self)) -> Self
.tap_mut() only in debug builds, and is erased in release
builds.Source§fn tap_borrow_dbg<B>(self, func: impl FnOnce(&B)) -> Self
fn tap_borrow_dbg<B>(self, func: impl FnOnce(&B)) -> Self
.tap_borrow() only in debug builds, and is erased in release
builds.Source§fn tap_borrow_mut_dbg<B>(self, func: impl FnOnce(&mut B)) -> Self
fn tap_borrow_mut_dbg<B>(self, func: impl FnOnce(&mut B)) -> Self
.tap_borrow_mut() only in debug builds, and is erased in release
builds.Source§fn tap_ref_dbg<R>(self, func: impl FnOnce(&R)) -> Self
fn tap_ref_dbg<R>(self, func: impl FnOnce(&R)) -> Self
.tap_ref() only in debug builds, and is erased in release
builds.Source§fn tap_ref_mut_dbg<R>(self, func: impl FnOnce(&mut R)) -> Self
fn tap_ref_mut_dbg<R>(self, func: impl FnOnce(&mut R)) -> Self
.tap_ref_mut() only in debug builds, and is erased in release
builds.Source§fn tap_deref_dbg<T>(self, func: impl FnOnce(&T)) -> Self
fn tap_deref_dbg<T>(self, func: impl FnOnce(&T)) -> Self
.tap_deref() only in debug builds, and is erased in release
builds.