pub struct GeoFeatureCollection {
pub bbox: Option<BBox>,
pub features: Vec<GeoFeature>,
}Expand description
GeoJSON-compatible feature collection data.
Fields§
§bbox: Option<BBox>Optional collection bounding box.
features: Vec<GeoFeature>Collection features.
Implementations§
Source§impl GeoFeatureCollection
impl GeoFeatureCollection
Sourcepub fn new(features: impl Into<Vec<GeoFeature>>) -> Self
pub fn new(features: impl Into<Vec<GeoFeature>>) -> Self
Creates a new collection.
Sourcepub fn push(&mut self, feature: GeoFeature)
pub fn push(&mut self, feature: GeoFeature)
Adds a feature to this collection.
Sourcepub fn filter_intersecting_bbox(&self, bbox: BBox) -> Self
pub fn filter_intersecting_bbox(&self, bbox: BBox) -> Self
Filters features whose geometry intersects a bbox.
Trait Implementations§
Source§impl Clone for GeoFeatureCollection
impl Clone for GeoFeatureCollection
Source§fn clone(&self) -> GeoFeatureCollection
fn clone(&self) -> GeoFeatureCollection
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for GeoFeatureCollection
impl Debug for GeoFeatureCollection
Source§impl Default for GeoFeatureCollection
impl Default for GeoFeatureCollection
Source§fn default() -> GeoFeatureCollection
fn default() -> GeoFeatureCollection
Returns the “default value” for a type. Read more
Source§impl<'de> Deserialize<'de> for GeoFeatureCollection
impl<'de> Deserialize<'de> for GeoFeatureCollection
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl PartialEq for GeoFeatureCollection
impl PartialEq for GeoFeatureCollection
Source§fn eq(&self, other: &GeoFeatureCollection) -> bool
fn eq(&self, other: &GeoFeatureCollection) -> bool
Tests for
self and other values to be equal, and is used by ==.Source§impl Serialize for GeoFeatureCollection
impl Serialize for GeoFeatureCollection
impl StructuralPartialEq for GeoFeatureCollection
Auto Trait Implementations§
impl Freeze for GeoFeatureCollection
impl RefUnwindSafe for GeoFeatureCollection
impl Send for GeoFeatureCollection
impl Sync for GeoFeatureCollection
impl Unpin for GeoFeatureCollection
impl UnsafeUnpin for GeoFeatureCollection
impl UnwindSafe for GeoFeatureCollection
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