[Tile-serving] [openstreetmap/osm2pgsql] Refactor expire by geometry code (PR #1809)

Sarah Hoffmann notifications at github.com
Thu Nov 3 08:24:57 UTC 2022


@lonvia commented on this pull request.

There is one more call to `from_geometry()` here: https://github.com/openstreetmap/osm2pgsql/blob/bd8d41fcdf6814404132795f0e571c7357cd22ad/src/expire-tiles.cpp#L291 That could be non-3857, too, or am I reading that wrong?

> -            }
+void expire_tiles::from_geometry(geom::polygon_t const &geom)
+{
+    geom::box_t const box = geom::envelope(geom);
+    if (from_bbox(box)) {
+        /* Bounding box too big - just expire tiles on the boundary */
+        from_polygon_boundary(geom);
+    }
+}
+
+void expire_tiles::from_geometry(geom::multipolygon_t const &geom)
+{
+    geom::box_t box;
+    for (auto const &sgeom : geom) {
+        box.extend(sgeom.outer());
+    }

Isn't that the same as `box = geom::envelope(geom)`?

-- 
Reply to this email directly or view it on GitHub:
https://github.com/openstreetmap/osm2pgsql/pull/1809#pullrequestreview-1166448084
You are receiving this because you are subscribed to this thread.

Message ID: <openstreetmap/osm2pgsql/pull/1809/review/1166448084 at github.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstreetmap.org/pipermail/tile-serving/attachments/20221103/81744afd/attachment.htm>


More information about the Tile-serving mailing list