[OSM-dev] New Ruby lib for handling and exporting OSM data
Jochen Topf
jochen at remote.org
Thu Dec 6 16:21:23 GMT 2007
Hi!
I wrote a new Ruby library for handling OSM data in several ways. It can
be found at http://osmlib.rubyforge.org/ . There is lots of documentation
there, some examples and Ruby gems which can also be installed as usual
with the 'gem' program.
The library is currently devided into three packages:
OSM Library - Base
Basic support for OSM objects like Nodes, Ways, Relations and Tags.
A Stream parser to parse OSM XML files.
OSM Library - Export
For exporting OSM data into other file formats. Currently KML,
Shapefiles and CSV are supported, more are planned and should be
reasonably easy to integrate in the framework. The export is very
flexible, it uses "rules files" to define which OSM data should be
exported in which way. The rules files are actually Ruby code which
makes this easy and flexible. A command line utility program called
"osmexport" is also provided. Try it out.
Some examples rules files and exported data can be found at
http://geo.topf.org/osmlib/index.html
OSM Library - SQLite
For importing OSM data into SQLite database and exporting it back
again into .osm files. The idea is that the SQLite database can be
used for filtering or generally mangling OSM data that doesn't
completely fit into memory without having to install a real database
like MySQL or Postgres. Currently this is more of a proof-of-concept,
especially the export is totally unoptimized, rather slow and
doesn't work on large files.
The library is released as Public Domain software. It is - as always -
very much work in progress. I encourage everybody to try it, send me bug
reports or feature requests or join the development. You can get the
current version from the Rubyforge Subversion server and there are
mailing lists for OSMLib specific stuff.
Jochen
--
Jochen Topf jochen at remote.org http://www.remote.org/jochen/ +49-721-388298
More information about the dev
mailing list