lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]


Hi,

lua-readosm [1] is a Lua binding to readosm [2], a library for reading OpenStreetMap [3] XML and PBF [4] files.

OpenStreetMap is a free, open map of the world, and its native data formats are XML and PBF (a binary format based on Google’s Protocol Buffers [5]).

I’m afraid it’s LuaJIT only at the moment, it uses the FFI rather than the classic Lua API.  If there’s interest I’ll try to find time to build a standard Lua binding.  Furthermore, it uses a callback interface, like readosm, rather than a more Lua-like iterator interface.  Unfortunately, turning a callback interface into an iterator interface requires yielding across a C boundary.

(Hisham, I’ll give it a week or so to see how many bugs are found and then I’ll tag v1 and ask you to upload the rockspec)

Cheers,
Geoff


[1] https://github.com/geoffleyland/lua-readosm
[2] https://www.gaia-gis.it/fossil/readosm/index
[3] http://www.openstreetmap.org/
[4] http://wiki.openstreetmap.org/wiki/PBF_Format
[5] https://code.google.com/p/protobuf/