Sha256: c0da8462357d9b6ece0f23645bca394fb56fc716bcaa40b5513ed34ef4c39ef7

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.0.2 lib/ogr/spatial_reference_mixins/morphers.rb
ffi-gdal-1.0.1 lib/ogr/spatial_reference_mixins/morphers.rb
ffi-gdal-1.0.0 lib/ogr/spatial_reference_mixins/morphers.rb