pub struct GeometryValues { /* private fields */ }Expand description
Parsed (decoded) geometry data
Implementations§
Source§impl GeometryValues
impl GeometryValues
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.
None unless the GeometryValues was created with Self::new_tessellated.
Sourcepub fn triangles(&self) -> Option<&[u32]>
pub fn triangles(&self) -> Option<&[u32]>
Per-feature triangle counts produced by Earcut tessellation.
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: [x0, y0, x1, y1, …] in tile coordinates.
Sourcepub fn to_geojson(&self, index: usize) -> MltResult<Geom32>
pub fn to_geojson(&self, index: usize) -> MltResult<Geom32>
Build a GeoJSON geometry for a single feature at index i.
Polygon and MultiPolygon rings are closed per GeoJSON spec
(MLT omits the closing vertex).
Source§impl GeometryValues
impl GeometryValues
Sourcepub fn new_tessellated() -> Self
pub fn new_tessellated() -> Self
Returns a GeometryValues with an empty triangles buffer pre-initialized.
When triangles is 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§fn clone(&self) -> GeometryValues
fn clone(&self) -> GeometryValues
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for GeometryValues
impl Debug for GeometryValues
Source§impl Decode<GeometryValues> for RawGeometry<'_>
impl Decode<GeometryValues> for RawGeometry<'_>
Source§impl Default for GeometryValues
impl Default for GeometryValues
Source§fn default() -> GeometryValues
fn default() -> GeometryValues
Source§impl PartialEq<<Lazy as DecodeState>::LazyOrParsed<RawGeometry<'_>, GeometryValues>> for GeometryValues
impl PartialEq<<Lazy as DecodeState>::LazyOrParsed<RawGeometry<'_>, GeometryValues>> for GeometryValues
Source§impl PartialEq for GeometryValues
impl PartialEq for GeometryValues
impl Eq 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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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