1# Flex Output Configuration
2
3See the [Flex Output](https://osm2pgsql.org/doc/manual.html#the-flex-output)
4chapter in the manual for all the details.
5
6## Example config files
7
8This directory contains example config files for the flex output. All config
9files are documented extensively with inline comments.
10
11If you are learning about the flex output, read the config files in the
12following order (from easiest to understand to the more complex ones):
13
141. [simple.lua](simple.lua) -- Introduction to config file format
152. [geometries.lua](geometries.lua) -- Geometry column options
163. [data-types.lua](data-types.lua) -- Data types and how to handle them
17
18After that you can dive into more advanced topics:
19
20* [route-relations.lua](route-relations.lua) -- Use multi-stage processing
21  to bring tags from relations to member ways
22* [unitable.lua](unitable.lua) -- Put all OSM data into a single table
23* [places.lua](places.lua) -- Creating JSON/JSONB columns
24* [with-schema.lua](with-schema.lua) -- Use a database schema
25* [attributes.lua](attributes.lua) -- How to access OSM object attributes
26
27The "generic" configuration is a full-featured but simple configuration that
28is a good starting point for your own real-world configuration:
29
30* [generic.lua](generic.lua)
31
32The following config file tries to be more or less compatible with the old
33pgsql (C transform) output:
34
35* [compatible.lua](compatible.lua)
36
37## Dependencies
38
39Some of the example files use the `inspect` Lua library to show debugging
40output. It is not needed for the actual functionality of the examples, so if
41you don't have the library, you can remove all uses of `inspect` and the
42scripts should still work.
43
44The library is available from [the
45source](https://github.com/kikito/inspect.lua) or using
46[LuaRocks](https://luarocks.org/modules/kikito/inspect). Debian/Ubuntu users
47can install the `lua-inspect` package.
48
49## Public Domain
50
51All the example config files in this directory are released into the Public
52Domain. You may use them in any way you like.
53
54