Sha256: d0c0c9abb9371e380bef907878c44b63367f2b9ad8a71a7c79ecb187efaf0866

Contents?: true

Size: 1.11 KB

Versions: 17

Compression:

Stored size: 1.11 KB

Contents

require 'spec_helper'

describe GeoConcerns::Processors::Raster::Aig do
  let(:output_file) { 'output/geo.png' }
  let(:file_name) { 'files/aig.zip' }
  let(:options) { { output_size: '150 150',
                    min_max: '2.054 11.717',
                    label: :thumbnail }
  }

  subject { described_class.new(file_name, {}) }

  describe '#translate' do
    it 'executes a gdal_translate command with scaling' do
      command = "gdal_translate -scale 2.054 11.717 255 0 -q -ot Byte -of "\
                  "GTiff \"files/aig.zip\" output/geo.png"
      expect(subject.class).to receive(:execute).with command
      subject.class.translate(file_name, output_file, options)
    end
  end

  describe '#reproject_queue' do
    it 'returns an array of command name symbols' do
      expect(subject.class.reproject_queue).to include :warp
    end
  end

  describe '#encode' do
    it 'wraps encode_raster in an unzip block' do
      allow(subject.class).to receive(:unzip).and_yield(file_name)
      expect(subject.class).to receive(:encode_raster)
      subject.class.encode(file_name, options, output_file)
    end
  end
end

Version data entries

17 entries across 17 versions & 1 rubygems

Version Path
geo_concerns-0.3.4 spec/processors/geo_concerns/processors/raster/aig_spec.rb
geo_concerns-0.3.3 spec/processors/geo_concerns/processors/raster/aig_spec.rb
geo_concerns-0.3.2 spec/processors/geo_concerns/processors/raster/aig_spec.rb
geo_concerns-0.3.1 spec/processors/geo_concerns/processors/raster/aig_spec.rb
geo_concerns-0.3.0 spec/processors/geo_concerns/processors/raster/aig_spec.rb
geo_concerns-0.2.0 spec/processors/geo_concerns/processors/raster/aig_spec.rb
geo_concerns-0.1.1 spec/processors/geo_concerns/processors/raster/aig_spec.rb
geo_concerns-0.1.0 spec/processors/geo_concerns/processors/raster/aig_spec.rb
geo_concerns-0.0.10 spec/processors/geo_concerns/processors/raster/aig_spec.rb
geo_concerns-0.0.9 spec/processors/geo_concerns/processors/raster/aig_spec.rb
geo_concerns-0.0.8 spec/processors/geo_concerns/processors/raster/aig_spec.rb
geo_concerns-0.0.7 spec/processors/geo_concerns/processors/raster/aig_spec.rb
geo_concerns-0.0.6 spec/processors/geo_concerns/processors/raster/aig_spec.rb
geo_concerns-0.0.5 spec/processors/geo_concerns/processors/raster/aig_spec.rb
geo_concerns-0.0.4 spec/processors/geo_concerns/processors/raster/aig_spec.rb
geo_concerns-0.0.3 spec/processors/geo_concerns/processors/raster/aig_spec.rb
geo_concerns-0.0.2 spec/processors/geo_concerns/processors/raster/aig_spec.rb