This is a static archive of our old OpenStreetMap Help Site. Please post any new questions and answers at community.osm.org.

osm2pqsql and lua

0

I installed osm2pqsql the other day. At one point it said "lua libraries not found. You will NOT be able to use lua scripts for tag transform.". I had no idea what a lua was or why I would want one, so I had a bit of a read here and here. After reading "This allows you to unify disparate tagging (for example, highway=path; foot=yes and highway=footway)" it now sounds very useful indeed **.

There's what seems to be an example here, but what isn't clear, unfortunately, is whether the lua script passed to osm2pgsql on the command line has got to implement all of what's currently in style.lua, or whether something much simpler (for example just rewriting one tag as another) is also possible?

** I've done this to Garmin maps for years - generally sticking extra info into the name tag to reflect things such as the legal status of a footpath. It would be useful to be able to do this elsewhere too.

asked 25 Nov '13, 20:36

SomeoneElse's gravatar image

SomeoneElse ♦
36.9k71370866
accept rate: 16%

edited 11 Jan '15, 11:24


One Answer:

2

You do need to implement what's included in style.lua. This is used in place of parts of the default, native processing. However, you can of course simply alter the existing style.lua for your own purposes, perhaps starting with filter_tags_way as a first step.

I'd very strongly recommend it if you're doing anything with rights of way, in particular. osm2pgsql's Lua processing has made my workflow much simpler and faster for exactly this reason.

answered 26 Nov '13, 00:41

Richard's gravatar image

Richard ♦
30.9k44279412
accept rate: 18%

1

Thanks - works a treat. What I ended up doing was:

https://github.com/SomeoneElseOSM/designation-style

(26 Dec '13, 16:23) SomeoneElse ♦

Source code available on GitHub .