[Tile-serving] [openstreetmap/osm2pgsql] Optionally wrap polygon geometries in multipolygons (#1327)
Jochen Topf
notifications at github.com
Wed Nov 18 15:45:58 UTC 2020
When you have an area table in the flex output, you always had to use the "geometry" column type for the geometry column, because ways are turned into polygons and multipolygon relations are turned into polygons or multipolygons. The common type for these is the generic "geometry".
With this change, declaring a geometry column as type "multipolygon" now works. All polygon geometries are automatically wrapped in a multipolygon before adding them to the database. Depending on what you are doing this might be want you want or not. It will make the geometries larger, but it also makes the data more consistent and so easier to work with and some software can only handle this consistent data.
See #1316
You can view, comment on, or merge this pull request online at:
https://github.com/openstreetmap/osm2pgsql/pull/1327
-- Commit Summary --
* Add target_geom_type parameter to geom transformation run() func
* Optionally wrap polygon geometries in multipolygons
-- File Changes --
M src/geom-transform.cpp (27)
M src/geom-transform.hpp (14)
M src/osmium-builder.cpp (53)
M src/osmium-builder.hpp (19)
M src/output-flex.cpp (12)
M src/output-flex.hpp (13)
M src/output-gazetteer.cpp (6)
M src/output-pgsql.cpp (5)
M src/processor-polygon.cpp (5)
M tests/CMakeLists.txt (1)
A tests/data/test_output_flex_multigeom.lua (32)
A tests/data/test_output_flex_multigeom.osm (51)
A tests/data/test_output_flex_multigeom_geometry.lua (5)
A tests/data/test_output_flex_multigeom_multipolygon.lua (5)
A tests/data/test_output_flex_multigeom_polygon.lua (5)
A tests/test-output-flex-multigeom.cpp (57)
-- Patch Links --
https://github.com/openstreetmap/osm2pgsql/pull/1327.patch
https://github.com/openstreetmap/osm2pgsql/pull/1327.diff
--
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/openstreetmap/osm2pgsql/pull/1327
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstreetmap.org/pipermail/tile-serving/attachments/20201118/61514e44/attachment.htm>
More information about the Tile-serving
mailing list