[Tile-serving] [osm2pgsql-dev/osm2pgsql] Changed handling of object attributes in flex output (PR #2231)

Jochen Topf notifications at github.com
Fri Aug 16 13:30:29 UTC 2024


This is a backwards incompatible change in the way we are handling objects attributes (version, timestamp, changeset, uid, user) and the -x/--extra-attributes option in the flex output. The pgsql output is unaffected.

Old behaviour:
* If -x is set: attributes are available in Lua
* If -x is set: **all** objects are sent to the process functions, not only tagged objects
* If -x is set: Attributes are stored in middle tables in slim mode

New behaviour:
* Attributes are always available in Lua if they are in the data
* Only tagged objects are sent to the `process_node|way|relation` functions. There are new functions `process_untagged_node|way|relation` that are always called for untagged objects if they are defined.
* If -x is set: Attributes are stored in middle tables in slim mode (as before)

This separates out the three concerns (availability of attributes in Lua config, handling of untagged objects, and storage of attributes in middle).
You can view, comment on, or merge this pull request online at:

  https://github.com/osm2pgsql-dev/osm2pgsql/pull/2231

-- Commit Summary --

  * Make attributes of OSM objects always available to Lua
  * Flex: Process untagged objects in their own callbacks

-- File Changes --

    A flex-config/untagged.lua (44)
    M src/init.lua (12)
    M src/osmdata.cpp (4)
    M src/output-flex.cpp (82)
    M src/output-flex.hpp (6)
    M tests/bdd/flex/extra-attributes.feature (4)

-- Patch Links --

https://github.com/osm2pgsql-dev/osm2pgsql/pull/2231.patch
https://github.com/osm2pgsql-dev/osm2pgsql/pull/2231.diff

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

Message ID: <osm2pgsql-dev/osm2pgsql/pull/2231 at github.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstreetmap.org/pipermail/tile-serving/attachments/20240816/f798c35a/attachment.htm>


More information about the Tile-serving mailing list