Module: GDAL::Dataset::WarpMethods
- Included in:
- GDAL::Dataset
- Defined in:
- lib/gdal/dataset/warp_methods.rb
Overview
Methods used for warping; most taken from gdalwarper.h.
Instance Method Summary collapse
-
#create_and_reproject_image(destination_file_name, resample_algorithm, destination_projection, destination_driver, creation_options: {}, warp_memory_limit: 0.0, max_error: 0.0, progress_function: nil, progress_arg: nil, warp_options: nil) ⇒ Object
rubocop:disable Metrics/ParameterLists.
- #reproject_image(destination_dataset, resample_algorithm, destination_projection: nil, warp_memory_limit: 0.0, max_error: 0.0, progress_function: nil, progress_arg: nil, warp_options: nil) ⇒ Object
Instance Method Details
#create_and_reproject_image(destination_file_name, resample_algorithm, destination_projection, destination_driver, creation_options: {}, warp_memory_limit: 0.0, max_error: 0.0, progress_function: nil, progress_arg: nil, warp_options: nil) ⇒ Object
rubocop:disable Metrics/ParameterLists
59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 |
# File 'lib/gdal/dataset/warp_methods.rb', line 59 def create_and_reproject_image(destination_file_name, resample_algorithm, destination_projection, destination_driver, creation_options: {}, warp_memory_limit: 0.0, max_error: 0.0, progress_function: nil, progress_arg: nil, warp_options: nil) = GDAL::Options.pointer() = &.c_struct FFI::GDAL::Warper.GDALCreateAndReprojectImage( @c_pointer, # hSrcDS nil, # pszSrcWKT destination_file_name, # pszDstFilename destination_projection, # pszDstWKT destination_driver.c_pointer, # hDstDriver , # papszCreateOptions resample_algorithm, # eResampleAlg warp_memory_limit, # dfWarpMemoryLimit max_error, # dfMaxError progress_function, # pfnProgress progress_arg, # pProgressArg # psOptions ) end |
#reproject_image(destination_dataset, resample_algorithm, destination_projection: nil, warp_memory_limit: 0.0, max_error: 0.0, progress_function: nil, progress_arg: nil, warp_options: nil) ⇒ Object
21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 |
# File 'lib/gdal/dataset/warp_methods.rb', line 21 def reproject_image(destination_dataset, resample_algorithm, destination_projection: nil, warp_memory_limit: 0.0, max_error: 0.0, progress_function: nil, progress_arg: nil, warp_options: nil) = &.c_struct FFI::GDAL::Warper.GDALReprojectImage( @c_pointer, # hSrcDS nil, # pszSrcWKT destination_dataset.c_pointer, # hDstDS destination_projection, # pszDstWKT resample_algorithm, # eResampleAlg warp_memory_limit, # dfWarpMemoryLimit max_error, # dfMaxError progress_function, # pfnProgress progress_arg, # pProgressArg # psOptions ) end |