ffi-gdal 1.0.0.beta5 → 1.0.0.beta6
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.gitignore +7 -3
- data/.rubocop.yml +7 -0
- data/.ruby-version +1 -0
- data/Gemfile +1 -1
- data/History.md +143 -1
- data/README.md +5 -11
- data/Rakefile +2 -60
- data/TODO.md +10 -0
- data/examples/geometries.rb +4 -6
- data/examples/gridding.rb +99 -98
- data/examples/ogr_layer_to_layer.rb +0 -2
- data/examples/raster_erasing.rb +47 -0
- data/examples/remove_small_polygons.rb +62 -0
- data/examples/testing_gdal.rb +0 -3
- data/examples/warping.rb +140 -0
- data/ffi-gdal.gemspec +5 -2
- data/lib/ext/error_symbols.rb +1 -1
- data/lib/ext/ffi_library_function_checks.rb +3 -2
- data/lib/ext/float_ext.rb +2 -2
- data/lib/ext/narray_ext.rb +1 -1
- data/lib/ext/numeric_as_data_type.rb +1 -1
- data/lib/ext/to_bool.rb +2 -2
- data/lib/ffi/cpl/conv.rb +1 -3
- data/lib/ffi/cpl/error.rb +0 -3
- data/lib/ffi/cpl/minixml.rb +17 -21
- data/lib/ffi/cpl/progress.rb +27 -0
- data/lib/ffi/cpl/string.rb +0 -8
- data/lib/ffi/cpl/vsi.rb +0 -1
- data/lib/ffi/cpl/xml_node.rb +0 -1
- data/lib/ffi/cpl.rb +15 -0
- data/lib/ffi/gdal/alg.rb +72 -54
- data/lib/ffi/gdal/gdal.rb +669 -672
- data/lib/ffi/gdal/grid.rb +141 -24
- data/lib/ffi/gdal/grid_data_metrics_options.rb +1 -1
- data/lib/ffi/gdal/grid_moving_average_options.rb +1 -1
- data/lib/ffi/gdal/matching.rb +0 -2
- data/lib/ffi/gdal/transformer_info.rb +1 -1
- data/lib/ffi/gdal/version.rb +1 -1
- data/lib/ffi/gdal/vrt.rb +0 -2
- data/lib/ffi/gdal/warp_options.rb +12 -14
- data/lib/ffi/gdal/warper.rb +61 -6
- data/lib/ffi/gdal.rb +18 -3
- data/lib/ffi/ogr/api.rb +10 -21
- data/lib/ffi/ogr/core.rb +9 -12
- data/lib/ffi/ogr/featurestyle.rb +0 -5
- data/lib/ffi/ogr/geocoding.rb +0 -1
- data/lib/ffi/ogr/srs_api.rb +0 -4
- data/lib/ffi/ogr/style_value.rb +1 -2
- data/lib/ffi/ogr.rb +15 -12
- data/lib/ffi-gdal.rb +5 -3
- data/lib/gdal/color_entry.rb +1 -0
- data/lib/gdal/color_interpretation.rb +2 -2
- data/lib/gdal/color_table.rb +14 -14
- data/lib/gdal/color_table_mixins/extensions.rb +4 -4
- data/lib/gdal/cpl_error_handler.rb +12 -14
- data/lib/gdal/data_type.rb +13 -12
- data/lib/gdal/dataset.rb +170 -94
- data/lib/gdal/dataset_mixins/algorithm_methods.rb +47 -21
- data/lib/gdal/dataset_mixins/extensions.rb +32 -61
- data/lib/gdal/dataset_mixins/matching.rb +0 -2
- data/lib/gdal/dataset_mixins/warp_methods.rb +42 -0
- data/lib/gdal/driver.rb +62 -47
- data/lib/gdal/driver_mixins/extensions.rb +2 -7
- data/lib/gdal/environment_methods.rb +13 -10
- data/lib/gdal/exceptions.rb +24 -2
- data/lib/gdal/geo_transform.rb +10 -16
- data/lib/gdal/geo_transform_mixins/extensions.rb +58 -3
- data/lib/gdal/grid.rb +62 -109
- data/lib/gdal/{grid_types → grid_algorithms}/data_metrics_base.rb +1 -3
- data/lib/gdal/{grid_types → grid_algorithms}/inverse_distance_to_a_power.rb +2 -4
- data/lib/gdal/{grid_types → grid_algorithms}/metric_average_distance.rb +2 -2
- data/lib/gdal/{grid_types → grid_algorithms}/metric_average_distance_pts.rb +2 -2
- data/lib/gdal/{grid_types → grid_algorithms}/metric_count.rb +2 -2
- data/lib/gdal/{grid_types → grid_algorithms}/metric_maximum.rb +2 -2
- data/lib/gdal/{grid_types → grid_algorithms}/metric_minimum.rb +2 -2
- data/lib/gdal/{grid_types → grid_algorithms}/metric_range.rb +2 -2
- data/lib/gdal/{grid_types → grid_algorithms}/moving_average.rb +2 -4
- data/lib/gdal/{grid_types → grid_algorithms}/nearest_neighbor.rb +2 -4
- data/lib/gdal/grid_algorithms.rb +22 -0
- data/lib/gdal/gridder/point_extracting.rb +89 -0
- data/lib/gdal/gridder.rb +294 -0
- data/lib/gdal/gridder_options.rb +273 -0
- data/lib/gdal/internal_helpers.rb +132 -23
- data/lib/gdal/major_object.rb +13 -10
- data/lib/gdal/merger.rb +130 -0
- data/lib/gdal/options.rb +3 -2
- data/lib/gdal/raster_attribute_table.rb +74 -51
- data/lib/gdal/raster_attribute_table_mixins/extensions.rb +21 -3
- data/lib/gdal/raster_band.rb +139 -167
- data/lib/gdal/raster_band_classifier.rb +19 -18
- data/lib/gdal/raster_band_mixins/algorithm_extensions.rb +107 -0
- data/lib/gdal/raster_band_mixins/algorithm_methods.rb +79 -40
- data/lib/gdal/raster_band_mixins/coloring_extensions.rb +84 -0
- data/lib/gdal/raster_band_mixins/extensions.rb +34 -169
- data/lib/gdal/raster_band_mixins/io_extensions.rb +180 -0
- data/lib/gdal/rpc_info.rb +1 -2
- data/lib/gdal/transformer.rb +1 -6
- data/lib/gdal/transformers/approximate_transformer.rb +0 -4
- data/lib/gdal/transformers/base_general_image_projection_transformer.rb +0 -6
- data/lib/gdal/transformers/gcp_transformer.rb +2 -6
- data/lib/gdal/transformers/general_image_projection_transformer.rb +8 -7
- data/lib/gdal/transformers/general_image_projection_transformer2.rb +1 -1
- data/lib/gdal/transformers/geolocation_transformer.rb +0 -4
- data/lib/gdal/transformers/reprojection_transformer.rb +0 -8
- data/lib/gdal/transformers/rpc_transformer.rb +0 -4
- data/lib/gdal/transformers/tps_transformer.rb +1 -3
- data/lib/gdal/version_info.rb +7 -8
- data/lib/gdal/virtual_dataset.rb +2 -4
- data/lib/gdal/warp_operation.rb +17 -14
- data/lib/gdal/warp_options.rb +132 -0
- data/lib/gdal.rb +41 -2
- data/lib/ogr/coordinate_transformation.rb +79 -32
- data/lib/ogr/data_source.rb +17 -14
- data/lib/ogr/data_source_extensions.rb +1 -5
- data/lib/ogr/driver.rb +11 -14
- data/lib/ogr/envelope.rb +1 -1
- data/lib/ogr/envelope_extensions.rb +23 -6
- data/lib/ogr/error_handling.rb +3 -3
- data/lib/ogr/exceptions.rb +6 -0
- data/lib/ogr/feature.rb +25 -38
- data/lib/ogr/feature_definition.rb +6 -8
- data/lib/ogr/feature_definition_extensions.rb +2 -6
- data/lib/ogr/feature_extensions.rb +71 -41
- data/lib/ogr/field.rb +16 -15
- data/lib/ogr/field_definition.rb +4 -4
- data/lib/ogr/geocoder.rb +5 -5
- data/lib/ogr/geometries/geometry_collection.rb +4 -1
- data/lib/ogr/geometries/geometry_collection_25d.rb +12 -0
- data/lib/ogr/geometries/line_string.rb +30 -8
- data/lib/ogr/geometries/line_string_25d.rb +21 -0
- data/lib/ogr/geometries/linear_ring.rb +10 -1
- data/lib/ogr/geometries/multi_line_string.rb +2 -1
- data/lib/ogr/geometries/multi_line_string_25d.rb +13 -0
- data/lib/ogr/geometries/multi_point.rb +2 -1
- data/lib/ogr/geometries/multi_point_25d.rb +14 -0
- data/lib/ogr/geometries/multi_polygon.rb +3 -2
- data/lib/ogr/geometries/multi_polygon_25d.rb +13 -0
- data/lib/ogr/geometries/point.rb +20 -23
- data/lib/ogr/geometries/point_25d.rb +48 -0
- data/lib/ogr/geometries/polygon.rb +4 -1
- data/lib/ogr/geometries/polygon_25d.rb +14 -0
- data/lib/ogr/geometry.rb +125 -93
- data/lib/ogr/geometry_field_definition.rb +7 -5
- data/lib/ogr/geometry_mixins/container_mixins.rb +23 -0
- data/lib/ogr/geometry_mixins/extensions.rb +111 -0
- data/lib/ogr/geometry_types/container.rb +10 -3
- data/lib/ogr/geometry_types/curve.rb +68 -23
- data/lib/ogr/geometry_types/surface.rb +0 -9
- data/lib/ogr/internal_helpers.rb +3 -3
- data/lib/ogr/layer.rb +4 -5
- data/lib/ogr/layer_mixins/extensions.rb +242 -17
- data/lib/ogr/layer_mixins/ogr_feature_methods.rb +11 -11
- data/lib/ogr/layer_mixins/ogr_field_methods.rb +6 -11
- data/lib/ogr/layer_mixins/ogr_layer_method_methods.rb +18 -18
- data/lib/ogr/layer_mixins/ogr_query_filter_methods.rb +0 -2
- data/lib/ogr/layer_mixins/ogr_sql_methods.rb +1 -1
- data/lib/ogr/spatial_reference.rb +12 -37
- data/lib/ogr/spatial_reference_mixins/coordinate_system_getter_setters.rb +53 -55
- data/lib/ogr/spatial_reference_mixins/exporters.rb +18 -49
- data/lib/ogr/spatial_reference_mixins/parameter_getter_setters.rb +10 -29
- data/lib/ogr/style_table.rb +2 -2
- data/lib/ogr/style_table_extensions.rb +3 -1
- data/lib/ogr/style_tool.rb +8 -14
- data/lib/ogr.rb +39 -1
- data/spec/ffi-gdal_spec.rb +18 -1
- data/spec/integration/gdal/color_table_info_spec.rb +49 -33
- data/spec/integration/gdal/dataset_info_spec.rb +294 -45
- data/spec/integration/gdal/driver_info_spec.rb +139 -31
- data/spec/integration/gdal/geo_transform_info_spec.rb +197 -26
- data/spec/integration/gdal/gridder_spec.rb +329 -0
- data/spec/integration/gdal/raster_attribute_table_info_spec.rb +216 -11
- data/spec/integration/gdal/raster_band_algorithms_spec.rb +33 -0
- data/spec/integration/gdal/raster_band_info_spec.rb +240 -271
- data/spec/integration/ogr/layer_spec.rb +3 -1
- data/spec/spec_helper.rb +15 -6
- data/spec/support/images/osgeo/gdal/data/hfa/float-rle.img +0 -0
- data/spec/support/images/osgeo/geotiff/GeogToWGS84GeoKey/GeogToWGS84GeoKey5.lgo +31 -0
- 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 +10 -0
- data/spec/support/images/osgeo/geotiff/gdal_eg/cea.tif +0 -0
- data/spec/support/images/osgeo/geotiff/gdal_eg/cea.txt +84 -0
- data/spec/support/images/osgeo/geotiff/zi_imaging/image0.lgo +45 -0
- data/spec/support/images/osgeo/geotiff/zi_imaging/image0.tif +0 -0
- data/spec/support/integration_help.rb +32 -2
- data/spec/support/shared_examples/gdal/major_object_examples.rb +0 -6
- data/spec/support/shared_examples/ogr/a_geometry.rb +1 -1
- data/spec/unit/ffi/gdal_spec.rb +1 -1
- data/spec/unit/gdal/color_entry_spec.rb +1 -0
- data/spec/unit/gdal/color_interpretation_spec.rb +1 -0
- data/spec/unit/gdal/dataset_spec.rb +53 -2
- data/spec/unit/gdal/geo_transform_mixins/extensions_spec.rb +67 -0
- data/spec/unit/gdal/geo_transform_spec.rb +1 -1
- data/spec/unit/gdal/grid_spec.rb +83 -0
- data/spec/unit/gdal/gridder/point_extracting_spec.rb +99 -0
- data/spec/unit/gdal/gridder_options_spec.rb +183 -0
- data/spec/unit/gdal/gridder_spec.rb +140 -0
- data/spec/unit/gdal/internal_helpers_spec.rb +166 -2
- data/spec/unit/gdal/major_object_spec.rb +2 -0
- data/spec/unit/gdal/options_spec.rb +1 -0
- data/spec/unit/gdal/raster_band_classifier_spec.rb +70 -12
- data/spec/unit/gdal/raster_band_mixins/extensions_spec.rb +71 -0
- data/spec/unit/gdal/raster_band_mixins/io_extensions_spec.rb +133 -0
- data/spec/unit/gdal/raster_band_spec.rb +1 -0
- data/spec/unit/gdal/rpc_info_spec.rb +1 -0
- data/spec/unit/gdal/version_info_spec.rb +2 -0
- data/spec/unit/gdal/warp_operation_spec.rb +1 -0
- data/spec/unit/ogr/coordinate_transformation_spec.rb +102 -0
- data/spec/unit/ogr/data_source_spec.rb +12 -0
- data/spec/unit/ogr/feature_extensions_spec.rb +88 -0
- data/spec/unit/ogr/feature_spec.rb +30 -46
- data/spec/unit/ogr/geometries/geometry_collection_25d_spec.rb +23 -0
- data/spec/unit/ogr/geometries/geometry_collection_spec.rb +3 -3
- data/spec/unit/ogr/geometries/line_string_25d_spec.rb +23 -0
- data/spec/unit/ogr/geometries/line_string_spec.rb +2 -2
- data/spec/unit/ogr/geometries/linear_ring_spec.rb +2 -2
- data/spec/unit/ogr/geometries/multi_line_string_25d_spec.rb +23 -0
- data/spec/unit/ogr/geometries/multi_point_25d_spec.rb +23 -0
- data/spec/unit/ogr/geometries/multi_polygon_25d_spec.rb +23 -0
- data/spec/unit/ogr/geometries/point_25d_spec.rb +23 -0
- data/spec/unit/ogr/geometries/point_spec.rb +14 -24
- data/spec/unit/ogr/geometries/polygon_25d_spec.rb +23 -0
- data/spec/unit/ogr/geometries/polygon_spec.rb +1 -1
- data/spec/unit/ogr/geometry_field_definition_spec.rb +1 -1
- data/spec/unit/ogr/geometry_spec.rb +196 -30
- data/spec/unit/ogr/internal_helpers_spec.rb +20 -9
- data/spec/unit/ogr/layer_mixins/ogr_feature_methods_spec.rb +14 -6
- data/spec/unit/ogr/spatial_reference_mixins/exporters_spec.rb +9 -1
- data/spec/unit/ogr/spatial_reference_mixins/parameter_getter_setters_spec.rb +2 -1
- data/spec/unit/ogr/style_table_spec.rb +1 -1
- data/tmp/.keep +0 -0
- metadata +121 -19
- data/examples/points.txt +0 -127
- data/lib/gdal/grid_types.rb +0 -22
- data/lib/ogr/geometries/point_extensions.rb +0 -32
- data/lib/ogr/geometry_extensions.rb +0 -59
data/lib/ffi/gdal/gdal.rb
CHANGED
@@ -1,684 +1,681 @@
|
|
1
1
|
require 'ffi'
|
2
2
|
require_relative '../../ext/ffi_library_function_checks'
|
3
|
-
require_relative '../ogr/core'
|
4
|
-
require_relative '../ogr/srs_api'
|
5
3
|
require_relative 'color_entry'
|
6
4
|
|
7
5
|
module FFI
|
8
6
|
module GDAL
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
:
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
:
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
:
|
37
|
-
|
38
|
-
|
39
|
-
:
|
40
|
-
|
41
|
-
|
42
|
-
:
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
|
54
|
-
|
55
|
-
|
56
|
-
|
57
|
-
|
58
|
-
|
59
|
-
|
60
|
-
|
61
|
-
:
|
62
|
-
|
63
|
-
|
64
|
-
|
65
|
-
|
66
|
-
:
|
67
|
-
|
68
|
-
|
69
|
-
|
70
|
-
:
|
71
|
-
|
72
|
-
|
73
|
-
|
74
|
-
|
75
|
-
|
76
|
-
|
77
|
-
|
78
|
-
|
79
|
-
|
80
|
-
|
81
|
-
|
82
|
-
|
83
|
-
|
84
|
-
|
85
|
-
|
86
|
-
|
87
|
-
|
88
|
-
|
89
|
-
|
90
|
-
:
|
91
|
-
|
92
|
-
|
93
|
-
|
94
|
-
|
95
|
-
|
96
|
-
|
97
|
-
|
98
|
-
|
99
|
-
|
100
|
-
|
101
|
-
|
102
|
-
|
103
|
-
|
104
|
-
|
105
|
-
|
106
|
-
|
107
|
-
|
108
|
-
|
109
|
-
|
110
|
-
|
111
|
-
|
112
|
-
|
113
|
-
|
114
|
-
# ----------------------------------------------------------------
|
115
|
-
# functions
|
116
|
-
# ----------------------------------------------------------------
|
117
|
-
# AsyncStatus
|
118
|
-
attach_function :GDALGetAsyncStatusTypeName, [AsyncStatusType], :string
|
119
|
-
attach_function :GDALGetAsyncStatusTypeByName, [:string], AsyncStatusType
|
120
|
-
|
121
|
-
# ~~~~~~~~~~~~~~~~~~~
|
122
|
-
# ColorInterpretation
|
123
|
-
# ~~~~~~~~~~~~~~~~~~~
|
124
|
-
attach_function :GDALGetColorInterpretationName, [ColorInterp], :string
|
125
|
-
attach_function :GDALGetColorInterpretationByName, [:string], ColorInterp
|
126
|
-
|
127
|
-
# ~~~~~~~~~~~~~~~~~~~
|
128
|
-
# Driver
|
129
|
-
# ~~~~~~~~~~~~~~~~~~~
|
130
|
-
attach_function :GDALAllRegister, [], :void
|
131
|
-
|
132
|
-
# Class-level functions
|
133
|
-
attach_function :GDALGetDriver, [:int], :GDALDriverH
|
134
|
-
attach_function :GDALGetDriverCount, [], :int
|
135
|
-
attach_function :GDALIdentifyDriver, %i[string pointer], :GDALDriverH
|
136
|
-
attach_function :GDALGetDriverByName, [:string], :GDALDriverH
|
137
|
-
attach_function :GDALDestroyDriverManager, [], :void
|
138
|
-
|
139
|
-
# Instance-level functions
|
140
|
-
attach_function :GDALCreate,
|
141
|
-
[:GDALDriverH, :string, :int, :int, :int, DataType, :pointer],
|
142
|
-
:GDALDatasetH
|
143
|
-
attach_function :GDALCreateCopy,
|
144
|
-
%i[GDALDriverH string GDALDatasetH bool pointer GDALProgressFunc pointer],
|
145
|
-
:GDALDatasetH
|
146
|
-
attach_function :GDALValidateCreationOptions, %i[GDALDriverH pointer], FFI::CPL::Error::CPLErr
|
147
|
-
attach_function :GDALGetDriverShortName, [:GDALDriverH], :string
|
148
|
-
attach_function :GDALGetDriverLongName, [:GDALDriverH], :string
|
149
|
-
attach_function :GDALGetDriverHelpTopic, [:GDALDriverH], :string
|
150
|
-
attach_function :GDALGetDriverCreationOptionList, [:GDALDriverH], :string
|
151
|
-
|
152
|
-
attach_function :GDALDestroyDriver, [:GDALDriverH], :void
|
153
|
-
attach_function :GDALRegisterDriver, [:GDALDriverH], :int
|
154
|
-
attach_function :GDALDeregisterDriver, [:GDALDriverH], :void
|
155
|
-
attach_function :GDALDeleteDataset, %i[GDALDriverH string], FFI::CPL::Error::CPLErr
|
156
|
-
attach_function :GDALRenameDataset,
|
157
|
-
%i[GDALDriverH string string],
|
158
|
-
FFI::CPL::Error::CPLErr
|
159
|
-
attach_function :GDALCopyDatasetFiles,
|
160
|
-
%i[GDALDriverH string string],
|
161
|
-
FFI::CPL::Error::CPLErr
|
162
|
-
|
163
|
-
# ~~~~~~~~~~~~~~~~~~~
|
164
|
-
# Dataset
|
165
|
-
# ~~~~~~~~~~~~~~~~~~~
|
166
|
-
# Class-level functions
|
167
|
-
attach_function :GDALOpen, [:string, Access], :GDALDatasetH
|
168
|
-
attach_function :GDALOpenShared,
|
169
|
-
[:string, Access],
|
170
|
-
:GDALDatasetH
|
171
|
-
attach_function :GDALOpenEx,
|
172
|
-
%i[string uint string string string],
|
173
|
-
:GDALDatasetH
|
174
|
-
attach_function :GDALDumpOpenDatasets, [:pointer], :int
|
175
|
-
attach_function :GDALGetOpenDatasets, %i[pointer pointer], :void
|
176
|
-
|
177
|
-
# Instance-level functions
|
178
|
-
attach_function :GDALClose, [:GDALDatasetH], :void
|
179
|
-
attach_function :GDALGetDatasetDriver, [:GDALDatasetH], :GDALDriverH
|
180
|
-
attach_function :GDALGetFileList, [:GDALDatasetH], :pointer
|
181
|
-
attach_function :GDALGetInternalHandle, %i[GDALDatasetH string], :pointer
|
182
|
-
attach_function :GDALReferenceDataset, [:GDALDatasetH], :int
|
183
|
-
attach_function :GDALDereferenceDataset, [:GDALDatasetH], :int
|
184
|
-
|
185
|
-
attach_function :GDALGetAccess, [:GDALDatasetH], :int
|
186
|
-
attach_function :GDALFlushCache, [:GDALDatasetH], :void
|
187
|
-
|
188
|
-
attach_function :GDALGetRasterXSize, [:GDALDatasetH], :int
|
189
|
-
attach_function :GDALGetRasterYSize, [:GDALDatasetH], :int
|
190
|
-
attach_function :GDALGetRasterCount, [:GDALDatasetH], :int
|
191
|
-
attach_function :GDALGetRasterBand, %i[GDALDatasetH int], :GDALRasterBandH
|
192
|
-
attach_function :GDALAddBand,
|
193
|
-
[:GDALDatasetH, DataType, :pointer],
|
194
|
-
FFI::CPL::Error::CPLErr
|
195
|
-
attach_function :GDALBeginAsyncReader,
|
196
|
-
[
|
197
|
-
:GDALDatasetH,
|
198
|
-
RWFlag,
|
199
|
-
:int,
|
200
|
-
:int,
|
201
|
-
:int,
|
202
|
-
:int,
|
203
|
-
:pointer,
|
204
|
-
:int,
|
205
|
-
:int,
|
206
|
-
DataType,
|
207
|
-
:int,
|
208
|
-
:pointer,
|
209
|
-
:int,
|
210
|
-
:int,
|
7
|
+
module GDAL
|
8
|
+
extend ::FFI::Library
|
9
|
+
ffi_lib [::FFI::CURRENT_PROCESS, ::FFI::GDAL.gdal_library_path]
|
10
|
+
|
11
|
+
# ----------------------------------------------------------------
|
12
|
+
# Enums
|
13
|
+
# ----------------------------------------------------------------
|
14
|
+
DataType = enum :GDT_Unknown, 0,
|
15
|
+
:GDT_Byte, 1,
|
16
|
+
:GDT_UInt16, 2,
|
17
|
+
:GDT_Int16, 3,
|
18
|
+
:GDT_UInt32, 4,
|
19
|
+
:GDT_Int32, 5,
|
20
|
+
:GDT_Float32, 6,
|
21
|
+
:GDT_Float64, 7,
|
22
|
+
:GDT_CInt16, 8,
|
23
|
+
:GDT_CInt32, 9,
|
24
|
+
:GDT_CFloat32, 10,
|
25
|
+
:GDT_CFloat64, 11,
|
26
|
+
:GDT_TypeCount, 12
|
27
|
+
|
28
|
+
AsyncStatusType = enum :GARIO_PENDING, 0,
|
29
|
+
:GARIO_UPDATE, 1,
|
30
|
+
:GARIO_ERROR, 2,
|
31
|
+
:GARIO_COMPLETE, 3,
|
32
|
+
:GARIO_TypeCount, 4
|
33
|
+
|
34
|
+
Access = enum :GA_ReadOnly, 0,
|
35
|
+
:GA_Update, 1
|
36
|
+
|
37
|
+
RWFlag = enum :GF_Read, 0,
|
38
|
+
:GF_Write, 1
|
39
|
+
|
40
|
+
ColorInterp = enum :GCI_Undefined, 0,
|
41
|
+
:GCI_GrayIndex, 1,
|
42
|
+
:GCI_PaletteIndex, 2,
|
43
|
+
:GCI_RedBand, 3,
|
44
|
+
:GCI_GreenBand, 4,
|
45
|
+
:GCI_BlueBand, 5,
|
46
|
+
:GCI_AlphaBand, 6,
|
47
|
+
:GCI_HueBand, 7,
|
48
|
+
:GCI_SaturationBand, 8,
|
49
|
+
:GCI_LightnessBand, 9,
|
50
|
+
:GCI_CyanBand, 10,
|
51
|
+
:GCI_MagentaBand, 11,
|
52
|
+
:GCI_YellowBand, 12,
|
53
|
+
:GCI_BlackBand, 13,
|
54
|
+
:GCI_YCbCr_YBand, 14,
|
55
|
+
:GCI_YCbCr_CbBand, 15,
|
56
|
+
:GCI_YCbCr_CrBand, 16,
|
57
|
+
:GCI_Max, 16 # Seems wrong that this is also 16...
|
58
|
+
|
59
|
+
PaletteInterp = enum :GPI_Gray, 0,
|
60
|
+
:GPI_RGB, 1,
|
61
|
+
:GPI_CMYK, 2,
|
62
|
+
:GPI_HLS, 3
|
63
|
+
|
64
|
+
RATFieldType = enum :GFT_Integer,
|
65
|
+
:GFT_Real,
|
66
|
+
:GFT_String
|
67
|
+
|
68
|
+
RATFieldUsage = enum :GFU_Generic, 0,
|
69
|
+
:GFU_PixelCount, 1,
|
70
|
+
:GFU_Name, 2,
|
71
|
+
:GFU_Min, 3,
|
72
|
+
:GFU_Max, 4,
|
73
|
+
:GFU_MinMax, 5,
|
74
|
+
:GFU_Red, 6,
|
75
|
+
:GFU_Green, 7,
|
76
|
+
:GFU_Blue, 8,
|
77
|
+
:GFU_Alpha, 9,
|
78
|
+
:GFU_RedMin, 10,
|
79
|
+
:GFU_GreenMin, 11,
|
80
|
+
:GFU_BlueMin, 12,
|
81
|
+
:GFU_AlphaMin, 13,
|
82
|
+
:GFU_RedMax, 14,
|
83
|
+
:GFU_GreenMax, 15,
|
84
|
+
:GFU_BlueMax, 16,
|
85
|
+
:GFU_AlphaMax, 17,
|
86
|
+
:GFU_MaxCount
|
87
|
+
|
88
|
+
TileOrganization = enum :GTO_TIP,
|
89
|
+
:GTO_BIT,
|
90
|
+
:GTO_BSQ
|
91
|
+
|
92
|
+
# ----------------------------------------------------------------
|
93
|
+
# typedefs
|
94
|
+
# ----------------------------------------------------------------
|
95
|
+
typedef :pointer, :GDALMajorObjectH
|
96
|
+
typedef :pointer, :GDALDatasetH
|
97
|
+
typedef :pointer, :GDALRasterBandH
|
98
|
+
typedef :pointer, :GDALDriverH
|
99
|
+
typedef :pointer, :GDALColorTableH
|
100
|
+
typedef :pointer, :GDALRasterAttributeTableH
|
101
|
+
typedef :pointer, :GDALAsyncReaderH
|
102
|
+
|
103
|
+
# When using, make sure to return +true+ if the operation should continue;
|
104
|
+
# +false+ if the user has cancelled.
|
105
|
+
callback :GDALProgressFunc,
|
106
|
+
%i[double string pointer], # completion, message, progress_arg
|
107
|
+
:bool
|
108
|
+
|
109
|
+
callback :GDALDerivedPixelFunc,
|
110
|
+
[:pointer, :int, :pointer, :int, :int, DataType, DataType, :int, :int],
|
211
111
|
:int
|
212
|
-
|
213
|
-
|
214
|
-
|
215
|
-
|
216
|
-
|
217
|
-
|
218
|
-
|
219
|
-
|
220
|
-
|
221
|
-
|
222
|
-
|
223
|
-
|
224
|
-
|
225
|
-
|
226
|
-
|
227
|
-
|
228
|
-
|
229
|
-
|
230
|
-
|
231
|
-
|
232
|
-
|
233
|
-
|
112
|
+
|
113
|
+
# ----------------------------------------------------------------
|
114
|
+
# functions
|
115
|
+
# ----------------------------------------------------------------
|
116
|
+
# AsyncStatus
|
117
|
+
attach_function :GDALGetAsyncStatusTypeName, [AsyncStatusType], :string
|
118
|
+
attach_function :GDALGetAsyncStatusTypeByName, [:string], AsyncStatusType
|
119
|
+
|
120
|
+
# ~~~~~~~~~~~~~~~~~~~
|
121
|
+
# ColorInterpretation
|
122
|
+
# ~~~~~~~~~~~~~~~~~~~
|
123
|
+
attach_function :GDALGetColorInterpretationName, [ColorInterp], :string
|
124
|
+
attach_function :GDALGetColorInterpretationByName, [:string], ColorInterp
|
125
|
+
|
126
|
+
# ~~~~~~~~~~~~~~~~~~~
|
127
|
+
# Driver
|
128
|
+
# ~~~~~~~~~~~~~~~~~~~
|
129
|
+
attach_function :GDALAllRegister, [], :void
|
130
|
+
|
131
|
+
# Class-level functions
|
132
|
+
attach_function :GDALGetDriver, [:int], :GDALDriverH
|
133
|
+
attach_function :GDALGetDriverCount, [], :int
|
134
|
+
attach_function :GDALIdentifyDriver, %i[string pointer], :GDALDriverH
|
135
|
+
attach_function :GDALGetDriverByName, [:string], :GDALDriverH
|
136
|
+
attach_function :GDALDestroyDriverManager, [], :void
|
137
|
+
|
138
|
+
# Instance-level functions
|
139
|
+
attach_function :GDALCreate,
|
140
|
+
[:GDALDriverH, :string, :int, :int, :int, DataType, :pointer],
|
141
|
+
:GDALDatasetH
|
142
|
+
attach_function :GDALCreateCopy,
|
143
|
+
%i[GDALDriverH string GDALDatasetH bool pointer GDALProgressFunc pointer],
|
144
|
+
:GDALDatasetH
|
145
|
+
attach_function :GDALValidateCreationOptions, %i[GDALDriverH pointer], :bool
|
146
|
+
attach_function :GDALGetDriverShortName, [:GDALDriverH], :string
|
147
|
+
attach_function :GDALGetDriverLongName, [:GDALDriverH], :string
|
148
|
+
attach_function :GDALGetDriverHelpTopic, [:GDALDriverH], :string
|
149
|
+
attach_function :GDALGetDriverCreationOptionList, [:GDALDriverH], :string
|
150
|
+
|
151
|
+
attach_function :GDALDestroyDriver, [:GDALDriverH], :void
|
152
|
+
attach_function :GDALRegisterDriver, [:GDALDriverH], :int
|
153
|
+
attach_function :GDALDeregisterDriver, [:GDALDriverH], :void
|
154
|
+
attach_function :GDALDeleteDataset, %i[GDALDriverH string], FFI::CPL::Error::CPLErr
|
155
|
+
attach_function :GDALRenameDataset,
|
156
|
+
%i[GDALDriverH string string],
|
157
|
+
FFI::CPL::Error::CPLErr
|
158
|
+
attach_function :GDALCopyDatasetFiles,
|
159
|
+
%i[GDALDriverH string string],
|
160
|
+
FFI::CPL::Error::CPLErr
|
161
|
+
|
162
|
+
# ~~~~~~~~~~~~~~~~~~~
|
163
|
+
# Dataset
|
164
|
+
# ~~~~~~~~~~~~~~~~~~~
|
165
|
+
# Class-level functions
|
166
|
+
attach_function :GDALOpen, [:string, Access], :GDALDatasetH
|
167
|
+
attach_function :GDALOpenShared,
|
168
|
+
[:string, Access],
|
169
|
+
:GDALDatasetH
|
170
|
+
attach_function :GDALDumpOpenDatasets, [:pointer], :int
|
171
|
+
attach_function :GDALGetOpenDatasets, %i[pointer pointer], :void
|
172
|
+
|
173
|
+
# Instance-level functions
|
174
|
+
attach_function :GDALClose, [:GDALDatasetH], :void
|
175
|
+
attach_function :GDALGetDatasetDriver, [:GDALDatasetH], :GDALDriverH
|
176
|
+
attach_function :GDALGetFileList, [:GDALDatasetH], :pointer
|
177
|
+
attach_function :GDALGetInternalHandle, %i[GDALDatasetH string], :pointer
|
178
|
+
attach_function :GDALReferenceDataset, [:GDALDatasetH], :int
|
179
|
+
attach_function :GDALDereferenceDataset, [:GDALDatasetH], :int
|
180
|
+
|
181
|
+
attach_function :GDALGetAccess, [:GDALDatasetH], :int
|
182
|
+
attach_function :GDALFlushCache, [:GDALDatasetH], :void
|
183
|
+
|
184
|
+
attach_function :GDALGetRasterXSize, [:GDALDatasetH], :int
|
185
|
+
attach_function :GDALGetRasterYSize, [:GDALDatasetH], :int
|
186
|
+
attach_function :GDALGetRasterCount, [:GDALDatasetH], :int
|
187
|
+
attach_function :GDALGetRasterBand, %i[GDALDatasetH int], :GDALRasterBandH
|
188
|
+
attach_function :GDALAddBand,
|
189
|
+
[:GDALDatasetH, DataType, :pointer],
|
190
|
+
FFI::CPL::Error::CPLErr
|
191
|
+
attach_function :GDALBeginAsyncReader,
|
192
|
+
[
|
193
|
+
:GDALDatasetH,
|
194
|
+
RWFlag,
|
195
|
+
:int,
|
196
|
+
:int,
|
197
|
+
:int,
|
198
|
+
:int,
|
199
|
+
:pointer,
|
200
|
+
:int,
|
201
|
+
:int,
|
202
|
+
DataType,
|
203
|
+
:int,
|
204
|
+
:pointer,
|
205
|
+
:int,
|
206
|
+
:int,
|
207
|
+
:int
|
208
|
+
], :GDALAsyncReaderH
|
209
|
+
|
210
|
+
attach_function :GDALEndAsyncReader,
|
211
|
+
%i[GDALDatasetH GDALAsyncReaderH],
|
212
|
+
:void
|
213
|
+
|
214
|
+
attach_function :GDALDatasetRasterIO,
|
215
|
+
[
|
216
|
+
:GDALDatasetH,
|
217
|
+
RWFlag,
|
218
|
+
:int,
|
219
|
+
:int,
|
220
|
+
:int,
|
221
|
+
:int,
|
222
|
+
:pointer,
|
223
|
+
:int,
|
224
|
+
:int,
|
225
|
+
DataType,
|
226
|
+
:int,
|
227
|
+
:pointer,
|
228
|
+
:int,
|
229
|
+
:int,
|
230
|
+
:int
|
231
|
+
], FFI::CPL::Error::CPLErr
|
232
|
+
|
233
|
+
attach_function :GDALDatasetAdviseRead,
|
234
|
+
[
|
235
|
+
:GDALDatasetH,
|
236
|
+
:int,
|
237
|
+
:int,
|
238
|
+
:int,
|
239
|
+
:int,
|
240
|
+
:int,
|
241
|
+
:int,
|
242
|
+
DataType,
|
243
|
+
:int,
|
244
|
+
:pointer,
|
245
|
+
:pointer
|
246
|
+
], FFI::CPL::Error::CPLErr
|
247
|
+
|
248
|
+
attach_function :GDALInitGCPs, %i[int pointer], :void
|
249
|
+
attach_function :GDALDeinitGCPs, %i[int pointer], :void
|
250
|
+
attach_function :GDALDuplicateGCPs, %i[int pointer], :pointer
|
251
|
+
attach_function :GDALGCPsToGeoTransform,
|
252
|
+
%i[int pointer pointer int],
|
234
253
|
:int
|
235
|
-
],
|
236
|
-
|
237
|
-
|
238
|
-
|
239
|
-
|
240
|
-
|
241
|
-
|
242
|
-
|
243
|
-
|
244
|
-
|
245
|
-
|
246
|
-
|
247
|
-
|
248
|
-
|
249
|
-
|
250
|
-
|
251
|
-
|
252
|
-
|
253
|
-
|
254
|
-
|
255
|
-
|
256
|
-
|
257
|
-
|
258
|
-
|
259
|
-
|
260
|
-
|
261
|
-
|
262
|
-
|
263
|
-
|
264
|
-
|
265
|
-
|
266
|
-
|
267
|
-
|
268
|
-
|
269
|
-
|
270
|
-
FFI::
|
271
|
-
|
272
|
-
|
273
|
-
|
274
|
-
|
275
|
-
|
276
|
-
|
277
|
-
|
278
|
-
|
279
|
-
|
280
|
-
|
281
|
-
|
282
|
-
|
283
|
-
|
284
|
-
|
285
|
-
|
286
|
-
|
287
|
-
|
288
|
-
|
289
|
-
|
290
|
-
|
291
|
-
|
292
|
-
|
293
|
-
|
294
|
-
|
295
|
-
|
296
|
-
|
297
|
-
|
298
|
-
|
299
|
-
|
300
|
-
|
301
|
-
|
302
|
-
|
303
|
-
|
304
|
-
|
305
|
-
|
306
|
-
|
307
|
-
|
308
|
-
|
309
|
-
|
310
|
-
|
311
|
-
|
312
|
-
|
313
|
-
|
314
|
-
|
315
|
-
|
316
|
-
|
317
|
-
|
318
|
-
|
319
|
-
|
320
|
-
|
321
|
-
|
322
|
-
|
323
|
-
|
324
|
-
|
325
|
-
|
326
|
-
|
327
|
-
|
328
|
-
|
329
|
-
|
330
|
-
|
331
|
-
|
332
|
-
|
333
|
-
|
334
|
-
|
335
|
-
|
336
|
-
|
337
|
-
|
338
|
-
|
339
|
-
|
340
|
-
|
341
|
-
|
342
|
-
|
343
|
-
|
344
|
-
|
345
|
-
:
|
346
|
-
|
347
|
-
|
348
|
-
|
349
|
-
|
350
|
-
|
351
|
-
|
352
|
-
GDALRasterBandH
|
353
|
-
|
354
|
-
|
355
|
-
|
356
|
-
|
357
|
-
|
358
|
-
|
359
|
-
|
360
|
-
|
361
|
-
|
362
|
-
|
363
|
-
|
364
|
-
|
365
|
-
|
366
|
-
|
367
|
-
|
368
|
-
|
369
|
-
|
370
|
-
|
371
|
-
|
372
|
-
|
373
|
-
|
374
|
-
|
375
|
-
|
376
|
-
|
377
|
-
|
378
|
-
|
379
|
-
|
380
|
-
|
381
|
-
|
382
|
-
|
383
|
-
|
384
|
-
|
385
|
-
|
386
|
-
|
387
|
-
|
254
|
+
attach_function :GDALGetGCPCount, [:GDALDatasetH], :int
|
255
|
+
attach_function :GDALGetGCPProjection, [:GDALDatasetH], :string
|
256
|
+
attach_function :GDALGetGCPs, [:GDALDatasetH], :pointer
|
257
|
+
attach_function :GDALSetGCPs,
|
258
|
+
%i[GDALDatasetH int pointer string],
|
259
|
+
FFI::CPL::Error::CPLErr
|
260
|
+
|
261
|
+
attach_function :GDALGetProjectionRef, [:GDALDatasetH], :string
|
262
|
+
attach_function :GDALSetProjection, %i[GDALDatasetH string], FFI::CPL::Error::CPLErr
|
263
|
+
attach_function :GDALGetGeoTransform, %i[GDALDatasetH pointer], FFI::CPL::Error::CPLErr
|
264
|
+
attach_function :GDALSetGeoTransform,
|
265
|
+
%i[GDALDatasetH pointer],
|
266
|
+
FFI::CPL::Error::CPLErr
|
267
|
+
|
268
|
+
attach_function :GDALBuildOverviews,
|
269
|
+
%i[
|
270
|
+
GDALDatasetH
|
271
|
+
string
|
272
|
+
int
|
273
|
+
pointer
|
274
|
+
int
|
275
|
+
pointer
|
276
|
+
GDALProgressFunc
|
277
|
+
pointer
|
278
|
+
], FFI::CPL::Error::CPLErr
|
279
|
+
|
280
|
+
# OGR datasets. Not found in v1.11.1
|
281
|
+
# attach_function :GDALDatasetGetLayerCount, [:GDALDatasetH], :int
|
282
|
+
# attach_function :GDALDatasetGetLayer, [:GDALDatasetH, :int], :OGRLayerH
|
283
|
+
# attach_function :GDALDatasetGetLayerByName, [:GDALDatasetH, :string], :OGRLayerH
|
284
|
+
# attach_function :GDALDatasetDeleteLayer, [:GDALDatasetH, :int], FFI::OGR::::OGRErr
|
285
|
+
# attach_function :GDALDatasetCreateLayer,
|
286
|
+
# [
|
287
|
+
# :GDALDatasetH,
|
288
|
+
# :string,
|
289
|
+
# FFI::OGR::SRSAPI.find_type(:OGRSpatialReferenceH),
|
290
|
+
# FFI::OGR::::OGRwkbGeometryType,
|
291
|
+
# :pointer
|
292
|
+
# ],
|
293
|
+
# :OGRLayerH
|
294
|
+
# attach_function :GDALDatasetCopyLayer,
|
295
|
+
# [:GDALDatasetH, :OGRLayerH, :string, :pointer],
|
296
|
+
# :OGRLayerH
|
297
|
+
# attach_function :GDALDatasetTestCapability, [:GDALDatasetH, :string], :int
|
298
|
+
# attach_function :GDALDatasetExecuteSQL,
|
299
|
+
# [:GDALDatasetH, :string, :OGRGeometryH, :string],
|
300
|
+
# :OGRLayerH
|
301
|
+
# attach_function :GDALDatasetReleaseResultSet,
|
302
|
+
# %i[GDALDatasetH OGRLayerH],
|
303
|
+
# :void
|
304
|
+
# attach_function :GDALDatasetGetStyleTable, [:GDALDatasetH], :OGRStyleTableH
|
305
|
+
# attach_function :GDALDatasetSetStyleTableDirectly,
|
306
|
+
# %i[GDALDatasetH OGRStyleTableH],
|
307
|
+
# :void
|
308
|
+
# attach_function :GDALDatasetSetStyleTable,
|
309
|
+
# %i[GDALDatasetH OGRStyleTableH],
|
310
|
+
# :void
|
311
|
+
|
312
|
+
attach_function :GDALCreateDatasetMaskBand, %i[GDALDatasetH int], FFI::CPL::Error::CPLErr
|
313
|
+
attach_function :GDALDatasetCopyWholeRaster,
|
314
|
+
%i[GDALDatasetH GDALDatasetH pointer GDALProgressFunc pointer],
|
315
|
+
FFI::CPL::Error::CPLErr
|
316
|
+
|
317
|
+
# ~~~~~~~~~~~~~~~~~~~
|
318
|
+
# MajorObject
|
319
|
+
# ~~~~~~~~~~~~~~~~~~~
|
320
|
+
attach_function :GDALGetMetadataDomainList, [:GDALMajorObjectH], :pointer
|
321
|
+
attach_function :GDALGetMetadata, %i[GDALMajorObjectH string], :pointer
|
322
|
+
attach_function :GDALSetMetadata, %i[GDALMajorObjectH pointer string], FFI::CPL::Error::CPLErr
|
323
|
+
attach_function :GDALGetMetadataItem,
|
324
|
+
%i[GDALMajorObjectH string string],
|
325
|
+
:string
|
326
|
+
attach_function :GDALSetMetadataItem,
|
327
|
+
%i[GDALMajorObjectH string string string],
|
328
|
+
FFI::CPL::Error::CPLErr
|
329
|
+
attach_function :GDALGetDescription, [:GDALMajorObjectH], :string
|
330
|
+
attach_function :GDALSetDescription, %i[GDALMajorObjectH string], :void
|
331
|
+
|
332
|
+
# ~~~~~~~~~~~~~~~~~~~
|
333
|
+
# GeoTransform
|
334
|
+
# ~~~~~~~~~~~~~~~~~~~
|
335
|
+
attach_function :GDALInvGeoTransform, %i[pointer pointer], :int
|
336
|
+
attach_function :GDALApplyGeoTransform,
|
337
|
+
%i[pointer double double pointer pointer],
|
338
|
+
:void
|
339
|
+
attach_function :GDALComposeGeoTransforms,
|
340
|
+
%i[pointer pointer pointer],
|
341
|
+
:void
|
342
|
+
|
343
|
+
# ----------------
|
344
|
+
# Raster functions
|
345
|
+
# ----------------
|
346
|
+
attach_function :GDALRasterBandCopyWholeRaster,
|
347
|
+
%i[
|
348
|
+
GDALRasterBandH
|
349
|
+
GDALRasterBandH
|
350
|
+
pointer
|
351
|
+
GDALProgressFunc
|
352
|
+
pointer
|
353
|
+
], FFI::CPL::Error::CPLErr
|
354
|
+
attach_function :GDALRegenerateOverviews,
|
355
|
+
%i[
|
356
|
+
GDALRasterBandH
|
357
|
+
int
|
358
|
+
pointer
|
359
|
+
string
|
360
|
+
GDALProgressFunc
|
361
|
+
pointer
|
362
|
+
], FFI::CPL::Error::CPLErr
|
363
|
+
attach_function :GDALGetMaskBand, [:GDALRasterBandH], :GDALRasterBandH
|
364
|
+
attach_function :GDALGetMaskFlags, [:GDALRasterBandH], :int
|
365
|
+
attach_function :GDALCreateMaskBand,
|
366
|
+
%i[GDALRasterBandH int],
|
367
|
+
FFI::CPL::Error::CPLErr
|
368
|
+
|
369
|
+
attach_function :GDALGetRasterDataType, [:GDALRasterBandH], DataType
|
370
|
+
attach_function :GDALGetBlockSize,
|
371
|
+
%i[GDALRasterBandH pointer pointer],
|
372
|
+
DataType
|
373
|
+
|
374
|
+
attach_function :GDALRasterAdviseRead,
|
375
|
+
[
|
376
|
+
:GDALRasterBandH,
|
377
|
+
:int,
|
378
|
+
:int,
|
379
|
+
:int,
|
380
|
+
:int,
|
381
|
+
:int,
|
382
|
+
:int,
|
383
|
+
DataType,
|
384
|
+
:pointer
|
385
|
+
], FFI::CPL::Error::CPLErr
|
386
|
+
|
387
|
+
attach_function :GDALRasterIO,
|
388
|
+
[
|
389
|
+
:GDALRasterBandH,
|
390
|
+
RWFlag,
|
391
|
+
:int,
|
392
|
+
:int,
|
393
|
+
:int,
|
394
|
+
:int,
|
395
|
+
:pointer,
|
396
|
+
:int,
|
397
|
+
:int,
|
398
|
+
DataType,
|
399
|
+
:int,
|
400
|
+
:int
|
401
|
+
], FFI::CPL::Error::CPLErr
|
402
|
+
attach_function :GDALReadBlock,
|
403
|
+
%i[GDALRasterBandH int int pointer],
|
404
|
+
FFI::CPL::Error::CPLErr
|
405
|
+
attach_function :GDALWriteBlock,
|
406
|
+
%i[GDALRasterBandH int int pointer],
|
407
|
+
FFI::CPL::Error::CPLErr
|
408
|
+
attach_function :GDALGetRasterBandXSize, [:GDALRasterBandH], :int
|
409
|
+
attach_function :GDALGetRasterBandYSize, [:GDALRasterBandH], :int
|
410
|
+
attach_function :GDALGetRasterAccess, [:GDALRasterBandH], Access
|
411
|
+
attach_function :GDALGetBandNumber, [:GDALRasterBandH], :int
|
412
|
+
attach_function :GDALGetBandDataset, [:GDALRasterBandH], :GDALDatasetH
|
413
|
+
attach_function :GDALGetRasterColorInterpretation,
|
414
|
+
[:GDALRasterBandH],
|
415
|
+
ColorInterp
|
416
|
+
attach_function :GDALSetRasterColorInterpretation,
|
417
|
+
[:GDALRasterBandH, ColorInterp],
|
418
|
+
FFI::CPL::Error::CPLErr
|
419
|
+
attach_function :GDALGetRasterColorTable,
|
420
|
+
[:GDALRasterBandH],
|
421
|
+
:GDALColorTableH
|
422
|
+
attach_function :GDALSetRasterColorTable,
|
423
|
+
%i[GDALRasterBandH GDALColorTableH],
|
424
|
+
FFI::CPL::Error::CPLErr
|
425
|
+
|
426
|
+
attach_function :GDALHasArbitraryOverviews, [:GDALRasterBandH], :int
|
427
|
+
attach_function :GDALGetOverviewCount, [:GDALRasterBandH], :int
|
428
|
+
attach_function :GDALGetOverview, %i[GDALRasterBandH int], :GDALRasterBandH
|
429
|
+
attach_function :GDALGetRasterNoDataValue,
|
430
|
+
%i[GDALRasterBandH pointer],
|
431
|
+
:double
|
432
|
+
attach_function :GDALSetRasterNoDataValue,
|
433
|
+
%i[GDALRasterBandH double],
|
434
|
+
FFI::CPL::Error::CPLErr
|
435
|
+
attach_function :GDALGetRasterCategoryNames,
|
436
|
+
[:GDALRasterBandH],
|
388
437
|
:pointer
|
389
|
-
|
390
|
-
|
391
|
-
|
392
|
-
|
393
|
-
|
394
|
-
|
395
|
-
|
396
|
-
|
397
|
-
:
|
398
|
-
|
399
|
-
|
400
|
-
|
401
|
-
|
402
|
-
|
403
|
-
|
438
|
+
attach_function :GDALSetRasterCategoryNames,
|
439
|
+
%i[GDALRasterBandH pointer],
|
440
|
+
FFI::CPL::Error::CPLErr
|
441
|
+
attach_function :GDALGetRasterMinimum,
|
442
|
+
%i[GDALRasterBandH pointer],
|
443
|
+
:double
|
444
|
+
attach_function :GDALGetRasterMaximum,
|
445
|
+
%i[GDALRasterBandH pointer],
|
446
|
+
:double
|
447
|
+
attach_function :GDALGetRasterStatistics,
|
448
|
+
%i[GDALRasterBandH bool bool pointer pointer pointer pointer],
|
449
|
+
FFI::CPL::Error::CPLErr
|
450
|
+
attach_function :GDALComputeRasterStatistics,
|
451
|
+
%i[
|
452
|
+
GDALRasterBandH
|
453
|
+
bool
|
454
|
+
pointer
|
455
|
+
pointer
|
456
|
+
pointer
|
457
|
+
pointer
|
458
|
+
GDALProgressFunc
|
459
|
+
pointer
|
460
|
+
], FFI::CPL::Error::CPLErr
|
461
|
+
attach_function :GDALSetRasterStatistics,
|
462
|
+
%i[GDALRasterBandH double double double double],
|
463
|
+
FFI::CPL::Error::CPLErr
|
464
|
+
attach_function :GDALGetRasterUnitType, [:GDALRasterBandH], :string
|
465
|
+
attach_function :GDALSetRasterUnitType, %i[GDALRasterBandH string], FFI::CPL::Error::CPLErr
|
466
|
+
attach_function :GDALGetRasterOffset, %i[GDALRasterBandH pointer], :double
|
467
|
+
attach_function :GDALSetRasterOffset, %i[GDALRasterBandH double], FFI::CPL::Error::CPLErr
|
468
|
+
attach_function :GDALGetRasterScale, %i[GDALRasterBandH pointer], :double
|
469
|
+
attach_function :GDALSetRasterScale, %i[GDALRasterBandH double], FFI::CPL::Error::CPLErr
|
470
|
+
attach_function :GDALComputeRasterMinMax,
|
471
|
+
%i[GDALRasterBandH bool pointer],
|
472
|
+
:void
|
473
|
+
attach_function :GDALFlushRasterCache, [:GDALRasterBandH], FFI::CPL::Error::CPLErr
|
474
|
+
attach_function :GDALGetRasterHistogram,
|
475
|
+
%i[
|
476
|
+
GDALRasterBandH
|
477
|
+
double
|
478
|
+
double
|
479
|
+
int
|
480
|
+
pointer
|
481
|
+
bool
|
482
|
+
bool
|
483
|
+
GDALProgressFunc
|
484
|
+
pointer
|
485
|
+
], FFI::CPL::Error::CPLErr
|
486
|
+
|
487
|
+
attach_function :GDALGetDefaultHistogram,
|
488
|
+
%i[
|
489
|
+
GDALRasterBandH
|
490
|
+
pointer
|
491
|
+
pointer
|
492
|
+
pointer
|
493
|
+
pointer
|
494
|
+
bool
|
495
|
+
GDALProgressFunc
|
496
|
+
pointer
|
497
|
+
], FFI::CPL::Error::CPLErr
|
498
|
+
attach_function :GDALSetDefaultHistogram,
|
499
|
+
%i[
|
500
|
+
GDALRasterBandH
|
501
|
+
double
|
502
|
+
double
|
503
|
+
int
|
504
|
+
pointer
|
505
|
+
], FFI::CPL::Error::CPLErr
|
506
|
+
|
507
|
+
attach_function :GDALGetRandomRasterSample,
|
508
|
+
%i[GDALRasterBandH int pointer],
|
509
|
+
:int
|
510
|
+
attach_function :GDALGetRasterSampleOverview,
|
511
|
+
%i[GDALRasterBandH int],
|
512
|
+
:GDALRasterBandH
|
513
|
+
attach_function :GDALFillRaster,
|
514
|
+
%i[GDALRasterBandH double double],
|
515
|
+
FFI::CPL::Error::CPLErr
|
516
|
+
|
517
|
+
attach_function :GDALGetDefaultRAT,
|
518
|
+
[:GDALRasterBandH],
|
519
|
+
:GDALRasterAttributeTableH
|
520
|
+
attach_function :GDALSetDefaultRAT,
|
521
|
+
%i[GDALRasterBandH GDALRasterAttributeTableH],
|
522
|
+
FFI::CPL::Error::CPLErr
|
523
|
+
attach_function :GDALAddDerivedBandPixelFunc,
|
524
|
+
%i[string GDALDerivedPixelFunc],
|
525
|
+
FFI::CPL::Error::CPLErr
|
526
|
+
|
527
|
+
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
528
|
+
# Raster Attribute Table functions
|
529
|
+
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
530
|
+
# Class-level functions
|
531
|
+
attach_function :GDALCreateRasterAttributeTable,
|
532
|
+
[],
|
533
|
+
:GDALRasterAttributeTableH
|
534
|
+
|
535
|
+
# Instance-level functions
|
536
|
+
attach_function :GDALDestroyRasterAttributeTable,
|
537
|
+
[:GDALRasterAttributeTableH],
|
538
|
+
:void
|
539
|
+
attach_function :GDALRATChangesAreWrittenToFile,
|
540
|
+
[:GDALRasterAttributeTableH],
|
541
|
+
:bool
|
542
|
+
attach_function :GDALRATClone,
|
543
|
+
[:GDALRasterAttributeTableH],
|
544
|
+
:GDALRasterAttributeTableH
|
545
|
+
|
546
|
+
attach_function :GDALRATGetColumnCount,
|
547
|
+
[:GDALRasterAttributeTableH],
|
548
|
+
:int
|
549
|
+
attach_function :GDALRATGetNameOfCol,
|
550
|
+
%i[GDALRasterAttributeTableH int],
|
551
|
+
:string
|
552
|
+
attach_function :GDALRATGetUsageOfCol,
|
553
|
+
%i[GDALRasterAttributeTableH int],
|
554
|
+
RATFieldUsage
|
555
|
+
attach_function :GDALRATGetTypeOfCol,
|
556
|
+
%i[GDALRasterAttributeTableH int],
|
557
|
+
RATFieldType
|
558
|
+
attach_function :GDALRATGetColOfUsage,
|
559
|
+
[:GDALRasterAttributeTableH, RATFieldUsage],
|
560
|
+
:int
|
561
|
+
attach_function :GDALRATCreateColumn,
|
562
|
+
[:GDALRasterAttributeTableH, :string, RATFieldType, RATFieldUsage],
|
563
|
+
FFI::CPL::Error::CPLErr
|
564
|
+
|
565
|
+
attach_function :GDALRATGetValueAsString,
|
566
|
+
%i[GDALRasterAttributeTableH int int],
|
567
|
+
:string
|
568
|
+
attach_function :GDALRATGetValueAsInt,
|
569
|
+
%i[GDALRasterAttributeTableH int int],
|
570
|
+
:int
|
571
|
+
attach_function :GDALRATGetValueAsDouble,
|
572
|
+
%i[GDALRasterAttributeTableH int int],
|
573
|
+
:double
|
574
|
+
attach_function :GDALRATSetValueAsString,
|
575
|
+
%i[GDALRasterAttributeTableH int int string],
|
576
|
+
:void
|
577
|
+
attach_function :GDALRATSetValueAsInt,
|
578
|
+
%i[GDALRasterAttributeTableH int int int],
|
579
|
+
:void
|
580
|
+
attach_function :GDALRATSetValueAsDouble,
|
581
|
+
%i[GDALRasterAttributeTableH int int double],
|
582
|
+
:void
|
583
|
+
attach_function :GDALRATValuesIOAsDouble,
|
584
|
+
[:GDALRasterAttributeTableH, RWFlag, :int, :int, :int, :pointer],
|
585
|
+
FFI::CPL::Error::CPLErr
|
586
|
+
attach_function :GDALRATValuesIOAsInteger,
|
587
|
+
[:GDALRasterAttributeTableH, RWFlag, :int, :int, :int, :pointer],
|
588
|
+
FFI::CPL::Error::CPLErr
|
589
|
+
attach_function :GDALRATValuesIOAsString,
|
590
|
+
[:GDALRasterAttributeTableH, RWFlag, :int, :int, :int, :pointer],
|
591
|
+
FFI::CPL::Error::CPLErr
|
592
|
+
|
593
|
+
attach_function :GDALRATGetRowCount,
|
594
|
+
[:GDALRasterAttributeTableH],
|
595
|
+
:int
|
596
|
+
attach_function :GDALRATSetRowCount,
|
597
|
+
%i[GDALRasterAttributeTableH int],
|
598
|
+
:void
|
599
|
+
attach_function :GDALRATGetRowOfValue,
|
600
|
+
%i[GDALRasterAttributeTableH double],
|
601
|
+
:int
|
602
|
+
|
603
|
+
attach_function :GDALRATSetLinearBinning,
|
604
|
+
%i[GDALRasterAttributeTableH double double],
|
404
605
|
:int
|
405
|
-
|
406
|
-
|
407
|
-
|
408
|
-
|
409
|
-
|
410
|
-
|
411
|
-
|
412
|
-
|
413
|
-
|
414
|
-
|
415
|
-
|
416
|
-
|
417
|
-
|
418
|
-
|
419
|
-
|
420
|
-
|
421
|
-
|
422
|
-
|
423
|
-
|
424
|
-
|
425
|
-
|
426
|
-
|
427
|
-
|
428
|
-
|
429
|
-
|
430
|
-
|
431
|
-
|
432
|
-
|
433
|
-
|
434
|
-
|
435
|
-
:
|
436
|
-
|
437
|
-
|
438
|
-
|
439
|
-
|
440
|
-
|
441
|
-
|
442
|
-
|
443
|
-
|
444
|
-
|
445
|
-
|
446
|
-
|
447
|
-
:
|
448
|
-
|
449
|
-
|
450
|
-
:
|
451
|
-
|
452
|
-
|
453
|
-
|
454
|
-
|
455
|
-
|
456
|
-
|
457
|
-
|
458
|
-
|
459
|
-
|
460
|
-
|
461
|
-
|
462
|
-
|
463
|
-
|
464
|
-
|
465
|
-
|
466
|
-
%i[
|
467
|
-
|
468
|
-
|
469
|
-
|
470
|
-
|
471
|
-
|
472
|
-
|
473
|
-
|
474
|
-
|
475
|
-
|
476
|
-
|
477
|
-
|
478
|
-
|
479
|
-
%i[
|
480
|
-
GDALRasterBandH
|
481
|
-
double
|
482
|
-
double
|
483
|
-
int
|
484
|
-
pointer
|
485
|
-
bool
|
486
|
-
bool
|
487
|
-
GDALProgressFunc
|
488
|
-
pointer
|
489
|
-
], FFI::CPL::Error::CPLErr
|
490
|
-
|
491
|
-
attach_function :GDALGetDefaultHistogram,
|
492
|
-
%i[
|
493
|
-
GDALRasterBandH
|
494
|
-
pointer
|
495
|
-
pointer
|
496
|
-
pointer
|
497
|
-
pointer
|
498
|
-
bool
|
499
|
-
GDALProgressFunc
|
500
|
-
pointer
|
501
|
-
], FFI::CPL::Error::CPLErr
|
502
|
-
attach_function :GDALSetDefaultHistogram,
|
503
|
-
%i[
|
504
|
-
GDALRasterBandH
|
505
|
-
double
|
506
|
-
double
|
507
|
-
int
|
508
|
-
pointer
|
509
|
-
], FFI::CPL::Error::CPLErr
|
510
|
-
|
511
|
-
attach_function :GDALGetRandomRasterSample,
|
512
|
-
%i[GDALRasterBandH int pointer],
|
513
|
-
:int
|
514
|
-
attach_function :GDALGetRasterSampleOverview,
|
515
|
-
%i[GDALRasterBandH int],
|
516
|
-
:GDALRasterBandH
|
517
|
-
attach_function :GDALFillRaster,
|
518
|
-
%i[GDALRasterBandH double double],
|
519
|
-
FFI::CPL::Error::CPLErr
|
520
|
-
|
521
|
-
attach_function :GDALGetDefaultRAT,
|
522
|
-
[:GDALRasterBandH],
|
523
|
-
:GDALRasterAttributeTableH
|
524
|
-
attach_function :GDALSetDefaultRAT,
|
525
|
-
%i[GDALRasterBandH GDALRasterAttributeTableH],
|
526
|
-
FFI::CPL::Error::CPLErr
|
527
|
-
attach_function :GDALAddDerivedBandPixelFunc,
|
528
|
-
%i[string GDALDerivedPixelFunc],
|
529
|
-
FFI::CPL::Error::CPLErr
|
530
|
-
|
531
|
-
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
532
|
-
# Raster Attribute Table functions
|
533
|
-
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
534
|
-
# Class-level functions
|
535
|
-
attach_function :GDALCreateRasterAttributeTable,
|
536
|
-
[],
|
537
|
-
:GDALRasterAttributeTableH
|
538
|
-
|
539
|
-
# Instance-level functions
|
540
|
-
attach_function :GDALDestroyRasterAttributeTable,
|
541
|
-
[:GDALRasterAttributeTableH],
|
542
|
-
:void
|
543
|
-
attach_function :GDALRATChangesAreWrittenToFile,
|
544
|
-
[:GDALRasterAttributeTableH],
|
545
|
-
:bool
|
546
|
-
attach_function :GDALRATClone,
|
547
|
-
[:GDALRasterAttributeTableH],
|
548
|
-
:GDALRasterAttributeTableH
|
549
|
-
|
550
|
-
attach_function :GDALRATGetColumnCount,
|
551
|
-
[:GDALRasterAttributeTableH],
|
552
|
-
:int
|
553
|
-
attach_function :GDALRATGetNameOfCol,
|
554
|
-
%i[GDALRasterAttributeTableH int],
|
555
|
-
:string
|
556
|
-
attach_function :GDALRATGetUsageOfCol,
|
557
|
-
%i[GDALRasterAttributeTableH int],
|
558
|
-
RATFieldUsage
|
559
|
-
attach_function :GDALRATGetTypeOfCol,
|
560
|
-
%i[GDALRasterAttributeTableH int],
|
561
|
-
RATFieldType
|
562
|
-
attach_function :GDALRATGetColOfUsage,
|
563
|
-
[:GDALRasterAttributeTableH, RATFieldUsage],
|
564
|
-
:int
|
565
|
-
attach_function :GDALRATCreateColumn,
|
566
|
-
[:GDALRasterAttributeTableH, :string, RATFieldType, RATFieldUsage],
|
567
|
-
FFI::CPL::Error::CPLErr
|
568
|
-
|
569
|
-
attach_function :GDALRATGetValueAsString,
|
570
|
-
%i[GDALRasterAttributeTableH int int],
|
571
|
-
:string
|
572
|
-
attach_function :GDALRATGetValueAsInt,
|
573
|
-
%i[GDALRasterAttributeTableH int int],
|
574
|
-
:int
|
575
|
-
attach_function :GDALRATGetValueAsDouble,
|
576
|
-
%i[GDALRasterAttributeTableH int int],
|
577
|
-
:double
|
578
|
-
attach_function :GDALRATSetValueAsString,
|
579
|
-
%i[GDALRasterAttributeTableH int int string],
|
580
|
-
:void
|
581
|
-
attach_function :GDALRATSetValueAsInt,
|
582
|
-
%i[GDALRasterAttributeTableH int int int],
|
583
|
-
:void
|
584
|
-
attach_function :GDALRATSetValueAsDouble,
|
585
|
-
%i[GDALRasterAttributeTableH int int double],
|
586
|
-
:void
|
587
|
-
attach_function :GDALRATValuesIOAsDouble,
|
588
|
-
[:GDALRasterAttributeTableH, RWFlag, :int, :int, :int, :pointer],
|
589
|
-
FFI::CPL::Error::CPLErr
|
590
|
-
attach_function :GDALRATValuesIOAsInteger,
|
591
|
-
[:GDALRasterAttributeTableH, RWFlag, :int, :int, :int, :pointer],
|
592
|
-
FFI::CPL::Error::CPLErr
|
593
|
-
attach_function :GDALRATValuesIOAsString,
|
594
|
-
[:GDALRasterAttributeTableH, RWFlag, :int, :int, :int, :pointer],
|
595
|
-
FFI::CPL::Error::CPLErr
|
596
|
-
|
597
|
-
attach_function :GDALRATGetRowCount,
|
598
|
-
[:GDALRasterAttributeTableH],
|
599
|
-
:int
|
600
|
-
attach_function :GDALRATSetRowCount,
|
601
|
-
%i[GDALRasterAttributeTableH int],
|
602
|
-
:void
|
603
|
-
attach_function :GDALRATGetRowOfValue,
|
604
|
-
%i[GDALRasterAttributeTableH double],
|
605
|
-
:int
|
606
|
-
|
607
|
-
attach_function :GDALRATSetLinearBinning,
|
608
|
-
%i[GDALRasterAttributeTableH double double],
|
609
|
-
:int
|
610
|
-
attach_function :GDALRATGetLinearBinning,
|
611
|
-
%i[GDALRasterAttributeTableH pointer pointer],
|
612
|
-
:int
|
613
|
-
attach_function :GDALRATTranslateToColorTable,
|
614
|
-
%i[GDALRasterAttributeTableH int],
|
615
|
-
:GDALColorTableH
|
616
|
-
attach_function :GDALRATInitializeFromColorTable,
|
617
|
-
%i[GDALRasterAttributeTableH GDALColorTableH],
|
618
|
-
FFI::CPL::Error::CPLErr
|
619
|
-
|
620
|
-
attach_function :GDALRATDumpReadable,
|
621
|
-
%i[GDALRasterAttributeTableH pointer],
|
622
|
-
:void
|
623
|
-
|
624
|
-
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
625
|
-
# ColorTable functions
|
626
|
-
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
627
|
-
# Class-level functions
|
628
|
-
attach_function :GDALCreateColorTable, [PaletteInterp], :GDALColorTableH
|
629
|
-
|
630
|
-
# Instance-level functions
|
631
|
-
attach_function :GDALDestroyColorTable, [:GDALColorTableH], :void
|
632
|
-
attach_function :GDALCloneColorTable, [:GDALColorTableH], :GDALColorTableH
|
633
|
-
|
634
|
-
attach_function :GDALGetPaletteInterpretation, [:GDALColorTableH], PaletteInterp
|
635
|
-
attach_function :GDALGetColorEntryCount, [:GDALColorTableH], :int
|
636
|
-
attach_function :GDALGetColorEntry, %i[GDALColorTableH int], FFI::GDAL::ColorEntry.ptr
|
637
|
-
attach_function :GDALGetColorEntryAsRGB, [:GDALColorTableH, :int, FFI::GDAL::ColorEntry], :int
|
638
|
-
attach_function :GDALSetColorEntry, [:GDALColorTableH, :int, FFI::GDAL::ColorEntry.ptr], :void
|
639
|
-
|
640
|
-
attach_function :GDALCreateColorRamp,
|
641
|
-
[:GDALColorTableH, :int, FFI::GDAL::ColorEntry.ptr, :int, FFI::GDAL::ColorEntry.ptr],
|
642
|
-
:void
|
643
|
-
|
644
|
-
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
645
|
-
# PaletteInterp functions
|
646
|
-
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
647
|
-
attach_function :GDALGetPaletteInterpretationName, [PaletteInterp], :string
|
648
|
-
|
649
|
-
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
650
|
-
# General stuff
|
651
|
-
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
652
|
-
attach_function :GDALGetDataTypeSize, [DataType], :int
|
653
|
-
attach_function :GDALDataTypeIsComplex, [DataType], :bool
|
654
|
-
attach_function :GDALGetDataTypeName, [DataType], :string
|
655
|
-
attach_function :GDALGetDataTypeByName, [:string], DataType
|
656
|
-
attach_function :GDALDataTypeUnion, [DataType, DataType], DataType
|
657
|
-
|
658
|
-
attach_function :GDALSetCacheMax, %i[int], :void
|
659
|
-
attach_function :GDALSetCacheMax64, [CPL::Port.find_type(:GIntBig)], :void
|
660
|
-
attach_function :GDALGetCacheMax, [], :int
|
661
|
-
attach_function :GDALGetCacheMax64, [], CPL::Port.find_type(:GIntBig)
|
662
|
-
attach_function :GDALGetCacheUsed, [], :int
|
663
|
-
attach_function :GDALGetCacheUsed64, [], CPL::Port.find_type(:GIntBig)
|
664
|
-
attach_function :GDALFlushCacheBlock, [], :bool
|
665
|
-
|
666
|
-
attach_function :GDALLoadWorldFile, %i[string pointer], :bool
|
667
|
-
attach_function :GDALReadWorldFile, %i[string string pointer], :bool
|
668
|
-
attach_function :GDALWriteWorldFile, %i[string string pointer], :bool
|
669
|
-
|
670
|
-
attach_function :GDALPackedDMSToDec, %i[double], :double
|
671
|
-
attach_function :GDALDecToPackedDMS, %i[double], :double
|
672
|
-
|
673
|
-
attach_function :GDALGeneralCmdLineProcessor, %i[int pointer int], :int
|
674
|
-
attach_function :GDALSwapWords,
|
675
|
-
%i[pointer int int int],
|
676
|
-
:void
|
677
|
-
attach_function :GDALCopyWords,
|
678
|
-
%i[pointer int int pointer int int int int],
|
679
|
-
:void
|
680
|
-
attach_function :GDALCopyBits,
|
681
|
-
%i[pointer int int pointer int int int int],
|
682
|
-
:void
|
606
|
+
attach_function :GDALRATGetLinearBinning,
|
607
|
+
%i[GDALRasterAttributeTableH pointer pointer],
|
608
|
+
:bool
|
609
|
+
attach_function :GDALRATTranslateToColorTable,
|
610
|
+
%i[GDALRasterAttributeTableH int],
|
611
|
+
:GDALColorTableH
|
612
|
+
attach_function :GDALRATInitializeFromColorTable,
|
613
|
+
%i[GDALRasterAttributeTableH GDALColorTableH],
|
614
|
+
FFI::CPL::Error::CPLErr
|
615
|
+
|
616
|
+
attach_function :GDALRATDumpReadable,
|
617
|
+
%i[GDALRasterAttributeTableH pointer],
|
618
|
+
:void
|
619
|
+
|
620
|
+
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
621
|
+
# ColorTable functions
|
622
|
+
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
623
|
+
# Class-level functions
|
624
|
+
attach_function :GDALCreateColorTable, [PaletteInterp], :GDALColorTableH
|
625
|
+
|
626
|
+
# Instance-level functions
|
627
|
+
attach_function :GDALDestroyColorTable, [:GDALColorTableH], :void
|
628
|
+
attach_function :GDALCloneColorTable, [:GDALColorTableH], :GDALColorTableH
|
629
|
+
|
630
|
+
attach_function :GDALGetPaletteInterpretation, [:GDALColorTableH], PaletteInterp
|
631
|
+
attach_function :GDALGetColorEntryCount, [:GDALColorTableH], :int
|
632
|
+
attach_function :GDALGetColorEntry, %i[GDALColorTableH int], FFI::GDAL::ColorEntry.ptr
|
633
|
+
attach_function :GDALGetColorEntryAsRGB, [:GDALColorTableH, :int, FFI::GDAL::ColorEntry], :int
|
634
|
+
attach_function :GDALSetColorEntry, [:GDALColorTableH, :int, FFI::GDAL::ColorEntry.ptr], :void
|
635
|
+
|
636
|
+
attach_function :GDALCreateColorRamp,
|
637
|
+
[:GDALColorTableH, :int, FFI::GDAL::ColorEntry.ptr, :int, FFI::GDAL::ColorEntry.ptr],
|
638
|
+
:void
|
639
|
+
|
640
|
+
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
641
|
+
# PaletteInterp functions
|
642
|
+
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
643
|
+
attach_function :GDALGetPaletteInterpretationName, [PaletteInterp], :string
|
644
|
+
|
645
|
+
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
646
|
+
# General stuff
|
647
|
+
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
648
|
+
attach_function :GDALGetDataTypeSize, [DataType], :int
|
649
|
+
attach_function :GDALDataTypeIsComplex, [DataType], :bool
|
650
|
+
attach_function :GDALGetDataTypeName, [DataType], :string
|
651
|
+
attach_function :GDALGetDataTypeByName, [:string], DataType
|
652
|
+
attach_function :GDALDataTypeUnion, [DataType, DataType], DataType
|
653
|
+
|
654
|
+
attach_function :GDALSetCacheMax, %i[int], :void
|
655
|
+
attach_function :GDALSetCacheMax64, [CPL::Port.find_type(:GIntBig)], :void
|
656
|
+
attach_function :GDALGetCacheMax, [], :int
|
657
|
+
attach_function :GDALGetCacheMax64, [], CPL::Port.find_type(:GIntBig)
|
658
|
+
attach_function :GDALGetCacheUsed, [], :int
|
659
|
+
attach_function :GDALGetCacheUsed64, [], CPL::Port.find_type(:GIntBig)
|
660
|
+
attach_function :GDALFlushCacheBlock, [], :bool
|
661
|
+
|
662
|
+
attach_function :GDALLoadWorldFile, %i[string pointer], :bool
|
663
|
+
attach_function :GDALReadWorldFile, %i[string string pointer], :bool
|
664
|
+
attach_function :GDALWriteWorldFile, %i[string string pointer], :bool
|
665
|
+
|
666
|
+
attach_function :GDALPackedDMSToDec, %i[double], :double
|
667
|
+
attach_function :GDALDecToPackedDMS, %i[double], :double
|
668
|
+
|
669
|
+
attach_function :GDALGeneralCmdLineProcessor, %i[int pointer int], :int
|
670
|
+
attach_function :GDALSwapWords,
|
671
|
+
%i[pointer int int int],
|
672
|
+
:void
|
673
|
+
attach_function :GDALCopyWords,
|
674
|
+
%i[pointer int int pointer int int int int],
|
675
|
+
:void
|
676
|
+
attach_function :GDALCopyBits,
|
677
|
+
%i[pointer int int pointer int int int int],
|
678
|
+
:void
|
679
|
+
end
|
683
680
|
end
|
684
681
|
end
|