ffi-gdal 1.0.0.beta16 → 1.0.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.dockerignore +17 -0
- data/.github/workflows/codacy.yml +61 -0
- data/.github/workflows/codeql.yml +74 -0
- data/.github/workflows/continuous-integration.yml +36 -0
- data/.github/workflows/dependency-review.yml +20 -0
- data/.github/workflows/specs-in-docker.yml +27 -0
- data/.gitignore +3 -0
- data/.rspec +1 -0
- data/.rubocop.yml +10 -80
- data/.rubocop_todo.yml +23 -40
- data/.ruby-version +1 -1
- data/Changelog-0.x.md +512 -0
- data/Changelog.md +12 -0
- data/Dockerfile.gdal2 +110 -0
- data/Dockerfile.gdal3 +73 -0
- data/README.md +25 -14
- data/Rakefile +0 -8
- data/Tiltfile +91 -0
- data/bin/bundle +123 -0
- data/bin/docker-clean +8 -0
- data/bin/rake +29 -0
- data/bin/rspec +29 -0
- data/bin/rubocop +29 -0
- data/docker-compose.yml +25 -0
- data/examples/extract_and_colorize.rb +0 -13
- data/examples/geometries.rb +14 -14
- data/examples/ogr_layer_to_layer.rb +1 -3
- data/examples/raster_erasing.rb +1 -0
- data/examples/remove_small_polygons.rb +1 -1
- data/examples/testing_gdal.rb +20 -17
- data/examples/warping.rb +9 -7
- data/ffi-gdal.gemspec +12 -6
- data/lib/ext/ffi_library_function_checks.rb +2 -2
- data/lib/ext/to_bool.rb +5 -3
- data/lib/ffi/cpl/conv.rb +27 -25
- data/lib/ffi/cpl/error.rb +19 -20
- data/lib/ffi/cpl/hash_set.rb +4 -4
- data/lib/ffi/cpl/http.rb +3 -3
- data/lib/ffi/cpl/http_result.rb +8 -8
- data/lib/ffi/cpl/list.rb +1 -1
- data/lib/ffi/cpl/mime_part.rb +2 -2
- data/lib/ffi/cpl/minixml.rb +7 -7
- data/lib/ffi/cpl/progress.rb +8 -8
- data/lib/ffi/cpl/quad_tree.rb +14 -14
- data/lib/ffi/cpl/rect_obj.rb +3 -3
- data/lib/ffi/cpl/string.rb +17 -20
- data/lib/ffi/cpl/vsi.rb +13 -13
- data/lib/ffi/cpl/xml_node.rb +3 -3
- data/lib/ffi/extensions/gdal/extensions/all.rb +4 -0
- data/lib/ffi/extensions/gdal/extensions/version.rb +9 -0
- data/lib/ffi/extensions/gdal/extensions.rb +12 -0
- data/lib/ffi/extensions/rttopo/gbox.rb +19 -0
- data/lib/ffi/extensions/rttopo/geom.rb +16 -0
- data/lib/ffi/extensions/rttopo.rb +41 -0
- data/lib/ffi/gdal/alg.rb +277 -277
- data/lib/ffi/gdal/color_entry.rb +3 -3
- data/lib/ffi/gdal/gcp.rb +6 -6
- data/lib/ffi/gdal/gdal.rb +349 -349
- data/lib/ffi/gdal/grid.rb +134 -134
- data/lib/ffi/gdal/grid_data_metrics_options.rb +4 -4
- data/lib/ffi/gdal/grid_inverse_distance_to_a_power_options.rb +9 -9
- data/lib/ffi/gdal/grid_moving_average_options.rb +4 -4
- data/lib/ffi/gdal/grid_nearest_neighbor_options.rb +3 -3
- data/lib/ffi/gdal/matching.rb +3 -3
- data/lib/ffi/gdal/rpc_info.rb +17 -17
- data/lib/ffi/gdal/transformer_info.rb +4 -4
- data/lib/ffi/gdal/version.rb +1 -1
- data/lib/ffi/gdal/vrt.rb +39 -39
- data/lib/ffi/gdal/warp_options.rb +34 -34
- data/lib/ffi/gdal/warper.rb +90 -90
- data/lib/ffi/gdal.rb +2 -31
- data/lib/ffi/ogr/api.rb +175 -167
- data/lib/ffi/ogr/contour_writer_info.rb +4 -4
- data/lib/ffi/ogr/core.rb +107 -107
- data/lib/ffi/ogr/envelope.rb +3 -3
- data/lib/ffi/ogr/envelope_3d.rb +5 -5
- data/lib/ffi/ogr/featurestyle.rb +3 -3
- data/lib/ffi/ogr/field.rb +22 -22
- data/lib/ffi/ogr/geocoding.rb +4 -4
- data/lib/ffi/ogr/srs_api.rb +154 -155
- data/lib/ffi/ogr/style_param.rb +3 -3
- data/lib/ffi/ogr/style_value.rb +4 -4
- data/lib/gdal/color_entry.rb +1 -5
- data/lib/gdal/color_interpretation.rb +7 -3
- data/lib/gdal/color_table.rb +46 -27
- data/lib/gdal/cpl_error_handler.rb +26 -6
- data/lib/gdal/data_type.rb +10 -3
- data/lib/gdal/dataset.rb +171 -85
- data/lib/gdal/dataset_mixins/algorithm_methods.rb +44 -44
- data/lib/gdal/dataset_mixins/matching.rb +1 -1
- data/lib/gdal/dataset_mixins/warp_methods.rb +4 -2
- data/lib/gdal/driver.rb +38 -21
- data/lib/gdal/environment_methods.rb +6 -6
- data/lib/gdal/extensions/all.rb +3 -0
- data/lib/gdal/{color_entry_mixins → extensions/color_entry}/extensions.rb +4 -1
- data/lib/gdal/{color_table_mixins → extensions/color_table}/extensions.rb +3 -0
- data/lib/gdal/extensions/dataset/extensions.rb +205 -0
- data/lib/gdal/{driver_mixins → extensions/driver}/extensions.rb +6 -2
- data/lib/gdal/{geo_transform_mixins → extensions/geo_transform}/extensions.rb +10 -8
- data/lib/gdal/{gridder → extensions/gridder}/point_extracting.rb +7 -5
- data/lib/gdal/{gridder.rb → extensions/gridder.rb} +33 -33
- data/lib/gdal/{gridder_options.rb → extensions/gridder_options.rb} +13 -14
- data/lib/gdal/{raster_attribute_table_mixins → extensions/raster_attribute_table}/extensions.rb +8 -6
- data/lib/gdal/{raster_band_mixins → extensions/raster_band}/algorithm_extensions.rb +8 -6
- data/lib/gdal/{raster_band_mixins → extensions/raster_band}/coloring_extensions.rb +6 -4
- data/lib/gdal/{raster_band_mixins → extensions/raster_band}/extensions.rb +9 -5
- data/lib/gdal/{raster_band_mixins → extensions/raster_band}/io_extensions.rb +18 -14
- data/lib/gdal/{raster_band_classifier.rb → extensions/raster_band_classifier.rb} +3 -5
- data/lib/gdal/geo_transform.rb +1 -6
- data/lib/gdal/grid.rb +3 -2
- data/lib/gdal/grid_algorithms.rb +9 -9
- data/lib/gdal/internal_helpers.rb +46 -9
- data/lib/gdal/major_object.rb +11 -3
- data/lib/gdal/options.rb +26 -32
- data/lib/gdal/raster_attribute_table.rb +63 -37
- data/lib/gdal/raster_band.rb +164 -116
- data/lib/gdal/raster_band_mixins/algorithm_methods.rb +26 -25
- data/lib/gdal/rpc_info.rb +3 -2
- data/lib/gdal/transformers/approximate_transformer.rb +12 -3
- data/lib/gdal/transformers/base_general_image_projection_transformer.rb +15 -2
- data/lib/gdal/transformers/gcp_transformer.rb +27 -19
- data/lib/gdal/transformers/general_image_projection_transformer.rb +8 -6
- data/lib/gdal/transformers/general_image_projection_transformer2.rb +9 -6
- data/lib/gdal/transformers/general_image_projection_transformer3.rb +6 -2
- data/lib/gdal/transformers/geolocation_transformer.rb +12 -4
- data/lib/gdal/transformers/reprojection_transformer.rb +11 -3
- data/lib/gdal/transformers/rpc_transformer.rb +11 -2
- data/lib/gdal/transformers/tps_transformer.rb +12 -4
- data/lib/gdal/version_info.rb +2 -2
- data/lib/gdal/virtual_dataset.rb +2 -0
- data/lib/gdal/warp_operation.rb +65 -54
- data/lib/gdal/warp_options.rb +9 -11
- data/lib/ogr/coordinate_transformation.rb +23 -9
- data/lib/ogr/data_source.rb +68 -37
- data/lib/ogr/driver.rb +18 -17
- data/lib/ogr/envelope.rb +0 -3
- data/lib/ogr/error_handling.rb +22 -24
- data/lib/ogr/extensions/all.rb +3 -0
- data/lib/ogr/{data_source_mixins → extensions/data_source}/capability_methods.rb +2 -0
- data/lib/ogr/extensions/data_source/data_source_extensions.rb +16 -0
- data/lib/ogr/{driver_mixins → extensions/driver}/capability_methods.rb +5 -1
- data/lib/ogr/extensions/envelope/extensions.rb +114 -0
- data/lib/ogr/extensions/feature/extensions.rb +87 -0
- data/lib/ogr/extensions/feature_definition/extensions.rb +43 -0
- data/lib/ogr/extensions/geometries/point/extensions.rb +19 -0
- data/lib/ogr/extensions/geometry/container_mixins.rb +56 -0
- data/lib/ogr/extensions/geometry/ewkb_io_extensions.rb +44 -0
- data/lib/ogr/extensions/geometry/ewkb_record.rb +94 -0
- data/lib/ogr/{geometry_mixins → extensions/geometry}/extensions.rb +16 -9
- data/lib/ogr/extensions/geometry/rttopo_extensions.rb +48 -0
- data/lib/ogr/extensions/geometry/wkb_record.rb +63 -0
- data/lib/ogr/extensions/geometry_types/curve/extensions.rb +68 -0
- data/lib/ogr/{layer_mixins → extensions/layer}/capability_methods.rb +4 -0
- data/lib/ogr/{layer_mixins → extensions/layer}/extensions.rb +11 -6
- data/lib/ogr/extensions/spatial_reference/extensions.rb +38 -0
- data/lib/ogr/extensions/spatial_reference/initializers.rb +138 -0
- data/lib/ogr/extensions/style_table/extensions.rb +31 -0
- data/lib/ogr/feature.rb +173 -88
- data/lib/ogr/feature_definition.rb +53 -45
- data/lib/ogr/field.rb +17 -19
- data/lib/ogr/field_definition.rb +30 -18
- data/lib/ogr/geocoder.rb +11 -4
- data/lib/ogr/geometries/line_string.rb +1 -0
- data/lib/ogr/geometries/line_string_25d.rb +0 -9
- data/lib/ogr/geometries/linear_ring.rb +2 -2
- data/lib/ogr/geometries/point.rb +0 -9
- data/lib/ogr/geometry.rb +116 -49
- data/lib/ogr/geometry_field_definition.rb +31 -15
- data/lib/ogr/geometry_types/container.rb +26 -28
- data/lib/ogr/geometry_types/curve.rb +5 -61
- data/lib/ogr/geometry_types/surface.rb +1 -1
- data/lib/ogr/internal_helpers.rb +2 -2
- data/lib/ogr/layer.rb +12 -10
- data/lib/ogr/layer_mixins/ogr_feature_methods.rb +39 -27
- data/lib/ogr/layer_mixins/ogr_field_methods.rb +66 -50
- data/lib/ogr/layer_mixins/ogr_layer_method_methods.rb +17 -8
- data/lib/ogr/layer_mixins/ogr_query_filter_methods.rb +7 -6
- data/lib/ogr/layer_mixins/ogr_sql_methods.rb +15 -7
- data/lib/ogr/spatial_reference.rb +79 -42
- data/lib/ogr/spatial_reference_mixins/coordinate_system_getter_setters.rb +149 -118
- data/lib/ogr/spatial_reference_mixins/exporters.rb +87 -51
- data/lib/ogr/spatial_reference_mixins/importers.rb +88 -43
- data/lib/ogr/spatial_reference_mixins/morphers.rb +12 -8
- data/lib/ogr/spatial_reference_mixins/parameter_getter_setters.rb +27 -13
- data/lib/ogr/style_table.rb +15 -5
- data/lib/ogr/style_tool.rb +29 -15
- data/lib/ogr.rb +1 -0
- data/rakelib/docker.rake +10 -0
- data/sorbet/rbi/hidden-definitions/errors.txt +21790 -0
- data/tilt/gdal2.yml +22 -0
- data/tilt/gdal3.yml +22 -0
- metadata +116 -280
- data/History.md +0 -360
- data/lib/ext/error_symbols.rb +0 -7
- data/lib/gdal/dataset_mixins/extensions.rb +0 -380
- data/lib/gdal/merger.rb +0 -132
- data/lib/ogr/data_source_extensions.rb +0 -10
- data/lib/ogr/envelope_extensions.rb +0 -110
- data/lib/ogr/feature_definition_extensions.rb +0 -39
- data/lib/ogr/feature_extensions.rb +0 -87
- data/lib/ogr/geometry_mixins/container_mixins.rb +0 -25
- data/lib/ogr/spatial_reference_extensions.rb +0 -34
- data/lib/ogr/style_table_extensions.rb +0 -26
- data/spec/ffi-gdal_spec.rb +0 -24
- data/spec/integration/gdal/color_table_info_spec.rb +0 -78
- data/spec/integration/gdal/dataset_info_spec.rb +0 -342
- data/spec/integration/gdal/driver_info_spec.rb +0 -170
- data/spec/integration/gdal/geo_transform_info_spec.rb +0 -226
- data/spec/integration/gdal/gridder_spec.rb +0 -331
- data/spec/integration/gdal/raster_attribute_table_info_spec.rb +0 -229
- data/spec/integration/gdal/raster_band_algorithms_spec.rb +0 -35
- data/spec/integration/gdal/raster_band_info_spec.rb +0 -320
- data/spec/integration/ogr/layer_spec.rb +0 -95
- data/spec/spec_helper.rb +0 -116
- data/spec/support/images/123.tiff +0 -0
- data/spec/support/images/osgeo/gdal/data/hfa/float-rle.img +0 -0
- data/spec/support/images/osgeo/geotiff/GeogToWGS84GeoKey/GeogToWGS84GeoKey5.lgo +0 -31
- data/spec/support/images/osgeo/geotiff/GeogToWGS84GeoKey/GeogToWGS84GeoKey5.tif +0 -0
- data/spec/support/images/osgeo/geotiff/GeogToWGS84GeoKey/GeogToWGS84GeoKey5.tif.msk +0 -0
- data/spec/support/images/osgeo/geotiff/GeogToWGS84GeoKey/GeogToWGS84GeoKey5.txt +0 -10
- data/spec/support/images/osgeo/geotiff/gdal_eg/cea.tif +0 -0
- data/spec/support/images/osgeo/geotiff/gdal_eg/cea.txt +0 -84
- data/spec/support/images/osgeo/geotiff/zi_imaging/image0.lgo +0 -45
- data/spec/support/images/osgeo/geotiff/zi_imaging/image0.tif +0 -0
- data/spec/support/integration_help.rb +0 -34
- data/spec/support/shapefiles/states_21basic/states.dbf +0 -0
- data/spec/support/shapefiles/states_21basic/states.prj +0 -1
- data/spec/support/shapefiles/states_21basic/states.sbn +0 -0
- data/spec/support/shapefiles/states_21basic/states.sbx +0 -0
- data/spec/support/shapefiles/states_21basic/states.shp +0 -0
- data/spec/support/shapefiles/states_21basic/states.shp.xml +0 -3
- data/spec/support/shapefiles/states_21basic/states.shx +0 -0
- data/spec/support/shared_contexts.rb +0 -28
- data/spec/support/shared_examples/gdal/major_object_examples.rb +0 -55
- data/spec/support/shared_examples/ogr/a_25d_geometry.rb +0 -9
- data/spec/support/shared_examples/ogr/a_container_geometry.rb +0 -49
- data/spec/support/shared_examples/ogr/a_geometry.rb +0 -406
- data/spec/support/shared_examples/ogr/a_line_string.rb +0 -18
- data/spec/support/test_style_table.txt +0 -3
- data/spec/support/worldfiles/SR_50M/SR_50M.VERSION.txt +0 -1
- data/spec/support/worldfiles/SR_50M/SR_50M.prj +0 -1
- data/spec/support/worldfiles/SR_50M/SR_50M.tfw +0 -6
- data/spec/support/worldfiles/SR_50M/SR_50M.tif +0 -0
- data/spec/unit/ext/error_symbols_spec.rb +0 -69
- data/spec/unit/ext/numeric_as_data_type_spec.rb +0 -115
- data/spec/unit/ffi/gdal_spec.rb +0 -73
- data/spec/unit/gdal/color_entry_spec.rb +0 -8
- data/spec/unit/gdal/color_interpretation_spec.rb +0 -8
- data/spec/unit/gdal/color_table_mixins/extensions_spec.rb +0 -62
- data/spec/unit/gdal/color_table_spec.rb +0 -146
- data/spec/unit/gdal/data_type_spec.rb +0 -74
- data/spec/unit/gdal/dataset_mixins/warp_methods_spec.rb +0 -55
- data/spec/unit/gdal/dataset_spec.rb +0 -148
- data/spec/unit/gdal/driver_mixins/extensions_spec.rb +0 -24
- data/spec/unit/gdal/driver_spec.rb +0 -51
- data/spec/unit/gdal/environment_methods_spec.rb +0 -8
- data/spec/unit/gdal/geo_transform_mixins/extensions_spec.rb +0 -69
- data/spec/unit/gdal/geo_transform_spec.rb +0 -265
- data/spec/unit/gdal/grid_spec.rb +0 -98
- data/spec/unit/gdal/gridder/point_extracting_spec.rb +0 -101
- data/spec/unit/gdal/gridder_options_spec.rb +0 -185
- data/spec/unit/gdal/gridder_spec.rb +0 -182
- data/spec/unit/gdal/internal_helpers_spec.rb +0 -278
- data/spec/unit/gdal/major_object_spec.rb +0 -10
- data/spec/unit/gdal/options_spec.rb +0 -33
- data/spec/unit/gdal/raster_attribute_table_spec.rb +0 -7
- data/spec/unit/gdal/raster_band_classifier_spec.rb +0 -260
- data/spec/unit/gdal/raster_band_mixins/extensions_spec.rb +0 -73
- data/spec/unit/gdal/raster_band_mixins/io_extensions_spec.rb +0 -135
- data/spec/unit/gdal/raster_band_spec.rb +0 -8
- data/spec/unit/gdal/rpc_info_spec.rb +0 -8
- data/spec/unit/gdal/version_info_spec.rb +0 -10
- data/spec/unit/gdal/virtual_dataset_spec.rb +0 -34
- data/spec/unit/gdal/warp_operation_spec.rb +0 -8
- data/spec/unit/gdal/warp_options_spec.rb +0 -338
- data/spec/unit/ogr/coordinate_transformation_spec.rb +0 -104
- data/spec/unit/ogr/data_source_mixins/capability_methods_spec.rb +0 -32
- data/spec/unit/ogr/data_source_spec.rb +0 -223
- data/spec/unit/ogr/driver_mixins/capability_methods_spec.rb +0 -20
- data/spec/unit/ogr/driver_spec.rb +0 -152
- data/spec/unit/ogr/envelope_spec.rb +0 -324
- data/spec/unit/ogr/feature_definition_spec.rb +0 -296
- data/spec/unit/ogr/feature_extensions_spec.rb +0 -90
- data/spec/unit/ogr/feature_spec.rb +0 -363
- data/spec/unit/ogr/field_definition_spec.rb +0 -118
- data/spec/unit/ogr/field_spec.rb +0 -195
- data/spec/unit/ogr/geometries/geometry_collection_25d_spec.rb +0 -25
- data/spec/unit/ogr/geometries/geometry_collection_spec.rb +0 -188
- data/spec/unit/ogr/geometries/line_string_25d_spec.rb +0 -25
- data/spec/unit/ogr/geometries/line_string_spec.rb +0 -107
- data/spec/unit/ogr/geometries/linear_ring_spec.rb +0 -92
- data/spec/unit/ogr/geometries/multi_line_string_25d_spec.rb +0 -25
- data/spec/unit/ogr/geometries/multi_line_string_spec.rb +0 -16
- data/spec/unit/ogr/geometries/multi_point_25d_spec.rb +0 -25
- data/spec/unit/ogr/geometries/multi_point_spec.rb +0 -16
- data/spec/unit/ogr/geometries/multi_polygon_25d_spec.rb +0 -25
- data/spec/unit/ogr/geometries/multi_polygon_spec.rb +0 -43
- data/spec/unit/ogr/geometries/none_geometry_spec.rb +0 -14
- data/spec/unit/ogr/geometries/point_25d_spec.rb +0 -25
- data/spec/unit/ogr/geometries/point_spec.rb +0 -307
- data/spec/unit/ogr/geometries/polygon_25d_spec.rb +0 -25
- data/spec/unit/ogr/geometries/polygon_spec.rb +0 -19
- data/spec/unit/ogr/geometries/unknown_geometry_spec.rb +0 -12
- data/spec/unit/ogr/geometry_field_definition_spec.rb +0 -73
- data/spec/unit/ogr/geometry_spec.rb +0 -711
- data/spec/unit/ogr/internal_helpers_spec.rb +0 -70
- data/spec/unit/ogr/layer_mixins/capability_methods_spec.rb +0 -90
- data/spec/unit/ogr/layer_mixins/ogr_feature_methods_spec.rb +0 -155
- data/spec/unit/ogr/layer_mixins/ogr_field_methods_spec.rb +0 -434
- data/spec/unit/ogr/layer_mixins/ogr_layer_method_methods_spec.rb +0 -22
- data/spec/unit/ogr/layer_mixins/ogr_query_filter_methods_spec.rb +0 -44
- data/spec/unit/ogr/layer_mixins/ogr_sql_methods_spec.rb +0 -14
- data/spec/unit/ogr/layer_spec.rb +0 -98
- data/spec/unit/ogr/spatial_reference_mixins/coordinate_system_getter_setters_spec.rb +0 -48
- data/spec/unit/ogr/spatial_reference_mixins/exporters_spec.rb +0 -151
- data/spec/unit/ogr/spatial_reference_mixins/importers_spec.rb +0 -40
- data/spec/unit/ogr/spatial_reference_mixins/morphers_spec.rb +0 -38
- data/spec/unit/ogr/spatial_reference_mixins/parameter_getter_setters_spec.rb +0 -105
- data/spec/unit/ogr/spatial_reference_mixins/type_checks_spec.rb +0 -159
- data/spec/unit/ogr/spatial_reference_spec.rb +0 -44
- data/spec/unit/ogr/style_table_spec.rb +0 -108
- data/spec/unit/ogr/style_tool_spec.rb +0 -159
- data/spec/unit/version_info_spec.rb +0 -50
data/lib/ffi/gdal/alg.rb
CHANGED
@@ -13,24 +13,24 @@ module FFI
|
|
13
13
|
# Enums
|
14
14
|
# -----------------------------------------------------------------------
|
15
15
|
GridAlgorithm = enum :GGA_InverseDistanceToAPower, 1,
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
16
|
+
:GGA_MovingAverage, 2,
|
17
|
+
:GGA_NearestNeighbor, 3,
|
18
|
+
:GGA_MetricMinimum, 4,
|
19
|
+
:GGA_MetricMaximum, 5,
|
20
|
+
:GGA_MetricRange, 6,
|
21
|
+
:GGA_MetricCount, 7,
|
22
|
+
:GGA_MetricAverageDistance, 8,
|
23
|
+
:GGA_MetricAverageDistancePts, 9
|
24
24
|
|
25
25
|
# -----------------------------------------------------------------------
|
26
26
|
# Typedefs
|
27
27
|
# -----------------------------------------------------------------------
|
28
28
|
callback :GDALTransformerFunc,
|
29
|
-
|
30
|
-
|
29
|
+
%i[pointer bool int pointer pointer pointer pointer],
|
30
|
+
:int
|
31
31
|
callback :GDALContourWriter,
|
32
|
-
|
33
|
-
|
32
|
+
%i[double int pointer pointer pointer],
|
33
|
+
CPL::Error::CPLErr
|
34
34
|
typedef :pointer, :GDALContourGeneratorH
|
35
35
|
|
36
36
|
# -----------------------------------------------------------------------
|
@@ -39,200 +39,200 @@ module FFI
|
|
39
39
|
attach_function :GDALDestroyTransformer, %i[pointer], :void
|
40
40
|
|
41
41
|
attach_function :GDALChecksumImage,
|
42
|
-
|
43
|
-
|
42
|
+
[FFI::GDAL::GDAL.find_type(:GDALRasterBandH), :int, :int, :int, :int],
|
43
|
+
:int
|
44
44
|
attach_function :GDALComputeMedianCutPCT,
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
|
54
|
-
|
55
|
-
|
45
|
+
[
|
46
|
+
FFI::GDAL::GDAL.find_type(:GDALRasterBandH),
|
47
|
+
FFI::GDAL::GDAL.find_type(:GDALRasterBandH),
|
48
|
+
FFI::GDAL::GDAL.find_type(:GDALRasterBandH),
|
49
|
+
:pointer,
|
50
|
+
:int,
|
51
|
+
FFI::GDAL::GDAL.find_type(:GDALColorTableH),
|
52
|
+
FFI::GDAL::GDAL.find_type(:GDALProgressFunc),
|
53
|
+
:pointer
|
54
|
+
],
|
55
|
+
:int
|
56
56
|
attach_function :GDALComputeProximity,
|
57
|
-
|
58
|
-
|
59
|
-
|
60
|
-
|
61
|
-
|
62
|
-
|
63
|
-
|
64
|
-
|
57
|
+
[
|
58
|
+
FFI::GDAL::GDAL.find_type(:GDALRasterBandH),
|
59
|
+
FFI::GDAL::GDAL.find_type(:GDALRasterBandH),
|
60
|
+
:pointer,
|
61
|
+
FFI::GDAL::GDAL.find_type(:GDALProgressFunc),
|
62
|
+
:pointer
|
63
|
+
],
|
64
|
+
CPL::Error::CPLErr
|
65
65
|
|
66
66
|
# ~~~~~~~~~~~~~~~~~~~~~
|
67
67
|
# Contour functions
|
68
68
|
# ~~~~~~~~~~~~~~~~~~~~~
|
69
69
|
attach_function :GDAL_CG_Create,
|
70
|
-
|
71
|
-
|
72
|
-
|
73
|
-
|
74
|
-
|
75
|
-
|
76
|
-
|
77
|
-
|
78
|
-
|
79
|
-
|
80
|
-
|
70
|
+
%i[
|
71
|
+
int
|
72
|
+
int
|
73
|
+
int
|
74
|
+
double
|
75
|
+
double
|
76
|
+
double
|
77
|
+
GDALContourWriter
|
78
|
+
pointer
|
79
|
+
],
|
80
|
+
:GDALContourGeneratorH
|
81
81
|
attach_function :GDAL_CG_FeedLine,
|
82
|
-
|
83
|
-
|
82
|
+
%i[GDALContourGeneratorH pointer],
|
83
|
+
CPL::Error::CPLErr
|
84
84
|
attach_function :GDAL_CG_Destroy, %i[pointer], :void
|
85
85
|
attach_function :OGRContourWriter,
|
86
|
-
|
87
|
-
|
86
|
+
%i[double int pointer pointer pointer],
|
87
|
+
CPL::Error::CPLErr
|
88
88
|
attach_function :GDALContourGenerate,
|
89
|
-
|
90
|
-
|
91
|
-
|
92
|
-
|
93
|
-
|
94
|
-
|
95
|
-
|
96
|
-
|
97
|
-
|
98
|
-
|
99
|
-
|
100
|
-
|
101
|
-
|
102
|
-
|
103
|
-
|
89
|
+
[
|
90
|
+
FFI::GDAL::GDAL.find_type(:GDALRasterBandH),
|
91
|
+
:double,
|
92
|
+
:double,
|
93
|
+
:int,
|
94
|
+
:pointer,
|
95
|
+
:int,
|
96
|
+
:double,
|
97
|
+
:pointer,
|
98
|
+
:int,
|
99
|
+
:int,
|
100
|
+
FFI::GDAL::GDAL.find_type(:GDALProgressFunc),
|
101
|
+
:pointer
|
102
|
+
],
|
103
|
+
CPL::Error::CPLErr
|
104
104
|
|
105
105
|
# ~~~~~~~~~~~~~~~~~~~~~
|
106
106
|
# Transformer functions
|
107
107
|
# ~~~~~~~~~~~~~~~~~~~~~
|
108
108
|
attach_function :GDALSuggestedWarpOutput,
|
109
|
-
|
110
|
-
|
111
|
-
|
112
|
-
|
113
|
-
|
114
|
-
|
115
|
-
|
116
|
-
|
117
|
-
|
109
|
+
[
|
110
|
+
FFI::GDAL::GDAL.find_type(:GDALDatasetH),
|
111
|
+
:GDALTransformerFunc,
|
112
|
+
:pointer,
|
113
|
+
:pointer,
|
114
|
+
:pointer,
|
115
|
+
:pointer
|
116
|
+
],
|
117
|
+
CPL::Error::CPLErr
|
118
118
|
attach_function :GDALSuggestedWarpOutput2,
|
119
|
-
|
120
|
-
|
121
|
-
|
122
|
-
|
123
|
-
|
124
|
-
|
125
|
-
|
126
|
-
|
127
|
-
|
128
|
-
|
129
|
-
|
119
|
+
[
|
120
|
+
FFI::GDAL::GDAL.find_type(:GDALDatasetH),
|
121
|
+
:GDALTransformerFunc,
|
122
|
+
:pointer,
|
123
|
+
:pointer,
|
124
|
+
:pointer,
|
125
|
+
:pointer,
|
126
|
+
:pointer,
|
127
|
+
:int
|
128
|
+
],
|
129
|
+
CPL::Error::CPLErr
|
130
130
|
attach_function :GDALSerializeTransformer,
|
131
|
-
|
132
|
-
|
131
|
+
%i[GDALTransformerFunc pointer],
|
132
|
+
CPL::XMLNode.ptr
|
133
133
|
attach_function :GDALDeserializeTransformer,
|
134
|
-
|
135
|
-
|
134
|
+
[CPL::XMLNode.ptr, :GDALTransformerFunc, :pointer],
|
135
|
+
CPL::Error::CPLErr
|
136
136
|
attach_function :GDALTransformGeolocations,
|
137
|
-
|
138
|
-
|
139
|
-
|
140
|
-
|
141
|
-
|
142
|
-
|
143
|
-
|
144
|
-
|
145
|
-
|
146
|
-
|
147
|
-
|
137
|
+
[
|
138
|
+
FFI::GDAL::GDAL.find_type(:GDALRasterBandH),
|
139
|
+
FFI::GDAL::GDAL.find_type(:GDALRasterBandH),
|
140
|
+
FFI::GDAL::GDAL.find_type(:GDALRasterBandH),
|
141
|
+
:GDALTransformerFunc,
|
142
|
+
:pointer,
|
143
|
+
FFI::GDAL::GDAL.find_type(:GDALProgressFunc),
|
144
|
+
:pointer,
|
145
|
+
:pointer
|
146
|
+
],
|
147
|
+
CPL::Error::CPLErr
|
148
148
|
|
149
149
|
# ~~~
|
150
150
|
# Approx
|
151
151
|
# ~~~
|
152
152
|
attach_function :GDALCreateApproxTransformer,
|
153
|
-
|
154
|
-
|
153
|
+
%i[GDALTransformerFunc pointer double],
|
154
|
+
:pointer
|
155
155
|
attach_function :GDALDestroyApproxTransformer, %i[pointer], :void
|
156
156
|
attach_function :GDALApproxTransformerOwnsSubtransformer,
|
157
|
-
|
158
|
-
|
157
|
+
%i[pointer bool],
|
158
|
+
:void
|
159
159
|
ApproxTransform = attach_function :GDALApproxTransform,
|
160
|
-
|
161
|
-
|
160
|
+
%i[pointer bool int pointer pointer pointer pointer],
|
161
|
+
:int
|
162
162
|
|
163
163
|
# ~~~
|
164
164
|
# GCP Transform
|
165
165
|
# ~~~
|
166
166
|
attach_function :GDALCreateGCPTransformer, %i[int pointer int int], :pointer
|
167
167
|
attach_function :GDALCreateGCPRefineTransformer,
|
168
|
-
|
169
|
-
|
168
|
+
%i[int pointer int int double int],
|
169
|
+
:pointer
|
170
170
|
attach_function :GDALDestroyGCPTransformer, %i[pointer], :void
|
171
171
|
GCPTransform = attach_function :GDALGCPTransform,
|
172
|
-
|
173
|
-
|
172
|
+
%i[pointer bool int pointer pointer pointer pointer],
|
173
|
+
:bool
|
174
174
|
|
175
175
|
# ~~~
|
176
176
|
# GeoLoc Transform
|
177
177
|
# ~~~
|
178
178
|
attach_function :GDALCreateGeoLocTransformer,
|
179
|
-
|
180
|
-
|
179
|
+
[FFI::GDAL::GDAL.find_type(:GDALDatasetH), :pointer, :bool],
|
180
|
+
:pointer
|
181
181
|
attach_function :GDALDestroyGeoLocTransformer, %i[pointer], :void
|
182
182
|
GeoLocTransform = attach_function :GDALGeoLocTransform,
|
183
|
-
|
184
|
-
|
183
|
+
%i[pointer bool int pointer pointer pointer pointer],
|
184
|
+
:bool
|
185
185
|
|
186
186
|
# ~~~
|
187
187
|
# GenImgProj Transform
|
188
188
|
# ~~~
|
189
189
|
attach_function :GDALCreateGenImgProjTransformer,
|
190
|
-
|
191
|
-
|
192
|
-
|
193
|
-
|
194
|
-
|
195
|
-
|
196
|
-
|
197
|
-
|
198
|
-
|
199
|
-
|
190
|
+
[
|
191
|
+
FFI::GDAL::GDAL.find_type(:GDALDatasetH),
|
192
|
+
:string,
|
193
|
+
FFI::GDAL::GDAL.find_type(:GDALDatasetH),
|
194
|
+
:string,
|
195
|
+
:bool,
|
196
|
+
:double,
|
197
|
+
:int
|
198
|
+
],
|
199
|
+
:pointer
|
200
200
|
attach_function :GDALCreateGenImgProjTransformer2,
|
201
|
-
|
202
|
-
|
201
|
+
[FFI::GDAL::GDAL.find_type(:GDALDatasetH), FFI::GDAL::GDAL.find_type(:GDALDatasetH), :pointer],
|
202
|
+
:pointer
|
203
203
|
attach_function :GDALCreateGenImgProjTransformer3,
|
204
|
-
|
205
|
-
|
204
|
+
%i[string pointer string pointer],
|
205
|
+
:pointer
|
206
206
|
attach_function :GDALDestroyGenImgProjTransformer, %i[pointer], :void
|
207
207
|
attach_function :GDALSetGenImgProjTransformerDstGeoTransform,
|
208
|
-
|
209
|
-
|
208
|
+
%i[pointer pointer],
|
209
|
+
:void
|
210
210
|
GenImgProjTransform = attach_function :GDALGenImgProjTransform,
|
211
|
-
|
212
|
-
|
211
|
+
%i[pointer bool int pointer pointer pointer pointer],
|
212
|
+
:bool
|
213
213
|
|
214
214
|
# ~~~
|
215
215
|
# Reprojection Transform
|
216
216
|
# ~~~
|
217
217
|
attach_function :GDALCreateReprojectionTransformer,
|
218
|
-
|
219
|
-
|
218
|
+
%i[string string],
|
219
|
+
:pointer
|
220
220
|
attach_function :GDALDestroyReprojectionTransformer, %i[pointer], :void
|
221
221
|
ReprojectionTransform = attach_function :GDALReprojectionTransform,
|
222
|
-
|
223
|
-
|
222
|
+
%i[pointer bool int pointer pointer pointer pointer],
|
223
|
+
:int
|
224
224
|
|
225
225
|
# ~~~
|
226
226
|
# RPC Transform
|
227
227
|
# ~~~
|
228
228
|
attach_function :GDALCreateRPCTransformer,
|
229
|
-
|
230
|
-
|
229
|
+
[RPCInfo.ptr, :int, :double, :pointer],
|
230
|
+
:pointer
|
231
231
|
attach_function :RPCInfoToMD, [RPCInfo.ptr], :pointer
|
232
232
|
attach_function :GDALDestroyRPCTransformer, %i[pointer], :void
|
233
233
|
RPCTransform = attach_function :GDALRPCTransform,
|
234
|
-
|
235
|
-
|
234
|
+
%i[pointer bool int pointer pointer pointer pointer],
|
235
|
+
:int
|
236
236
|
|
237
237
|
# ~~~
|
238
238
|
# TPS Transform
|
@@ -240,166 +240,166 @@ module FFI
|
|
240
240
|
attach_function :GDALCreateTPSTransformer, %i[int pointer int], :pointer
|
241
241
|
attach_function :GDALDestroyTPSTransformer, %i[pointer], :void
|
242
242
|
TPSTransform = attach_function :GDALTPSTransform,
|
243
|
-
|
244
|
-
|
243
|
+
%i[pointer bool int pointer pointer pointer pointer],
|
244
|
+
:int
|
245
245
|
|
246
246
|
# ~~~
|
247
247
|
# RasterBand related functions
|
248
248
|
# ~~~
|
249
249
|
attach_function :GDALDitherRGB2PCT,
|
250
|
-
|
251
|
-
|
252
|
-
|
253
|
-
|
254
|
-
|
255
|
-
|
256
|
-
|
257
|
-
|
258
|
-
|
259
|
-
|
250
|
+
[
|
251
|
+
FFI::GDAL::GDAL.find_type(:GDALRasterBandH),
|
252
|
+
FFI::GDAL::GDAL.find_type(:GDALRasterBandH),
|
253
|
+
FFI::GDAL::GDAL.find_type(:GDALRasterBandH),
|
254
|
+
FFI::GDAL::GDAL.find_type(:GDALRasterBandH),
|
255
|
+
FFI::GDAL::GDAL.find_type(:GDALColorTableH),
|
256
|
+
FFI::GDAL::GDAL.find_type(:GDALProgressFunc),
|
257
|
+
:pointer
|
258
|
+
],
|
259
|
+
CPL::Error::CPLErr
|
260
260
|
attach_function :GDALFillNodata,
|
261
|
-
|
262
|
-
|
263
|
-
|
264
|
-
|
265
|
-
|
266
|
-
|
267
|
-
|
268
|
-
|
269
|
-
|
270
|
-
|
271
|
-
|
261
|
+
[
|
262
|
+
FFI::GDAL::GDAL.find_type(:GDALRasterBandH),
|
263
|
+
FFI::GDAL::GDAL.find_type(:GDALRasterBandH),
|
264
|
+
:double,
|
265
|
+
:int,
|
266
|
+
:int,
|
267
|
+
:pointer,
|
268
|
+
FFI::GDAL::GDAL.find_type(:GDALProgressFunc),
|
269
|
+
:pointer
|
270
|
+
],
|
271
|
+
CPL::Error::CPLErr
|
272
272
|
attach_function :GDALPolygonize,
|
273
|
-
|
274
|
-
|
275
|
-
|
276
|
-
|
277
|
-
|
278
|
-
|
279
|
-
|
280
|
-
|
281
|
-
|
282
|
-
|
273
|
+
[
|
274
|
+
FFI::GDAL::GDAL.find_type(:GDALRasterBandH),
|
275
|
+
FFI::GDAL::GDAL.find_type(:GDALRasterBandH),
|
276
|
+
OGR::API.find_type(:OGRLayerH),
|
277
|
+
:int,
|
278
|
+
:pointer,
|
279
|
+
FFI::GDAL::GDAL.find_type(:GDALProgressFunc),
|
280
|
+
:pointer
|
281
|
+
],
|
282
|
+
CPL::Error::CPLErr
|
283
283
|
attach_function :GDALFPolygonize,
|
284
|
-
|
285
|
-
|
286
|
-
|
287
|
-
|
288
|
-
|
289
|
-
|
290
|
-
|
291
|
-
|
292
|
-
|
293
|
-
|
284
|
+
[
|
285
|
+
FFI::GDAL::GDAL.find_type(:GDALRasterBandH),
|
286
|
+
FFI::GDAL::GDAL.find_type(:GDALRasterBandH),
|
287
|
+
OGR::API.find_type(:OGRLayerH),
|
288
|
+
:int,
|
289
|
+
:pointer,
|
290
|
+
FFI::GDAL::GDAL.find_type(:GDALProgressFunc),
|
291
|
+
:pointer
|
292
|
+
],
|
293
|
+
CPL::Error::CPLErr
|
294
294
|
attach_function :GDALSieveFilter,
|
295
|
-
|
296
|
-
|
297
|
-
|
298
|
-
|
299
|
-
|
300
|
-
|
301
|
-
|
302
|
-
|
303
|
-
|
304
|
-
|
305
|
-
|
295
|
+
[
|
296
|
+
FFI::GDAL::GDAL.find_type(:GDALRasterBandH),
|
297
|
+
FFI::GDAL::GDAL.find_type(:GDALRasterBandH),
|
298
|
+
FFI::GDAL::GDAL.find_type(:GDALRasterBandH),
|
299
|
+
:int,
|
300
|
+
:int,
|
301
|
+
:pointer,
|
302
|
+
FFI::GDAL::GDAL.find_type(:GDALProgressFunc),
|
303
|
+
:pointer
|
304
|
+
],
|
305
|
+
CPL::Error::CPLErr
|
306
306
|
|
307
307
|
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
308
308
|
# Dataset-related
|
309
309
|
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
310
310
|
attach_function :GDALGridCreate,
|
311
|
-
|
312
|
-
|
313
|
-
|
314
|
-
|
315
|
-
|
316
|
-
|
317
|
-
|
318
|
-
|
319
|
-
|
320
|
-
|
321
|
-
|
322
|
-
|
323
|
-
|
324
|
-
|
325
|
-
|
326
|
-
|
327
|
-
|
328
|
-
|
329
|
-
|
311
|
+
[
|
312
|
+
GridAlgorithm,
|
313
|
+
:pointer,
|
314
|
+
CPL::Port.find_type(:GUInt32),
|
315
|
+
:pointer,
|
316
|
+
:pointer,
|
317
|
+
:pointer,
|
318
|
+
:double,
|
319
|
+
:double,
|
320
|
+
:double,
|
321
|
+
:double,
|
322
|
+
CPL::Port.find_type(:GUInt32),
|
323
|
+
CPL::Port.find_type(:GUInt32),
|
324
|
+
GDAL::DataType,
|
325
|
+
:pointer,
|
326
|
+
FFI::GDAL::GDAL.find_type(:GDALProgressFunc),
|
327
|
+
:pointer
|
328
|
+
],
|
329
|
+
CPL::Error::CPLErr
|
330
330
|
attach_function :GDALRasterizeGeometries,
|
331
|
-
|
332
|
-
|
333
|
-
|
334
|
-
|
335
|
-
|
336
|
-
|
337
|
-
|
338
|
-
|
339
|
-
|
340
|
-
|
341
|
-
|
342
|
-
|
343
|
-
|
344
|
-
|
331
|
+
[
|
332
|
+
FFI::GDAL::GDAL.find_type(:GDALDatasetH),
|
333
|
+
:int,
|
334
|
+
:pointer,
|
335
|
+
:int,
|
336
|
+
:pointer,
|
337
|
+
:GDALTransformerFunc,
|
338
|
+
:pointer,
|
339
|
+
:pointer,
|
340
|
+
:pointer,
|
341
|
+
FFI::GDAL::GDAL.find_type(:GDALProgressFunc),
|
342
|
+
:pointer
|
343
|
+
],
|
344
|
+
CPL::Error::CPLErr
|
345
345
|
attach_function :GDALRasterizeLayers,
|
346
|
-
|
347
|
-
|
348
|
-
|
349
|
-
|
350
|
-
|
351
|
-
|
352
|
-
|
353
|
-
|
354
|
-
|
355
|
-
|
356
|
-
|
357
|
-
|
358
|
-
|
359
|
-
|
346
|
+
[
|
347
|
+
FFI::GDAL::GDAL.find_type(:GDALDatasetH),
|
348
|
+
:int,
|
349
|
+
:pointer,
|
350
|
+
:int,
|
351
|
+
:pointer,
|
352
|
+
:GDALTransformerFunc,
|
353
|
+
:pointer,
|
354
|
+
:pointer,
|
355
|
+
:pointer,
|
356
|
+
FFI::GDAL::GDAL.find_type(:GDALProgressFunc),
|
357
|
+
:pointer
|
358
|
+
],
|
359
|
+
CPL::Error::CPLErr
|
360
360
|
attach_function :GDALRasterizeLayersBuf,
|
361
|
-
|
362
|
-
|
363
|
-
|
364
|
-
|
365
|
-
|
366
|
-
|
367
|
-
|
368
|
-
|
369
|
-
|
370
|
-
|
371
|
-
|
372
|
-
|
373
|
-
|
374
|
-
|
375
|
-
|
376
|
-
|
377
|
-
|
378
|
-
|
379
|
-
|
361
|
+
[
|
362
|
+
:pointer,
|
363
|
+
:int,
|
364
|
+
:int,
|
365
|
+
GDAL::DataType,
|
366
|
+
:int,
|
367
|
+
:int,
|
368
|
+
:int,
|
369
|
+
:pointer,
|
370
|
+
:string,
|
371
|
+
:pointer,
|
372
|
+
:GDALTransformerFunc,
|
373
|
+
:pointer,
|
374
|
+
:double,
|
375
|
+
:pointer,
|
376
|
+
FFI::GDAL::GDAL.find_type(:GDALProgressFunc),
|
377
|
+
:pointer
|
378
|
+
],
|
379
|
+
CPL::Error::CPLErr
|
380
380
|
|
381
381
|
attach_function :GDALSimpleImageWarp,
|
382
|
-
|
383
|
-
|
384
|
-
|
385
|
-
|
386
|
-
|
387
|
-
|
388
|
-
|
389
|
-
|
390
|
-
|
391
|
-
|
392
|
-
|
393
|
-
|
382
|
+
[
|
383
|
+
FFI::GDAL::GDAL.find_type(:GDALDatasetH),
|
384
|
+
FFI::GDAL::GDAL.find_type(:GDALDatasetH),
|
385
|
+
:int,
|
386
|
+
:pointer,
|
387
|
+
:GDALTransformerFunc,
|
388
|
+
:pointer,
|
389
|
+
FFI::GDAL::GDAL.find_type(:GDALProgressFunc),
|
390
|
+
:pointer,
|
391
|
+
:pointer
|
392
|
+
],
|
393
|
+
:bool
|
394
394
|
|
395
395
|
attach_function :GDALComputeMatchingPoints,
|
396
|
-
|
397
|
-
|
398
|
-
|
399
|
-
|
400
|
-
|
401
|
-
|
402
|
-
|
396
|
+
[
|
397
|
+
FFI::GDAL::GDAL.find_type(:GDALDatasetH),
|
398
|
+
FFI::GDAL::GDAL.find_type(:GDALDatasetH),
|
399
|
+
:pointer,
|
400
|
+
:pointer
|
401
|
+
],
|
402
|
+
FFI::GDAL::GCP.ptr
|
403
403
|
end
|
404
404
|
end
|
405
405
|
end
|