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
TVerのWeb内製化 - 開発スピードと品質を両立させるまでの道のり
techtver
PRO
3
1.4k
非同期処理の迷宮を抜ける: 初学者がつまづく構造的な原因
pd1xx
1
450
dotfiles 式年遷宮 令和最新版
masawada
1
610
Building AI Agents with TypeScript #TSKaigiHokuriku
izumin5210
6
1.2k
Full-Cycle Reactivity in Angular: SignalStore mit Signal Forms und Resources
manfredsteyer
PRO
0
170
dnx で実行できるコマンド、作ってみました
tomohisa
0
130
AI時代もSEOを頑張っている話
shirahama_x
0
220
ViewファーストなRailsアプリ開発のたのしさ
sugiwe
0
380
Media Capture and Streams: W3C仕様と現場での知見
nowaki28
0
130
関数の挙動書き換える
takatofukui
4
770
バックエンドエンジニアによる Amebaブログ K8s 基盤への CronJobの導入・運用経験
sunabig
0
130
UIデザインに役立つ 2025年の最新CSS / The Latest CSS for UI Design 2025
clockmaker
16
6.5k
Featured
See All Featured
Measuring & Analyzing Core Web Vitals
bluesmoon
9
690
The Psychology of Web Performance [Beyond Tellerrand 2023]
tammyeverts
49
3.2k
Producing Creativity
orderedlist
PRO
348
40k
GraphQLとの向き合い方2022年版
quramy
49
14k
Navigating Team Friction
lara
191
16k
Save Time (by Creating Custom Rails Generators)
garrettdimon
PRO
32
1.8k
Agile that works and the tools we love
rasmusluckow
331
21k
The Cult of Friendly URLs
andyhume
79
6.7k
Build your cross-platform service in a week with App Engine
jlugia
234
18k
Put a Button on it: Removing Barriers to Going Fast.
kastner
60
4.1k
Templates, Plugins, & Blocks: Oh My! Creating the theme that thinks of everything
marktimemedia
31
2.6k
How to Ace a Technical Interview
jacobian
280
24k
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