Sha256: 225298ca49baf61cc31ffa53d8665e1e0858e44e187d7551d7a8062a3e97677a

Contents?: true

Size: 1.26 KB

Versions: 6

Compression:

Stored size: 1.26 KB

Contents

require 'spec_helper'
require 'support/integration_help'
require 'ffi-gdal'


TIF_FILES.each do |file|
  dataset =  GDAL::Dataset.open(file, 'r')

  describe 'GeoTransform Info' do
    after :all do
      dataset.close
    end

    subject do
      dataset.geo_transform
    end

    describe '#x_origin' do
      it 'is a Float' do
        expect(subject.x_origin).to be_a Float
      end
    end

    describe '#y_origin' do
      it 'is a Float' do
        expect(subject.y_origin).to be_a Float
      end
    end

    describe '#pixel_width' do
      it 'is a Float' do
        expect(subject.pixel_width).to be_a Float
      end
    end

    describe '#x_rotation' do
      it 'is a Float' do
        expect(subject.x_rotation).to be_a Float
      end
    end

    describe '#y_rotation' do
      it 'is a Float' do
        expect(subject.y_rotation).to be_a Float
      end
    end

    describe '#pixel_height' do
      it 'is a Float' do
        expect(subject.pixel_height).to be_a Float
      end
    end

    describe '#x_projection' do
      it 'is a Float' do
        expect(subject.x_projection(0, 0)).to be_a Float
      end
    end

    describe '#y_projection' do
      it 'is a Float' do
        expect(subject.y_projection(0, 0)).to be_a Float
      end
    end
  end
end

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
ffi-gdal-1.0.0.beta3 spec/integration/geo_transform_info_spec.rb
ffi-gdal-1.0.0.beta1 spec/integration/geo_transform_info_spec.rb
ffi-gdal-0.0.4 spec/ffi-gdal/integration/geo_transform_info_spec.rb
ffi-gdal-0.0.3 spec/ffi-gdal/integration/geo_transform_info_spec.rb
ffi-gdal-0.0.2 spec/ffi-gdal/integration/geo_transform_info_spec.rb
ffi-gdal-0.0.1 spec/ffi-gdal/integration/geo_transform_info_spec.rb