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
74
Intro to MongoDB
ryan_fischer
2
220
MongoDB and Ruby on Rails
ryan_fischer
2
160
Other Decks in Programming
See All in Programming
非ブラウザランタイムとWeb標準 / Non-Browser Runtimes and Web Standards
petamoriken
0
450
Внедряем бюджетирование, или Как сделать хорошо?
lamodatech
0
980
ファインディの テックブログ爆誕までの軌跡
starfish719
1
790
Spring gRPC について / About Spring gRPC
mackey0225
0
180
盆栽転じて家具となる / Bonsai and Furnitures
aereal
0
2.2k
Java Webフレームワークの現状 / java web framework at burikaigi
kishida
9
2k
AWS Lambda functions with C# 用の Dev Container Template を作ってみた件
mappie_kochi
0
220
traP の部内 ISUCON とそれを支えるポータル / PISCON Portal
ikura_hamu
0
240
Azure AI Foundryのご紹介
qt_luigi
1
260
SpringBoot3.4の構造化ログ #kanjava
irof
2
780
2025.01.17_Sansan × DMM.swift
riofujimon
2
670
chibiccをCILに移植した結果 (NGK2025S版)
kekyo
PRO
0
190
Featured
See All Featured
Speed Design
sergeychernyshev
25
760
The World Runs on Bad Software
bkeepers
PRO
67
11k
Building Applications with DynamoDB
mza
93
6.2k
Reflections from 52 weeks, 52 projects
jeffersonlam
348
20k
Build your cross-platform service in a week with App Engine
jlugia
229
18k
Designing Experiences People Love
moore
139
23k
Save Time (by Creating Custom Rails Generators)
garrettdimon
PRO
29
990
Why Our Code Smells
bkeepers
PRO
335
57k
Dealing with People You Can't Stand - Big Design 2015
cassininazir
365
25k
What's in a price? How to price your products and services
michaelherold
244
12k
Scaling GitHub
holman
459
140k
How to Create Impact in a Changing Tech Landscape [PerfNow 2023]
tammyeverts
49
2.2k
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