问题描述
这是否意味着mongodb将地球分成几个网格?
Does that mean mongodb split the earth into several grids?
推荐答案
Greg Studer(10gen)的本次演讲详细讨论了地理空间索引: 使用MongoDB进行地理空间索引.
This presentation from Greg Studer (10gen) discusses the geospatial indexes in some detail: Geospatial Indexing with MongoDB.
MongoDB 2.2上的标准地理空间实现使用2-D GeoHash 方法,该方法具有可变性精度:
The standard geospatial implementation as at MongoDB 2.2 uses a 2-D GeoHash approach, with variable bits of precision:
By default, precision is set to 26 bits which is equivalent to approximately
2 feet given (longitude, latitude) location values and default (-180, 180)
bounds.
GeoHash方法确实存在边缘情况,其中某些点在空间上可能接近,但具有不同的哈希值. MongoDB还包括一个地理空间干草堆索引,该索引专门针对小型区域进行了调整
The GeoHash approach does have edge cases where some points may be spatially close but have different hashes. MongoDB also includes a Geospatial Haystack Index which is specifically tuned for small-region "near" long/lat searches with one additional indexed criteria (for example: "find all restaurants within 25 miles with name 'foo'").
Nicholas Knize(Thermopylae)的另一个有趣的演讲将当前的B树/GeoHash方法与 R -树.如果您跳过幻灯片8,则有一个直观的说明可能会有所帮助: 使用MongoDB进行RTree空间索引-MongoDC .
Another interesting presentation from Nicholas Knize (Thermopylae) contrasts the current B-tree / GeoHash approach with R-trees. If you skip ahead to slide 8, there is a visual explanation that may be helpful: RTree Spatial Indexing with MongoDB - MongoDC.
这篇关于MongoDB如何实现其空间索引?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!