Skip to content

Commit

Permalink
More general FeatureLayer methods (#64)
Browse files Browse the repository at this point in the history
  • Loading branch information
alexkirsz authored Mar 11, 2024
1 parent 2e0fcf4 commit 59326e5
Showing 1 changed file with 15 additions and 15 deletions.
30 changes: 15 additions & 15 deletions galileo/src/layer/feature_layer/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -165,6 +165,21 @@ where

self
}

/// Returns a reference to the feature store.
pub fn features(&self) -> &FeatureStore<F> {
&self.features
}

/// Returns a mutable reference to the feature store.
pub fn features_mut(&mut self) -> &mut FeatureStore<F> {
&mut self.features
}

/// Returns the CRS of the layer.
pub fn crs(&self) -> &Crs {
&self.crs
}
}

impl<P, F, S> FeatureLayer<P, F, S, GeoSpace2d>
Expand Down Expand Up @@ -230,21 +245,6 @@ where
.iter_mut()
.filter(move |f| f.as_ref().geometry().is_point_inside(point, tolerance))
}

/// Returns a reference to the feature store.
pub fn features(&self) -> &FeatureStore<F> {
&self.features
}

/// Returns a mutable reference to the feature store.
pub fn features_mut(&mut self) -> &mut FeatureStore<F> {
&mut self.features
}

/// Returns the CRS of the layer.
pub fn crs(&self) -> &Crs {
&self.crs
}
}

impl<P, F, S, Space> FeatureLayer<P, F, S, Space>
Expand Down

0 comments on commit 59326e5

Please sign in to comment.