[Tile-serving] [openstreetmap/osm2pgsql] Add tilesets to flex output allowing more flexible expire configuration (PR #1912)

Paul Norman notifications at github.com
Tue Feb 14 08:02:34 UTC 2023


@pnorman commented on this pull request.

This looks good for what it does, but a couple issues

- information like expire filenames is often a deployment consideration, not a style consideration, so as the person writing the transforms, I may not know where to save the files. e.g. the OSMF tile servers write files to /var/lib/replicate, but my server might use a different set of directories for deployment
- A major use-case is to use knowledge of the style which is going to use the DB to reduce the number of tiles expired. e.g. if a change is to a building polygon, only expire the z14 tiles, not the z10 tiles, and if the change is a motorway, expire all zooms. It's okay if this doesn't accomplish that need, but I want to make sure we're not closing off any doors with the API we define here.

> @@ -0,0 +1,168 @@
+-- This config example file is released into the Public Domain.
+--
+-- This examples shows how to use tilesets for expire.
+
+local tilesets = {}
+
+tilesets.pois = osm2pgsql.define_tileset({
+    -- Every tileset must have a name. The name is independent of the table
+    -- names although this example file uses the same name for simplicity.
+    name = 'pois',
+    -- The zoom level at which we calculate the tiles. This must always be set.
+    maxzoom = 14,
+    -- The filename where tile list should be written to.

Relative or absolute path?

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

Message ID: <openstreetmap/osm2pgsql/pull/1912/review/1297007931 at github.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstreetmap.org/pipermail/tile-serving/attachments/20230214/104b3dfa/attachment.htm>


More information about the Tile-serving mailing list