hey can any one tell me how to import OSM data in mongoDB step by step.

This is the link of data http://download.geofabrik.de/europe/germany/baden-wuerttemberg/karlsruhe-regbez.html

asked 04 Aug '14, 22:25

vickyvikas's gravatar image

accept rate: 0%

MongoDB is not the database of choice for typical OSM operations so you are unlikely to find any tried and tested howtos beyond what any major search engine will give you if you type in "openstreetmap mongodb", namely http://derickrethans.nl/importing-osm-into-mongodb.html

permanent link

answered 04 Aug '14, 22:58

Frederik%20Ramm's gravatar image

Frederik Ramm ♦
accept rate: 23%

It mostly depends on what you want to do with the data. You can always parse the data yourself and import it that way. How you store data depends greatly on what you want to do with it.

For rendering maps (a common OSM usage), you need geographic indexes, for doing spatial analysis, you need geographic functions (what's the distance between X and this road), if these things are not in MongoDB, then you will not be able to easily use OSM data in MongoDB.

permanent link

answered 08 Jun '15, 13:27

rorym's gravatar image

accept rate: 9%

This can be done using the mongosm importer.

  1. Download the osm file: http://download.geofabrik.de/europe/germany/baden-wuerttemberg/karlsruhe-regbez-latest.osm.bz2.
  2. Extract the file. Try f.ex. 7zip, or bunzip2 karlsruhe-regbez-latest.osm.bz2 in a shell.
  3. Download the repo. Either from me (patched), or from the original and replace Connection with MongoClient.
  4. python mongosm-master/insert_osm_data.py karlsruhe-regbez-latest.osm imports the data.

cross-post to https://gis.stackexchange.com/a/240341/97214, as the question was cross-posted as well

permanent link

answered 14 May, 19:19

serv-inc's gravatar image

accept rate: 0%

Your answer
toggle preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here



Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text](http://url.com/ "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported

Question tags:


question asked: 04 Aug '14, 22:25

question was seen: 3,463 times

last updated: 14 May, 19:19

powered by OSQA