[Tile-serving] [openstreetmap/osm2pgsql] WIP: Add code to generalize polygons using two different strategies (PR #1830)
mboeringa
notifications at github.com
Sun Nov 27 13:00:38 UTC 2022
@joto
Interesting reads those blog posts.
A couple of remarks though:
- Unless you use **ST_Buffer**'s 'num_seg_quarter_circle' setting in the vector option, you may in fact end up with far more vertices in the output than in the input polygons, and not be generalizing the data at all... Using 'num_seg_quarter_circle' with a low value like 2 or 3, should considerably speed up the (subsequent) processing as well.
- It may be highly recommended to add an additional true generalization step using 'ST_Simplify/ST_SimplifyPreserveTopology/ST_SimplifyVW' after the buffer operation, for the same reason as listed above: truly reduce the number of vertices and processing requirements.
- There is a high chance of producing invalid output with Polygon generalization. In fact, when I ran the QGIS's 'Check Validity' option two years ago or so against the generalized land and water polygons as created by the coastline processing you refer to and as available on https://osmdata.openstreetmap.de/data/, QGIS detected multiple errors. I don't know the current situation, I should recheck it, but from my own experience developing my own algorithms, it is easy to run into trouble with invalid Polygons (and it can be really hard to fix it and get 100% valid output). In my particular case, running 'ST_MakeValid' was not enough to deal with all issues (but ArcGIS is even more finicky in this respect due to the different Polygon validity framework, although any OGC valid one is also valid in the ESRI world according to https://pro.arcgis.com/en/pro-app/latest/tool-reference/data-management/check-geometry.htm).
- Anyway, since the goal of osm2pgsql was to always produce valid output, I would certainly recommend carefully reviewing any generalization results from the developed algorithms for issues, as invalid geometries can cause a range of issues for subsequent use.
--
Reply to this email directly or view it on GitHub:
https://github.com/openstreetmap/osm2pgsql/pull/1830#issuecomment-1328241850
You are receiving this because you are subscribed to this thread.
Message ID: <openstreetmap/osm2pgsql/pull/1830/c1328241850 at github.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstreetmap.org/pipermail/tile-serving/attachments/20221127/c54d159c/attachment.htm>
More information about the Tile-serving
mailing list