mod_tile 0.9.1
Renders map tiles with Mapnik and serves them using Apache HTTP Server
Loading...
Searching...
No Matches
renderd_config.h
Go to the documentation of this file.
1/*
2 * Copyright (c) 2007 - 2026 by mod_tile contributors (see AUTHORS file)
3 *
4 * This program is free software; you can redistribute it and/or
5 * modify it under the terms of the GNU General Public License
6 * as published by the Free Software Foundation; either version 2
7 * of the License, or (at your option) any later version.
8 *
9 * This program is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 * GNU General Public License for more details.
13 *
14 * You should have received a copy of the GNU General Public License
15 * along with this program; If not, see http://www.gnu.org/licenses/.
16 */
17
18#ifndef RENDERD_CONFIG_H
19#define RENDERD_CONFIG_H
20
21#include "render_config.h"
22#include "renderd.h"
23
24#ifdef HAVE_INIPARSER_INIPARSER_H
25#include <iniparser/iniparser.h>
26#else
27#include <iniparser.h>
28#endif
29
30#ifdef __cplusplus
31extern "C" {
32#endif
33
34 extern int num_maps;
35 extern int num_slave_threads;
36 extern renderd_config *config;
39
40 double min_max_double_opt(const char *opt_arg, const char *opt_type_name, double minimum, double maximum);
41 int min_max_int_opt(const char *opt_arg, const char *opt_type_name, int minimum, int maximum);
42 void free_map_section(xmlconfigitem *map_section);
43 void free_map_sections(xmlconfigitem *map_sections);
44 void free_renderd_section(renderd_config *renderd_section);
45 void free_renderd_sections(renderd_config *renderd_sections);
46 void process_config_file(const char *config_file_name, int active_renderd_section_num, int log_level);
47 void process_map_sections(const dictionary *ini, const char *config_file_name, xmlconfigitem *maps_dest, const char *default_tile_dir, int num_threads);
48 void process_mapnik_section(const dictionary *ini, const char *config_file_name, renderd_config *config_dest);
49 void process_renderd_sections(const dictionary *ini, const char *config_file_name, renderd_config *configs_dest);
50
51#ifdef __cplusplus
52}
53#endif
54
55#endif /* RENDERD_CONFIG_H */
#define XMLCONFIGS_MAX
Maximum number of map style configurations supported simultaneously by mod_tile.
Definition render_config.h:80
#define MAX_SLAVES
Maximum number of slave renderd instances configurable alongside the master daemon.
Definition renderd.h:35
int min_max_int_opt(const char *opt_arg, const char *opt_type_name, int minimum, int maximum)
Parse and validate an int command-line or config option against optional bounds.
Definition renderd_config.c:381
void free_renderd_sections(renderd_config *renderd_sections)
Free all populated entries in an array of MAX_SLAVES renderd instance configurations.
Definition renderd_config.c:326
void process_renderd_sections(const dictionary *ini, const char *config_file_name, renderd_config *configs_dest)
Parse all [renderd] and [renderdN] sections from a renderd.conf INI file.
Definition renderd_config.c:642
void free_renderd_section(renderd_config *renderd_section)
Free all heap-allocated string fields inside a single renderd_config and zero the struct.
Definition renderd_config.c:308
double min_max_double_opt(const char *opt_arg, const char *opt_type_name, double minimum, double maximum)
Parse and validate a double command-line or config option against optional bounds.
Definition renderd_config.c:347
renderd_config * config
Pointer to the active renderd_config entry inside config_slaves[].
Definition renderd_config.c:61
void free_map_section(xmlconfigitem *map_section)
Free all heap-allocated string fields inside a single xmlconfigitem and zero the struct.
Definition renderd_config.c:270
void process_config_file(const char *config_file_name, int active_renderd_section_num, int log_level)
Load and parse a complete renderd.conf file and populate global configuration state.
Definition renderd_config.c:741
int num_maps
Total number of map style sections parsed into maps[].
Definition renderd_config.c:57
void free_map_sections(xmlconfigitem *map_sections)
Free all populated entries in an array of XMLCONFIGS_MAX map configurations.
Definition renderd_config.c:294
xmlconfigitem maps[100]
Array of parsed map style configurations ([default], etc.) up to XMLCONFIGS_MAX.
Definition renderd_config.c:65
renderd_config config_slaves[5]
Array of parsed [renderd] / [renderdN] instance configurations indexed by section number.
Definition renderd_config.c:63
void process_map_sections(const dictionary *ini, const char *config_file_name, xmlconfigitem *maps_dest, const char *default_tile_dir, int num_threads)
Parse all map style sections from a renderd.conf INI file into maps_dest[].
Definition renderd_config.c:419
int num_slave_threads
Sum of num_threads across all inactive (slave) [renderdN] sections.
Definition renderd_config.c:59
void process_mapnik_section(const dictionary *ini, const char *config_file_name, renderd_config *config_dest)
Parse the [mapnik] section from a renderd.conf INI file into config_dest.
Definition renderd_config.c:588
Global daemon and Mapnik runtime settings parsed from a [renderd] INI section.
Definition renderd.h:42
Per-map-style configuration parsed from a [mapname] section in renderd.conf.
Definition renderd.h:70