bt-maps / lua-dbf

dbf reading for Lua

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

lua-dbf - Read DBF files in Lua

1. What?

dbf format is documented here

2. Why?

Shapefiles use dbf.

3. How?

luarocks install dbf

then

dbf = require"dbf"
local f = dbf.open("dbf-file.dbf")
for l in f:lines() do
  for k, v in pairs(l) do print(k, v) end
end

If you don't install with luarocks, then you need to make sure that Roberto's struct library is installed.

4. Requirements

Lua >= 5.1 or LuaJIT >= 2.0.0.

5. Issues

  • Incomplete

6. Wishlist

  • Tests?
  • Documentation?

6. Alternatives

  • Moteus's gist reads and writes dbf

About

dbf reading for Lua

License:MIT License


Languages

Language:Lua 100.0%