本文整理了Java中org.locationtech.geowave.core.store.api.DataStore.aggregate()
方法的一些代码示例,展示了DataStore.aggregate()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。DataStore.aggregate()
方法的具体详情如下:
包路径:org.locationtech.geowave.core.store.api.DataStore
类名称:DataStore
方法名:aggregate
[英]Perform an aggregation on the data and just return the aggregated result. The query criteria is very similar to querying the individual entries except in this case it defines the input to the aggregation function, and the aggregation function produces a single result. Examples of this might be simply counting matched entries, producing a bounding box or other range/extent for matched entries, or producing a histogram.
[中]对数据执行聚合并仅返回聚合结果。查询条件与查询单个条目非常相似,只是在本例中它定义了聚合函数的输入,聚合函数生成单个结果。这方面的示例可能只是计算匹配的条目,为匹配的条目生成边界框或其他范围/范围,或者生成直方图。
代码示例来源:origin: locationtech/geowave
@Override
public CloseableIterator<SimpleFeature> query(final Index index, final BasicQuery query) {
VectorAggregationQueryBuilder<Persistable, Long> bldr =
(VectorAggregationQueryBuilder) VectorAggregationQueryBuilder.newBuilder().count(
components.getAdapter().getTypeName()).indexName(index.getName()).setAuthorizations(
transaction.composeAuthorizations()).constraints(
OptimalCQLQuery.createOptimalQuery(
filter,
components.getAdapter(),
index,
query));
if (limit != null) {
bldr = bldr.limit(limit);
}
final Long count = components.getDataStore().aggregate(bldr.build());
if (count != null) {
this.count = count;
}
return null;
}
}
代码示例来源:origin: locationtech/geowave
typeName).indexName(indexName);
final Long countResult =
dataStore.aggregate(
bldr.constraints(bldr.constraintsFactory().cqlConstraints(cqlStr)).build());
if (countResult != null) {
代码示例来源:origin: locationtech/geowave
@Override
public CloseableIterator<SimpleFeature> query(final Index index, final BasicQuery query) {
final VectorAggregationQueryBuilder<DistributedRenderOptions, DistributedRenderResult> bldr =
(VectorAggregationQueryBuilder) VectorAggregationQueryBuilder.newBuilder().indexName(
index.getName()).setAuthorizations(transaction.composeAuthorizations());
bldr.aggregate(
components.getAdapter().getTypeName(),
new DistributedRenderAggregation(renderOptions)).constraints(
OptimalCQLQuery.createOptimalQuery(filter, components.getAdapter(), index, query));
final DistributedRenderResult result = components.getDataStore().aggregate(bldr.build());
return new CloseableIterator.Wrapper(
Iterators.singletonIterator(
SimpleFeatureBuilder.build(
GeoWaveFeatureCollection.getDistributedRenderFeatureType(),
new Object[] {result, renderOptions},
"render")));
}
}
代码示例来源:origin: locationtech/geowave
typeName).indexName(indexName);
final Long countResult =
dataStore.aggregate(
bldr.constraints(
bldr.constraintsFactory().spatialTemporalConstraints().spatialConstraints(
内容来源于网络,如有侵权,请联系作者删除!