Sha256: 473aefe267845d671f6623d2c4ebf41feec27f806f61061182131a0a3c134a0e

Contents?: true

Size: 815 Bytes

Versions: 3

Compression:

Stored size: 815 Bytes

Contents

# frozen_string_literal: true

module OGR
  module SpatialReferenceMixins
    module Morphers
      # Converts, in place, to ESRI WKT format.
      #
      # @return [OGR::SpatialReference] If successful, returns self.
      # @raise [OGR::Failure]
      def morph_to_esri!
        OGR::ErrorHandling.handle_ogr_err("Unable to morph self to ESRI") do
          FFI::OGR::SRSAPI.OSRMorphToESRI(@c_pointer)
        end

        self
      end

      # Converts, in place, from ESRI WKT format.
      #
      # @return [OGR::SpatialReference] If successful, returns self.
      # @raise [OGR::Failure]
      def morph_from_esri!
        OGR::ErrorHandling.handle_ogr_err("Unable to morph self from ESRI") do
          FFI::OGR::SRSAPI.OSRMorphFromESRI(@c_pointer)
        end

        self
      end
    end
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
ffi-gdal-1.1.0 lib/ogr/spatial_reference_mixins/morphers.rb
ffi-gdal-1.0.4 lib/ogr/spatial_reference_mixins/morphers.rb
ffi-gdal-1.0.3 lib/ogr/spatial_reference_mixins/morphers.rb