[Tile-serving] [openstreetmap/osm2pgsql] Refactor expire code (PR #1648)
Sarah Hoffmann
notifications at github.com
Fri Mar 4 11:08:15 UTC 2022
@lonvia commented on this pull request.
> + } else if (geom.is_multilinestring()) {
+ for (auto const &list : geom.get<geom::multilinestring_t>()) {
+ from_point_list(list);
+ }
+ } else if (geom.is_polygon() || geom.is_multipolygon()) {
+ auto const box = geom::envelope(geom);
+ if (from_bbox(box)) {
+ /* Bounding box too big - just expire tiles on the line */
+ log_debug("Large polygon ({:.0f} x {:.0f} metres, OSM ID {})"
+ " - only expiring perimeter",
+ box.max_x() - box.min_x(), box.max_y() - box.min_y(), osm_id);
+ if (geom.is_polygon()) {
+ from_point_list(geom.get<geom::polygon_t>().outer());
+ } else if (geom.is_multipolygon()) {
+ for (auto const &polygon : geom.get<geom::multipolygon_t>()) {
+ from_point_list(polygon.outer());
The original code expires all rings here.
--
Reply to this email directly or view it on GitHub:
https://github.com/openstreetmap/osm2pgsql/pull/1648#pullrequestreview-900095753
You are receiving this because you are subscribed to this thread.
Message ID: <openstreetmap/osm2pgsql/pull/1648/review/900095753 at github.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstreetmap.org/pipermail/tile-serving/attachments/20220304/4ac166d7/attachment.htm>
More information about the Tile-serving
mailing list