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
Introduction to Geospatial Queries in MongoDB
Search
Hans Kristian Flaatten
December 15, 2015
Technology
0
32
Introduction to Geospatial Queries in MongoDB
Hans Kristian Flaatten
December 15, 2015
Tweet
Share
More Decks by Hans Kristian Flaatten
See All by Hans Kristian Flaatten
Continuous Deployment with Jenkins Pipelines
starefossen
0
54
Continuous Integrations with Jenkins
starefossen
0
65
Testing Node.js
starefossen
0
29
What is Node.js?
starefossen
0
40
LeftPad Not Found
starefossen
0
85
Whats New In EcmaScript 2015 / ES6
starefossen
0
70
Experience with NoSQL at the Norwegian Trekking Asocciation
starefossen
0
39
Åpen Tur- og Friluftsdata
starefossen
0
100
Reverse Engineering APIs from iOS and Android Apps
starefossen
0
64
Other Decks in Technology
See All in Technology
プロダクト開発と社内データ活用での、BI×AIの現在地 / Data_Findy
sansan_randd
1
820
LLM APIを2年間本番運用して苦労した話
ivry_presentationmaterials
10
8.1k
Mackerelにおけるインシデント対応とポストモーテム - 現場での工夫と学び
taxin
0
110
CLIPでマルチモーダル画像検索 →とても良い
wm3
2
800
kotlin-lsp の開発開始に触発されて、Emacs で Kotlin 開発に挑戦した記録 / kotlin‑lsp as a Catalyst: My Journey to Kotlin Development in Emacs
nabeo
2
330
窓口業務を生成AIにおまかせ!Bedrock Agent Coreで実現する自治体AIエージェント!
rayofhopejp
0
170
設計に疎いエンジニアでも始めやすいアーキテクチャドキュメント
phaya72
27
18k
InsightX 会社説明資料/ Company deck
insightx
0
200
パフォーマンスチューニングのために普段からできること/Performance Tuning: Daily Practices
fujiwara3
2
200
アノテーション作業書作成のGood Practice
cierpa0905
PRO
1
400
Copilotの精度を上げる!カスタムプロンプト入門.pdf
ismk
2
420
可観測性は開発環境から、開発環境にもオブザーバビリティ導入のススメ
layerx
PRO
4
2.7k
Featured
See All Featured
Building an army of robots
kneath
306
46k
I Don’t Have Time: Getting Over the Fear to Launch Your Podcast
jcasabona
34
2.5k
StorybookのUI Testing Handbookを読んだ
zakiyama
31
6.3k
Exploring the Power of Turbo Streams & Action Cable | RailsConf2023
kevinliebholz
36
6.1k
Gamification - CAS2011
davidbonilla
81
5.5k
Improving Core Web Vitals using Speculation Rules API
sergeychernyshev
21
1.2k
How to Think Like a Performance Engineer
csswizardry
27
2.2k
Reflections from 52 weeks, 52 projects
jeffersonlam
355
21k
10 Git Anti Patterns You Should be Aware of
lemiorhan
PRO
658
61k
No one is an island. Learnings from fostering a developers community.
thoeni
21
3.5k
It's Worth the Effort
3n
187
28k
Unsuck your backbone
ammeep
671
58k
Transcript
1 ! Geometriske Spøringer Hans Kristian Flaatten @Starefossen Bergen MongoDB
& NoSQL User Group Tirsdag 15. desember 2015 Bergen og Hordaland Turlag
Geometriske indexer • Sfærisk (Spherical) • index: 2dsphere • data:
GeoJSON • Flat (legacy) • index: 2d • data: coordinate pairs 2
2dsphere • Introdusert i MongoDB v2.4.0 • http://geojson.org/ • coordinate-axis
order: longitude, latitude • coordinate reference system: WGS84 datum 3
GeoJSON • Point (v2.4.0) • LineString (v2.4.0) • Polygon (v2.4.0)
• MultiPoint (v2.4.0) • MultiLineString (v2.6.0) • MultiPolygon (v2.6.0) • GeometryCollection (v2.6.0) 4
GeoJSON 5 { "type": "LineString", "coordinates": [ [100.0, 0.0], [101.0,
1.0], [102.0, 2.0] ], "properties": { "name": "Simple Line" } }
Coordinate Reference System (CRS) • geoid • ellipsoid (spheroid) •
Lokal: NAD1983, GDA94 • Global: WGS84, GRS80, International 1924 6
7 geoid Ellipsoide globalt best passende til geoiden Ellipsoide regionalt
tilpasset geoiden Best mulig passform
topografi geosenter b a 8 H h
Geometriske Spøringer 9 $geoWithin <Polygon> $geoIntersects <*>
$near <Point>
2dsphere index 10 db.collection.createIndex({ <location field> : "2dsphere" });
$geoWithin 11 $geoWithin: { $geometry: { type: <"Polygon" or "MultiPolygon">,
coordinates: [ <coordinates> ] } }
$geoWithin (improved) 12 $geoWithin: { $box: [ [ <bottom left
coordinates> ], [ <upper right coordinates> ] ] }
$geoIntersects 13 $geoIntersects: { $geometry: { type: <"GeoJSON object type">,
coordinates: [ <coordinates> ] } }
$near 14 $near: { $geometry: { type: "Point", coordinates: coordinates:
[<lon> , <lat>] }, $maxDistance: <distance in meters>, $minDistance: <distance in meters> }