[Tile-serving] [openstreetmap/osm2pgsql] Get bbox relation (PR #1666)

Jochen Topf notifications at github.com
Thu Apr 7 15:22:17 UTC 2022


The `get_bbox()` function now works for relations, too. Only node and way members are taken into account. The data is cached properly so that it is only requested from the database once even if `get_bbox()` and/or `add_row()` are called multiple times.

Part of this change is that we'll get the location of all nodes members of relations. This is new, we used to only get the way members and the locations in those ways. Getting all the node members keeps the code simpler, but has some overhead. It should be fairly small though compared to getting all the way members of the multipolygon and boundary relations which make up the bulk of what we are using.
You can view, comment on, or merge this pull request online at:

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

-- Commit Summary --

  * Simplify output_flex_t::relation_cache_t::add_members() function
  * Add support for the get_bbox() function for relations

-- File Changes --

    A flex-config/bbox.lua (153)
    M src/middle-pgsql.cpp (70)
    M src/output-flex.cpp (78)
    M src/output-flex.hpp (10)

-- Patch Links --

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

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

Message ID: <openstreetmap/osm2pgsql/pull/1666 at github.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstreetmap.org/pipermail/tile-serving/attachments/20220407/0e63c2e8/attachment.htm>


More information about the Tile-serving mailing list