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
73
Intro to MongoDB
ryan_fischer
2
220
MongoDB and Ruby on Rails
ryan_fischer
2
160
Other Decks in Programming
See All in Programming
たのしいparse.y
ydah
3
120
「とりあえず動く」コードはよい、「読みやすい」コードはもっとよい / Code that 'just works' is good, but code that is 'readable' is even better.
mkmk884
3
120
fs2-io を試してたらバグを見つけて直した話
chencmd
0
230
ゆるやかにgolangci-lintのルールを強くする / Kyoto.go #56
utgwkk
1
370
MCP with Cloudflare Workers
yusukebe
2
220
フロントエンドのディレクトリ構成どうしてる? Feature-Sliced Design 導入体験談
osakatechlab
8
4.1k
Итераторы в Go 1.23: зачем они нужны, как использовать, и насколько они быстрые?
lamodatech
0
730
SymfonyCon Vienna 2025: Twig, still relevant in 2025?
fabpot
3
1.2k
LLM Supervised Fine-tuningの理論と実践
datanalyticslabo
4
1.1k
Haze - Real time background blurring
chrisbanes
1
510
モバイルアプリにおける自動テストの導入戦略
ostk0069
0
110
From Translations to Multi Dimension Entities
alexanderschranz
2
130
Featured
See All Featured
Navigating Team Friction
lara
183
15k
Improving Core Web Vitals using Speculation Rules API
sergeychernyshev
0
97
The Myth of the Modular Monolith - Day 2 Keynote - Rails World 2024
eileencodes
17
2.3k
Typedesign – Prime Four
hannesfritz
40
2.4k
A designer walks into a library…
pauljervisheath
204
24k
How GitHub (no longer) Works
holman
311
140k
Building Your Own Lightsaber
phodgson
103
6.1k
The Invisible Side of Design
smashingmag
298
50k
Unsuck your backbone
ammeep
669
57k
実際に使うSQLの書き方 徹底解説 / pgcon21j-tutorial
soudai
169
50k
"I'm Feeling Lucky" - Building Great Search Experiences for Today's Users (#IAC19)
danielanewman
226
22k
Fantastic passwords and where to find them - at NoRuKo
philnash
50
2.9k
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