def __init__(<EOL>self, input_config, zoom=None, bounds=None, single_input_file=None,<EOL>mode="<STR_LIT>", debug=False<EOL>):
<EOL>self._raw = _map_to_new_config(_config_to_dict(input_config))<EOL>self._raw["<STR_LIT>"] = zoom<EOL>self._raw["<STR_LIT>"] = bounds<EOL>self._cache_area_at_zoom = {}<EOL>self._cache_full_process_area = None<EOL>try:<EOL><INDENT>validate_values(self._raw, _MANDATORY_PARAMETERS)<EOL><DEDENT>except Exception as e:<EOL><INDENT>raise MapcheteConfigError(e)<EOL><DEDENT>logger.debug("<STR_LIT>")<EOL>self.config_dir = self._raw["<STR_LIT>"]<EOL>self.process_name = self._raw["<STR_LIT>"]<EOL>self.process_func<EOL>logger.debug("<STR_LIT>")<EOL>try:<EOL><INDENT>process_metatiling = self._raw["<STR_LIT>"].get("<STR_LIT>", <NUM_LIT:1>)<EOL>output_metatiling = self._raw["<STR_LIT>"].get(<EOL>"<STR_LIT>", process_metatiling)<EOL>if output_metatiling > process_metatiling:<EOL><INDENT>raise ValueError(<EOL>"<STR_LIT>")<EOL><DEDENT>self.process_pyramid = BufferedTilePyramid(<EOL>self._raw["<STR_LIT>"]["<STR_LIT>"],<EOL>metatiling=process_metatiling,<EOL>pixelbuffer=self._raw["<STR_LIT>"].get("<STR_LIT>", <NUM_LIT:0>))<EOL>self.output_pyramid = BufferedTilePyramid(<EOL>self._raw["<STR_LIT>"]["<STR_LIT>"],<EOL>metatiling=output_metatiling,<EOL>pixelbuffer=self._raw["<STR_LIT>"].get("<STR_LIT>", <NUM_LIT:0>))<EOL><DEDENT>except Exception as e:<EOL><INDENT>logger.exception(e)<EOL>raise MapcheteConfigError(e)<EOL><DEDENT>if mode not in ["<STR_LIT>", "<STR_LIT>", "<STR_LIT>", "<STR_LIT>"]:<EOL><INDENT>raise MapcheteConfigError("<STR_LIT>" % mode)<EOL><DEDENT>self.mode = mode<EOL>logger.debug("<STR_LIT>")<EOL>self._params_at_zoom = _raw_at_zoom(self._raw, self.init_zoom_levels)<EOL>logger.debug("<STR_LIT>")<EOL>self.output<EOL>logger.debug("<STR_LIT>")<EOL>self.input<EOL>
Initialize configuration.