[Tile-serving] [openstreetmap/osm2pgsql] Add special id column type "tile" for generalized data (PR #2008)

Jochen Topf notifications at github.com
Fri Jul 21 07:03:54 UTC 2023


Generalized data is often stored in tables accessed by tile (x/y). This adds special code for that so we don't have to defined these columns explicitly in the Lua config. The columns are logically very similar to the "id column(s)" stored for "normal" output tables in that they are used by osm2pgsql to update the data correctly. So we are using the same mechanism for these columns.

In "create" mode an index is automatically generated on these columns after generalization. As with the other id indexes this will happen either when the database is updatable or when the "create_index" option on the ids setting is set to "always".

This commit introduces a new enum "flex_table_index_type" which is used instead of osmium::item_type to define the index type, because osmium::item_type has no value for "tile".
You can view, comment on, or merge this pull request online at:

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

-- Commit Summary --

  * Add special id column type "tile" for generalized data

-- File Changes --

    M flex-config/gen/forests.lua (5)
    M src/flex-lua-table.cpp (40)
    M src/flex-table.cpp (17)
    M src/flex-table.hpp (24)
    M src/gen/osm2pgsql-gen.cpp (31)

-- Patch Links --

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

-- 
Reply to this email directly or view it on GitHub:
https://github.com/openstreetmap/osm2pgsql/pull/2008
You are receiving this because you are subscribed to this thread.

Message ID: <openstreetmap/osm2pgsql/pull/2008 at github.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstreetmap.org/pipermail/tile-serving/attachments/20230721/07cd4a84/attachment.htm>


More information about the Tile-serving mailing list