Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [geomesa-users] Aggregations With Geomesa

Hi Suresh,

We do support aggregation through our statistics framework. All of our datastores will have a 'stats' method that will return one of these:

https://github.com/locationtech/geomesa/blob/master/geomesa-index-api/src/main/scala/org/locationtech/geomesa/index/stats/GeoMesaStats.scala

We have a few optimized methods for count and bounds. If you want to run arbitrary queries, you can use the 'runStats' method.

You specify a stat to run as a string. You can use the helper methods here to create the appropriate strings. In particular, DescriptiveStats has everything you ask for:

https://github.com/locationtech/geomesa/blob/geomesa_2.11-1.3.1/geomesa-utils/src/main/scala/org/locationtech/geomesa/utils/stats/Stat.scala#L122-L222

Note that running stats may not be especially fast - it sill has to iterate over all your data. Our accumulo implementation does this work in a distributed fashion, other implementations do it on the client.

An alternative to using our built in stats is to load things into spark and run your own operations.

Thanks,

Emilio

On 05/13/2017 08:32 AM, Suresh Prajapati wrote:
Hello Everyone,

Does geomesa support aggregation functions?. Like
1. Calculating matching feature COUNT for the given query.
2. Max/Min of an attribute for specified query collections.
3. Avg of an attribute value for specified query collections.

I tried with geotools aggregate functions but they are not getting updated for new records being inserted. I also tried using offset for the feature but It's not working(as was suggested by one of the developers that geomesa doesn't support offsets). What can be done to achieve such operations?

Thank You
Suresh Prajapati


_______________________________________________
geomesa-users mailing list
geomesa-users@xxxxxxxxxxxxxxxx
To change your delivery options, retrieve your password, or unsubscribe from this list, visit
https://dev.locationtech.org/mailman/listinfo/geomesa-users


Back to the top