object OverviewStrategy
- Alphabetic
- By Inheritance
- OverviewStrategy
- AnyRef
- Any
- Hide All
- Show All
- Public
- All
Value Members
- def DEFAULT: OverviewStrategy
-
def
selectOverview(overviewCS: List[CellSize], desiredCS: CellSize, strategy: OverviewStrategy): Int
Select appropriate overview given the strategy.
Select appropriate overview given the strategy.
WARN: this function assumes that CellSizes are sorted by their resolution, with "smaller" cell sizes appearing first. It interprets idx 0 as the position with the highest CellSize. If the input list is not sorted, this function returns idx 0.
Unless a particular strategy suggests otherwise, this method will clamp the returned index to the range of overviewCS.
- overviewCS
a list of CellSizes sorted by
resolution
, result is undefined for unsorted lists.- desiredCS
cellSize that would be searched
- strategy
overview strategy used to search for the best matching CellSize
- returns
index of the closest cellSize. Each strategy defines a different behavior: Level: selects the passed index and if it is OOB clamps the index. Auto(n): selects the best matching cellSize (approximately) and adds n, requires the input resolutions list to be sorted. Base: always returns the best matching cellSize from the given list of CellSizes. AutoHigherResolution: selects the best matching cellSize (approximately) always selects a higher resolution, requires the input resolutions list to be sorted.