pub struct Feature<T: CoordNum = f32> {
pub geometry: Geometry<T>,
pub id: Option<u64>,
pub properties: Option<HashMap<String, Value>>,
}Expand description
A structure representing a feature in a vector tile.
Fields§
§geometry: Geometry<T>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<T: CoordNum> Feature<T>
impl<T: CoordNum> Feature<T>
Sourcepub fn get_geometry(&self) -> &Geometry<T>
pub fn get_geometry(&self) -> &Geometry<T>
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<T> Freeze for Feature<T>where
T: Freeze,
impl<T> RefUnwindSafe for Feature<T>where
T: RefUnwindSafe,
impl<T> Send for Feature<T>where
T: Send,
impl<T> Sync for Feature<T>where
T: Sync,
impl<T> Unpin for Feature<T>where
T: Unpin,
impl<T> UnsafeUnpin for Feature<T>where
T: UnsafeUnpin,
impl<T> UnwindSafe for Feature<T>where
T: UnwindSafe,
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