module CartoCSSHelper::Configuration
Public Instance Methods
Source
# File lib/cartocss_helper/configuration.rb, line 137 def default_renderer :tilemill end
Source
# File lib/cartocss_helper/configuration.rb, line 52 def find_style_file_location Find.find(get_path_to_cartocss_project_folder) do |path| return path if path =~ /.*\.style$/ end end
Source
# File lib/cartocss_helper/configuration.rb, line 43 def get_cartocss_project_name return get_path_to_cartocss_project_folder.split(File::SEPARATOR)[-1] end
Source
# File lib/cartocss_helper/configuration.rb, line 112 def get_data_filename return get_path_to_folder_for_branch_specific_cache + 'data.osm' end
Source
# File lib/cartocss_helper/configuration.rb, line 20 def get_max_z return get_style_specific_data.max_z end
Source
# File lib/cartocss_helper/configuration.rb, line 24 def get_min_z if @style_specific_data == nil raise 'Set your configuration data using CartoCSSHelper::Configuration.set_style_specific_data(data)' end return get_style_specific_data.min_z end
Source
# File lib/cartocss_helper/configuration.rb, line 125 def get_overpass_instance_url return @overpass_instance_url end
Source
# File lib/cartocss_helper/configuration.rb, line 36 def get_path_to_cartocss_project_folder if @style_path == nil raise 'Set your configuration data using CartoCSSHelper::Configuration.set_style_path(path)' end return @style_path end
Source
# File lib/cartocss_helper/configuration.rb, line 88 def get_path_to_folder_for_branch_specific_cache location = File.join(get_path_to_folder_for_cache, 'generated_images', CartoCSSHelper::Git.get_commit_hash, '') FileUtils.mkdir_p location return location end
Source
# File lib/cartocss_helper/configuration.rb, line 80 def get_path_to_folder_for_cache if @path_to_folder_for_cache == nil raise 'Set your configuration data using CartoCSSHelper::Configuration.set_path_to_folder_for_cache(path)' end FileUtils.mkdir_p @path_to_folder_for_cache return @path_to_folder_for_cache end
Source
# File lib/cartocss_helper/configuration.rb, line 106 def get_path_to_folder_for_history_api_cache location = File.join(get_path_to_folder_for_cache, 'history-api', '') FileUtils.mkdir_p location return location end
Source
# File lib/cartocss_helper/configuration.rb, line 100 def get_path_to_folder_for_notes_api_cache location = File.join(get_path_to_folder_for_cache, 'notes-api', '') FileUtils.mkdir_p location return location end
Source
# File lib/cartocss_helper/configuration.rb, line 68 def get_path_to_folder_for_output if @path_to_folder_for_output == nil raise 'Set your configuration data using CartoCSSHelper::Configuration.set_path_to_folder_for_output(path)' end FileUtils.mkdir_p @path_to_folder_for_output return @path_to_folder_for_output end
Source
# File lib/cartocss_helper/configuration.rb, line 94 def get_path_to_folder_for_overpass_cache location = File.join(get_path_to_folder_for_cache, 'overpass', '') FileUtils.mkdir_p location return location end
Source
# File lib/cartocss_helper/configuration.rb, line 47 def get_style_file_location @style_file = find_style_file_location if @style_file == nil return @style_file end
Source
# File lib/cartocss_helper/configuration.rb, line 13 def get_style_specific_data if @style_specific_data == nil raise 'Set your configuration data using CartoCSSHelper::Configuration.set_style_specific_data(data)' end return @style_specific_data end
Source
# File lib/cartocss_helper/configuration.rb, line 150 def mapnik_reference_version_override @mapnik_reference_version end
Source
# File lib/cartocss_helper/configuration.rb, line 133 def path_to_kosmtik @kosmtik_path end
Source
# File lib/cartocss_helper/configuration.rb, line 58 def project_file_location Find.find(get_path_to_cartocss_project_folder) do |path| return path if path =~ /.*\.yaml$/ end end
Source
# File lib/cartocss_helper/configuration.rb, line 145 def renderer return default_renderer if @renderer == nil return @renderer end
Source
# File lib/cartocss_helper/configuration.rb, line 121 def set_known_alternative_overpass_url set_overpass_instance_url('http://overpass.osm.rambler.ru/cgi') end
Source
# File lib/cartocss_helper/configuration.rb, line 154 def set_mapnik_reference_version_override(version) @mapnik_reference_version = version end
Source
# File lib/cartocss_helper/configuration.rb, line 117 def set_overpass_instance_url(path) @overpass_instance_url = path end
Source
# File lib/cartocss_helper/configuration.rb, line 32 def set_path_to_cartocss_project_folder(path) @style_path = path end
Link to project folder itself, not to folder containing various projects.
Source
# File lib/cartocss_helper/configuration.rb, line 76 def set_path_to_folder_for_cache(path) @path_to_folder_for_cache = path end
Source
# File lib/cartocss_helper/configuration.rb, line 64 def set_path_to_folder_for_output(path) @path_to_folder_for_output = path end
Source
# File lib/cartocss_helper/configuration.rb, line 129 def set_path_to_kosmtik(path) @kosmtik_path = path end
Source
# File lib/cartocss_helper/configuration.rb, line 141 def set_renderer(renderer) @renderer = renderer end
Source
# File lib/cartocss_helper/configuration.rb, line 9 def set_style_specific_data(data) @style_specific_data = data end