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/gdal.rb
CHANGED
@@ -14,82 +14,82 @@ module FFI
|
|
14
14
|
# Enums
|
15
15
|
# ----------------------------------------------------------------
|
16
16
|
DataType = enum :GDT_Unknown, 0,
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
17
|
+
:GDT_Byte, 1,
|
18
|
+
:GDT_UInt16, 2,
|
19
|
+
:GDT_Int16, 3,
|
20
|
+
:GDT_UInt32, 4,
|
21
|
+
:GDT_Int32, 5,
|
22
|
+
:GDT_Float32, 6,
|
23
|
+
:GDT_Float64, 7,
|
24
|
+
:GDT_CInt16, 8,
|
25
|
+
:GDT_CInt32, 9,
|
26
|
+
:GDT_CFloat32, 10,
|
27
|
+
:GDT_CFloat64, 11,
|
28
|
+
:GDT_TypeCount, 12
|
29
29
|
|
30
30
|
AsyncStatusType = enum :GARIO_PENDING, 0,
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
31
|
+
:GARIO_UPDATE, 1,
|
32
|
+
:GARIO_ERROR, 2,
|
33
|
+
:GARIO_COMPLETE, 3,
|
34
|
+
:GARIO_TypeCount, 4
|
35
35
|
|
36
36
|
Access = enum :GA_ReadOnly, 0,
|
37
|
-
|
37
|
+
:GA_Update, 1
|
38
38
|
|
39
39
|
RWFlag = enum :GF_Read, 0,
|
40
|
-
|
40
|
+
:GF_Write, 1
|
41
41
|
|
42
42
|
ColorInterp = enum :GCI_Undefined, 0,
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
|
54
|
-
|
55
|
-
|
56
|
-
|
57
|
-
|
58
|
-
|
59
|
-
|
43
|
+
:GCI_GrayIndex, 1,
|
44
|
+
:GCI_PaletteIndex, 2,
|
45
|
+
:GCI_RedBand, 3,
|
46
|
+
:GCI_GreenBand, 4,
|
47
|
+
:GCI_BlueBand, 5,
|
48
|
+
:GCI_AlphaBand, 6,
|
49
|
+
:GCI_HueBand, 7,
|
50
|
+
:GCI_SaturationBand, 8,
|
51
|
+
:GCI_LightnessBand, 9,
|
52
|
+
:GCI_CyanBand, 10,
|
53
|
+
:GCI_MagentaBand, 11,
|
54
|
+
:GCI_YellowBand, 12,
|
55
|
+
:GCI_BlackBand, 13,
|
56
|
+
:GCI_YCbCr_YBand, 14,
|
57
|
+
:GCI_YCbCr_CbBand, 15,
|
58
|
+
:GCI_YCbCr_CrBand, 16,
|
59
|
+
:GCI_Max, 16 # Seems wrong that this is also 16...
|
60
60
|
|
61
61
|
PaletteInterp = enum :GPI_Gray, 0,
|
62
|
-
|
63
|
-
|
64
|
-
|
62
|
+
:GPI_RGB, 1,
|
63
|
+
:GPI_CMYK, 2,
|
64
|
+
:GPI_HLS, 3
|
65
65
|
|
66
66
|
RATFieldType = enum :GFT_Integer,
|
67
|
-
|
68
|
-
|
67
|
+
:GFT_Real,
|
68
|
+
:GFT_String
|
69
69
|
|
70
70
|
RATFieldUsage = enum :GFU_Generic, 0,
|
71
|
-
|
72
|
-
|
73
|
-
|
74
|
-
|
75
|
-
|
76
|
-
|
77
|
-
|
78
|
-
|
79
|
-
|
80
|
-
|
81
|
-
|
82
|
-
|
83
|
-
|
84
|
-
|
85
|
-
|
86
|
-
|
87
|
-
|
88
|
-
|
71
|
+
:GFU_PixelCount, 1,
|
72
|
+
:GFU_Name, 2,
|
73
|
+
:GFU_Min, 3,
|
74
|
+
:GFU_Max, 4,
|
75
|
+
:GFU_MinMax, 5,
|
76
|
+
:GFU_Red, 6,
|
77
|
+
:GFU_Green, 7,
|
78
|
+
:GFU_Blue, 8,
|
79
|
+
:GFU_Alpha, 9,
|
80
|
+
:GFU_RedMin, 10,
|
81
|
+
:GFU_GreenMin, 11,
|
82
|
+
:GFU_BlueMin, 12,
|
83
|
+
:GFU_AlphaMin, 13,
|
84
|
+
:GFU_RedMax, 14,
|
85
|
+
:GFU_GreenMax, 15,
|
86
|
+
:GFU_BlueMax, 16,
|
87
|
+
:GFU_AlphaMax, 17,
|
88
|
+
:GFU_MaxCount
|
89
89
|
|
90
90
|
TileOrganization = enum :GTO_TIP,
|
91
|
-
|
92
|
-
|
91
|
+
:GTO_BIT,
|
92
|
+
:GTO_BSQ
|
93
93
|
|
94
94
|
# ----------------------------------------------------------------
|
95
95
|
# typedefs
|
@@ -103,14 +103,14 @@ module FFI
|
|
103
103
|
typedef :pointer, :GDALAsyncReaderH
|
104
104
|
|
105
105
|
# When using, make sure to return +true+ if the operation should continue;
|
106
|
-
# +false+ if the user has
|
106
|
+
# +false+ if the user has canceled.
|
107
107
|
callback :GDALProgressFunc,
|
108
|
-
|
109
|
-
|
108
|
+
%i[double string pointer], # completion, message, progress_arg
|
109
|
+
:bool
|
110
110
|
|
111
111
|
callback :GDALDerivedPixelFunc,
|
112
|
-
|
113
|
-
|
112
|
+
[:pointer, :int, :pointer, :int, :int, DataType, DataType, :int, :int],
|
113
|
+
:int
|
114
114
|
|
115
115
|
# ----------------------------------------------------------------
|
116
116
|
# functions
|
@@ -122,7 +122,7 @@ module FFI
|
|
122
122
|
# ~~~~~~~~~~~~~~~~~~~
|
123
123
|
# ColorInterpretation
|
124
124
|
# ~~~~~~~~~~~~~~~~~~~
|
125
|
-
attach_function :GDALGetColorInterpretationName, [ColorInterp], :
|
125
|
+
attach_function :GDALGetColorInterpretationName, [ColorInterp], :strptr
|
126
126
|
attach_function :GDALGetColorInterpretationByName, [:string], ColorInterp
|
127
127
|
|
128
128
|
# ~~~~~~~~~~~~~~~~~~~
|
@@ -139,27 +139,27 @@ module FFI
|
|
139
139
|
|
140
140
|
# Instance-level functions
|
141
141
|
attach_function :GDALCreate,
|
142
|
-
|
143
|
-
|
142
|
+
[:GDALDriverH, :string, :int, :int, :int, DataType, :pointer],
|
143
|
+
:GDALDatasetH
|
144
144
|
attach_function :GDALCreateCopy,
|
145
|
-
|
146
|
-
|
145
|
+
%i[GDALDriverH string GDALDatasetH bool pointer GDALProgressFunc pointer],
|
146
|
+
:GDALDatasetH
|
147
147
|
attach_function :GDALValidateCreationOptions, %i[GDALDriverH pointer], :bool
|
148
|
-
attach_function :GDALGetDriverShortName, [:GDALDriverH], :
|
149
|
-
attach_function :GDALGetDriverLongName, [:GDALDriverH], :
|
150
|
-
attach_function :GDALGetDriverHelpTopic, [:GDALDriverH], :
|
151
|
-
attach_function :GDALGetDriverCreationOptionList, [:GDALDriverH], :
|
148
|
+
attach_function :GDALGetDriverShortName, [:GDALDriverH], :strptr
|
149
|
+
attach_function :GDALGetDriverLongName, [:GDALDriverH], :strptr
|
150
|
+
attach_function :GDALGetDriverHelpTopic, [:GDALDriverH], :strptr
|
151
|
+
attach_function :GDALGetDriverCreationOptionList, [:GDALDriverH], :strptr
|
152
152
|
|
153
153
|
attach_function :GDALDestroyDriver, [:GDALDriverH], :void
|
154
154
|
attach_function :GDALRegisterDriver, [:GDALDriverH], :int
|
155
155
|
attach_function :GDALDeregisterDriver, [:GDALDriverH], :void
|
156
156
|
attach_function :GDALDeleteDataset, %i[GDALDriverH string], FFI::CPL::Error::CPLErr
|
157
157
|
attach_function :GDALRenameDataset,
|
158
|
-
|
159
|
-
|
158
|
+
%i[GDALDriverH string string],
|
159
|
+
FFI::CPL::Error::CPLErr
|
160
160
|
attach_function :GDALCopyDatasetFiles,
|
161
|
-
|
162
|
-
|
161
|
+
%i[GDALDriverH string string],
|
162
|
+
FFI::CPL::Error::CPLErr
|
163
163
|
|
164
164
|
# ~~~~~~~~~~~~~~~~~~~
|
165
165
|
# Dataset
|
@@ -167,8 +167,8 @@ module FFI
|
|
167
167
|
# Class-level functions
|
168
168
|
attach_function :GDALOpen, [:string, Access], :GDALDatasetH
|
169
169
|
attach_function :GDALOpenShared,
|
170
|
-
|
171
|
-
|
170
|
+
[:string, Access],
|
171
|
+
:GDALDatasetH
|
172
172
|
attach_function :GDALDumpOpenDatasets, [:pointer], :int
|
173
173
|
attach_function :GDALGetOpenDatasets, %i[pointer pointer], :void
|
174
174
|
|
@@ -188,96 +188,96 @@ module FFI
|
|
188
188
|
attach_function :GDALGetRasterCount, [:GDALDatasetH], :int
|
189
189
|
attach_function :GDALGetRasterBand, %i[GDALDatasetH int], :GDALRasterBandH
|
190
190
|
attach_function :GDALAddBand,
|
191
|
-
|
192
|
-
|
191
|
+
[:GDALDatasetH, DataType, :pointer],
|
192
|
+
FFI::CPL::Error::CPLErr
|
193
193
|
attach_function :GDALBeginAsyncReader,
|
194
|
-
|
195
|
-
|
196
|
-
|
197
|
-
|
198
|
-
|
199
|
-
|
200
|
-
|
201
|
-
|
202
|
-
|
203
|
-
|
204
|
-
|
205
|
-
|
206
|
-
|
207
|
-
|
208
|
-
|
209
|
-
|
210
|
-
|
194
|
+
[
|
195
|
+
:GDALDatasetH,
|
196
|
+
RWFlag,
|
197
|
+
:int,
|
198
|
+
:int,
|
199
|
+
:int,
|
200
|
+
:int,
|
201
|
+
:pointer,
|
202
|
+
:int,
|
203
|
+
:int,
|
204
|
+
DataType,
|
205
|
+
:int,
|
206
|
+
:pointer,
|
207
|
+
:int,
|
208
|
+
:int,
|
209
|
+
:int
|
210
|
+
], :GDALAsyncReaderH
|
211
211
|
|
212
212
|
attach_function :GDALEndAsyncReader,
|
213
|
-
|
214
|
-
|
213
|
+
%i[GDALDatasetH GDALAsyncReaderH],
|
214
|
+
:void
|
215
215
|
|
216
216
|
attach_function :GDALDatasetRasterIO,
|
217
|
-
|
218
|
-
|
219
|
-
|
220
|
-
|
221
|
-
|
222
|
-
|
223
|
-
|
224
|
-
|
225
|
-
|
226
|
-
|
227
|
-
|
228
|
-
|
229
|
-
|
230
|
-
|
231
|
-
|
232
|
-
|
233
|
-
|
217
|
+
[
|
218
|
+
:GDALDatasetH,
|
219
|
+
RWFlag,
|
220
|
+
:int,
|
221
|
+
:int,
|
222
|
+
:int,
|
223
|
+
:int,
|
224
|
+
:pointer,
|
225
|
+
:int,
|
226
|
+
:int,
|
227
|
+
DataType,
|
228
|
+
:int,
|
229
|
+
:pointer,
|
230
|
+
:int,
|
231
|
+
:int,
|
232
|
+
:int
|
233
|
+
], FFI::CPL::Error::CPLErr
|
234
234
|
|
235
235
|
attach_function :GDALDatasetAdviseRead,
|
236
|
-
|
237
|
-
|
238
|
-
|
239
|
-
|
240
|
-
|
241
|
-
|
242
|
-
|
243
|
-
|
244
|
-
|
245
|
-
|
246
|
-
|
247
|
-
|
248
|
-
|
236
|
+
[
|
237
|
+
:GDALDatasetH,
|
238
|
+
:int,
|
239
|
+
:int,
|
240
|
+
:int,
|
241
|
+
:int,
|
242
|
+
:int,
|
243
|
+
:int,
|
244
|
+
DataType,
|
245
|
+
:int,
|
246
|
+
:pointer,
|
247
|
+
:pointer
|
248
|
+
], FFI::CPL::Error::CPLErr
|
249
249
|
|
250
250
|
attach_function :GDALInitGCPs, %i[int pointer], :void
|
251
251
|
attach_function :GDALDeinitGCPs, %i[int pointer], :void
|
252
252
|
attach_function :GDALDuplicateGCPs, %i[int pointer], :pointer
|
253
253
|
attach_function :GDALGCPsToGeoTransform,
|
254
|
-
|
255
|
-
|
254
|
+
%i[int pointer pointer int],
|
255
|
+
:int
|
256
256
|
attach_function :GDALGetGCPCount, [:GDALDatasetH], :int
|
257
|
-
attach_function :GDALGetGCPProjection, [:GDALDatasetH], :
|
257
|
+
attach_function :GDALGetGCPProjection, [:GDALDatasetH], :strptr
|
258
258
|
attach_function :GDALGetGCPs, [:GDALDatasetH], :pointer
|
259
259
|
attach_function :GDALSetGCPs,
|
260
|
-
|
261
|
-
|
260
|
+
%i[GDALDatasetH int pointer string],
|
261
|
+
FFI::CPL::Error::CPLErr
|
262
262
|
|
263
|
-
attach_function :GDALGetProjectionRef, [:GDALDatasetH], :
|
263
|
+
attach_function :GDALGetProjectionRef, [:GDALDatasetH], :strptr
|
264
264
|
attach_function :GDALSetProjection, %i[GDALDatasetH string], FFI::CPL::Error::CPLErr
|
265
265
|
attach_function :GDALGetGeoTransform, %i[GDALDatasetH pointer], FFI::CPL::Error::CPLErr
|
266
266
|
attach_function :GDALSetGeoTransform,
|
267
|
-
|
268
|
-
|
267
|
+
%i[GDALDatasetH pointer],
|
268
|
+
FFI::CPL::Error::CPLErr
|
269
269
|
|
270
270
|
attach_function :GDALBuildOverviews,
|
271
|
-
|
272
|
-
|
273
|
-
|
274
|
-
|
275
|
-
|
276
|
-
|
277
|
-
|
278
|
-
|
279
|
-
|
280
|
-
|
271
|
+
%i[
|
272
|
+
GDALDatasetH
|
273
|
+
string
|
274
|
+
int
|
275
|
+
pointer
|
276
|
+
int
|
277
|
+
pointer
|
278
|
+
GDALProgressFunc
|
279
|
+
pointer
|
280
|
+
], FFI::CPL::Error::CPLErr
|
281
281
|
|
282
282
|
# OGR datasets. Not found in v1.11.1
|
283
283
|
# attach_function :GDALDatasetGetLayerCount, [:GDALDatasetH], :int
|
@@ -313,8 +313,8 @@ module FFI
|
|
313
313
|
|
314
314
|
attach_function :GDALCreateDatasetMaskBand, %i[GDALDatasetH int], FFI::CPL::Error::CPLErr
|
315
315
|
attach_function :GDALDatasetCopyWholeRaster,
|
316
|
-
|
317
|
-
|
316
|
+
%i[GDALDatasetH GDALDatasetH pointer GDALProgressFunc pointer],
|
317
|
+
FFI::CPL::Error::CPLErr
|
318
318
|
|
319
319
|
# ~~~~~~~~~~~~~~~~~~~
|
320
320
|
# MajorObject
|
@@ -323,12 +323,12 @@ module FFI
|
|
323
323
|
attach_function :GDALGetMetadata, %i[GDALMajorObjectH string], :pointer
|
324
324
|
attach_function :GDALSetMetadata, %i[GDALMajorObjectH pointer string], FFI::CPL::Error::CPLErr
|
325
325
|
attach_function :GDALGetMetadataItem,
|
326
|
-
|
327
|
-
|
326
|
+
%i[GDALMajorObjectH string string],
|
327
|
+
:strptr
|
328
328
|
attach_function :GDALSetMetadataItem,
|
329
|
-
|
330
|
-
|
331
|
-
attach_function :GDALGetDescription, [:GDALMajorObjectH], :
|
329
|
+
%i[GDALMajorObjectH string string string],
|
330
|
+
FFI::CPL::Error::CPLErr
|
331
|
+
attach_function :GDALGetDescription, [:GDALMajorObjectH], :strptr
|
332
332
|
attach_function :GDALSetDescription, %i[GDALMajorObjectH string], :void
|
333
333
|
|
334
334
|
# ~~~~~~~~~~~~~~~~~~~
|
@@ -336,288 +336,288 @@ module FFI
|
|
336
336
|
# ~~~~~~~~~~~~~~~~~~~
|
337
337
|
attach_function :GDALInvGeoTransform, %i[pointer pointer], :int
|
338
338
|
attach_function :GDALApplyGeoTransform,
|
339
|
-
|
340
|
-
|
339
|
+
%i[pointer double double pointer pointer],
|
340
|
+
:void
|
341
341
|
attach_function :GDALComposeGeoTransforms,
|
342
|
-
|
343
|
-
|
342
|
+
%i[pointer pointer pointer],
|
343
|
+
:void
|
344
344
|
|
345
345
|
# ----------------
|
346
346
|
# Raster functions
|
347
347
|
# ----------------
|
348
348
|
attach_function :GDALRasterBandCopyWholeRaster,
|
349
|
-
|
350
|
-
|
351
|
-
|
352
|
-
|
353
|
-
|
354
|
-
|
355
|
-
|
349
|
+
%i[
|
350
|
+
GDALRasterBandH
|
351
|
+
GDALRasterBandH
|
352
|
+
pointer
|
353
|
+
GDALProgressFunc
|
354
|
+
pointer
|
355
|
+
], FFI::CPL::Error::CPLErr
|
356
356
|
attach_function :GDALRegenerateOverviews,
|
357
|
-
|
358
|
-
|
359
|
-
|
360
|
-
|
361
|
-
|
362
|
-
|
363
|
-
|
364
|
-
|
357
|
+
%i[
|
358
|
+
GDALRasterBandH
|
359
|
+
int
|
360
|
+
pointer
|
361
|
+
string
|
362
|
+
GDALProgressFunc
|
363
|
+
pointer
|
364
|
+
], FFI::CPL::Error::CPLErr
|
365
365
|
attach_function :GDALGetMaskBand, [:GDALRasterBandH], :GDALRasterBandH
|
366
366
|
attach_function :GDALGetMaskFlags, [:GDALRasterBandH], :int
|
367
367
|
attach_function :GDALCreateMaskBand,
|
368
|
-
|
369
|
-
|
368
|
+
%i[GDALRasterBandH int],
|
369
|
+
FFI::CPL::Error::CPLErr
|
370
370
|
|
371
371
|
attach_function :GDALGetRasterDataType, [:GDALRasterBandH], DataType
|
372
372
|
attach_function :GDALGetBlockSize,
|
373
|
-
|
374
|
-
|
373
|
+
%i[GDALRasterBandH pointer pointer],
|
374
|
+
DataType
|
375
375
|
|
376
376
|
attach_function :GDALRasterAdviseRead,
|
377
|
-
|
378
|
-
|
379
|
-
|
380
|
-
|
381
|
-
|
382
|
-
|
383
|
-
|
384
|
-
|
385
|
-
|
386
|
-
|
387
|
-
|
377
|
+
[
|
378
|
+
:GDALRasterBandH,
|
379
|
+
:int,
|
380
|
+
:int,
|
381
|
+
:int,
|
382
|
+
:int,
|
383
|
+
:int,
|
384
|
+
:int,
|
385
|
+
DataType,
|
386
|
+
:pointer
|
387
|
+
], FFI::CPL::Error::CPLErr
|
388
388
|
|
389
389
|
attach_function :GDALRasterIO,
|
390
|
-
|
391
|
-
|
392
|
-
|
393
|
-
|
394
|
-
|
395
|
-
|
396
|
-
|
397
|
-
|
398
|
-
|
399
|
-
|
400
|
-
|
401
|
-
|
402
|
-
|
403
|
-
|
390
|
+
[
|
391
|
+
:GDALRasterBandH,
|
392
|
+
RWFlag,
|
393
|
+
:int,
|
394
|
+
:int,
|
395
|
+
:int,
|
396
|
+
:int,
|
397
|
+
:pointer,
|
398
|
+
:int,
|
399
|
+
:int,
|
400
|
+
DataType,
|
401
|
+
:int,
|
402
|
+
:int
|
403
|
+
], FFI::CPL::Error::CPLErr
|
404
404
|
attach_function :GDALReadBlock,
|
405
|
-
|
406
|
-
|
405
|
+
%i[GDALRasterBandH int int pointer],
|
406
|
+
FFI::CPL::Error::CPLErr
|
407
407
|
attach_function :GDALWriteBlock,
|
408
|
-
|
409
|
-
|
408
|
+
%i[GDALRasterBandH int int pointer],
|
409
|
+
FFI::CPL::Error::CPLErr
|
410
410
|
attach_function :GDALGetRasterBandXSize, [:GDALRasterBandH], :int
|
411
411
|
attach_function :GDALGetRasterBandYSize, [:GDALRasterBandH], :int
|
412
412
|
attach_function :GDALGetRasterAccess, [:GDALRasterBandH], Access
|
413
413
|
attach_function :GDALGetBandNumber, [:GDALRasterBandH], :int
|
414
414
|
attach_function :GDALGetBandDataset, [:GDALRasterBandH], :GDALDatasetH
|
415
415
|
attach_function :GDALGetRasterColorInterpretation,
|
416
|
-
|
417
|
-
|
416
|
+
[:GDALRasterBandH],
|
417
|
+
ColorInterp
|
418
418
|
attach_function :GDALSetRasterColorInterpretation,
|
419
|
-
|
420
|
-
|
419
|
+
[:GDALRasterBandH, ColorInterp],
|
420
|
+
FFI::CPL::Error::CPLErr
|
421
421
|
attach_function :GDALGetRasterColorTable,
|
422
|
-
|
423
|
-
|
422
|
+
[:GDALRasterBandH],
|
423
|
+
:GDALColorTableH
|
424
424
|
attach_function :GDALSetRasterColorTable,
|
425
|
-
|
426
|
-
|
425
|
+
%i[GDALRasterBandH GDALColorTableH],
|
426
|
+
FFI::CPL::Error::CPLErr
|
427
427
|
|
428
428
|
attach_function :GDALHasArbitraryOverviews, [:GDALRasterBandH], :int
|
429
429
|
attach_function :GDALGetOverviewCount, [:GDALRasterBandH], :int
|
430
430
|
attach_function :GDALGetOverview, %i[GDALRasterBandH int], :GDALRasterBandH
|
431
431
|
attach_function :GDALGetRasterNoDataValue,
|
432
|
-
|
433
|
-
|
432
|
+
%i[GDALRasterBandH pointer],
|
433
|
+
:double
|
434
434
|
attach_function :GDALSetRasterNoDataValue,
|
435
|
-
|
436
|
-
|
435
|
+
%i[GDALRasterBandH double],
|
436
|
+
FFI::CPL::Error::CPLErr
|
437
437
|
attach_function :GDALGetRasterCategoryNames,
|
438
|
-
|
439
|
-
|
438
|
+
[:GDALRasterBandH],
|
439
|
+
:pointer
|
440
440
|
attach_function :GDALSetRasterCategoryNames,
|
441
|
-
|
442
|
-
|
441
|
+
%i[GDALRasterBandH pointer],
|
442
|
+
FFI::CPL::Error::CPLErr
|
443
443
|
attach_function :GDALGetRasterMinimum,
|
444
|
-
|
445
|
-
|
444
|
+
%i[GDALRasterBandH pointer],
|
445
|
+
:double
|
446
446
|
attach_function :GDALGetRasterMaximum,
|
447
|
-
|
448
|
-
|
447
|
+
%i[GDALRasterBandH pointer],
|
448
|
+
:double
|
449
449
|
attach_function :GDALGetRasterStatistics,
|
450
|
-
|
451
|
-
|
450
|
+
%i[GDALRasterBandH bool bool pointer pointer pointer pointer],
|
451
|
+
FFI::CPL::Error::CPLErr
|
452
452
|
attach_function :GDALComputeRasterStatistics,
|
453
|
-
|
454
|
-
|
455
|
-
|
456
|
-
|
457
|
-
|
458
|
-
|
459
|
-
|
460
|
-
|
461
|
-
|
462
|
-
|
453
|
+
%i[
|
454
|
+
GDALRasterBandH
|
455
|
+
bool
|
456
|
+
pointer
|
457
|
+
pointer
|
458
|
+
pointer
|
459
|
+
pointer
|
460
|
+
GDALProgressFunc
|
461
|
+
pointer
|
462
|
+
], FFI::CPL::Error::CPLErr
|
463
463
|
attach_function :GDALSetRasterStatistics,
|
464
|
-
|
465
|
-
|
466
|
-
attach_function :GDALGetRasterUnitType, [:GDALRasterBandH], :
|
464
|
+
%i[GDALRasterBandH double double double double],
|
465
|
+
FFI::CPL::Error::CPLErr
|
466
|
+
attach_function :GDALGetRasterUnitType, [:GDALRasterBandH], :strptr
|
467
467
|
attach_function :GDALSetRasterUnitType, %i[GDALRasterBandH string], FFI::CPL::Error::CPLErr
|
468
468
|
attach_function :GDALGetRasterOffset, %i[GDALRasterBandH pointer], :double
|
469
469
|
attach_function :GDALSetRasterOffset, %i[GDALRasterBandH double], FFI::CPL::Error::CPLErr
|
470
470
|
attach_function :GDALGetRasterScale, %i[GDALRasterBandH pointer], :double
|
471
471
|
attach_function :GDALSetRasterScale, %i[GDALRasterBandH double], FFI::CPL::Error::CPLErr
|
472
472
|
attach_function :GDALComputeRasterMinMax,
|
473
|
-
|
474
|
-
|
473
|
+
%i[GDALRasterBandH bool pointer],
|
474
|
+
:void
|
475
475
|
attach_function :GDALFlushRasterCache, [:GDALRasterBandH], FFI::CPL::Error::CPLErr
|
476
476
|
attach_function :GDALGetRasterHistogram,
|
477
|
-
|
478
|
-
|
479
|
-
|
480
|
-
|
481
|
-
|
482
|
-
|
483
|
-
|
484
|
-
|
485
|
-
|
486
|
-
|
487
|
-
|
477
|
+
%i[
|
478
|
+
GDALRasterBandH
|
479
|
+
double
|
480
|
+
double
|
481
|
+
int
|
482
|
+
pointer
|
483
|
+
bool
|
484
|
+
bool
|
485
|
+
GDALProgressFunc
|
486
|
+
pointer
|
487
|
+
], FFI::CPL::Error::CPLErr
|
488
488
|
|
489
489
|
attach_function :GDALGetDefaultHistogram,
|
490
|
-
|
491
|
-
|
492
|
-
|
493
|
-
|
494
|
-
|
495
|
-
|
496
|
-
|
497
|
-
|
498
|
-
|
499
|
-
|
490
|
+
%i[
|
491
|
+
GDALRasterBandH
|
492
|
+
pointer
|
493
|
+
pointer
|
494
|
+
pointer
|
495
|
+
pointer
|
496
|
+
bool
|
497
|
+
GDALProgressFunc
|
498
|
+
pointer
|
499
|
+
], FFI::CPL::Error::CPLErr
|
500
500
|
attach_function :GDALSetDefaultHistogram,
|
501
|
-
|
502
|
-
|
503
|
-
|
504
|
-
|
505
|
-
|
506
|
-
|
507
|
-
|
501
|
+
%i[
|
502
|
+
GDALRasterBandH
|
503
|
+
double
|
504
|
+
double
|
505
|
+
int
|
506
|
+
pointer
|
507
|
+
], FFI::CPL::Error::CPLErr
|
508
508
|
|
509
509
|
attach_function :GDALGetRandomRasterSample,
|
510
|
-
|
511
|
-
|
510
|
+
%i[GDALRasterBandH int pointer],
|
511
|
+
:int
|
512
512
|
attach_function :GDALGetRasterSampleOverview,
|
513
|
-
|
514
|
-
|
513
|
+
%i[GDALRasterBandH int],
|
514
|
+
:GDALRasterBandH
|
515
515
|
attach_function :GDALFillRaster,
|
516
|
-
|
517
|
-
|
516
|
+
%i[GDALRasterBandH double double],
|
517
|
+
FFI::CPL::Error::CPLErr
|
518
518
|
|
519
519
|
attach_function :GDALGetDefaultRAT,
|
520
|
-
|
521
|
-
|
520
|
+
[:GDALRasterBandH],
|
521
|
+
:GDALRasterAttributeTableH
|
522
522
|
attach_function :GDALSetDefaultRAT,
|
523
|
-
|
524
|
-
|
523
|
+
%i[GDALRasterBandH GDALRasterAttributeTableH],
|
524
|
+
FFI::CPL::Error::CPLErr
|
525
525
|
attach_function :GDALAddDerivedBandPixelFunc,
|
526
|
-
|
527
|
-
|
526
|
+
%i[string GDALDerivedPixelFunc],
|
527
|
+
FFI::CPL::Error::CPLErr
|
528
528
|
|
529
529
|
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
530
530
|
# Raster Attribute Table functions
|
531
531
|
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
532
532
|
# Class-level functions
|
533
533
|
attach_function :GDALCreateRasterAttributeTable,
|
534
|
-
|
535
|
-
|
534
|
+
[],
|
535
|
+
:GDALRasterAttributeTableH
|
536
536
|
|
537
537
|
# Instance-level functions
|
538
538
|
attach_function :GDALDestroyRasterAttributeTable,
|
539
|
-
|
540
|
-
|
539
|
+
[:GDALRasterAttributeTableH],
|
540
|
+
:void
|
541
541
|
attach_function :GDALRATChangesAreWrittenToFile,
|
542
|
-
|
543
|
-
|
542
|
+
[:GDALRasterAttributeTableH],
|
543
|
+
:bool
|
544
544
|
attach_function :GDALRATClone,
|
545
|
-
|
546
|
-
|
545
|
+
[:GDALRasterAttributeTableH],
|
546
|
+
:GDALRasterAttributeTableH
|
547
547
|
|
548
548
|
attach_function :GDALRATGetColumnCount,
|
549
|
-
|
550
|
-
|
549
|
+
[:GDALRasterAttributeTableH],
|
550
|
+
:int
|
551
551
|
attach_function :GDALRATGetNameOfCol,
|
552
|
-
|
553
|
-
|
552
|
+
%i[GDALRasterAttributeTableH int],
|
553
|
+
:strptr
|
554
554
|
attach_function :GDALRATGetUsageOfCol,
|
555
|
-
|
556
|
-
|
555
|
+
%i[GDALRasterAttributeTableH int],
|
556
|
+
RATFieldUsage
|
557
557
|
attach_function :GDALRATGetTypeOfCol,
|
558
|
-
|
559
|
-
|
558
|
+
%i[GDALRasterAttributeTableH int],
|
559
|
+
RATFieldType
|
560
560
|
attach_function :GDALRATGetColOfUsage,
|
561
|
-
|
562
|
-
|
561
|
+
[:GDALRasterAttributeTableH, RATFieldUsage],
|
562
|
+
:int
|
563
563
|
attach_function :GDALRATCreateColumn,
|
564
|
-
|
565
|
-
|
564
|
+
[:GDALRasterAttributeTableH, :string, RATFieldType, RATFieldUsage],
|
565
|
+
FFI::CPL::Error::CPLErr
|
566
566
|
|
567
567
|
attach_function :GDALRATGetValueAsString,
|
568
|
-
|
569
|
-
|
568
|
+
%i[GDALRasterAttributeTableH int int],
|
569
|
+
:strptr
|
570
570
|
attach_function :GDALRATGetValueAsInt,
|
571
|
-
|
572
|
-
|
571
|
+
%i[GDALRasterAttributeTableH int int],
|
572
|
+
:int
|
573
573
|
attach_function :GDALRATGetValueAsDouble,
|
574
|
-
|
575
|
-
|
574
|
+
%i[GDALRasterAttributeTableH int int],
|
575
|
+
:double
|
576
576
|
attach_function :GDALRATSetValueAsString,
|
577
|
-
|
578
|
-
|
577
|
+
%i[GDALRasterAttributeTableH int int string],
|
578
|
+
:void
|
579
579
|
attach_function :GDALRATSetValueAsInt,
|
580
|
-
|
581
|
-
|
580
|
+
%i[GDALRasterAttributeTableH int int int],
|
581
|
+
:void
|
582
582
|
attach_function :GDALRATSetValueAsDouble,
|
583
|
-
|
584
|
-
|
583
|
+
%i[GDALRasterAttributeTableH int int double],
|
584
|
+
:void
|
585
585
|
attach_function :GDALRATValuesIOAsDouble,
|
586
|
-
|
587
|
-
|
586
|
+
[:GDALRasterAttributeTableH, RWFlag, :int, :int, :int, :pointer],
|
587
|
+
FFI::CPL::Error::CPLErr
|
588
588
|
attach_function :GDALRATValuesIOAsInteger,
|
589
|
-
|
590
|
-
|
589
|
+
[:GDALRasterAttributeTableH, RWFlag, :int, :int, :int, :pointer],
|
590
|
+
FFI::CPL::Error::CPLErr
|
591
591
|
attach_function :GDALRATValuesIOAsString,
|
592
|
-
|
593
|
-
|
592
|
+
[:GDALRasterAttributeTableH, RWFlag, :int, :int, :int, :pointer],
|
593
|
+
FFI::CPL::Error::CPLErr
|
594
594
|
|
595
595
|
attach_function :GDALRATGetRowCount,
|
596
|
-
|
597
|
-
|
596
|
+
[:GDALRasterAttributeTableH],
|
597
|
+
:int
|
598
598
|
attach_function :GDALRATSetRowCount,
|
599
|
-
|
600
|
-
|
599
|
+
%i[GDALRasterAttributeTableH int],
|
600
|
+
:void
|
601
601
|
attach_function :GDALRATGetRowOfValue,
|
602
|
-
|
603
|
-
|
602
|
+
%i[GDALRasterAttributeTableH double],
|
603
|
+
:int
|
604
604
|
|
605
605
|
attach_function :GDALRATSetLinearBinning,
|
606
|
-
|
607
|
-
|
606
|
+
%i[GDALRasterAttributeTableH double double],
|
607
|
+
:int
|
608
608
|
attach_function :GDALRATGetLinearBinning,
|
609
|
-
|
610
|
-
|
609
|
+
%i[GDALRasterAttributeTableH pointer pointer],
|
610
|
+
:bool
|
611
611
|
attach_function :GDALRATTranslateToColorTable,
|
612
|
-
|
613
|
-
|
612
|
+
%i[GDALRasterAttributeTableH int],
|
613
|
+
:GDALColorTableH
|
614
614
|
attach_function :GDALRATInitializeFromColorTable,
|
615
|
-
|
616
|
-
|
615
|
+
%i[GDALRasterAttributeTableH GDALColorTableH],
|
616
|
+
FFI::CPL::Error::CPLErr
|
617
617
|
|
618
618
|
attach_function :GDALRATDumpReadable,
|
619
|
-
|
620
|
-
|
619
|
+
%i[GDALRasterAttributeTableH pointer],
|
620
|
+
:void
|
621
621
|
|
622
622
|
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
623
623
|
# ColorTable functions
|
@@ -636,20 +636,20 @@ module FFI
|
|
636
636
|
attach_function :GDALSetColorEntry, [:GDALColorTableH, :int, FFI::GDAL::ColorEntry.ptr], :void
|
637
637
|
|
638
638
|
attach_function :GDALCreateColorRamp,
|
639
|
-
|
640
|
-
|
639
|
+
[:GDALColorTableH, :int, FFI::GDAL::ColorEntry.ptr, :int, FFI::GDAL::ColorEntry.ptr],
|
640
|
+
:void
|
641
641
|
|
642
642
|
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
643
643
|
# PaletteInterp functions
|
644
644
|
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
645
|
-
attach_function :GDALGetPaletteInterpretationName, [PaletteInterp], :
|
645
|
+
attach_function :GDALGetPaletteInterpretationName, [PaletteInterp], :strptr
|
646
646
|
|
647
647
|
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
648
648
|
# General stuff
|
649
649
|
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
650
650
|
attach_function :GDALGetDataTypeSize, [DataType], :int
|
651
651
|
attach_function :GDALDataTypeIsComplex, [DataType], :bool
|
652
|
-
attach_function :GDALGetDataTypeName, [DataType], :
|
652
|
+
attach_function :GDALGetDataTypeName, [DataType], :strptr
|
653
653
|
attach_function :GDALGetDataTypeByName, [:string], DataType
|
654
654
|
attach_function :GDALDataTypeUnion, [DataType, DataType], DataType
|
655
655
|
|
@@ -670,14 +670,14 @@ module FFI
|
|
670
670
|
|
671
671
|
attach_function :GDALGeneralCmdLineProcessor, %i[int pointer int], :int
|
672
672
|
attach_function :GDALSwapWords,
|
673
|
-
|
674
|
-
|
673
|
+
%i[pointer int int int],
|
674
|
+
:void
|
675
675
|
attach_function :GDALCopyWords,
|
676
|
-
|
677
|
-
|
676
|
+
%i[pointer int int pointer int int int int],
|
677
|
+
:void
|
678
678
|
attach_function :GDALCopyBits,
|
679
|
-
|
680
|
-
|
679
|
+
%i[pointer int int pointer int int int int],
|
680
|
+
:void
|
681
681
|
end
|
682
682
|
end
|
683
683
|
end
|