[SERVER-8667] about Geospatial Index(2d or 2dsphere) Created: 22/Feb/13  Updated: 08/Mar/13  Resolved: 04/Mar/13

Status: Closed
Project: Core Server
Component/s: Geo
Affects Version/s: 2.3.2
Fix Version/s: None

Type: Question Priority: Major - P3
Reporter: charm dx Assignee: hari.khalsa@10gen.com
Resolution: Done Votes: 0
Labels: geometry, geospatial, gis
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Participants:

 Description   

usually,quardtree and rtree are the common spatail indexes using in GIS.
so what's the difference between quardtree/rtree and 2d/2dsphere,
and what's the difference between 2d and 2dsphere?



 Comments   
Comment by hari.khalsa@10gen.com [ 04/Mar/13 ]

2d and 2dsphere both use a Btree. They each partition "the world" into buckets and index which buckets a geometry is in. Then, when looking for geometry near/in a region, the query only has to look at things in that region's buckets.

2dsphere is strictly on the sphere and offers increased functionality (polygons, lines, etc.).

2d is on the plane with an option to treat points as on the sphere when calculating distance.

Generated at Thu Feb 08 03:18:02 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.