Sha256: 5cc32d1e0900edeb725c3b2bbc0b53fe14cc6cd720124aa21b46de751d9faf93
Contents?: true
Size: 516 Bytes
Versions: 8
Compression:
Stored size: 516 Bytes
Contents
# frozen_string_literal: true class Map::Gdal::MergeService include Map::Gdal::Base def initialize(files) raise 'Files is not an array' unless files.is_a?(Array) @files = files end def call(options = []) files = @files.select{ |file| file.downcase[/(.jp2|.tif)$/, 1].present? }.join(' ') out = get_path_to_temp_file('merge', 'tif') run_command("gdal_merge.py #{options.join(' ')} #{files} -o #{out}") add_to_clean(out) add_to_clean(out.gsub('tif', 'tfw')) out end end
Version data entries
8 entries across 8 versions & 1 rubygems