Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
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
80
Intro to MongoDB (Updated)
ryan_fischer
2
78
Intro to MongoDB
ryan_fischer
2
240
MongoDB and Ruby on Rails
ryan_fischer
2
170
Other Decks in Programming
See All in Programming
GoのWebAssembly活用パターン紹介
syumai
3
1.3k
「ElixirでIoT!!」のこれまでとこれから
takasehideki
0
300
実はすごいスピードで進化しているCSS
hayato_yokoyama
0
100
PT AI без купюр
v0lka
0
210
コード書くの好きな人向けAIコーディング活用tips #orestudy
77web
3
250
OpenNext + Hono on Cloudflare でイマドキWeb開発スタックを実現する
rokuosan
0
110
ドメインモデリングにおける抽象の役割、tagless-finalによるDSL構築、そして型安全な最適化
knih
10
1.5k
事業戦略を理解してソフトウェアを設計する
masuda220
PRO
19
5.6k
Cursor Meetup Tokyo ゲノミクスとCursor: 進化と制約のあいだ
koido
2
900
List Unfolding - 'unfold' as the Computational Dual of 'fold', and how 'unfold' relates to 'iterate'"
philipschwarz
PRO
0
180
XSLTで作るBrainfuck処理系
makki_d
0
140
Use Perl as Better Shell Script
karupanerura
0
680
Featured
See All Featured
Principles of Awesome APIs and How to Build Them.
keavy
126
17k
Testing 201, or: Great Expectations
jmmastey
42
7.5k
Fantastic passwords and where to find them - at NoRuKo
philnash
51
3.3k
The Illustrated Children's Guide to Kubernetes
chrisshort
48
50k
[RailsConf 2023 Opening Keynote] The Magic of Rails
eileencodes
29
9.5k
Making the Leap to Tech Lead
cromwellryan
134
9.3k
Optimizing for Happiness
mojombo
379
70k
Visualization
eitanlees
146
16k
実際に使うSQLの書き方 徹底解説 / pgcon21j-tutorial
soudai
PRO
180
53k
Practical Orchestrator
shlominoach
188
11k
The Pragmatic Product Professional
lauravandoore
35
6.7k
The Web Performance Landscape in 2024 [PerfNow 2024]
tammyeverts
7
640
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