[Tile-serving] [openstreetmap/osm2pgsql] Work-in-progress implementation of new flex backend (#1037)

Jochen Topf notifications at github.com
Thu Dec 19 10:45:23 UTC 2019


WORK IN PROGRESS - Do not merge!

This PR shows my current state in working on #1036 . This PR is intended to show everybody who is interested what's there and allow testing and discussion. Much of the code is of copy-and-paste-and-then-fiddle-around quality to get something going. This will, of course, be cleaned up in time.

If you want to try this: Compile as usual, Lua support must be enabled. Then run osm2pgsql with `-O flex` and `-S some-config.lua`. Look into `flex-config` directory for some example config/style files with inline documentation. Start with `simple.lua`, then `multipolygons.lua`, and when you understand that look at `advanced.lua`.

You need the MessagePack Lua library installed (Debian/Ubuntu: `lua-messagepack`). Examples use the Inspect Lua library (Debian-Ubuntu: `lua-inspect`) for debugging output.

The work is incomplete. Specifically the following is not working yet:

* Projections other than 3857
* way_area
* Updates are not fully operational, some simpler changes might work, other will mangle your database
* Splitting linestring geometries is not implemented
* No indexes are built
* Keeping your Lua state between threads is handled by serializing the data in one thread and de-serializing in another, this copies potentially huge amounts of data around and will have to be optimized

The error handling is somtimes missing or incomplete. You will probably get crashes.

You can view, comment on, or merge this pull request online at:

  https://github.com/openstreetmap/osm2pgsql/pull/1037

-- Commit Summary --

  * Work-in-progress implementation of new flex backend

-- File Changes --

    A flex-config/advanced.lua (169)
    A flex-config/multipolygons.lua (201)
    A flex-config/simple.lua (139)
    M src/CMakeLists.txt (6)
    M src/db-copy.hpp (3)
    M src/expire-tiles.cpp (19)
    M src/expire-tiles.hpp (2)
    A src/flex-table-column.cpp (158)
    A src/flex-table-column.hpp (99)
    A src/flex-table.cpp (155)
    A src/flex-table.hpp (110)
    A src/output-flex.cpp (1025)
    A src/output-flex.hpp (120)
    M src/output.cpp (7)
    M tests/CMakeLists.txt (1)
    M tests/common-options.hpp (8)
    A tests/data/test_output_flex.lua (127)
    A tests/test-output-flex.cpp (145)

-- Patch Links --

https://github.com/openstreetmap/osm2pgsql/pull/1037.patch
https://github.com/openstreetmap/osm2pgsql/pull/1037.diff

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/openstreetmap/osm2pgsql/pull/1037
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstreetmap.org/pipermail/tile-serving/attachments/20191219/e6c715fc/attachment-0001.html>


More information about the Tile-serving mailing list