@Test public void testNoGeometry() throws SchemaException { SimpleFeatureType noGeoType = DataUtilities.createType("testNoGeo", "name:String"); SimpleFeature noGeoFeature = SimpleFeatureBuilder.build(noGeoType, new Object[] {"NAME!"}, "NAME!"); GeohashBinningStrategy<SimpleFeature> sfStrat = new GeohashSimpleFeatureBinningStrategy(4); String[] bin = sfStrat.binEntry(noGeoFeature); assertNull(bin); GeohashBinningStrategy<CommonIndexedPersistenceEncoding> ciStrat = new GeohashCommonIndexedBinningStrategy(4, "NotTheGeoField"); bin = ciStrat.binEntry(createCommonIndexData(new Coordinate(1, 1, 1))); assertNull(bin); }
@Override public String[] binEntry(T entry) { Geometry geometry = this.getGeometry(entry); return geometry == null ? null : new String[] {encodeToGeohash(geometry, this.precision)}; }
GeohashBinningStrategy implements AggregationBinningStrategy<T> { @Override public String[] binEntry(T entry) { Geometry geometry = this.getGeometry(entry); return geometry == null ? null : new String[] {encodeToGeohash(geometry, this.precision)}; } }
GeohashBinningStrategy implements AggregationBinningStrategy<T> { @Override public String[] binEntry(T entry) { Geometry geometry = this.getGeometry(entry); return geometry == null ? null : new String[] {encodeToGeohash(geometry, this.precision)}; } GeohashBinningStrategy(int precision); }
GeohashBinningStrategy implements AggregationBinningStrategy<T> { @Override public String[] binEntry(T entry) { Geometry geometry = this.getGeometry(entry); return geometry == null ? null : new String[] {encodeToGeohash(geometry, this.precision)}; } GeohashBinningStrategy(int precision); int getPrecision(); @Override String[] binEntry(T entry); @Override byte[] toBinary(); @Override void fromBinary(byte[] bytes); }
GeohashBinningStrategy implements AggregationBinningStrategy<T> { @Override public String[] binEntry(T entry) { Geometry geometry = this.getGeometry(entry); return geometry == null ? null : new String[] {encodeToGeohash(geometry, this.precision)}; } GeohashBinningStrategy(int precision); int getPrecision(); @Override String[] binEntry(T entry); @Override byte[] toBinary(); @Override void fromBinary(byte[] bytes);  }