Simple OpenStreetMaps to Mongo loader
Find a file
Alexander NeonXP Kiryukhin c362271047 Store objects on single collections (overpass like json)
Filter deleted objects
2019-06-03 13:59:49 +03:00
.gitignore Initial 2019-05-26 02:17:25 +03:00
go.mod Parallel write 2019-05-30 14:05:08 +03:00
go.sum Parallel write 2019-05-30 14:05:08 +03:00
helpers.go Parallel write 2019-05-30 14:05:08 +03:00
indexes.go Store objects on single collections (overpass like json) 2019-06-03 13:59:49 +03:00
LICENSE Create LICENSE 2019-05-26 02:20:26 +03:00
main.go Store objects on single collections (overpass like json) 2019-06-03 13:59:49 +03:00
models.go Store objects on single collections (overpass like json) 2019-06-03 13:59:49 +03:00
reader.go Store objects on single collections (overpass like json) 2019-06-03 13:59:49 +03:00
README.md Store objects on single collections (overpass like json) 2019-06-03 13:59:49 +03:00
writer.go Store objects on single collections (overpass like json) 2019-06-03 13:59:49 +03:00

OpenStreetMaps to Mongo

Simple loader from osm dump file to mongodb. Based on https://github.com/paulmach/osm package.

Build

go build -o osm2mgo

Usage

./osm2mgo flags

Flags:

  • -osmfile string Path to OSM file (PBF format only) (default "./RU.osm.pbf")
  • -dbconnection string Mongo database name (default "mongodb://localhost:27017")
  • -dbname string Mongo database name (default "map")
  • -initial Is initial import?
  • -indexes Create indexes
  • -layers string Layers to import (default "nodes,ways,relations")
  • -concurrency int Workers count (default 32)
  • -block int Block size to bulk write (default 1000)

Example

# ./osm2mgo -osmfile ~/Downloads/RU.pbf
Nodes: 1294069 Ways: 0 Relations: 0