geospatial - ElasticSearch QuadPrefixTree vs GeohashPrefixTree -
i new elasticsearch , want understand difference between using geohashes , quadtree. in reference written:
- geohashprefixtree - uses geohashes grid squares. geohashes base32 encoded strings of bits of latitude , longitude interleaved. longer hash, more precise is. each character added geohash represents tree level , adds 5 bits of precision geohash. geohash represents rectangular area , has 32 sub rectangles. maximum amount of levels in elasticsearch 24.
- quadprefixtree - uses quadtree grid squares. similar geohash, quad trees interleave bits of latitude , longitude resulting hash bit set. tree level in quad tree represents 2 bits in bit set, 1 each coordinate. maximum amount of levels quad trees in elasticsearch 50.
i don't difference, example if take point: latitude / longitude = 42.9123456, 21.799986 geohash srxs05fq8. can explain how can calculate quadtree representation?
moreover, when better prefer 1 on other?
quadtrees more predictable in each level spans square, whereas in geohash representation squares rectangles spanned.
so, if presenting heatmap user can adjust resolution, quadtree give smoother interface user know width , height of squares increased/decreased 2 times @ each level increment/decrement.
Comments
Post a Comment