[OSM-dev] osmlib - which version of libxml

Jochen Topf jochen at remote.org
Wed Feb 27 13:38:49 GMT 2008

On Wed, Feb 27, 2008 at 12:47:07PM +0000, Nick Black wrote:
> I can't get into the osmlib list, so I'm asking here.  I last used
> osmlib before christmas, but today it isn't working:
> $ osmexport 01_major_secondary.oxr  putney.osm /output/
> /sw/lib/ruby/gems/1.8/gems/GeoRuby-1.3.2/lib/geo_ruby/simple_features/geometry.rb:22:
> warning: method redefined; discarding old srid=
> /sw/lib/ruby/gems/1.8/gems/osmlib-base-0.1.2/lib/OSM/StreamParser.rb:38:
> uninitialized constant XML::SaxParser::Callbacks (NameError)
> I thought this is an issue with libxml-ruby's new SAX paraser
> callbacks.  I'm using libxml-ruby on Ubuntu & Mac.

Yes. That version is too old. It doesn't work with current osmlib.

> Do I need to update to 0.5.2 or 0.5.3?

0.5.2 works for me on my development machine, but I have problems on
other machines with it. It seems the libxml-ruby people are changing
some things around in the last weeks and have broken the library several
times in different ways. :-(

I have just checked in a version of the OSM parser that uses REXML
instead of libxml that could be used while we wait for the libxml stuff
to settle. Its going to be slower, though.

Change OSM::StreamParser to OSM::StreamParserREXML and OSM::Callbacks to
OSM::CallbacksREXML to use this.

I have also added a version of osmexport that uses this. Call
"osmexport-rexml" binary instead of "osmexport".

Of course this is very inelegant and hacky, but I don't have the time at
the moment to do it properly. This should at least give everybody a
working version to work with.

Jochen Topf  jochen at remote.org  http://www.remote.org/jochen/  +49-721-388298

More information about the dev mailing list