NOTICE: help.openstreetmap.org is no longer in use from 1st March 2024. Please use the OpenStreetMap Community Forum

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


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.

permanent link

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 ♦

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text](http://url.com/ "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported

Question tags:

×263
×5

question asked: 25 Nov '13, 20:36

question was seen: 6,997 times

last updated: 11 Jan '15, 11:24

NOTICE: help.openstreetmap.org is no longer in use from 1st March 2024. Please use the OpenStreetMap Community Forum