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
Sponsored
·
Your Podcast. Everywhere. Effortlessly.
Share. Educate. Inspire. Entertain. You do you. We'll handle the rest.
→
Hans Kristian Flaatten
December 15, 2015
Technology
36
0
Share
Introduction to Geospatial Queries in MongoDB
Hans Kristian Flaatten
December 15, 2015
More Decks by Hans Kristian Flaatten
See All by Hans Kristian Flaatten
Continuous Deployment with Jenkins Pipelines
starefossen
0
55
Continuous Integrations with Jenkins
starefossen
0
69
Testing Node.js
starefossen
0
32
What is Node.js?
starefossen
0
43
LeftPad Not Found
starefossen
0
87
Whats New In EcmaScript 2015 / ES6
starefossen
0
72
Experience with NoSQL at the Norwegian Trekking Asocciation
starefossen
0
44
Åpen Tur- og Friluftsdata
starefossen
0
110
Reverse Engineering APIs from iOS and Android Apps
starefossen
0
66
Other Decks in Technology
See All in Technology
なぜハノーバーメッセに行くべきなのか 〜初参加だから語れること〜
tanakaseiya
0
190
TROCCOで始めるクラウドコストを民主化するためのFinOps
tk3fftk
2
520
Spring AI × MCP 入門〜AIエージェントへのツール公開、境界設計から始める最小構成 〜
yuyamiyamoto
0
190
Platform Engineering as a Product: Criteria for Improvement and Multi-Tenant Design
kumorn5s
0
450
GitHub Copilot CLIでWebアクセシビリティを改善した話
tomokusaba
0
140
OpenID Connectによるサービス間連携
takesection
0
150
脅威をエンジニアリングの糧にして:恐怖を乗り越えた先にあったもの / Turn threats into fuel for engineering: what lay beyond overcoming fear
nrslib
1
360
JJUG CCC 2026 Spring AI時代の開発こそ標準化を武器に! ― 方式・プロセス・プラットフォームの標準化
s27watanabe
2
650
Mastering Ruby Box
tagomoris
3
130
GoとSIMDとWasmの今。
askua
2
430
Strands Agents超入門
kintotechdev
1
150
APIテストとは?
nagix
0
160
Featured
See All Featured
End of SEO as We Know It (SMX Advanced Version)
ipullrank
3
4.2k
From Legacy to Launchpad: Building Startup-Ready Communities
dugsong
0
220
Fantastic passwords and where to find them - at NoRuKo
philnash
52
3.7k
The browser strikes back
jonoalderson
0
1.1k
The Pragmatic Product Professional
lauravandoore
37
7.3k
The Spectacular Lies of Maps
axbom
PRO
1
780
The Illustrated Guide to Node.js - THAT Conference 2024
reverentgeek
1
370
Visualizing Your Data: Incorporating Mongo into Loggly Infrastructure
mongodb
49
10k
Believing is Seeing
oripsolob
1
140
Deep Space Network (abreviated)
tonyrice
0
160
A Guide to Academic Writing Using Generative AI - A Workshop
ks91
PRO
1
310
Information Architects: The Missing Link in Design Systems
soysaucechin
0
950
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> }