sphereql-layout 0.1.0-alpha

Layout engine for sphereQL spatial positioning
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
use sphereql_core::SphericalPoint;

use crate::types::LayoutResult;

pub trait DimensionMapper: Send + Sync {
    type Item;
    fn map(&self, item: &Self::Item) -> SphericalPoint;
}

pub trait LayoutStrategy<T>: Send + Sync {
    fn layout(&self, items: &[T], mapper: &dyn DimensionMapper<Item = T>) -> LayoutResult<T>;
}