[Tile-serving] Configuration files for osm2pgsql
Kai Krueger
kakrueger at gmail.com
Thu Apr 10 07:09:18 UTC 2014
Hi,
Yes, I think you do sort of still need both the default.style and the
lua script when using lua. There is a bit of an odd interaction between
the two, so it depends on how you need to keep things in sync.
They default.style is still used to define the postgresql database table
layout. I.e. the columns specified in the point, way, road and polygon
tables are specified through the default.style. Everything else should
be done through the lua script.
In some ways, the lua script is really only a tag transform script that
"pre-filters" every way, node and relation and allows to perform
arbitrary changes, deletion or adding of tags for each entity before it
enters the main processing pipeline. However, the lua script is also
used to define if a way or relation belongs in the polygon table or the
linear tables (road or line).
If you use a pure hstore database, i.e. the table consists of a single
"tags" column and no other columns, then you can entirely rely on the
lua script.
If you are using hstore, there is a good chance you don't need to touch
the default.style though as the more exotic tags used that aren't
already in default.style are probably best added only to hstore rather
than to the columns, so you don't need to modify the db layout through
default.style but that is up to you and in the end depends on your use case.
Kai
P.S. take everything I said with a grain of salt, as I haven't looked at
this part in detail for a while, so I might be remembering things
incorrectly...
On 04/09/2014 05:21 AM, Andy Allan wrote:
> Hi All,
>
> The latest release of osm2pgsql (0.84.0) has a style.lua file, along
> with the default.style. I understand that the lua file is (currently?)
> optional, and repeats what is implemented in the C code.
>
> The lua file contains polygon_keys and generic_keys but it's not clear
> to me how they interact with the default.style.
>
> Does the style.lua file make the default.style redundant? Or do you
> need to keep them in sync if you're using the lua rules? The example
> in README_lua.md suggests that you need both.
>
> Cheers,
> Andy
>
> _______________________________________________
> Tile-serving mailing list
> Tile-serving at openstreetmap.org
> https://lists.openstreetmap.org/listinfo/tile-serving
>
More information about the Tile-serving
mailing list