Sha256: e5446aa70c7b72c67f1eec8663b1ebb28e1b3a1a9d1ee0b28f280edcd9c6a5a5

Contents?: true

Size: 1.07 KB

Versions: 3

Compression:

Stored size: 1.07 KB

Contents

# frozen_string_literal: true

require_relative "base_general_image_projection_transformer"

module GDAL
  module Transformers
    class GeneralImageProjectionTransformer < BaseGeneralImageProjectionTransformer
      # @param source_dataset [GDAL::Dataset, FFI::Pointer]
      # @param destination_dataset [GDAL::Dataset, FFI::Pointer]
      # @param source_wkt [String]
      # @param destination_wkt [String]
      # @param gcp_use_ok [Boolean]
      # @param order [Integer]
      def initialize(source_dataset, destination_dataset: nil, source_wkt: nil, destination_wkt: nil,
        gcp_use_ok: false, order: 0)
        super()

        source_ptr = GDAL::Dataset.new_pointer(source_dataset)
        dest_ptr = GDAL::Dataset.new_pointer(destination_dataset, warn_on_nil: false)

        pointer = FFI::GDAL::Alg.GDALCreateGenImgProjTransformer(
          source_ptr,
          source_wkt,
          dest_ptr,
          destination_wkt,
          gcp_use_ok,
          0.0,
          order
        )
        raise if pointer.null?

        init_pointer(pointer)
      end
    end
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
ffi-gdal-1.1.0 lib/gdal/transformers/general_image_projection_transformer.rb
ffi-gdal-1.0.4 lib/gdal/transformers/general_image_projection_transformer.rb
ffi-gdal-1.0.3 lib/gdal/transformers/general_image_projection_transformer.rb