pub struct Feature {
pub geometry: Geometry<f32>,
pub id: Option<u64>,
pub properties: Option<HashMap<String, Value>>,
}Expand description
A structure representing a feature in a vector tile.
Fields§
§geometry: Geometry<f32>The geometry of the feature.
id: Option<u64>Optional identifier for the feature.
properties: Option<HashMap<String, Value>>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)),
id: None,
properties: None,
};
let geometry = feature.get_geometry();
println!("{:?}", geometry);Trait Implementations§
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