SlideShare a Scribd company logo
Submit Search
Upload
Login
Signup
MongoDBと位置情報 ~地理空間インデックスの紹介
Report
Koji Iwazaki
Follow
Dec. 12, 2010
•
0 likes
•
4,936 views
1
of
30
MongoDBと位置情報 ~地理空間インデックスの紹介
Dec. 12, 2010
•
0 likes
•
4,936 views
Download Now
Download to read offline
Report
Technology
Koji Iwazaki
Follow
Recommended
MongoDBで作るソーシャルデータ新解析基盤
Takahiro Inoue
29K views
•
76 slides
MongoDB全機能解説2
Takahiro Inoue
2.8K views
•
85 slides
MongoDB Oplog入門
Takahiro Inoue
7.1K views
•
24 slides
MongoDB: Replication,Sharding,MapReduce
Takahiro Inoue
2.2K views
•
39 slides
Topological indices (t is) of the graphs to seek qsar models of proteins com...
Jitendra Kumar Gupta
11.1K views
•
11 slides
Native json in the Cache' ObjectScript 2016.*
Timur Safin
473 views
•
28 slides
More Related Content
What's hot
NoSQL を Ruby で実践するための n 個の方法
Tomohiro Nishimura
2.5K views
•
79 slides
Mongo db presentation
Julie Sommerville
566 views
•
31 slides
Cracking for the Blue Team
James '-- Mckinlay
64 views
•
53 slides
Agile database access with CakePHP 3
José Lorenzo Rodríguez Urdaneta
17.9K views
•
34 slides
Internationalizing CakePHP Applications
Pierre MARTIN
5.8K views
•
18 slides
جلسه سوم پایتون برای هکر های قانونی دوره مقدماتی پاییز ۹۲
Mohammad Reza Kamalifard
414 views
•
22 slides
What's hot
(20)
NoSQL を Ruby で実践するための n 個の方法
Tomohiro Nishimura
•
2.5K views
Mongo db presentation
Julie Sommerville
•
566 views
Cracking for the Blue Team
James '-- Mckinlay
•
64 views
Agile database access with CakePHP 3
José Lorenzo Rodríguez Urdaneta
•
17.9K views
Internationalizing CakePHP Applications
Pierre MARTIN
•
5.8K views
جلسه سوم پایتون برای هکر های قانونی دوره مقدماتی پاییز ۹۲
Mohammad Reza Kamalifard
•
414 views
San Francisco Java User Group
kchodorow
•
1.5K views
PromptWorks Talk Tuesdays: Ray Zane 1/17/17 "Elixir Is Cool"
PromptWorks
•
211 views
Automatically Spotting Cross-language Relations
Federico Tomassetti
•
1.1K views
PyLecture4 -Python Basics2-
Yoshiki Satotani
•
254 views
FormValidator::LazyWay で検証ルールをまとめよう
Daisuke Komatsu
•
1.6K views
Building Real Time Systems on MongoDB Using the Oplog at Stripe
MongoDB
•
11.2K views
Aggregation in MongoDB
Kishor Parkhe
•
1.7K views
MongoDB Aggregation Framework
Tyler Brock
•
6.4K views
Groovy scripts with Groovy
Andrés Viedma Peláez
•
2K views
Being Google
Tom Dyson
•
3.9K views
MongoDB
Rawin Windygallery
•
720 views
Introduction to DBIx::Lite - Kyoto.pm tech talk #2
Hiroshi Shibamura
•
2.9K views
Lập trình Python cơ bản
Nguyen Thi Lan Phuong
•
665 views
From mysql to MongoDB(MongoDB2011北京交流会)
Night Sailer
•
1.5K views
Viewers also liked
OpenStreetMap+MongoDBで地図情報を検索してみたい!
Naruhiko Ogasawara
4K views
•
38 slides
Review for Ch. 12
bridgetteflaherty
410 views
•
23 slides
Ccb1maria ba
begona10
606 views
•
6 slides
Leadership powerpoint
Atty Garfinkel
459 views
•
13 slides
Latesht employee details
mrunaldsamant
514 views
•
48 slides
การใช้งานของ Google
Tooktik นางฟ้าแสนสวย
449 views
•
12 slides
Viewers also liked
(11)
OpenStreetMap+MongoDBで地図情報を検索してみたい!
Naruhiko Ogasawara
•
4K views
Review for Ch. 12
bridgetteflaherty
•
410 views
Ccb1maria ba
begona10
•
606 views
Leadership powerpoint
Atty Garfinkel
•
459 views
Latesht employee details
mrunaldsamant
•
514 views
การใช้งานของ Google
Tooktik นางฟ้าแสนสวย
•
449 views
Trip planner
Mexan Juadha
•
342 views
Week14
s1180075
•
288 views
Speakers' Profiles
yuklan
•
540 views
Google表單
shiehrm
•
735 views
Textual analysis
adamb33
•
164 views
Similar to MongoDBと位置情報 ~地理空間インデックスの紹介
Designing Opeation Oriented Web Applications / YAPC::Asia Tokyo 2011
Masahiro Nagano
2.6K views
•
114 slides
Retail Reference Architecture Part 2: Real-Time, Geo Distributed Inventory
MongoDB
3.3K views
•
32 slides
はじめてのMongoDB
Takahiro Inoue
16.1K views
•
72 slides
Why MongoDB is awesome
John Nunemaker
79.2K views
•
104 slides
Modern Application Foundations: Underscore and Twitter Bootstrap
Howard Lewis Ship
2K views
•
92 slides
Crazy things done on PHP
Taras Kalapun
14K views
•
33 slides
Similar to MongoDBと位置情報 ~地理空間インデックスの紹介
(20)
Designing Opeation Oriented Web Applications / YAPC::Asia Tokyo 2011
Masahiro Nagano
•
2.6K views
Retail Reference Architecture Part 2: Real-Time, Geo Distributed Inventory
MongoDB
•
3.3K views
はじめてのMongoDB
Takahiro Inoue
•
16.1K views
Why MongoDB is awesome
John Nunemaker
•
79.2K views
Modern Application Foundations: Underscore and Twitter Bootstrap
Howard Lewis Ship
•
2K views
Crazy things done on PHP
Taras Kalapun
•
14K views
Map/reduce, geospatial indexing, and other cool features (Kristina Chodorow)
MongoSF
•
2.9K views
Mongo db ecommerce
christkv
•
3.8K views
Building a web application with mongo db
MongoDB
•
1.5K views
Mongoskin - Guilin
Jackson Tian
•
3.6K views
CS442 - Rogue: A Scala DSL for MongoDB
jorgeortiz85
•
3.4K views
Das Web Wird Mobil - Geolocation und Location Based Services
Stephan Schmidt
•
3K views
Building Applications with MongoDB - an Introduction
MongoDB
•
1.3K views
MongoDB Europe 2016 - ETL for Pros – Getting Data Into MongoDB The Right Way
MongoDB
•
1.3K views
Mapping Flatland: Using MongoDB for an MMO Crossword Game (GDC Online 2011)
Grant Goodale
•
2.3K views
Introdução ao Perl 6
garux
•
1.8K views
Building Your First MongoDB Application (Mongo Austin)
MongoDB
•
942 views
Damn Fine CoffeeScript
niklal
•
850 views
Nosh slides mongodb web application - mongo philly 2011
MongoDB
•
506 views
ETL for Pros: Getting Data Into MongoDB
MongoDB
•
325 views
Recently uploaded
Scaling out with WordPress
Konstantin Kovshenin
54 views
•
55 slides
Announcing InfluxDB Clustered
InfluxData
51 views
•
30 slides
BuilderAI Proposal_Malesniak
Michael Lesniak
84 views
•
9 slides
LLaMA 2.pptx
RkRahul16
15 views
•
19 slides
How to use the Cataloguing Code Ethics at your day job : a hands-on workshop ...
CILIP MDG
30 views
•
13 slides
who we are - values.pptx
LauraGarceran
33 views
•
5 slides
Recently uploaded
(20)
Scaling out with WordPress
Konstantin Kovshenin
•
54 views
Announcing InfluxDB Clustered
InfluxData
•
51 views
BuilderAI Proposal_Malesniak
Michael Lesniak
•
84 views
LLaMA 2.pptx
RkRahul16
•
15 views
How to use the Cataloguing Code Ethics at your day job : a hands-on workshop ...
CILIP MDG
•
30 views
who we are - values.pptx
LauraGarceran
•
33 views
ISO Survey 2022: ISO 27001 certificates (ISMS)
Andrey Prozorov, CISM, CIPP/E, CDPSE. LA 27001
•
73 views
info_session_gdsc_tmsl .pptx
NikitaSingh741518
•
14 views
Enterprise Application and Data Protection on AWS with Amazon FSx for NetApp ...
LilyJang3
•
17 views
Webinar: Discover the Power of SpiraTeam - A Jira Alternative To Revolutioniz...
Inflectra
•
32 views
Property Graphs in APEX.pptx
ssuser923120
•
183 views
class and object in c++.pptx
Adarsh College, Hingoli
•
184 views
web test repair.pptx
YuanzhangLin
•
25 views
How to Manage Your Offshore Software Development Team Efficiently
Capital Numbers
•
28 views
Common WordPress APIs - Options API
Jonathan Bossenger
•
18 views
Unleashing Innovation: IoT Project with MicroPython
Vubon Roy
•
19 views
Swiss Re Reinsurance Solutions - Claims Automated Rules Engine – Insurer Inno...
The Digital Insurer
•
15 views
Product Listing Presentation_Cathy.pptx
CatarinaTorrenuevaMa
•
60 views
Understanding Wireguard, TLS and Workload Identity
Christian Posta
•
96 views
Netwitness RT - Don’t scratch that patch.pptx
Stefano Maccaglia
•
89 views
MongoDBと位置情報 ~地理空間インデックスの紹介
9.
db.shopinfo.ensureIndex({ loc
: "2d" }); db.shopinfo.ensureIndex({ loc : "2d", category: 1 });
10.
var lon =
139; var lat = 35; db.shopinfo.save({ name: '喫茶もんご', category: ['喫茶店'], loc: [lon, lat] });
11.
db.shopinfo.find({ loc:
[139, 35] });
12.
db.shopinfo.find({ loc
: { $near : [139.4, 35.4] } });
13.
db.shopinfo.find({ loc
: { $near : [139.4, 35.4], $maxDistance : 2 } });
14.
db.shopinfo.find({ loc
: { $near : [139.4, 35.4], $maxDistance : 2 }, category: '喫茶店' });
15.
db.runCommand({ geoNear:
"shopinfo", near: [139.4, 35.4], maxDistance: 2, query: {category: '喫茶店'} });
16.
{
"ns" : "test.shopinfo", "near" : "1110100101001011000011000101000010111011111111011110", "results" : [{ "dis" : 0.5656861498877501, "obj" : { "_id" : ObjectId("4d01f5616919cb54afce6a77"), "name" : "喫茶もんご", "category" : ["喫茶店"], "loc" : [139, 35] } }], "stats" : { "time" : 0, "btreelocs" : 0, "nscanned" : 1, "objectsLoaded" : 1, "avgDistance" : 0.5656861498877501, "maxDistance" : 0.5656861498877501 }, "ok" : 1 }
18.
db.shopinfo.find({ loc
: { $within : { $box : [[130, 30], [140, 35]] } } }); db.shopinfo.find({ loc : { $within : { $center : [[135, 35], 4] } } });
25.
db.shopinfo.find({ loc
: { $nearSphere : [139.4, 35.4] } }); db.shopinfo.find({ loc : { $within : { $centerSphere : [[135, 35], 0.1] } } });
26.
1
= 6371 km
27.
db.runCommand({ geoNear:
"shopinfo", near: [135, 35], query: {category: '喫茶店'}, spherical: true }); "results" : [{ "dis" : 0.05718377899700883, "obj" : { "loc" : [139, 35] } }],