pub struct PointGrid<V: Interpolatable + Serialize + DeserializeOwned + Debug = RGBA, S: VectorStore<S2CellId, IndexPoint<V>> = Vector<S2CellId, IndexPoint<V>>, G: KVStore<S2CellId, Vec<V>> = KV<S2CellId, Vec<V>>> { /* private fields */ }Expand description
Implementations§
Source§impl<V: Interpolatable + Serialize + DeserializeOwned + Debug, S: VectorStore<S2CellId, IndexPoint<V>>, G: KVStore<S2CellId, Vec<V>>> PointGrid<V, S, G>
impl<V: Interpolatable + Serialize + DeserializeOwned + Debug, S: VectorStore<S2CellId, IndexPoint<V>>, G: KVStore<S2CellId, Vec<V>>> PointGrid<V, S, G>
Sourcepub fn new(options: Option<GridOptions<V>>) -> Self
pub fn new(options: Option<GridOptions<V>>) -> Self
Create a new point grid
Sourcepub fn insert_point<T: GetXY>(&mut self, point: T, data: Option<V>)
pub fn insert_point<T: GetXY>(&mut self, point: T, data: Option<V>)
Add a lon-lat pair as with any shape
Sourcepub fn insert_lon_lat(&mut self, ll: LonLat<V>)
pub fn insert_lon_lat(&mut self, ll: LonLat<V>)
Add a lon-lat pair to the cluster
Sourcepub fn insert_face_st(&mut self, face: Face, s: f64, t: f64, data: V)
pub fn insert_face_st(&mut self, face: Face, s: f64, t: f64, data: V)
Insert an STPoint to the index
Sourcepub fn insert_reader<L: Clone, F: FeatureReader<L, V, V>>(&mut self, reader: &F)
pub fn insert_reader<L: Clone, F: FeatureReader<L, V, V>>(&mut self, reader: &F)
Add all points from a reader. It will try to use the M-value first, but if it doesn’t exist it will use the feature properties data
Sourcepub fn insert_feature<L: Clone>(&mut self, data: JSONCollection<L, V, V>)
pub fn insert_feature<L: Clone>(&mut self, data: JSONCollection<L, V, V>)
Add a vector feature. It will try to use the M-value first, but if it doesn’t exist it will use the feature properties data
Sourcepub fn get_tile(&self, id: S2CellId) -> Option<TileGrid<'_, V>>
pub fn get_tile(&self, id: S2CellId) -> Option<TileGrid<'_, V>>
Get the point data as a grid of a tile
Sourcepub fn build_clusters(&mut self)
pub fn build_clusters(&mut self)
Build the grid cluster tiles
Trait Implementations§
Source§impl<V: Debug + Interpolatable + Serialize + DeserializeOwned + Debug, S: Debug + VectorStore<S2CellId, IndexPoint<V>>, G: Debug + KVStore<S2CellId, Vec<V>>> Debug for PointGrid<V, S, G>
impl<V: Debug + Interpolatable + Serialize + DeserializeOwned + Debug, S: Debug + VectorStore<S2CellId, IndexPoint<V>>, G: Debug + KVStore<S2CellId, Vec<V>>> Debug for PointGrid<V, S, G>
Auto Trait Implementations§
impl<V, S, G> Freeze for PointGrid<V, S, G>
impl<V, S, G> RefUnwindSafe for PointGrid<V, S, G>
impl<V, S, G> Send for PointGrid<V, S, G>
impl<V, S, G> Sync for PointGrid<V, S, G>
impl<V, S, G> Unpin for PointGrid<V, S, G>
impl<V, S, G> UnwindSafe for PointGrid<V, S, G>
Blanket Implementations§
§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more