mod_tile 0.9.1
Renders map tiles with Mapnik and serves them using Apache HTTP Server
Loading...
Searching...
No Matches
gen_tile.h File Reference
#include "protocol.h"

Go to the source code of this file.

Classes

struct  item
 Node representing a queued or active metatile render request in the scheduler. More...

Enumerations

enum  queueEnum {
  queueRequest , queueRequestPrio , queueRequestBulk , queueDirty ,
  queueRender , queueDuplicate , queueRequestLow
}
 Priority queues and lifecycle states tracked by the render request scheduler. More...

Functions

void * render_thread (void *)
 Worker thread entry point that initializes per-thread Mapnik instances and processes render requests.
struct item * fetch_request (void)
void delete_request (struct item *item)
void render_init (const char *plugins_dir, const char *font_dir, int font_recurse)
 Initialize global Mapnik datasource plugins and FreeType fonts.

Enumeration Type Documentation

◆ queueEnum

enum queueEnum

Priority queues and lifecycle states tracked by the render request scheduler.

Enumerator
queueRequest 

Standard interactive tile render queue (cmdRender).

queueRequestPrio 

High-priority interactive tile render queue (cmdRenderPrio).

queueRequestBulk 

Bulk/batch tile render queue (cmdRenderBulk).

queueDirty 

Background dirty-tile re-render queue (cmdDirty).

queueRender 

Active rendering state (dequeued and currently being rendered by a worker thread).

queueDuplicate 

Coalesced duplicate request linked onto an existing in-flight or queued struct item.

queueRequestLow 

Low-priority interactive tile render queue (cmdRenderLow).

Function Documentation

◆ delete_request()

void delete_request ( struct item * item)

◆ fetch_request()

struct item * fetch_request ( void )

◆ render_init()

void render_init ( const char * plugins_dir,
const char * font_dir,
int font_dir_recurse )

Initialize global Mapnik datasource plugins and FreeType fonts.

Must be called once during renderd startup before spawning worker threads.

Parameters
plugins_dirDirectory path containing Mapnik input datasource plugins (.input).
font_dirDirectory path containing font files for Mapnik's FreeType engine.
font_dir_recurseNon-zero to recursively load fonts from subdirectories of font_dir.

◆ render_thread()

void * render_thread ( void * arg)

Worker thread entry point that initializes per-thread Mapnik instances and processes render requests.

Each worker thread maintains its own xmlmapconfig array (because mapnik::Map is not safe for concurrent rendering across threads). After loading all configured XML stylesheets and storage backends, the thread loops indefinitely pulling items from render_request_queue, rendering metatiles, saving them to storage, optionally sending HTCP cache purges, and replying to the requesting client.

Parameters
argPointer to the shared array of xmlconfigitem definitions (XMLCONFIGS_MAX elements).
Returns
Always returns NULL (runs until process termination).