Class: GDAL::WarpOperation
- Inherits:
-
Object
- Object
- GDAL::WarpOperation
- Defined in:
- lib/gdal/warp_operation.rb
Instance Attribute Summary collapse
- #c_pointer ⇒ FFI::Pointer readonly
Class Method Summary collapse
Instance Method Summary collapse
- #chunk_and_warp_image(x_offset, y_offset, x_size, y_size) ⇒ Object
- #chunk_and_warp_multi(x_offset, y_offset, x_size, y_size) ⇒ Object
- #destroy! ⇒ Object
-
#initialize(warp_options) ⇒ WarpOperation
constructor
A new instance of WarpOperation.
- #warp_region(destination_x_offset, destination_y_offset, destination_x_size, destination_y_size, source_x_offset, source_y_offset, source_x_size, source_y_size) ⇒ Object
-
#warp_region_to_buffer(destination_x_offset, destination_y_offset, destination_x_size, destination_y_size, buffer, data_type, source_x_offset, source_y_offset, source_x_size, source_y_size) ⇒ Object
rubocop:disable Metrics/ParameterLists.
Constructor Details
#initialize(warp_options) ⇒ WarpOperation
Returns a new instance of WarpOperation.
18 19 20 21 22 23 24 |
# File 'lib/gdal/warp_operation.rb', line 18 def initialize() pointer = FFI::GDAL::Warper.GDALCreateWarpOperation(.c_struct) raise GDAL::Error, "Unable to create warp operation" if pointer.null? @c_pointer = FFI::AutoPointer.new(pointer, WarpOperation.method(:release)) end |
Instance Attribute Details
#c_pointer ⇒ FFI::Pointer (readonly)
15 16 17 |
# File 'lib/gdal/warp_operation.rb', line 15 def c_pointer @c_pointer end |
Class Method Details
Instance Method Details
#chunk_and_warp_image(x_offset, y_offset, x_size, y_size) ⇒ Object
36 37 38 39 40 41 42 |
# File 'lib/gdal/warp_operation.rb', line 36 def chunk_and_warp_image(x_offset, y_offset, x_size, y_size) !!FFI::GDAL::Warper.GDALChunkAndWarpImage(@c_pointer, x_offset, y_offset, x_size, y_size) end |
#chunk_and_warp_multi(x_offset, y_offset, x_size, y_size) ⇒ Object
48 49 50 51 52 53 54 |
# File 'lib/gdal/warp_operation.rb', line 48 def chunk_and_warp_multi(x_offset, y_offset, x_size, y_size) FFI::GDAL::Warper.GDALChunkAndWarpMulti(@c_pointer, x_offset, y_offset, x_size, y_size) end |
#destroy! ⇒ Object
26 27 28 29 30 |
# File 'lib/gdal/warp_operation.rb', line 26 def destroy! WarpOperation.release(@c_pointer) @c_pointer = nil end |
#warp_region(destination_x_offset, destination_y_offset, destination_x_size, destination_y_size, source_x_offset, source_y_offset, source_x_size, source_y_size) ⇒ Object
64 65 66 67 68 69 70 71 72 73 74 75 76 77 |
# File 'lib/gdal/warp_operation.rb', line 64 def warp_region(destination_x_offset, destination_y_offset, destination_x_size, destination_y_size, source_x_offset, source_y_offset, source_x_size, source_y_size) !!FFI::GDAL::Warper.GDALWarpRegion(@c_pointer, destination_x_offset, destination_y_offset, destination_x_size, destination_y_size, source_x_offset, source_y_offset, source_x_size, source_y_size) end |
#warp_region_to_buffer(destination_x_offset, destination_y_offset, destination_x_size, destination_y_size, buffer, data_type, source_x_offset, source_y_offset, source_x_size, source_y_size) ⇒ Object
rubocop:disable Metrics/ParameterLists
90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 |
# File 'lib/gdal/warp_operation.rb', line 90 def warp_region_to_buffer(destination_x_offset, destination_y_offset, destination_x_size, destination_y_size, buffer, data_type, source_x_offset, source_y_offset, source_x_size, source_y_size) !!FFI::GDAL::Warper.GDALWarpRegionToBuffer(@c_pointer, destination_x_offset, destination_y_offset, destination_x_size, destination_y_size, buffer, data_type, source_x_offset, source_y_offset, source_x_size, source_y_size) end |