Locate all the things
summary
Imports OpenStreetMap extracts (Amsterdam) into MongoDB, handling about 12 million nodes and 1.2 million ways, and stores geometries as GeoJSON points/lines/polygons with a S2 cell based geospatial index. Uses a single-array tag index hack (concatenated "key=value" strings) to avoid hundreds of sparse indexes, runs geo queries ($geoNear, $geoWithin, $geoIntersects) and aggregation pipeline geoNear to attach distances, and renders results with Leaflet. Works well for proximity lookups; heavy GIS needs favour PostGIS.
AI-written summary · about
chapters (20)
- 0:00Start
- 0:13What's open?
- 1:11About the example data-set
- 2:42The Data
- 6:38Tagging features (2)
- 9:40Importing OSM into MongoDB (2)
- 13:13Tags as a keylvalue combination
- 14:12Tags as concatenated strings
- 17:35GeoJSON: Point
- 19:01GeoJSON: LineString
- 19:38GeoJSON: Polygon
- 23:45Cells for a point
- 24:28Cells for a polygon
- 26:42The import script
- 28:37Geo Operators
- 29:13Example with Snear
- 30:48Example with $geoWithin
- 32:22SgeoWithin - example
- 33:04Example with $geolntersects
- 35:32Aggregation: SgeoNear example
related talks
52mThe Location of Things from A to (X,Y,Z)
01h 41mOpenStreetWhat? Mapping The World With Open Data
50mMaking use of OpenStreetMap data with Python
48mOpenStreetMap for the Web
23mLocation Insights for Your Graphs with Neo4j, PostGIS, and Brickgraph
35mMySQL 5.7, 8.0 and MongoDB: Geospatial Introduction
50m–Mom, can we have G**gle Maps? –We have G**gle Maps at home
37mProcessing Open Street Map Data with Python and PostgreSQL
