Class: GDAL::Transformers::GeneralImageProjectionTransformer2

Inherits:
BaseGeneralImageProjectionTransformer show all
Defined in:
lib/gdal/transformers/general_image_projection_transformer2.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods inherited from BaseGeneralImageProjectionTransformer

#destination_geo_transform=, #destroy!, function, #function, release

Constructor Details

#initialize(source_dataset, destination_dataset: nil, **options) ⇒ GeneralImageProjectionTransformer2

Returns a new instance of GeneralImageProjectionTransformer2.

Parameters:

  • source_dataset (GDAL::Dataset, FFI::Pointer)
  • destination_dataset (GDAL::Dataset, FFI::Pointer) (defaults to: nil)
  • options (Hash)

Options Hash (**options):

  • src_srs (String)

    Use to override source_dataset‘s WKT SRS.

  • dst_srs (String)

    Use to override destination_dataset‘s WKT SRS.

  • gcps_ok (Boolean) — default: true
  • refine_minimum_gcps (Integer)

    Minimum amount of GCPs that should be available after the refinement.

  • refine_tolerance (Float)

    The tolerance that specifies when a GCP will be eliminated.

  • max_gcp_order (Integer)

    Max order to use for GCP-derived polynomials, if possible. Default is to auto-select based on the number of GCPs. A value of -1 triggers use of Thin Plate Spline instead of polynomials.

  • src_method (String)

    GEOTRANSFORM, GCP_POLYNOMIAL, GCP_TPS, GEOLOC_ARRAY, or RPC. Use this specific geolocation method when transforming pixel/line to georeferenced space on the source dataset.

  • dst_method (String)

    GEOTRANSFORM, GCP_POLYNOMIAL, GCP_TPS, GEOLOC_ARRAY, or RPC. Use this specific geolocation method when transforming pixel/line to georeferenced space on the destination dataset.

  • rpc_height (Float)

    A fixed height to be used with RPC calculations.

  • rpc_dem (String)

    Name of a DEM file to be used with RPC calculations.

  • insert_center_long (Boolean) — default: true

    False disables setting up a CENTER_LONG value on the coordinate system to rewrap things around the center of the image.



40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
# File 'lib/gdal/transformers/general_image_projection_transformer2.rb', line 40

def initialize(source_dataset, destination_dataset: nil, **options)
  super()

  source_ptr = GDAL::Dataset.new_pointer(source_dataset)
  destination_ptr = GDAL::Dataset.new_pointer(destination_dataset, warn_on_nil: false)
  options_ptr = GDAL::Options.pointer(options)

  pointer = FFI::GDAL::Alg.GDALCreateGenImgProjTransformer2(
    source_ptr,
    destination_ptr,
    options_ptr
  )
  raise if pointer.null?

  init_pointer(pointer)
end

Instance Attribute Details

#c_pointerObject (readonly)

Returns the value of attribute c_pointer.



8
9
10
# File 'lib/gdal/transformers/general_image_projection_transformer2.rb', line 8

def c_pointer
  @c_pointer
end