[Tile-serving] [osm2pgsql-dev/osm2pgsql] How to filter (postgis) Multipolygon in LUA (Discussion #2357)
Jochen Topf
notifications at github.com
Fri Jul 18 12:48:27 UTC 2025
I don't understand why you just ignore multipolygons with more than one polygon in it. You'll loose data that way. It seems to me it would be much simpler to iterate over all polygons in the multipolygon and insert each one on its own ([example](https://osm2pgsql.org/examples/buildings/)). That way you have all the data and don't need to mess around with multipolygons in the database.
If you *really* want to ignore multipolygons with more than one polygon in it, the `num_geometries() == 1` is the correct way of doing this. Any other check (with members and roles and so on) will not work for all cases.
--
Reply to this email directly or view it on GitHub:
https://github.com/osm2pgsql-dev/osm2pgsql/discussions/2357#discussioncomment-13805853
You are receiving this because you are subscribed to this thread.
Message ID: <osm2pgsql-dev/osm2pgsql/repo-discussions/2357/comments/13805853 at github.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstreetmap.org/pipermail/tile-serving/attachments/20250718/6db4770a/attachment.htm>
More information about the Tile-serving
mailing list