ngageoint / elasticgeo

ElasticGeo provides a GeoTools data store that allows geospatial features from an Elasticsearch index to be published via OGC services using GeoServer.
GNU General Public License v3.0
169 stars 86 forks source link

Geohash aggregation when there's no buckets #124

Open albertwgchu opened 3 years ago

albertwgchu commented 3 years ago

@sjudeng I have come across an issue when using the geohash aggregation. If there's no buckets returned in the aggregation, ie from the user panning the map to an area where the isn't any data, the request seems to not return to Geoserver and times out.

I worked around this by adding the following in GeoHashGridProcess execute: method:

        if (obsFeatures.size() == 0) {
            return null;
        } 

Let me know if I am missing something as this seems like it would be a common scenario. Thanks!