public class HeatmapFacetCounter extends Object
Modifier and Type | Class and Description |
---|---|
static class |
HeatmapFacetCounter.Heatmap
Response structure
|
Modifier and Type | Field and Description |
---|---|
static int |
MAX_ROWS_OR_COLUMNS
Maximum number of supported rows (or columns).
|
Modifier and Type | Method and Description |
---|---|
static HeatmapFacetCounter.Heatmap |
calcFacets(PrefixTreeStrategy strategy,
IndexReaderContext context,
Bits topAcceptDocs,
org.locationtech.spatial4j.shape.Shape inputShape,
int facetLevel,
int maxCells)
Calculates spatial 2D facets (aggregated counts) in a grid, sometimes called a heatmap.
|
public static final int MAX_ROWS_OR_COLUMNS
public static HeatmapFacetCounter.Heatmap calcFacets(PrefixTreeStrategy strategy, IndexReaderContext context, Bits topAcceptDocs, org.locationtech.spatial4j.shape.Shape inputShape, int facetLevel, int maxCells) throws IOException
PrefixTreeStrategy
uses when approximating what level to go to when indexing a shape given a distErrPct.context
- the IndexReader's contexttopAcceptDocs
- a Bits to limit counted docs. If null, live docs are counted.inputShape
- the shape to gather grid squares for; typically a Rectangle
.
The actual heatmap area will usually be larger since the cells on the edge that overlap
are returned. We always return a rectangle of integers even if the inputShape isn't a rectangle
-- the non-intersecting cells will all be 0.
If null is given, the entire world is assumed.facetLevel
- the target depth (detail) of cells.maxCells
- the maximum number of cells to return. If the cells exceed this count, anIOException
Copyright © 2000-2017 Apache Software Foundation. All Rights Reserved.