pub struct BaseVectorLayer {
pub version: u8,
pub name: String,
pub extent: Extent,
pub shape_defined: bool,
pub m_shape_defined: bool,
pub shape: Shape,
pub m_shape: Option<Shape>,
pub features: Vec<BaseVectorFeature>,
}
Expand description
Base Vector Layer This is an intermediary for storing layer data in the Open Vector Tile format.
Fields§
§version: u8
the version of the vector tile. This is a number that tracks the OVT specification. and shouldn’t be tampered with
name: String
the name of the layer
extent: Extent
the extent of the vector tile (only 512, 1_024, 2_048, 4_096, and 8_192 are supported)
shape_defined: bool
if the shape was already passed in to the constructor
m_shape_defined: bool
if the M-Shape was already passed in to the constructor
shape: Shape
The shape used to describe the features properties in the layer
m_shape: Option<Shape>
the shape of each feature’s M-Values
features: Vec<BaseVectorFeature>
the features in the layer
Implementations§
Source§impl BaseVectorLayer
impl BaseVectorLayer
Sourcepub fn new(
name: String,
extent: Extent,
features: Vec<BaseVectorFeature>,
shape: Option<Shape>,
m_shape: Option<Shape>,
) -> Self
pub fn new( name: String, extent: Extent, features: Vec<BaseVectorFeature>, shape: Option<Shape>, m_shape: Option<Shape>, ) -> Self
Create a new BaseVectorLayer
Sourcepub fn add_feature(&mut self, feature: BaseVectorFeature)
pub fn add_feature(&mut self, feature: BaseVectorFeature)
Add a new feature to the layer
Sourcepub fn feature(&self, i: usize) -> &BaseVectorFeature
pub fn feature(&self, i: usize) -> &BaseVectorFeature
Get the feature at the given index
Trait Implementations§
Source§impl Debug for BaseVectorLayer
impl Debug for BaseVectorLayer
Source§impl From<&mut MapboxVectorLayer> for BaseVectorLayer
impl From<&mut MapboxVectorLayer> for BaseVectorLayer
Source§fn from(mvt: &mut MapboxVectorLayer) -> Self
fn from(mvt: &mut MapboxVectorLayer) -> Self
Converts to this type from the input type.
Auto Trait Implementations§
impl Freeze for BaseVectorLayer
impl RefUnwindSafe for BaseVectorLayer
impl Send for BaseVectorLayer
impl Sync for BaseVectorLayer
impl Unpin for BaseVectorLayer
impl UnwindSafe for BaseVectorLayer
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
Mutably borrows from an owned value. Read more