[Tile-serving] [osm2pgsql-dev/osm2pgsql] Refactor area assembler (PR #2224)

Jochen Topf notifications at github.com
Thu Aug 15 06:57:54 UTC 2024


The area assembler code we were using from libosmium was doing a few unnecessary things. This implements our own class which only does what's necessary.

We also reuse the memory buffer where we assemble the areas, which saves us from constant memory allocations.

Will not have a huge impact, but doing less work is always good.
You can view, comment on, or merge this pull request online at:

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

-- Commit Summary --

  * Write our own area assembler wrapper class
  * Re-use temp buffer for area creation

-- File Changes --

    M src/CMakeLists.txt (1)
    A src/geom-area-assembler.cpp (59)
    A src/geom-area-assembler.hpp (67)
    M src/geom-from-osm.cpp (37)
    M src/geom-from-osm.hpp (16)
    M src/output-flex.cpp (11)
    M src/output-flex.hpp (2)
    M src/output-pgsql.cpp (14)
    M src/output-pgsql.hpp (1)
    M tests/test-geom-multipolygons.cpp (24)
    M tests/test-geom-polygons.cpp (24)

-- Patch Links --

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

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

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


More information about the Tile-serving mailing list