Struct mvt_reader::feature::Feature
source · pub struct Feature {
pub geometry: Geometry<f32>,
pub properties: Option<HashMap<String, String>>,
}Expand description
A structure representing a feature in a vector tile.
Fields§
§geometry: Geometry<f32>The geometry of the feature.
properties: Option<HashMap<String, String>>Optional properties associated with the feature.
Implementations§
source§impl Feature
impl Feature
sourcepub fn get_geometry(&self) -> &Geometry<f32>
pub fn get_geometry(&self) -> &Geometry<f32>
Retrieves the geometry of the feature.
§Returns
A reference to the geometry of the feature.
§Examples
use mvt_reader::feature::Feature;
use geo_types::{Geometry, Point};
let feature = Feature {
geometry: Geometry::Point(Point::new(0.0, 0.0)),
properties: None,
};
let geometry = feature.get_geometry();
println!("{:?}", geometry);Auto Trait Implementations§
impl Freeze for Feature
impl RefUnwindSafe for Feature
impl Send for Feature
impl Sync for Feature
impl Unpin for Feature
impl UnwindSafe for Feature
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