Sha256: 46cadaff0acecac2503911d9def2727bd0225ab99df06ceb11150f4e136dad8f

Contents?: true

Size: 1011 Bytes

Versions: 3

Compression:

Stored size: 1011 Bytes

Contents

# frozen_string_literal: true

require_relative "base_general_image_projection_transformer"

module GDAL
  module Transformers
    class GeneralImageProjectionTransformer3 < BaseGeneralImageProjectionTransformer
      # @param source_wkt [String]
      # @param source_geo_transform [GDAL::GeoTransform, FFI::Pointer]
      # @param destination_wkt [String]
      # @param destination_geo_transform [GDAL::GeoTransform, FFI::Pointer]
      # @return [FFI::Pointer]
      def initialize(source_wkt, source_geo_transform, destination_wkt, destination_geo_transform)
        super()

        source_ptr = GDAL._pointer(GDAL::GeoTransform, source_geo_transform)
        destination_ptr = GDAL._pointer(GDAL::GeoTransform, destination_geo_transform)

        pointer = FFI::GDAL::Alg.GDALCreateGenImgProjTransformer3(
          source_wkt,
          source_ptr,
          destination_wkt,
          destination_ptr
        )

        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_transformer3.rb
ffi-gdal-1.0.4 lib/gdal/transformers/general_image_projection_transformer3.rb
ffi-gdal-1.0.3 lib/gdal/transformers/general_image_projection_transformer3.rb