joto / osmium

C++/Javascript framework for working with OSM files.
http://wiki.openstreetmap.org/wiki/Osmium
GNU General Public License v3.0
123 stars 31 forks source link

osmjs before_ and after_ callbacks #61

Closed ajashton closed 11 years ago

ajashton commented 11 years ago

The init, end, node, way, & relation callbacks work fine, but none of the before or after callbacks do. I've created a js file to test all of the callbacks; when run (with various pbf and xml files) as described in the comment at the top the output is:

✔ init
✔ node
✔ way
✔ relation
✔ end

Apart from missing all of the before and after callbacks, the relations are handled later than I would expect based on the README and the -2 option being passed.

This is with latest master on Arch Linux.

joto commented 11 years ago

It seems those callbacks were never implemented. Fixed in c94a0eb.

Relation callbacks are called on the second pass. The documentation was wrong and has been fixed.

ajashton commented 11 years ago

Excellent, thanks!