File: README.md

package info (click to toggle)
osm2pgsql 2.1.1%2Bds-1
  • links: PTS, VCS
  • area: main
  • in suites: trixie
  • size: 6,652 kB
  • sloc: cpp: 59,934; python: 1,039; ansic: 763; sh: 25; makefile: 14
file content (71 lines) | stat: -rw-r--r-- 2,916 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
# Flex Output Configuration

See the [Flex Output](https://osm2pgsql.org/doc/manual.html#the-flex-output)
chapter in the manual for all the details.

## Example config files

This directory contains example config files for the flex output. All config
files are documented extensively with inline comments.

If you are learning about the flex output, read the config files in the
following order (from easiest to understand to the more complex ones):

1. [simple.lua](simple.lua) -- Introduction to config file format
2. [geometries.lua](geometries.lua) -- Geometry column options
3. [data-types.lua](data-types.lua) -- Data types and how to handle them

After that you can dive into more advanced topics:

* [public-transport.lua](public-transport.lua) -- Use multi-stage processing
  to bring tags from public transport relations to member nodes and ways
* [route-relations.lua](route-relations.lua) -- Use multi-stage processing
  to bring tags from relations to member ways
* [unitable.lua](unitable.lua) -- Put all OSM data into a single table
* [places.lua](places.lua) -- Creating JSON/JSONB columns
* [with-schema.lua](with-schema.lua) -- Use a database schema
* [attributes.lua](attributes.lua) -- How to access OSM object attributes

The "generic" configuration is a full-featured but simple configuration that
is a good starting point for your own real-world configuration:

* [generic.lua](generic.lua)

The following config file tries to be more or less compatible with the old
pgsql (C transform) output:

* [compatible.lua](compatible.lua)

The other files demonstrate some specific functionality, look at these if
and when you need that functionality.

* [addresses.lua](addresses.lua) -- Get all objects with addresses and store
  as point objects in the database
* [bbox.lua](bbox.lua) -- Use of the `get_bbox()` function to get the bounding
  boxes of features
* [expire.lua](expire.lua) -- Tile expiry configuration
* [indexes.lua](indexes.lua) -- Various options around index creation
* [labelpoint.lua](labelpoint.lua) -- How to get good labelling points using
  the `centroid()` and `pole_of_inaccessibility()` functions.
* [untagged](untagged.lua) -- How to access untagged objects.

The subdirectory [gen](gen/) contains example configurations for
generalization support.

## Dependencies

Some of the example files use the `inspect` Lua library to show debugging
output. It is not needed for the actual functionality of the examples, so if
you don't have the library, you can remove all uses of `inspect` and the
scripts should still work.

The library is available from [the
source](https://github.com/kikito/inspect.lua) or using
[LuaRocks](https://luarocks.org/modules/kikito/inspect). Debian/Ubuntu users
can install the `lua-inspect` package.

## Public Domain

All the example config files in this directory are released into the Public
Domain. You may use them in any way you like.