Project

osm2mongo

0.01
Repository is archived
No commit activity in last 3 years
No release in over 3 years
Import Openstreetmap .osm(xml) data format into MongoDB written in Ruby.
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Development

~> 3.0
~> 3.10
 Project Readme
= osm2mongo

* https://github.com/posseidon/osm2mongo

== DESCRIPTION:

Import Openstreetmap .osm(xml) data format into MongoDB written in Ruby.

== FEATURES/PROBLEMS:

* TODO: Missing Rake task for installing dependencies and generate documentation.

== SYNOPSIS:

  From Code:
  =============
  
  collections = {"node" => "nodes", "way" => "ways", "relation" => "rels"}
  common = Osm2Mongo::Common.new()
  status = common.download("http://download.geofabrik.de/osm/europe/hungary.osm.bz2", "/tmp/")
  status = common.decompress(status['path'])
  callback = Osm2Mongo::Callbacks.new("osm",  collections, 100, common)
  common.parse(status['path'])
  
  From command line:
  =============
  >>>Load data into Mongo<<<
  ruby osm2mongo.rb -H localhost -p 27017 -d osm -l 200 -f /tmp/map.osm
  ruby osm2mongo.rb -H localhost -p 27017 -d osm -l 200 -U http://someaddress.com/map.osm.bz2
  
  >>Filter data into new collection by map feature type<<<
  ruby osm2mongo.rb -F highway -d osm -H localhost -p 27017 -l 300
  ruby osm2mongo.rb -F waterway -S riverbank -d osm -H localhost -p 27017 -l 300


== REQUIREMENTS:

* mongo: MongoDB ruby driver (http://rubygems.org/gems/mongo)
* nokogiri: xml parser (http://rubygems.org/gems/nokogiri)
* progressbar: just for fun and icandy :-) (http://rubygems.org/gems/progressbar)

== INSTALL:

sudo gem install osm2mongo

== DEVELOPERS:

After checking out the source, run:

  $ rake newb

This task will install any missing dependencies, run the tests/specs,
and generate the RDoc.

== LICENSE:

(The MIT License)

Copyright (c) 2012 OSM2Mongo

Permission is hereby granted, free of charge, to any person obtaining
a copy of this software and associated documentation files (the
'Software'), to deal in the Software without restriction, including
without limitation the rights to use, copy, modify, merge, publish,
distribute, sublicense, and/or sell copies of the Software, and to
permit persons to whom the Software is furnished to do so, subject to
the following conditions:

The above copyright notice and this permission notice shall be
included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND,
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.