[Tile-serving] [openstreetmap/osm2pgsql] Store properties to a database table and retrieve for updates (PR #1964)

Jochen Topf notifications at github.com
Mon May 22 09:32:32 UTC 2023


Store command line settings in a database table called "osm2pgsql_properties" when importing data. This is mainly so that we can do updates without specifying those settings again (or checking that the settings match the ones used for import.)

The table always has the same name and will be stored in the schema used for the middle tables (set with --middle-schema).

Adds a new generic properties_t class which can store strings, integers and booleans as properties. Internally a map of strings is used for the properties, in the database a simple table with two text columns, property and value, is used. For boolean values strings 'true' and 'false' are used.

Currently the following properties are stored in the database:
- "attributes" (bool): -x/--extra-attributes setting
- "flat_node_file": flat node file name
- "prefix": prefix from --prefix
- "updatable" (bool): can the database be updated, i.e. created with --slim and no --drop
- "version": osm2pgsql version
You can view, comment on, or merge this pull request online at:

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

-- Commit Summary --

  * Store properties to a database table and retrieve for updates

-- File Changes --

    M src/CMakeLists.txt (1)
    M src/options.cpp (1)
    M src/options.hpp (1)
    M src/osm2pgsql.cpp (157)
    M src/pgsql-capabilities.cpp (4)
    A src/properties.cpp (182)
    A src/properties.hpp (106)
    M tests/CMakeLists.txt (1)
    A tests/bdd/regression/properties.feature (52)
    M tests/bdd/regression/update.feature (1)
    A tests/test-properties.cpp (155)

-- Patch Links --

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

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

Message ID: <openstreetmap/osm2pgsql/pull/1964 at github.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstreetmap.org/pipermail/tile-serving/attachments/20230522/2677dced/attachment.htm>


More information about the Tile-serving mailing list