T - The type of the entry. The geometry inside of it is queried, and the geohash of that
geometry is used as the bin.public abstract class SpatialBinningStrategy<T> extends Object implements BinningStrategy
| Modifier and Type | Field and Description |
|---|---|
protected ComplexGeometryBinningOption |
complexGeometryBinning |
protected String |
geometryFieldName |
protected int |
precision
The precision/resolution/length used by the binning strategy (it usually is equivalent to
character length).
|
protected SpatialBinningType |
type |
| Constructor and Description |
|---|
SpatialBinningStrategy() |
SpatialBinningStrategy(SpatialBinningType type,
int precision,
boolean useCentroidOnly,
String geometryFieldName)
Use the given precision to bin objects
|
| Modifier and Type | Method and Description |
|---|---|
void |
fromBinary(byte[] bytes) |
<I> ByteArray[] |
getBins(DataTypeAdapter<I> adapter,
I entry,
GeoWaveRow... rows)
calculates appropriate bins for a given entry.
|
int |
getPrecision() |
byte[] |
toBinary() |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitgetWeightprotected String geometryFieldName
protected int precision
protected ComplexGeometryBinningOption complexGeometryBinning
protected SpatialBinningType type
public SpatialBinningStrategy()
public SpatialBinningStrategy(SpatialBinningType type, int precision, boolean useCentroidOnly, String geometryFieldName)
type - The type (such as S3, H2, or GeoHash)precision - The Geohash precision to calculate bins.useCentroidOnly - for complex geometry such as lines and polygons whether to just
aggregate one hash value based on the centroid or to apply the aggregation to all
overlapping centroidsgeometryFieldName - the field name for the geometry to bin bypublic int getPrecision()
public <I> ByteArray[] getBins(DataTypeAdapter<I> adapter, I entry, GeoWaveRow... rows)
getBins in interface BinningStrategyentry - An entry to bin, utilizing its' geohash.public byte[] toBinary()
toBinary in interface Persistablepublic void fromBinary(byte[] bytes)
fromBinary in interface PersistableCopyright © 2013–2021. All rights reserved.