5

Mongodb site shows the internals of 2d index is GeoHash.

I want to know the internals of 2dsphere index.

Is it GeoHash, Cartesian Tiers or other techs?

I just find the blog of mongodb site, new-geo-features, to introduce 2dsphere index.

But there is no detail.

Elias Zamaria
  • 96,623
  • 33
  • 114
  • 148
efei
  • 281
  • 1
  • 3
  • 14

1 Answers1

4

The blog post you linked to says a few things about how the 2dsphere index is implemented. It uses Google's S2 Geometry Library to create grid cells on the surface of the earth and put them in a B-tree so they can be searched quickly.

The link in the blog post is obsolete, since Google Code is no longer active. The repository for S2 can now be seen here.

Elias Zamaria
  • 96,623
  • 33
  • 114
  • 148