Upgrade to PRO for Only $50/Year—Limited-Time Offer! 🔥
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
Geospatial Indexing with MongoDB
Search
20spokes
January 22, 2012
Programming
3
110
Geospatial Indexing with MongoDB
20spokes
January 22, 2012
Tweet
Share
More Decks by 20spokes
See All by 20spokes
Start Your Startup: The Essential Steps to Launch Your Idea
ryan_fischer
1
82
Intro to MongoDB (Updated)
ryan_fischer
2
81
Intro to MongoDB
ryan_fischer
2
240
MongoDB and Ruby on Rails
ryan_fischer
2
170
Other Decks in Programming
See All in Programming
なあ兄弟、 余白の意味を考えてから UI実装してくれ!
ktcryomm
10
11k
テストやOSS開発に役立つSetup PHP Action
matsuo_atsushi
0
140
CloudNative Days Winter 2025: 一週間で作る低レイヤコンテナランタイム
ternbusty
7
1.9k
ID管理機能開発の裏側 高速にSaaS連携を実現したチームのAI活用編
atzzcokek
0
180
Micro Frontendsで築いた 共通基盤と運用の試行錯誤 / Building a Shared Platform with Micro Frontends: Operational Learnings
kyntk
1
1.9k
AI時代もSEOを頑張っている話
shirahama_x
0
220
全員アーキテクトで挑む、 巨大で高密度なドメインの紐解き方
agatan
8
18k
WebRTC、 綺麗に見るか滑らかに見るか
sublimer
1
140
Reactive Thinking with Signals and the new Resource API
manfredsteyer
PRO
0
160
認証・認可の基本を学ぼう前編
kouyuume
0
150
Integrating WordPress and Symfony
alexandresalome
0
120
関数実行の裏側では何が起きているのか?
minop1205
1
520
Featured
See All Featured
Measuring & Analyzing Core Web Vitals
bluesmoon
9
690
The Invisible Side of Design
smashingmag
302
51k
Fireside Chat
paigeccino
41
3.7k
How STYLIGHT went responsive
nonsquared
100
5.9k
The Cost Of JavaScript in 2023
addyosmani
55
9.3k
How to Ace a Technical Interview
jacobian
280
24k
YesSQL, Process and Tooling at Scale
rocio
174
15k
Designing for Performance
lara
610
69k
Large-scale JavaScript Application Architecture
addyosmani
514
110k
Building a Scalable Design System with Sketch
lauravandoore
463
34k
Bash Introduction
62gerente
615
210k
Responsive Adventures: Dirty Tricks From The Dark Corners of Front-End
smashingmag
253
22k
Transcript
Geospatial Indexing Ryan Fischer @ryanfischer20 Tuesday, November 15, 11
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
geospatial Tuesday, November 15, 11
simple Tuesday, November 15, 11
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
MongoDB db.places.find({loc : { $near:[50,50] } } ) Tuesday, November
15, 11
how do you want to search? Tuesday, November 15, 11
Exact Queries Search by closest points Tuesday, November 15, 11
Query within a rectangle Circle with a center point and
radius Search within a polygon ( >= 1.9 ) Bound Queries Tuesday, November 15, 11
The earth is round (seriously) Tuesday, November 15, 11
Tuesday, November 15, 11
Tuesday, November 15, 11
Spherical Model Use decimal degrees - 42.53 Use [longitude, latitude]
as ordering Use radians for distance $nearSphere and $centerSphere Tuesday, November 15, 11
geoNear returns distance for object db.runCommand({ geoNear: "persons", near: [50,50]
}) Tuesday, November 15, 11
Multi-location Documents objects can contain sub-objects for multiple locations can
show up more than once in location queries Tuesday, November 15, 11
Sharding Now supported Can only use geoNear command MongoDB is
still young Tuesday, November 15, 11
MongoDB meets Ruby Tuesday, November 15, 11
The End Follow me - @ryanfischer20 Tuesday, November 15, 11
Tuesday, November 15, 11