MongoDB Documentation, Release 3.0.4 Geospatial Indexes and Queries Surfaces Location Data Legacy Coordinate Pairs MongoDB supports spherical surface calculations on legacy coordinate pairs using a 2dsphere index by converting the data to the GeoJSON Point type. If you choose flat surface calculations via a 2d index, you can store data only as legacy coordinate pairs . MongoDB supports the following GeoJSON objects: Changed in version 2.6: Support for additional GeoJSON types: MultiPoint, MultiLineString, MultiPolygon, Geome- tryCollection. New in version 2.4: Support for GeoJSON storage and queries is new in version 2.4. Prior to version 2.4, all geospatial data used coordinate pairs. GeoJSON Objects Queries on GeoJSON objects always calculate on a sphere. The default coordinate reference system for GeoJSON uses the WGS84 datum. If you choose spherical surface calculations, you store location data as either: Flat To calculate distances on a Euclidean plane, store your location data as legacy coordinate pairs and use a 2d (page 497) index. Store your location data as GeoJSON objects with this coordinate-axis order: longitude, latitude . The coordinate reference system for GeoJSON uses the WGS84 datum. Spherical To calculate geometry over an Earth-like sphere, store your location data on a spherical surface and use 2dsphere (page 496) index. MongoDB offers two surface types: Before storing your location data and writing queries, you must decide the type of surface to use to perform calcula- tions. The type you choose affects how you store data, what type of index to build, and the syntax of your queries. MongoDB offers a number of indexes and query mechanisms to handle geospatial information. This section introduces MongoDB’s geospatial features. For complete examples of geospatial queries in MongoDB, see Geospatial Index Tutorials (page 529). • Point • LineString • Polygon • MultiPoint • MultiLineString • MultiPolygon • GeometryCollection Chapter 8. Indexes 494