|
mod_tile 0.9.1
Renders map tiles with Mapnik and serves them using Apache HTTP Server
|
#include <getopt.h>#include <glib.h>#include <limits.h>#include <stdio.h>#include <stdlib.h>#include <string.h>#include <sys/stat.h>#include <sys/time.h>#include <unistd.h>#include "config.h"#include "g_logger.h"#include "protocol.h"#include "render_config.h"#include "render_submit_queue.h"#include "renderd_config.h"#include "store.h"Functions | |
| static gint64 | tile_key (int z, int x, int y) |
| Pack metatile zoom and grid coordinates (z, x, y) into a 64-bit hash key. | |
| static int | tile_is_requested (int z, int x, int y) |
| Check whether a metatile has already been seen and processed during this run. | |
| static void | set_tile_requested (int z, int x, int y) |
| Record a metatile in tile_requested so subsequent ancestor traversals skip it. | |
| int | main (int argc, char **argv) |
| Entry point for the render_expired tile expiration and re-rendering CLI utility. | |
Variables | |
| static GHashTable * | tile_requested |
| Deduplication set of already-processed metatile coordinates (gint64 packed keys). | |
| int main | ( | int | argc, |
| char ** | argv ) |
Entry point for the render_expired tile expiration and re-rendering CLI utility.
Reads expired tile coordinates (z/x/y) from stdin, normalizes each coordinate to max_zoom, walks upward through ancestor zoom levels down to min_zoom, deduplicates metatiles via tile_requested, checks cache existence via the configured storage backend, and deletes (--delete-from), marks expired (--touch-from), or enqueues re-render jobs to renderd accordingly.
| argc | Command-line argument count. |
| argv | Command-line argument vector. |
|
static |
Record a metatile in tile_requested so subsequent ancestor traversals skip it.
Allocates a heap gint64 key owned and freed by tile_requested.
| z | Metatile-adjusted zoom level. |
| x | Metatile X index. |
| y | Metatile Y index. |
|
static |
Check whether a metatile has already been seen and processed during this run.
| z | Metatile-adjusted zoom level. |
| x | Metatile X index. |
| y | Metatile Y index. |
|
static |
Pack metatile zoom and grid coordinates (z, x, y) into a 64-bit hash key.
| z | Metatile-adjusted zoom level (z - excess_zoomlevels). |
| x | Metatile X index (x >> excess_zoomlevels, masked to 24 bits). |
| y | Metatile Y index (y >> excess_zoomlevels, masked to 24 bits). |
|
static |
Deduplication set of already-processed metatile coordinates (gint64 packed keys).
Ensures each metatile is stat'ed, deleted, touched, or queued for re-rendering at most once even when multiple input z/x/y coordinates expand to overlapping ancestor metatiles.