Sha256: 48409dc2ceab09cbe0b52989739f69b1f084fa37638c9d4799e4cc107587a3ce

Contents?: true

Size: 932 Bytes

Versions: 9

Compression:

Stored size: 932 Bytes

Contents

# frozen_string_literal: true

require 'spec_helper'
require 'ogr/spatial_reference'

RSpec.describe OGR::SpatialReference do
  describe '#morph_to_esri!' do
    subject { described_class.new_from_epsg 4326 }

    it 'changes the SRS to ESRI' do
      expect do
        subject.morph_to_esri!
      end.to(change { subject.to_wkt.size })
    end
  end

  describe '#morph_from_esri!' do
    let(:esri) do
      <<-ESRI.strip
        GEOGCS["GCS_North_American_1983",
           DATUM["D_North_American_1983",
           SPHEROID["GRS_1980",6378137,298.257222101]],
           PRIMEM["Greenwich",0],
           UNIT["Degree",0.0174532925199433]]
      ESRI
    end

    subject { described_class.new_from_esri(esri) }

    it 'changes the SRS to ESRI' do
      pending 'Figure out why morphing does not change anything'

      expect do
        subject.morph_from_esri!
      end.to(change { subject.to_wkt.size })
    end
  end
end

Version data entries

9 entries across 9 versions & 1 rubygems

Version Path
ffi-gdal-1.0.0.beta16 spec/unit/ogr/spatial_reference_mixins/morphers_spec.rb
ffi-gdal-1.0.0.beta15 spec/unit/ogr/spatial_reference_mixins/morphers_spec.rb
ffi-gdal-1.0.0.beta14 spec/unit/ogr/spatial_reference_mixins/morphers_spec.rb
ffi-gdal-1.0.0.beta13 spec/unit/ogr/spatial_reference_mixins/morphers_spec.rb
ffi-gdal-1.0.0.beta12 spec/unit/ogr/spatial_reference_mixins/morphers_spec.rb
ffi-gdal-1.0.0.beta11 spec/unit/ogr/spatial_reference_mixins/morphers_spec.rb
ffi-gdal-1.0.0.beta10 spec/unit/ogr/spatial_reference_mixins/morphers_spec.rb
ffi-gdal-1.0.0.beta9 spec/unit/ogr/spatial_reference_mixins/morphers_spec.rb
ffi-gdal-1.0.0.beta8 spec/unit/ogr/spatial_reference_mixins/morphers_spec.rb