Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Geospatial Indexing with MongoDB

20spokes
January 22, 2012

Geospatial Indexing with MongoDB

20spokes

January 22, 2012
Tweet

More Decks by 20spokes

Other Decks in Programming

Transcript

  1. What is covered The most amazing slides ever to be

    displayed Getting Started with Geospatial Indexing A real live working session of the most amazing code How many times I say ‘um’ Tuesday, November 15, 11
  2. SQL SELECT * FROM Places WHERE acos(sin(1.3963) * sin(Lat) +

    cos(1.3963) * cos(Lat) * cos(Lon - (-0.6981))) * 6371 <= 1000; Tuesday, November 15, 11
  3. Query within a rectangle Circle with a center point and

    radius Search within a polygon ( >= 1.9 ) Bound Queries Tuesday, November 15, 11
  4. Spherical Model Use decimal degrees - 42.53 Use [longitude, latitude]

    as ordering Use radians for distance $nearSphere and $centerSphere Tuesday, November 15, 11
  5. Multi-location Documents objects can contain sub-objects for multiple locations can

    show up more than once in location queries Tuesday, November 15, 11