[Tile-serving] [openstreetmap/osm2pgsql] WIP: Add code to generalize polygons using two different strategies (PR #1830)
Jochen Topf
notifications at github.com
Mon Nov 21 08:11:53 UTC 2022
This commit adds the code to generalize polygons using two different strategies. In both cases polygons are merged and simplified on a tile-by-tile basis.
The "vector" strategy uses the commonly used approach where polygons are buffered, their union is calculated and then a reverse buffer applied, followed by a final buffer again.
The "raster" strategy does a similar thing but does it in raster space which is much faster. First the polygons are rendered into a raster, an open/close operation is called (which basically does the same thing as the buffering in vector space) and finally the resulting raster is vectorized again.
For the raster support this adds two new library dependency: CImg and potrace.
The functionality is accessed through a new command line program called osm2pgsql-gen. Call it with -h to get some usage information. This program is for testing only, eventually the functionality should be accessible from osm2pgsql itself (using the Lua config file for configuration).
Some additional information is in README-gen.md
You can view, comment on, or merge this pull request online at:
https://github.com/openstreetmap/osm2pgsql/pull/1830
-- Commit Summary --
* WIP: Add code to generalize polygons using two different strategies
-- File Changes --
M .github/actions/ubuntu-prerequisites/action.yml (2)
M .github/actions/win-install/action.yml (3)
M .github/workflows/ci.yml (2)
M .github/workflows/test-install.yml (2)
M CMakeLists.txt (15)
A README-gen.md (65)
M README.md (5)
A src/canvas.cpp (48)
A src/canvas.hpp (68)
A src/gen-tile-raster.cpp (222)
A src/gen-tile-raster.hpp (34)
A src/gen-tile-vector.cpp (83)
A src/gen-tile-vector.hpp (26)
A src/gen-tile.cpp (139)
A src/gen-tile.hpp (94)
A src/osm2pgsql-gen.cpp (289)
M src/pgsql.hpp (9)
M src/tile.hpp (25)
A src/tracer.cpp (102)
A src/tracer.hpp (74)
M src/util.hpp (6)
-- Patch Links --
https://github.com/openstreetmap/osm2pgsql/pull/1830.patch
https://github.com/openstreetmap/osm2pgsql/pull/1830.diff
--
Reply to this email directly or view it on GitHub:
https://github.com/openstreetmap/osm2pgsql/pull/1830
You are receiving this because you are subscribed to this thread.
Message ID: <openstreetmap/osm2pgsql/pull/1830 at github.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstreetmap.org/pipermail/tile-serving/attachments/20221121/01803bd9/attachment.htm>
More information about the Tile-serving
mailing list