class GDAL::Utils::Nearblack::Options

Ruby wrapper for GDALNearblackOptions C API (options for nearblack utility).

@see GDAL::Utils::Nearblack @see gdal.org/programs/nearblack.html nearblack utility documentation.

Attributes

c_pointer[R]

@return [AutoPointer] C pointer to the GDALNearblackOptions.

options[R]

@return [Array<String>] The options.

string_list[R]

Public Class Methods

new(options: []) click to toggle source

Create a new instance.

@see gdal.org/programs/nearblack.html

List of available options could be found in nearblack utility documentation.

@example Create a new instance.

options = GDAL::Utils::Nearblack::Options.new(options: ["-of", "GTiff", "-near", "10"])

@param options [Array<String>] The options list.

# File lib/gdal/utils/nearblack/options.rb, line 36
def initialize(options: [])
  @options = options
  @string_list = ::GDAL::Utils::Helpers::StringList.new(strings: options)
  @c_pointer = AutoPointer.new(options_pointer)
end

Private Instance Methods

options_pointer() click to toggle source
# File lib/gdal/utils/nearblack/options.rb, line 46
def options_pointer
  ::FFI::GDAL::Utils.GDALNearblackOptionsNew(string_list.c_pointer, nil)
end