Scroll to navigation

Tirex::Renderer(3pm) User Contributed Perl Documentation Tirex::Renderer(3pm)

NAME

Tirex::Renderer - A Tirex renderer config

SYNOPSIS

my $r = Tirex::Renderer->new( ... );

DESCRIPTION

Tirex can work with several rendering backends such as Mapnik or WMS. A backend can be started with different configurations, for the Mapnik backend you need to configure the font directory for instance. This class defines methods for reading the config files (/etc/tirex/renderer/*.conf) describing the backend configurations and managing those renderers.

See the class Tirex::Backend and its subclasses for the actual code of some backends.

METHODS

Tirex::Renderer->read_config_dir($dir)

Read all renderer configs in given config directory.

Tirex::Renderer->get('foo')

Get renderer by name.

Tirex::Renderer->all();

Return sorted (by name) list of all configured renderers.

Tirex::Renderer->clear();

Clear list of renderers.

Tirex::Renderer->enabled();

Return sorted (by name) list of all enabled renderers.

Tirex::Renderer->new( name => 'foo', path => '/path/to/exec', port => 1234, procs => 3, ... )

Create new renderer config.

Every renderer has at least these general options: name, path, port, and procs. Will croak if they are not all present.

In addition it can have zero or more options specific to this renderer.

Will croak if a renderer configuration already exists under the same name.

Tirex::Renderer->new_from_configfile($filename)

Create new renderer config from a file.

Croaks if the file does not exist.

$rend->read_map_config()

Read all map configs for this renderer.

$rend->get_maps()

Get array of map configs for this renderer.

$rend->get_config()

Return hash with renderer-specific configuration.

$rend->get_name();

Get name of this renderer.

$rend->get_debug();

Get debug flag of this renderer.

$rend->get_path();

Get path of this renderer.

$rend->get_port();

Get port of this renderer.

$rend->get_procs();

Get procs of this renderer.

$rend->get_syslog_facility();

Get syslog facility of this renderer.

$rend->is_enabled()

Is this renderer enabled?

$rend->disable();

Disable this renderer.

$rend->enable();

Enable this renderer.

$rend->to_s();

Return human readable description of this renderer.

$rend->to_hash();

Return parameters of this renderer as hash.

Tirex::Renderer->status();

Return status of all configured renderers.

$rend->add_worker($pid);

Add process id to list of currently running workers.

$rend->remove_worker($pid);

Remove process id from list of currently running workers.

$rend->num_workers();

Return number of currently running workers.

2021-10-07 perl v5.32.1