elasticsearch


Quadtree aggregation of geospatial records in ElasticSearch


Is it possible to make quadtree grid aggregation in ElasticSearch? I already know that geohash_grid aggregation is doable but we need quadtree aggregation.
We can have a location field with the following mapping (in version 5.x):
"location": {
"type": "geo_shape",
"tree": "quadtree",
"tree_levels": 25,
"points_only": true
}
What I want is to write a query in ElasticSearch by specifying a target path in the quadtree and number of dive levels, so that in the response values inside the target path will be aggregated according to the dive levels.
Example use case is drawing heatmaps with Leaflet:
For each visible tile (256 px):
I convert the tile to its path equivalent in the quadtree
I dive to the path with 8 levels to get an aggregated result pixel by pixel (where in the response the "key"s will be the paths to those pixels)
Then I assign colors for each pixel value and draw the tile canvas.
I also have a configuration parameter to adjust resolution so that i may decrease resolution by 1 level and that means I have to dive 7 levels instead of 8. Then the squares will be 4 times big (2 px by 2 px instead of a single pixel). I can decrease resolution one by one until I dive 0 levels and the squares will get bigger the same way. Geohash aggregation is not that predictable, i.e. sometimes the aggregation units are squares sometimes rectangles.
I believe that quadtree aggregation can be possible now with something like "path_hierarchy" tokenizer as it is suggested in https://github.com/elastic/elasticsearch/issues/10408. But I cannot get it working. Can someone provide a working example for quadtree aggregation in ElasticSearch?

Related Links

Shards and replicas elastic search
Elasticsearch Completion Suggester - Sort suggestions
Can _score from different queries be compared?
Difference between a “plain” terms query and a terms query using a filter
Elasticsearch: Updating a field that has been set as a document _id via mapping with a path
Return parent data with child document from Elasticsearch
Elasticsearch Giving Incorrect Result When Using “must_not” operator alongwith “must” Operator
ElasticSearch _suggest queries are case sensitive. Want them to be case insensitive
How to normalize periods in elastic search query (such that JJ Abrams == J.J Abrams)?
Elastic Search - Sort By Doc Type
ElasticSearch Filtering aggregations from array field
Full text search for exact match_phrase (with leading and trailing whitespace) in elasticsearch
Do two equal documents in elasticsearch double the needed disc space
In logstash/ElasticSearch/Kibana, how do I augment records following a particular stateful request?
How to know which shard is overloaded in Elasticsearch?
ElasticSearch - searching different doc_types with the same field name but different analyzers

Categories

HOME
webview
events
android-espresso
ontouchlistener
angular-ui-grid
xcode8.1
livecode
enums
activex
compilation
biztalk
mathematical-optimization
navigation
linker
share
openfoam
angular2-template
polymer-2.x
mailing-list
colors
chromecast
outlook-restapi
temperature
pygobject
checkout
cpu-usage
bazaar
pfobject
jitsi
sqlplus
web-analytics
multi-upload
sap-lumira
openbravo
uilocalnotification
points
math.js
amazon-cloudtrail
nic
matlab-app-designer
infopath2010
john-the-ripper
bean-validation
db2-luw
ms-solver-foundation
installanywhere
variable-variables
xll
mars-simulator
hidden-markov-models
microkernel
stat
grunt-contrib-watch
vungle-ads
aws-kinesis-firehose
non-linear-regression
line-intersection
dex
sidewaffle
hmmlearn
cognos-tm1
gapi
libharu
msg
logical
openquery
nette
astropy
sqlbase
roxygen2
kefir.js
flow-js
ipod
fiware-bosun
sql-processor
jcheckbox
rebar
squeezebox
box2dweb
network-printers
forceclose
miglayout
jack
jomsocial
ctp
saga
dibs
jsplitpane
linkbutton
multiple-dispatch
zend-pdf
stretch
workflow-manager-1.x
getopt-long
thejit
server-name
play2-mini
firefly-mv
sscli
resharper-5.0
mysqli-multi-query
google-translator-toolkit
chronic
word-automation
synthesizer

Resources

Encrypt Message