ffi-gdal 1.0.4 → 1.1.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.devcontainer/Dockerfile +9 -0
- data/.devcontainer/devcontainer.json +98 -0
- data/.github/CODEOWNERS +1 -0
- data/.github/workflows/codacy.yml +3 -3
- data/.github/workflows/codeql.yml +4 -4
- data/.github/workflows/continuous-integration.yml +30 -19
- data/.github/workflows/dependency-review.yml +2 -2
- data/.github/workflows/specs-in-docker.yml +12 -6
- data/.gitignore +4 -1
- data/Changelog.md +40 -5
- data/Gemfile +4 -2
- data/README.md +35 -0
- data/lib/ext/numeric_as_data_type.rb +1 -1
- data/lib/ffi/cpl/vsi.rb +10 -0
- data/lib/ffi/gdal/gdal.rb +9 -2
- data/lib/ffi/gdal/grid_data_metrics_options.rb +27 -5
- data/lib/ffi/gdal/grid_inverse_distance_to_a_power_options.rb +30 -10
- data/lib/ffi/gdal/grid_moving_average_options.rb +30 -5
- data/lib/ffi/gdal/grid_nearest_neighbor_options.rb +24 -4
- data/lib/ffi/gdal/internal_helpers/gdal_version.rb +15 -0
- data/lib/ffi/gdal/internal_helpers/layout_version.rb +9 -0
- data/lib/ffi/gdal/internal_helpers/layout_version_resolver.rb +24 -0
- data/lib/ffi/gdal/internal_helpers.rb +11 -0
- data/lib/ffi/gdal/utils.rb +984 -0
- data/lib/ffi/gdal/version.rb +1 -1
- data/lib/ffi/gdal.rb +3 -1
- data/lib/ffi/ogr/core.rb +1 -1
- data/lib/ffi/ogr/srs_api.rb +17 -0
- data/lib/gdal/cpl_error_handler.rb +30 -15
- data/lib/gdal/exceptions.rb +35 -16
- data/lib/gdal/extensions/color_table/extensions.rb +1 -1
- data/lib/gdal/extensions/gridder.rb +4 -0
- data/lib/gdal/geo_transform.rb +13 -0
- data/lib/gdal/grid_algorithms/algorithm_base.rb +35 -0
- data/lib/gdal/grid_algorithms/inverse_distance_to_a_power.rb +3 -7
- data/lib/gdal/grid_algorithms/metric_average_distance.rb +5 -4
- data/lib/gdal/grid_algorithms/metric_average_distance_pts.rb +5 -4
- data/lib/gdal/grid_algorithms/metric_count.rb +5 -4
- data/lib/gdal/grid_algorithms/metric_maximum.rb +5 -4
- data/lib/gdal/grid_algorithms/metric_minimum.rb +5 -4
- data/lib/gdal/grid_algorithms/metric_range.rb +5 -4
- data/lib/gdal/grid_algorithms/moving_average.rb +3 -7
- data/lib/gdal/grid_algorithms/nearest_neighbor.rb +3 -7
- data/lib/gdal/grid_algorithms.rb +2 -0
- data/lib/gdal/internal_helpers.rb +8 -5
- data/lib/gdal/major_object.rb +6 -0
- data/lib/gdal/raster_band.rb +16 -12
- data/lib/gdal/utils/dem/options.rb +52 -0
- data/lib/gdal/utils/dem.rb +108 -0
- data/lib/gdal/utils/grid/options.rb +52 -0
- data/lib/gdal/utils/grid.rb +72 -0
- data/lib/gdal/utils/helpers/dataset_list.rb +43 -0
- data/lib/gdal/utils/helpers/string_list.rb +47 -0
- data/lib/gdal/utils/helpers.rb +11 -0
- data/lib/gdal/utils/info/options.rb +52 -0
- data/lib/gdal/utils/info.rb +40 -0
- data/lib/gdal/utils/nearblack/options.rb +52 -0
- data/lib/gdal/utils/nearblack.rb +119 -0
- data/lib/gdal/utils/rasterize/options.rb +52 -0
- data/lib/gdal/utils/rasterize.rb +108 -0
- data/lib/gdal/utils/translate/options.rb +52 -0
- data/lib/gdal/utils/translate.rb +72 -0
- data/lib/gdal/utils/vector_translate/options.rb +52 -0
- data/lib/gdal/utils/vector_translate.rb +132 -0
- data/lib/gdal/utils/warp/options.rb +52 -0
- data/lib/gdal/utils/warp.rb +118 -0
- data/lib/gdal/utils.rb +22 -0
- data/lib/gdal/warp_options.rb +11 -2
- data/lib/gdal.rb +1 -0
- data/lib/ogr/extensions/layer/extensions.rb +1 -1
- data/lib/ogr/extensions/spatial_reference/extensions.rb +4 -4
- data/lib/ogr/geometry.rb +1 -6
- data/lib/ogr/layer.rb +1 -1
- data/lib/ogr/spatial_reference.rb +27 -2
- metadata +32 -5
- data/.ruby-version +0 -1
- data/lib/gdal/grid_algorithms/data_metrics_base.rb +0 -14
@@ -0,0 +1,984 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
require "ffi"
|
4
|
+
require_relative "../../ext/ffi_library_function_checks"
|
5
|
+
|
6
|
+
module FFI
|
7
|
+
module GDAL
|
8
|
+
module Utils
|
9
|
+
extend FFI::Library
|
10
|
+
ffi_lib [::FFI::CURRENT_PROCESS, ::FFI::GDAL.gdal_library_path]
|
11
|
+
|
12
|
+
# -----------------------------------------------------------------------
|
13
|
+
# Typedefs
|
14
|
+
# -----------------------------------------------------------------------
|
15
|
+
|
16
|
+
##############################################
|
17
|
+
### Common arguments for utility functions ###
|
18
|
+
##############################################
|
19
|
+
|
20
|
+
# GDALDatasetH -- the dataset handle (typical result of GDAL Utils).
|
21
|
+
typedef FFI::GDAL::GDAL.find_type(:GDALDatasetH), :GDALDatasetH
|
22
|
+
|
23
|
+
# papszArgv -- NULL terminated list of options (potentially including filename and open options too), or NULL.
|
24
|
+
# The accepted options are the ones of the according gdal* utility.
|
25
|
+
typedef :pointer, :papszArgv
|
26
|
+
|
27
|
+
# psOptionsForBinary -- (output) may be NULL (and should generally be NULL).
|
28
|
+
# NOTE: We don't use it in the Ruby-fied API. Keeping for documentation purposes.
|
29
|
+
typedef :pointer, :psOptionsForBinary
|
30
|
+
|
31
|
+
# pszDest -- the destination dataset path.
|
32
|
+
typedef :string, :pszDest
|
33
|
+
|
34
|
+
# hDataset -- the dataset handle.
|
35
|
+
typedef :GDALDatasetH, :hDataset
|
36
|
+
|
37
|
+
# hSrcDataset -- the source dataset handle
|
38
|
+
typedef :GDALDatasetH, :hSrcDataset
|
39
|
+
|
40
|
+
# hDstDS -- the destination dataset handle.
|
41
|
+
typedef :GDALDatasetH, :hDstDS
|
42
|
+
|
43
|
+
# nSrcCount -- the number of input datasets.
|
44
|
+
typedef :int, :nSrcCount
|
45
|
+
|
46
|
+
# pahSrcDS -- the list of input datasets.
|
47
|
+
typedef :pointer, :pahSrcDS
|
48
|
+
|
49
|
+
# pszProcessing -- the processing to apply
|
50
|
+
# (one of "hillshade", "slope", "aspect", "color-relief", "TRI", "TPI", "Roughness")
|
51
|
+
# NOTE: Only used by GDALDEMProcessing.
|
52
|
+
typedef :string, :pszProcessing
|
53
|
+
|
54
|
+
# pszColorFilename -- color file (mandatory for "color-relief" processing, should be NULL otherwise)
|
55
|
+
# NOTE: Only used by GDALDEMProcessing.
|
56
|
+
typedef :string, :pszColorFilename
|
57
|
+
|
58
|
+
# pbUsageError -- pointer to a integer output variable to store if any usage error has occurred or NULL.
|
59
|
+
typedef :pointer, :pbUsageError
|
60
|
+
|
61
|
+
########################################
|
62
|
+
### Pointers to GDAL Options Structs ###
|
63
|
+
########################################
|
64
|
+
|
65
|
+
# https://gdal.org/api/gdal_utils.html#_CPPv415GDALInfoOptions
|
66
|
+
typedef :pointer, :GDALInfoOptions
|
67
|
+
|
68
|
+
# https://gdal.org/api/gdal_utils.html#_CPPv420GDALTranslateOptions
|
69
|
+
typedef :pointer, :GDALTranslateOptions
|
70
|
+
|
71
|
+
# https://gdal.org/api/gdal_utils.html#_CPPv418GDALWarpAppOptions
|
72
|
+
typedef :pointer, :GDALWarpAppOptions
|
73
|
+
|
74
|
+
# # https://gdal.org/api/gdal_utils.html#_CPPv426GDALVectorTranslateOptions
|
75
|
+
typedef :pointer, :GDALVectorTranslateOptions
|
76
|
+
|
77
|
+
# # https://gdal.org/api/gdal_utils.html#_CPPv424GDALDEMProcessingOptions
|
78
|
+
typedef :pointer, :GDALDEMProcessingOptions
|
79
|
+
|
80
|
+
# # https://gdal.org/api/gdal_utils.html#_CPPv420GDALNearblackOptions
|
81
|
+
typedef :pointer, :GDALNearblackOptions
|
82
|
+
|
83
|
+
# # https://gdal.org/api/gdal_utils.html#_CPPv415GDALGridOptions
|
84
|
+
typedef :pointer, :GDALGridOptions
|
85
|
+
|
86
|
+
# # https://gdal.org/api/gdal_utils.html#_CPPv420GDALRasterizeOptions
|
87
|
+
typedef :pointer, :GDALRasterizeOptions
|
88
|
+
|
89
|
+
# # https://gdal.org/api/gdal_utils.html#_CPPv420GDALFootprintOptions
|
90
|
+
typedef :pointer, :GDALFootprintOptions
|
91
|
+
|
92
|
+
# # https://gdal.org/api/gdal_utils.html#_CPPv419GDALBuildVRTOptions
|
93
|
+
typedef :pointer, :GDALBuildVRTOptions
|
94
|
+
|
95
|
+
# https://gdal.org/api/gdal_utils.html#_CPPv423GDALMultiDimInfoOptions
|
96
|
+
typedef :pointer, :GDALMultiDimInfoOptions
|
97
|
+
|
98
|
+
# https://gdal.org/api/gdal_utils.html#_CPPv428GDALMultiDimTranslateOptions
|
99
|
+
typedef :pointer, :GDALMultiDimTranslateOptions
|
100
|
+
|
101
|
+
# https://gdal.org/api/gdal_utils.html#_CPPv421GDALVectorInfoOptions
|
102
|
+
typedef :pointer, :GDALVectorInfoOptions
|
103
|
+
|
104
|
+
# https://gdal.org/api/gdal_utils.html#_CPPv420GDALTileIndexOptions
|
105
|
+
typedef :pointer, :GDALTileIndexOptions
|
106
|
+
|
107
|
+
# -----------------------------------------------------------------------
|
108
|
+
# Functions
|
109
|
+
# -----------------------------------------------------------------------
|
110
|
+
|
111
|
+
################
|
112
|
+
### GDALInfo ###
|
113
|
+
################
|
114
|
+
|
115
|
+
# https://gdal.org/api/gdal_utils.html#_CPPv418GDALInfoOptionsNewPPcP24GDALInfoOptionsForBinary
|
116
|
+
# GDALInfoOptions *GDALInfoOptionsNew(char **papszArgv, GDALInfoOptionsForBinary *psOptionsForBinary)
|
117
|
+
#
|
118
|
+
# Allocates a GDALInfoOptions struct.
|
119
|
+
#
|
120
|
+
# Since
|
121
|
+
# GDAL 2.1
|
122
|
+
# Parameters:
|
123
|
+
# papszArgv -- NULL terminated list of options (potentially including filename and open options too), or NULL.
|
124
|
+
# The accepted options are the ones of the gdalinfo utility.
|
125
|
+
# psOptionsForBinary -- (output) may be NULL (and should generally be NULL), otherwise (gdalinfo_bin.cpp
|
126
|
+
# use case) must be allocated with GDALInfoOptionsForBinaryNew() prior to this function.
|
127
|
+
# Will be filled with potentially present filename, open options, subdataset number...
|
128
|
+
# Returns:
|
129
|
+
# pointer to the allocated GDALInfoOptions struct. Must be freed with GDALInfoOptionsFree().
|
130
|
+
attach_function :GDALInfoOptionsNew, %i[papszArgv psOptionsForBinary], :GDALInfoOptions
|
131
|
+
|
132
|
+
# https://gdal.org/api/gdal_utils.html#_CPPv419GDALInfoOptionsFreeP15GDALInfoOptions
|
133
|
+
# void GDALInfoOptionsFree(GDALInfoOptions *psOptions)
|
134
|
+
#
|
135
|
+
# Frees the GDALInfoOptions struct.
|
136
|
+
#
|
137
|
+
# Since
|
138
|
+
# GDAL 2.1
|
139
|
+
# Parameters:
|
140
|
+
# psOptions -- the options struct for GDALInfo().
|
141
|
+
attach_function :GDALInfoOptionsFree, [:GDALInfoOptions], :void
|
142
|
+
|
143
|
+
# https://gdal.org/api/gdal_utils.html#_CPPv48GDALInfo12GDALDatasetHPK15GDALInfoOptions
|
144
|
+
# char *GDALInfo(GDALDatasetH hDataset, const GDALInfoOptions *psOptions)
|
145
|
+
#
|
146
|
+
# Lists various information about a GDAL supported raster dataset.
|
147
|
+
# This is the equivalent of the gdalinfo utility.
|
148
|
+
# GDALInfoOptions* must be allocated and freed with GDALInfoOptionsNew() and GDALInfoOptionsFree() respectively.
|
149
|
+
#
|
150
|
+
# Since
|
151
|
+
# GDAL 2.1
|
152
|
+
# Parameters:
|
153
|
+
# hDataset -- the dataset handle.
|
154
|
+
# psOptions -- the options structure returned by GDALInfoOptionsNew() or NULL.
|
155
|
+
# Returns:
|
156
|
+
# string corresponding to the information about the raster dataset (must be freed with CPLFree()), or NULL
|
157
|
+
# in case of error.
|
158
|
+
attach_function :GDALInfo,
|
159
|
+
%i[hDataset GDALInfoOptions],
|
160
|
+
:strptr
|
161
|
+
|
162
|
+
#####################
|
163
|
+
### GDALTranslate ###
|
164
|
+
#####################
|
165
|
+
|
166
|
+
# https://gdal.org/api/gdal_utils.html#_CPPv423GDALTranslateOptionsNewPPcP29GDALTranslateOptionsForBinary
|
167
|
+
# GDALTranslateOptions *GDALTranslateOptionsNew(
|
168
|
+
# char **papszArgv,
|
169
|
+
# GDALTranslateOptionsForBinary *psOptionsForBinary
|
170
|
+
# )
|
171
|
+
#
|
172
|
+
# Allocates a GDALTranslateOptions struct.
|
173
|
+
#
|
174
|
+
# Since
|
175
|
+
# GDAL 2.1
|
176
|
+
# Parameters:
|
177
|
+
# papszArgv -- NULL terminated list of options (potentially including filename and open options too), or NULL.
|
178
|
+
# The accepted options are the ones of the gdal_translate utility.
|
179
|
+
# psOptionsForBinary -- (output) may be NULL (and should generally be NULL), otherwise (gdal_translate_bin.cpp
|
180
|
+
# use case) must be allocated with GDALTranslateOptionsForBinaryNew() prior to this function.
|
181
|
+
# Will be filled with potentially present filename, open options,...
|
182
|
+
# Returns:
|
183
|
+
# pointer to the allocated GDALTranslateOptions struct. Must be freed with GDALTranslateOptionsFree().
|
184
|
+
attach_function :GDALTranslateOptionsNew, %i[papszArgv psOptionsForBinary], :GDALTranslateOptions
|
185
|
+
|
186
|
+
# https://gdal.org/api/gdal_utils.html#_CPPv424GDALTranslateOptionsFreeP20GDALTranslateOptions
|
187
|
+
# void GDALTranslateOptionsFree(GDALTranslateOptions *psOptions)
|
188
|
+
#
|
189
|
+
# Frees the GDALTranslateOptions struct.
|
190
|
+
#
|
191
|
+
# Since
|
192
|
+
# GDAL 2.1
|
193
|
+
# Parameters:
|
194
|
+
# psOptions -- the options struct for GDALTranslate().
|
195
|
+
attach_function :GDALTranslateOptionsFree, [:GDALTranslateOptions], :void
|
196
|
+
|
197
|
+
# https://gdal.org/api/gdal_utils.html#_CPPv413GDALTranslatePKc12GDALDatasetHPK20GDALTranslateOptionsPi
|
198
|
+
# GDALDatasetH GDALTranslate(
|
199
|
+
# const char *pszDestFilename,
|
200
|
+
# GDALDatasetH hSrcDataset,
|
201
|
+
# const GDALTranslateOptions *psOptions,
|
202
|
+
# int *pbUsageError
|
203
|
+
# )
|
204
|
+
#
|
205
|
+
# Converts raster data between different formats.
|
206
|
+
# This is the equivalent of the gdal_translate utility.
|
207
|
+
# GDALTranslateOptions* must be allocated and freed with GDALTranslateOptionsNew() and
|
208
|
+
# GDALTranslateOptionsFree() respectively.
|
209
|
+
#
|
210
|
+
# Since
|
211
|
+
# GDAL 2.1
|
212
|
+
# Parameters:
|
213
|
+
# pszDest -- the destination dataset path.
|
214
|
+
# hSrcDataset -- the source dataset handle.
|
215
|
+
# psOptionsIn -- the options struct returned by GDALTranslateOptionsNew() or NULL.
|
216
|
+
# pbUsageError -- pointer to a integer output variable to store if any usage error has occurred or NULL.
|
217
|
+
# Returns:
|
218
|
+
# the output dataset (new dataset that must be closed using GDALClose()) or NULL in case of error.
|
219
|
+
# If the output format is a VRT dataset, then the returned VRT dataset has a reference to hSrcDataset.
|
220
|
+
# Hence hSrcDataset should be closed after the returned dataset if using GDALClose().
|
221
|
+
# A safer alternative is to use GDALReleaseDataset() instead of using GDALClose(),
|
222
|
+
# in which case you can close datasets in any order.
|
223
|
+
attach_function :GDALTranslate,
|
224
|
+
%i[pszDest hSrcDataset GDALTranslateOptions pbUsageError],
|
225
|
+
:GDALDatasetH
|
226
|
+
|
227
|
+
################
|
228
|
+
### GDALWarp ###
|
229
|
+
################
|
230
|
+
|
231
|
+
# https://gdal.org/api/gdal_utils.html#_CPPv421GDALWarpAppOptionsNewPPcP27GDALWarpAppOptionsForBinary
|
232
|
+
# GDALWarpAppOptions *GDALWarpAppOptionsNew(char **papszArgv, GDALWarpAppOptionsForBinary *psOptionsForBinary)
|
233
|
+
#
|
234
|
+
# Allocates a GDALWarpAppOptions struct.
|
235
|
+
#
|
236
|
+
# Since
|
237
|
+
# GDAL 2.1
|
238
|
+
# Parameters:
|
239
|
+
# papszArgv -- NULL terminated list of options (potentially including filename and open options too), or NULL.
|
240
|
+
# The accepted options are the ones of the gdalwarp utility.
|
241
|
+
# psOptionsForBinary -- (output) may be NULL (and should generally be NULL), otherwise (gdal_translate_bin.cpp
|
242
|
+
# use case) must be allocated with GDALWarpAppOptionsForBinaryNew() prior to this function.
|
243
|
+
# Will be filled with potentially present filename, open options,...
|
244
|
+
# Returns:
|
245
|
+
# pointer to the allocated GDALWarpAppOptions struct. Must be freed with GDALWarpAppOptionsFree().
|
246
|
+
attach_function :GDALWarpAppOptionsNew, %i[papszArgv psOptionsForBinary], :GDALWarpAppOptions
|
247
|
+
|
248
|
+
# https://gdal.org/api/gdal_utils.html#_CPPv422GDALWarpAppOptionsFreeP18GDALWarpAppOptions
|
249
|
+
# void GDALWarpAppOptionsFree(GDALWarpAppOptions *psOptions)
|
250
|
+
#
|
251
|
+
# Frees the GDALWarpAppOptions struct.
|
252
|
+
#
|
253
|
+
# Since
|
254
|
+
# GDAL 2.1
|
255
|
+
# Parameters:
|
256
|
+
# psOptions -- the options struct for GDALWarp().
|
257
|
+
attach_function :GDALWarpAppOptionsFree, [:GDALWarpAppOptions], :void
|
258
|
+
|
259
|
+
# https://gdal.org/api/gdal_utils.html#_CPPv48GDALWarpPKc12GDALDatasetHiP12GDALDatasetHPK18GDALWarpAppOptionsPi
|
260
|
+
# GDALDatasetH GDALWarp(
|
261
|
+
# const char *pszDest,
|
262
|
+
# GDALDatasetH hDstDS,
|
263
|
+
# int nSrcCount,
|
264
|
+
# GDALDatasetH *pahSrcDS,
|
265
|
+
# const GDALWarpAppOptions *psOptions,
|
266
|
+
# int *pbUsageError
|
267
|
+
# )
|
268
|
+
#
|
269
|
+
# Image reprojection and warping function.
|
270
|
+
# This is the equivalent of the gdalwarp utility.
|
271
|
+
# GDALWarpAppOptions* must be allocated and freed with GDALWarpAppOptionsNew() and
|
272
|
+
# GDALWarpAppOptionsFree() respectively. pszDest and hDstDS cannot be used at the same time.
|
273
|
+
#
|
274
|
+
# Since
|
275
|
+
# GDAL 2.1
|
276
|
+
# Parameters:
|
277
|
+
# pszDest -- the destination dataset path or NULL.
|
278
|
+
# hDstDS -- the destination dataset or NULL.
|
279
|
+
# nSrcCount -- the number of input datasets.
|
280
|
+
# pahSrcDS -- the list of input datasets. For practical purposes, the type of this argument should be
|
281
|
+
# considered as "const GDALDatasetH* const*", that is neither the array nor its values are mutated by
|
282
|
+
# this function.
|
283
|
+
# psOptionsIn -- the options struct returned by GDALWarpAppOptionsNew() or NULL.
|
284
|
+
# pbUsageError -- pointer to a integer output variable to store if any usage error has occurred, or NULL.
|
285
|
+
# Returns:
|
286
|
+
# the output dataset (new dataset that must be closed using GDALClose(), or hDstDS if not NULL) or NULL
|
287
|
+
# in case of error. If the output format is a VRT dataset, then the returned VRT dataset has
|
288
|
+
# a reference to pahSrcDS[0]. Hence pahSrcDS[0] should be closed after the returned dataset if
|
289
|
+
# using GDALClose(). A safer alternative is to use GDALReleaseDataset() instead of using GDALClose(), in
|
290
|
+
# which case you can close datasets in any order.
|
291
|
+
attach_function :GDALWarp,
|
292
|
+
%i[pszDest hDstDS nSrcCount pahSrcDS GDALWarpAppOptions pbUsageError],
|
293
|
+
:GDALDatasetH
|
294
|
+
|
295
|
+
###########################
|
296
|
+
### GDALVectorTranslate ###
|
297
|
+
###########################
|
298
|
+
|
299
|
+
# https://gdal.org/api/gdal_utils.html#_CPPv429GDALVectorTranslateOptionsNewPPcP35GDALVectorTranslateOptionsForBinary
|
300
|
+
# GDALVectorTranslateOptions *GDALVectorTranslateOptionsNew(
|
301
|
+
# char **papszArgv,
|
302
|
+
# GDALVectorTranslateOptionsForBinary *psOptionsForBinary
|
303
|
+
# )
|
304
|
+
#
|
305
|
+
# Allocates a GDALVectorTranslateOptions struct.
|
306
|
+
#
|
307
|
+
# Since
|
308
|
+
# GDAL 2.1
|
309
|
+
# Parameters:
|
310
|
+
# papszArgv -- NULL terminated list of options (potentially including filename and open options too), or NULL.
|
311
|
+
# The accepted options are the ones of the ogr2ogr utility.
|
312
|
+
# psOptionsForBinary -- (output) may be NULL (and should generally be NULL), otherwise (gdal_translate_bin.cpp
|
313
|
+
# use case) must be allocated with GDALVectorTranslateOptionsForBinaryNew() prior to this function.
|
314
|
+
# Will be filled with potentially present filename, open options,...
|
315
|
+
# Returns:
|
316
|
+
# pointer to the allocated GDALVectorTranslateOptions struct. Must be freed with
|
317
|
+
# GDALVectorTranslateOptionsFree().
|
318
|
+
attach_function :GDALVectorTranslateOptionsNew, %i[papszArgv psOptionsForBinary], :GDALVectorTranslateOptions
|
319
|
+
|
320
|
+
# https://gdal.org/api/gdal_utils.html#_CPPv430GDALVectorTranslateOptionsFreeP26GDALVectorTranslateOptions
|
321
|
+
# void GDALVectorTranslateOptionsFree(GDALVectorTranslateOptions *psOptions)
|
322
|
+
#
|
323
|
+
# Frees the GDALVectorTranslateOptions struct.
|
324
|
+
#
|
325
|
+
# Since
|
326
|
+
# GDAL 2.1
|
327
|
+
# Parameters:
|
328
|
+
# psOptions -- the options struct for GDALVectorTranslate().
|
329
|
+
attach_function :GDALVectorTranslateOptionsFree, [:GDALVectorTranslateOptions], :void
|
330
|
+
|
331
|
+
# https://gdal.org/api/gdal_utils.html#_CPPv419GDALVectorTranslatePKc12GDALDatasetHiP12GDALDatasetHPK26GDALVectorTranslateOptionsPi
|
332
|
+
# GDALDatasetH GDALVectorTranslate(
|
333
|
+
# const char *pszDest,
|
334
|
+
# GDALDatasetH hDstDS,
|
335
|
+
# int nSrcCount,
|
336
|
+
# GDALDatasetH *pahSrcDS,
|
337
|
+
# const GDALVectorTranslateOptions *psOptions,
|
338
|
+
# int *pbUsageError
|
339
|
+
# )
|
340
|
+
#
|
341
|
+
# Converts vector data between file formats.
|
342
|
+
# This is the equivalent of the ogr2ogr utility.
|
343
|
+
# GDALVectorTranslateOptions* must be allocated and freed with GDALVectorTranslateOptionsNew() and
|
344
|
+
# GDALVectorTranslateOptionsFree() respectively. pszDest and hDstDS cannot be used at the same time.
|
345
|
+
#
|
346
|
+
# Since
|
347
|
+
# GDAL 2.1
|
348
|
+
# Parameters:
|
349
|
+
# pszDest -- the destination dataset path or NULL.
|
350
|
+
# hDstDS -- the destination dataset or NULL.
|
351
|
+
# nSrcCount -- the number of input datasets (only 1 supported currently)
|
352
|
+
# pahSrcDS -- the list of input datasets.
|
353
|
+
# psOptionsIn -- the options struct returned by GDALVectorTranslateOptionsNew() or NULL.
|
354
|
+
# pbUsageError -- pointer to a integer output variable to store if any usage error has occurred, or NULL.
|
355
|
+
# Returns:
|
356
|
+
# the output dataset (new dataset that must be closed using GDALClose(), or hDstDS is not NULL) or NULL
|
357
|
+
# in case of error.
|
358
|
+
attach_function :GDALVectorTranslate,
|
359
|
+
%i[pszDest hDstDS nSrcCount pahSrcDS GDALVectorTranslateOptions pbUsageError],
|
360
|
+
:GDALDatasetH
|
361
|
+
|
362
|
+
#########################
|
363
|
+
### GDALDEMProcessing ###
|
364
|
+
#########################
|
365
|
+
|
366
|
+
# https://gdal.org/api/gdal_utils.html#_CPPv427GDALDEMProcessingOptionsNewPPcP33GDALDEMProcessingOptionsForBinary
|
367
|
+
# GDALDEMProcessingOptions *GDALDEMProcessingOptionsNew(
|
368
|
+
# char **papszArgv,
|
369
|
+
# GDALDEMProcessingOptionsForBinary *psOptionsForBinary
|
370
|
+
# )
|
371
|
+
#
|
372
|
+
# Allocates a GDALDEMProcessingOptions struct.
|
373
|
+
#
|
374
|
+
# Since
|
375
|
+
# GDAL 2.1
|
376
|
+
# Parameters:
|
377
|
+
# papszArgv -- NULL terminated list of options (potentially including filename and open options too), or NULL.
|
378
|
+
# The accepted options are the ones of the gdaldem utility.
|
379
|
+
# psOptionsForBinary -- (output) may be NULL (and should generally be NULL), otherwise (gdal_translate_bin.cpp
|
380
|
+
# use case) must be allocated with GDALDEMProcessingOptionsForBinaryNew() prior to this function.
|
381
|
+
# Will be filled with potentially present filename, open options,...
|
382
|
+
# Returns:
|
383
|
+
# pointer to the allocated GDALDEMProcessingOptions struct. Must be freed with GDALDEMProcessingOptionsFree().
|
384
|
+
attach_function :GDALDEMProcessingOptionsNew, %i[papszArgv psOptionsForBinary], :GDALDEMProcessingOptions
|
385
|
+
|
386
|
+
# https://gdal.org/api/gdal_utils.html#_CPPv428GDALDEMProcessingOptionsFreeP24GDALDEMProcessingOptions
|
387
|
+
# void GDALDEMProcessingOptionsFree(GDALDEMProcessingOptions *psOptions)
|
388
|
+
#
|
389
|
+
# Frees the GDALDEMProcessingOptions struct.
|
390
|
+
#
|
391
|
+
# Since
|
392
|
+
# GDAL 2.1
|
393
|
+
# Parameters:
|
394
|
+
# psOptions -- the options struct for GDALDEMProcessing().
|
395
|
+
attach_function :GDALDEMProcessingOptionsFree, [:GDALDEMProcessingOptions], :void
|
396
|
+
|
397
|
+
# https://gdal.org/api/gdal_utils.html#_CPPv417GDALDEMProcessingPKc12GDALDatasetHPKcPKcPK24GDALDEMProcessingOptionsPi
|
398
|
+
# GDALDatasetH GDALDEMProcessing(
|
399
|
+
# const char *pszDestFilename,
|
400
|
+
# GDALDatasetH hSrcDataset,
|
401
|
+
# const char *pszProcessing,
|
402
|
+
# const char *pszColorFilename,
|
403
|
+
# const GDALDEMProcessingOptions *psOptions,
|
404
|
+
# int *pbUsageError
|
405
|
+
# )
|
406
|
+
#
|
407
|
+
# Apply a DEM processing.
|
408
|
+
# This is the equivalent of the gdaldem utility.
|
409
|
+
# GDALDEMProcessingOptions* must be allocated and freed with GDALDEMProcessingOptionsNew() and
|
410
|
+
# GDALDEMProcessingOptionsFree() respectively.
|
411
|
+
#
|
412
|
+
# Since
|
413
|
+
# GDAL 2.1
|
414
|
+
# Parameters:
|
415
|
+
# pszDest -- the destination dataset path.
|
416
|
+
# hSrcDataset -- the source dataset handle.
|
417
|
+
# pszProcessing -- the processing to apply (one of "hillshade", "slope", "aspect", "color-relief", "TRI",
|
418
|
+
# "TPI", "Roughness")
|
419
|
+
# pszColorFilename -- color file (mandatory for "color-relief" processing, should be NULL otherwise)
|
420
|
+
# psOptionsIn -- the options struct returned by GDALDEMProcessingOptionsNew() or NULL.
|
421
|
+
# pbUsageError -- pointer to a integer output variable to store if any usage error has occurred or NULL.
|
422
|
+
# Returns:
|
423
|
+
# the output dataset (new dataset that must be closed using GDALClose()) or NULL in case of error.
|
424
|
+
attach_function :GDALDEMProcessing,
|
425
|
+
%i[pszDest hSrcDataset pszProcessing pszColorFilename GDALDEMProcessingOptions pbUsageError],
|
426
|
+
:GDALDatasetH
|
427
|
+
|
428
|
+
#####################
|
429
|
+
### GDALNearblack ###
|
430
|
+
#####################
|
431
|
+
|
432
|
+
# https://gdal.org/api/gdal_utils.html#_CPPv423GDALNearblackOptionsNewPPcP29GDALNearblackOptionsForBinary
|
433
|
+
# GDALNearblackOptions *GDALNearblackOptionsNew(
|
434
|
+
# char **papszArgv,
|
435
|
+
# GDALNearblackOptionsForBinary *psOptionsForBinary
|
436
|
+
# )
|
437
|
+
#
|
438
|
+
# Allocates a GDALNearblackOptions struct.
|
439
|
+
#
|
440
|
+
# Since
|
441
|
+
# GDAL 2.1
|
442
|
+
# Parameters:
|
443
|
+
# papszArgv -- NULL terminated list of options (potentially including filename and open options too), or NULL.
|
444
|
+
# The accepted options are the ones of the nearblack utility.
|
445
|
+
# psOptionsForBinary -- (output) may be NULL (and should generally be NULL), otherwise (gdal_translate_bin.cpp
|
446
|
+
# use case) must be allocated with GDALNearblackOptionsForBinaryNew() prior to this function.
|
447
|
+
# Will be filled with potentially present filename, open options,...
|
448
|
+
# Returns:
|
449
|
+
# pointer to the allocated GDALNearblackOptions struct. Must be freed with GDALNearblackOptionsFree().
|
450
|
+
attach_function :GDALNearblackOptionsNew, %i[papszArgv psOptionsForBinary], :GDALNearblackOptions
|
451
|
+
|
452
|
+
# https://gdal.org/api/gdal_utils.html#_CPPv424GDALNearblackOptionsFreeP20GDALNearblackOptions
|
453
|
+
# void GDALNearblackOptionsFree(GDALNearblackOptions *psOptions)
|
454
|
+
#
|
455
|
+
# Frees the GDALNearblackOptions struct.
|
456
|
+
#
|
457
|
+
# Since
|
458
|
+
# GDAL 2.1
|
459
|
+
# Parameters:
|
460
|
+
# psOptions -- the options struct for GDALNearblack().
|
461
|
+
attach_function :GDALNearblackOptionsFree, [:GDALNearblackOptions], :void
|
462
|
+
|
463
|
+
# https://gdal.org/api/gdal_utils.html#_CPPv413GDALNearblackPKc12GDALDatasetH12GDALDatasetHPK20GDALNearblackOptionsPi
|
464
|
+
# GDALDatasetH GDALNearblack(
|
465
|
+
# const char *pszDest,
|
466
|
+
# GDALDatasetH hDstDS,
|
467
|
+
# GDALDatasetH hSrcDS,
|
468
|
+
# const GDALNearblackOptions *psOptions,
|
469
|
+
# int *pbUsageError
|
470
|
+
# )
|
471
|
+
#
|
472
|
+
# Convert nearly black/white borders to exact value.
|
473
|
+
# This is the equivalent of the nearblack utility.
|
474
|
+
# GDALNearblackOptions* must be allocated and freed with GDALNearblackOptionsNew()
|
475
|
+
# and GDALNearblackOptionsFree() respectively. pszDest and hDstDS cannot be used at the same time.
|
476
|
+
# In-place update (i.e. hDstDS == hSrcDataset) is possible for formats that support it,
|
477
|
+
# and if the dataset is opened in update mode.
|
478
|
+
#
|
479
|
+
# Since
|
480
|
+
# GDAL 2.1
|
481
|
+
# Parameters:
|
482
|
+
# pszDest -- the destination dataset path or NULL.
|
483
|
+
# hDstDS -- the destination dataset or NULL. Might be equal to hSrcDataset.
|
484
|
+
# hSrcDataset -- the source dataset handle.
|
485
|
+
# psOptionsIn -- the options struct returned by GDALNearblackOptionsNew() or NULL.
|
486
|
+
# pbUsageError -- pointer to a integer output variable to store if any usage error has occurred or NULL.
|
487
|
+
# Returns:
|
488
|
+
# the output dataset (new dataset that must be closed using GDALClose(), or hDstDS when it is not NULL) or NULL
|
489
|
+
# in case of error.
|
490
|
+
attach_function :GDALNearblack,
|
491
|
+
%i[pszDest hDstDS hSrcDataset GDALNearblackOptions pbUsageError],
|
492
|
+
:GDALDatasetH
|
493
|
+
|
494
|
+
################
|
495
|
+
### GDALGrid ###
|
496
|
+
################
|
497
|
+
|
498
|
+
# https://gdal.org/api/gdal_utils.html#_CPPv418GDALGridOptionsNewPPcP24GDALGridOptionsForBinary
|
499
|
+
# GDALGridOptions *GDALGridOptionsNew(char **papszArgv, GDALGridOptionsForBinary *psOptionsForBinary)
|
500
|
+
#
|
501
|
+
# Allocates a GDALGridOptions struct.
|
502
|
+
#
|
503
|
+
# Since
|
504
|
+
# GDAL 2.1
|
505
|
+
# Parameters:
|
506
|
+
# papszArgv -- NULL terminated list of options (potentially including filename and open options too), or NULL.
|
507
|
+
# The accepted options are the ones of the gdal_translate utility.
|
508
|
+
# psOptionsForBinary -- (output) may be NULL (and should generally be NULL), otherwise (gdal_translate_bin.cpp
|
509
|
+
# use case) must be allocated with GDALGridOptionsForBinaryNew() prior to this function.
|
510
|
+
# Will be filled with potentially present filename, open options,...
|
511
|
+
# Returns:
|
512
|
+
# pointer to the allocated GDALGridOptions struct. Must be freed with GDALGridOptionsFree().
|
513
|
+
attach_function :GDALGridOptionsNew, %i[papszArgv psOptionsForBinary], :GDALGridOptions
|
514
|
+
|
515
|
+
# https://gdal.org/api/gdal_utils.html#_CPPv419GDALGridOptionsFreeP15GDALGridOptions
|
516
|
+
# void GDALGridOptionsFree(GDALGridOptions *psOptions)
|
517
|
+
#
|
518
|
+
# Frees the GDALGridOptions struct.
|
519
|
+
#
|
520
|
+
# Since
|
521
|
+
# GDAL 2.1
|
522
|
+
# Parameters:
|
523
|
+
# psOptions -- the options struct for GDALGrid().
|
524
|
+
attach_function :GDALGridOptionsFree, [:GDALGridOptions], :void
|
525
|
+
|
526
|
+
# https://gdal.org/api/gdal_utils.html#_CPPv48GDALGridPKc12GDALDatasetHPK15GDALGridOptionsPi
|
527
|
+
# GDALDatasetH GDALGrid(
|
528
|
+
# const char *pszDest,
|
529
|
+
# GDALDatasetH hSrcDS,
|
530
|
+
# const GDALGridOptions *psOptions,
|
531
|
+
# int *pbUsageError
|
532
|
+
# )
|
533
|
+
#
|
534
|
+
# Create raster from the scattered data.
|
535
|
+
# This is the equivalent of the gdal_grid utility.
|
536
|
+
# GDALGridOptions* must be allocated and freed with GDALGridOptionsNew() and GDALGridOptionsFree() respectively.
|
537
|
+
#
|
538
|
+
# Since
|
539
|
+
# GDAL 2.1
|
540
|
+
# Parameters:
|
541
|
+
# pszDest -- the destination dataset path.
|
542
|
+
# hSrcDataset -- the source dataset handle.
|
543
|
+
# psOptionsIn -- the options struct returned by GDALGridOptionsNew() or NULL.
|
544
|
+
# pbUsageError -- pointer to a integer output variable to store if any usage error has occurred or NULL.
|
545
|
+
# Returns:
|
546
|
+
# the output dataset (new dataset that must be closed using GDALClose()) or NULL in case of error.
|
547
|
+
attach_function :GDALGrid,
|
548
|
+
%i[pszDest hSrcDataset GDALGridOptions pbUsageError],
|
549
|
+
:GDALDatasetH
|
550
|
+
|
551
|
+
#####################
|
552
|
+
### GDALRasterize ###
|
553
|
+
#####################
|
554
|
+
|
555
|
+
# https://gdal.org/api/gdal_utils.html#_CPPv423GDALRasterizeOptionsNewPPcP29GDALRasterizeOptionsForBinary
|
556
|
+
# GDALRasterizeOptions *GDALRasterizeOptionsNew(
|
557
|
+
# char **papszArgv,
|
558
|
+
# GDALRasterizeOptionsForBinary *psOptionsForBinary
|
559
|
+
# )
|
560
|
+
#
|
561
|
+
# Allocates a GDALRasterizeOptions struct.
|
562
|
+
#
|
563
|
+
# Since
|
564
|
+
# GDAL 2.1
|
565
|
+
# Parameters:
|
566
|
+
# papszArgv -- NULL terminated list of options (potentially including filename and open options too), or NULL.
|
567
|
+
# The accepted options are the ones of the gdal_rasterize utility.
|
568
|
+
# psOptionsForBinary -- (output) may be NULL (and should generally be NULL), otherwise (gdal_translate_bin.cpp
|
569
|
+
# use case) must be allocated with GDALRasterizeOptionsForBinaryNew() prior to this function.
|
570
|
+
# Will be filled with potentially present filename, open options,...
|
571
|
+
# Returns:
|
572
|
+
# pointer to the allocated GDALRasterizeOptions struct. Must be freed with GDALRasterizeOptionsFree().
|
573
|
+
attach_function :GDALRasterizeOptionsNew, %i[papszArgv psOptionsForBinary], :GDALRasterizeOptions
|
574
|
+
|
575
|
+
# https://gdal.org/api/gdal_utils.html#_CPPv424GDALRasterizeOptionsFreeP20GDALRasterizeOptions
|
576
|
+
# void GDALRasterizeOptionsFree(GDALRasterizeOptions *psOptions)
|
577
|
+
#
|
578
|
+
# Frees the GDALRasterizeOptions struct.
|
579
|
+
#
|
580
|
+
# Since
|
581
|
+
# GDAL 2.1
|
582
|
+
# Parameters:
|
583
|
+
# psOptions -- the options struct for GDALRasterize().
|
584
|
+
attach_function :GDALRasterizeOptionsFree, [:GDALRasterizeOptions], :void
|
585
|
+
|
586
|
+
# https://gdal.org/api/gdal_utils.html#_CPPv413GDALRasterizePKc12GDALDatasetH12GDALDatasetHPK20GDALRasterizeOptionsPi
|
587
|
+
# GDALDatasetH GDALRasterize(
|
588
|
+
# const char *pszDest,
|
589
|
+
# GDALDatasetH hDstDS,
|
590
|
+
# GDALDatasetH hSrcDS,
|
591
|
+
# const GDALRasterizeOptions *psOptions,
|
592
|
+
# int *pbUsageError
|
593
|
+
# )
|
594
|
+
#
|
595
|
+
# Burns vector geometries into a raster.
|
596
|
+
# This is the equivalent of the gdal_rasterize utility.
|
597
|
+
# GDALRasterizeOptions* must be allocated and freed with GDALRasterizeOptionsNew() and
|
598
|
+
# GDALRasterizeOptionsFree() respectively. pszDest and hDstDS cannot be used at the same time.
|
599
|
+
#
|
600
|
+
# Since
|
601
|
+
# GDAL 2.1
|
602
|
+
# Parameters:
|
603
|
+
# pszDest -- the destination dataset path or NULL.
|
604
|
+
# hDstDS -- the destination dataset or NULL.
|
605
|
+
# hSrcDataset -- the source dataset handle.
|
606
|
+
# psOptionsIn -- the options struct returned by GDALRasterizeOptionsNew() or NULL.
|
607
|
+
# pbUsageError -- pointer to a integer output variable to store if any usage error has occurred or NULL.
|
608
|
+
# Returns:
|
609
|
+
# the output dataset (new dataset that must be closed using GDALClose(), or hDstDS is not NULL) or NULL
|
610
|
+
# in case of error.
|
611
|
+
attach_function :GDALRasterize,
|
612
|
+
%i[pszDest hDstDS hSrcDataset GDALRasterizeOptions pbUsageError],
|
613
|
+
:GDALDatasetH
|
614
|
+
|
615
|
+
#####################
|
616
|
+
### GDALFootprint ###
|
617
|
+
#####################
|
618
|
+
|
619
|
+
# https://gdal.org/api/gdal_utils.html#_CPPv423GDALFootprintOptionsNewPPcP29GDALFootprintOptionsForBinary
|
620
|
+
# GDALFootprintOptions *GDALFootprintOptionsNew(
|
621
|
+
# char **papszArgv,
|
622
|
+
# GDALFootprintOptionsForBinary *psOptionsForBinary
|
623
|
+
# )
|
624
|
+
#
|
625
|
+
# Allocates a GDALFootprintOptions struct.
|
626
|
+
#
|
627
|
+
# Since
|
628
|
+
# GDAL 3.8
|
629
|
+
# Parameters:
|
630
|
+
# papszArgv -- NULL terminated list of options (potentially including filename and open options too), or NULL.
|
631
|
+
# The accepted options are the ones of the gdal_rasterize utility.
|
632
|
+
# psOptionsForBinary -- (output) may be NULL (and should generally be NULL), otherwise (gdal_translate_bin.cpp
|
633
|
+
# use case) must be allocated with GDALFootprintOptionsForBinaryNew() prior to this function.
|
634
|
+
# Will be filled with potentially present filename, open options,...
|
635
|
+
# Returns:
|
636
|
+
# pointer to the allocated GDALFootprintOptions struct. Must be freed with GDALFootprintOptionsFree().
|
637
|
+
attach_function :GDALFootprintOptionsNew, %i[papszArgv psOptionsForBinary], :GDALFootprintOptions
|
638
|
+
|
639
|
+
# https://gdal.org/api/gdal_utils.html#_CPPv424GDALFootprintOptionsFreeP20GDALFootprintOptions
|
640
|
+
# void GDALFootprintOptionsFree(GDALFootprintOptions *psOptions)
|
641
|
+
#
|
642
|
+
# Frees the GDALFootprintOptions struct.
|
643
|
+
#
|
644
|
+
# Since
|
645
|
+
# GDAL 3.8
|
646
|
+
# Parameters:
|
647
|
+
# psOptions -- the options struct for GDALFootprint().
|
648
|
+
attach_function :GDALFootprintOptionsFree, [:GDALFootprintOptions], :void
|
649
|
+
|
650
|
+
# https://gdal.org/api/gdal_utils.html#_CPPv413GDALFootprintPKc12GDALDatasetH12GDALDatasetHPK20GDALFootprintOptionsPi
|
651
|
+
# GDALDatasetH GDALFootprint(
|
652
|
+
# const char *pszDest,
|
653
|
+
# GDALDatasetH hDstDS,
|
654
|
+
# GDALDatasetH hSrcDS,
|
655
|
+
# const GDALFootprintOptions *psOptions,
|
656
|
+
# int *pbUsageError
|
657
|
+
# )
|
658
|
+
#
|
659
|
+
# Computes the footprint of a raster.
|
660
|
+
# This is the equivalent of the gdal_footprint utility.
|
661
|
+
# GDALFootprintOptions* must be allocated and freed with GDALFootprintOptionsNew() and
|
662
|
+
# GDALFootprintOptionsFree() respectively. pszDest and hDstDS cannot be used at the same time.
|
663
|
+
#
|
664
|
+
# Since
|
665
|
+
# GDAL 3.8
|
666
|
+
# Parameters:
|
667
|
+
# pszDest -- the vector destination dataset path or NULL.
|
668
|
+
# hDstDS -- the vector destination dataset or NULL.
|
669
|
+
# hSrcDataset -- the raster source dataset handle.
|
670
|
+
# psOptionsIn -- the options struct returned by GDALFootprintOptionsNew() or NULL.
|
671
|
+
# pbUsageError -- pointer to a integer output variable to store if any usage error has occurred or NULL.
|
672
|
+
# Returns:
|
673
|
+
# the output dataset (new dataset that must be closed using GDALClose(), or hDstDS is not NULL) or NULL
|
674
|
+
# in case of error.
|
675
|
+
attach_function :GDALFootprint,
|
676
|
+
%i[pszDest hDstDS hSrcDataset GDALFootprintOptions pbUsageError],
|
677
|
+
:GDALDatasetH
|
678
|
+
|
679
|
+
####################
|
680
|
+
### GDALBuildVRT ###
|
681
|
+
####################
|
682
|
+
|
683
|
+
# https://gdal.org/api/gdal_utils.html#_CPPv422GDALBuildVRTOptionsNewPPcP28GDALBuildVRTOptionsForBinary
|
684
|
+
# GDALBuildVRTOptions *GDALBuildVRTOptionsNew(char **papszArgv, GDALBuildVRTOptionsForBinary *psOptionsForBinary)
|
685
|
+
#
|
686
|
+
# Allocates a GDALBuildVRTOptions struct.
|
687
|
+
#
|
688
|
+
# Since
|
689
|
+
# GDAL 2.1
|
690
|
+
# Parameters:
|
691
|
+
# papszArgv -- NULL terminated list of options (potentially including filename and open options too), or NULL.
|
692
|
+
# The accepted options are the ones of the gdalbuildvrt utility.
|
693
|
+
# psOptionsForBinary -- (output) may be NULL (and should generally be NULL), otherwise (gdalbuildvrt_bin.cpp
|
694
|
+
# use case) must be allocated with GDALBuildVRTOptionsForBinaryNew() prior to this function.
|
695
|
+
# Will be filled with potentially present filename, open options,...
|
696
|
+
# Returns:
|
697
|
+
# pointer to the allocated GDALBuildVRTOptions struct. Must be freed with GDALBuildVRTOptionsFree().
|
698
|
+
attach_function :GDALBuildVRTOptionsNew, %i[papszArgv psOptionsForBinary], :GDALBuildVRTOptions
|
699
|
+
|
700
|
+
# https://gdal.org/api/gdal_utils.html#_CPPv423GDALBuildVRTOptionsFreeP19GDALBuildVRTOptions
|
701
|
+
# void GDALBuildVRTOptionsFree(GDALBuildVRTOptions *psOptions)
|
702
|
+
#
|
703
|
+
# Frees the GDALBuildVRTOptions struct.
|
704
|
+
#
|
705
|
+
# Since
|
706
|
+
# GDAL 2.1
|
707
|
+
# Parameters:
|
708
|
+
# psOptions -- the options struct for GDALBuildVRT().
|
709
|
+
attach_function :GDALBuildVRTOptionsFree, [:GDALBuildVRTOptions], :void
|
710
|
+
|
711
|
+
# https://gdal.org/api/gdal_utils.html#_CPPv412GDALBuildVRTPKciP12GDALDatasetHPPCKcPK19GDALBuildVRTOptionsPi
|
712
|
+
# GDALDatasetH GDALBuildVRT(
|
713
|
+
# const char *pszDest,
|
714
|
+
# int nSrcCount,
|
715
|
+
# GDALDatasetH *pahSrcDS,
|
716
|
+
# const char *const *papszSrcDSNames,
|
717
|
+
# const GDALBuildVRTOptions *psOptions,
|
718
|
+
# int *pbUsageError
|
719
|
+
# )
|
720
|
+
#
|
721
|
+
# Build a VRT from a list of datasets.
|
722
|
+
# This is the equivalent of the gdalbuildvrt utility.
|
723
|
+
# GDALBuildVRTOptions* must be allocated and freed with GDALBuildVRTOptionsNew()
|
724
|
+
# and GDALBuildVRTOptionsFree() respectively. pahSrcDS and papszSrcDSNames cannot be used at the same time.
|
725
|
+
#
|
726
|
+
# Since
|
727
|
+
# GDAL 2.1
|
728
|
+
# Parameters:
|
729
|
+
# pszDest -- the destination dataset path.
|
730
|
+
# nSrcCount -- the number of input datasets.
|
731
|
+
# pahSrcDS -- the list of input datasets (or NULL, exclusive with papszSrcDSNames).
|
732
|
+
# For practical purposes, the type of this argument should be considered as "const GDALDatasetH* const*",
|
733
|
+
# that is neither the array nor its values are mutated by this function.
|
734
|
+
# papszSrcDSNames -- the list of input dataset names (or NULL, exclusive with pahSrcDS)
|
735
|
+
# psOptionsIn -- the options struct returned by GDALBuildVRTOptionsNew() or NULL.
|
736
|
+
# pbUsageError -- pointer to a integer output variable to store if any usage error has occurred.
|
737
|
+
# Returns:
|
738
|
+
# the output dataset (new dataset that must be closed using GDALClose()) or NULL in case of error.
|
739
|
+
# If using pahSrcDS, the returned VRT dataset has a reference to each pahSrcDS[] element.
|
740
|
+
# Hence pahSrcDS[] elements should be closed after the returned dataset if using GDALClose().
|
741
|
+
# A safer alternative is to use GDALReleaseDataset() instead of using GDALClose(), in which case
|
742
|
+
# you can close datasets in any order.
|
743
|
+
attach_function :GDALBuildVRT,
|
744
|
+
%i[pszDest nSrcCount pahSrcDS pointer GDALBuildVRTOptions pbUsageError],
|
745
|
+
:GDALDatasetH
|
746
|
+
|
747
|
+
########################
|
748
|
+
### GDALMultiDimInfo ###
|
749
|
+
########################
|
750
|
+
|
751
|
+
# https://gdal.org/api/gdal_utils.html#_CPPv426GDALMultiDimInfoOptionsNewPPcP32GDALMultiDimInfoOptionsForBinary
|
752
|
+
# GDALMultiDimInfoOptions *GDALMultiDimInfoOptionsNew(
|
753
|
+
# char **papszArgv,
|
754
|
+
# GDALMultiDimInfoOptionsForBinary *psOptionsForBinary
|
755
|
+
# )
|
756
|
+
#
|
757
|
+
# Allocates a GDALMultiDimInfoOptions struct.
|
758
|
+
#
|
759
|
+
# Since
|
760
|
+
# GDAL 3.1
|
761
|
+
# Parameters:
|
762
|
+
# papszArgv -- NULL terminated list of options (potentially including filename and open options too), or NULL.
|
763
|
+
# The accepted options are the ones of the gdalmdiminfo utility.
|
764
|
+
# psOptionsForBinary -- should be nullptr, unless called from gdalmultidiminfo_bin.cpp
|
765
|
+
# Returns:
|
766
|
+
# pointer to the allocated GDALMultiDimInfoOptions struct. Must be freed with GDALMultiDimInfoOptionsFree().
|
767
|
+
attach_function :GDALMultiDimInfoOptionsNew, %i[papszArgv psOptionsForBinary], :GDALMultiDimInfoOptions
|
768
|
+
|
769
|
+
# https://gdal.org/api/gdal_utils.html#_CPPv427GDALMultiDimInfoOptionsFreeP23GDALMultiDimInfoOptions
|
770
|
+
# void GDALMultiDimInfoOptionsFree(GDALMultiDimInfoOptions *psOptions)
|
771
|
+
#
|
772
|
+
# Frees the GDALMultiDimInfoOptions struct.
|
773
|
+
#
|
774
|
+
# Since
|
775
|
+
# GDAL 3.1
|
776
|
+
# Parameters:
|
777
|
+
# psOptions -- the options struct for GDALMultiDimInfo().
|
778
|
+
attach_function :GDALMultiDimInfoOptionsFree, [:GDALMultiDimInfoOptions], :void
|
779
|
+
|
780
|
+
# https://gdal.org/api/gdal_utils.html#_CPPv416GDALMultiDimInfo12GDALDatasetHPK23GDALMultiDimInfoOptions
|
781
|
+
# char *GDALMultiDimInfo(GDALDatasetH hDataset, const GDALMultiDimInfoOptions *psOptions)
|
782
|
+
#
|
783
|
+
# Lists various information about a GDAL multidimensional dataset.
|
784
|
+
# This is the equivalent of the gdalmdiminfoutility.
|
785
|
+
# GDALMultiDimInfoOptions* must be allocated and freed with GDALMultiDimInfoOptionsNew() and
|
786
|
+
# GDALMultiDimInfoOptionsFree() respectively.
|
787
|
+
#
|
788
|
+
# Since
|
789
|
+
# GDAL 3.1
|
790
|
+
# Parameters:
|
791
|
+
# hDataset -- the dataset handle.
|
792
|
+
# psOptionsIn -- the options structure returned by GDALMultiDimInfoOptionsNew() or NULL.
|
793
|
+
# Returns:
|
794
|
+
# string corresponding to the information about the raster dataset (must be freed with CPLFree()), or NULL
|
795
|
+
# in case of error.
|
796
|
+
attach_function :GDALMultiDimInfo,
|
797
|
+
%i[hDataset GDALMultiDimInfoOptions],
|
798
|
+
:strptr
|
799
|
+
|
800
|
+
#############################
|
801
|
+
### GDALMultiDimTranslate ###
|
802
|
+
#############################
|
803
|
+
|
804
|
+
# https://gdal.org/api/gdal_utils.html#_CPPv431GDALMultiDimTranslateOptionsNewPPcP37GDALMultiDimTranslateOptionsForBinary
|
805
|
+
# GDALMultiDimTranslateOptions *GDALMultiDimTranslateOptionsNew(
|
806
|
+
# char **papszArgv,
|
807
|
+
# GDALMultiDimTranslateOptionsForBinary *psOptionsForBinary
|
808
|
+
# )
|
809
|
+
#
|
810
|
+
# Allocates a GDALMultiDimTranslateOptions struct.
|
811
|
+
#
|
812
|
+
# Since
|
813
|
+
# GDAL 3.1
|
814
|
+
# Parameters:
|
815
|
+
# papszArgv -- NULL terminated list of options (potentially including filename and open options too), or NULL.
|
816
|
+
# The accepted options are the ones of the gdalmdimtranslate utility.
|
817
|
+
# psOptionsForBinary -- should be nullptr, unless called from gdalmdimtranslate_bin.cpp
|
818
|
+
# Returns:
|
819
|
+
# pointer to the allocated GDALMultiDimTranslateOptions struct. Must be freed with
|
820
|
+
# GDALMultiDimTranslateOptionsFree().
|
821
|
+
attach_function :GDALMultiDimTranslateOptionsNew, %i[papszArgv psOptionsForBinary], :GDALMultiDimTranslateOptions
|
822
|
+
|
823
|
+
# https://gdal.org/api/gdal_utils.html#_CPPv432GDALMultiDimTranslateOptionsFreeP28GDALMultiDimTranslateOptions
|
824
|
+
# void GDALMultiDimTranslateOptionsFree(GDALMultiDimTranslateOptions *psOptions)
|
825
|
+
#
|
826
|
+
# Frees the GDALMultiDimTranslateOptions struct.
|
827
|
+
#
|
828
|
+
# Since
|
829
|
+
# GDAL 3.1
|
830
|
+
# Parameters:
|
831
|
+
# psOptions -- the options struct for GDALMultiDimTranslate().
|
832
|
+
attach_function :GDALMultiDimTranslateOptionsFree, [:GDALMultiDimTranslateOptions], :void
|
833
|
+
|
834
|
+
# https://gdal.org/api/gdal_utils.html#_CPPv421GDALMultiDimTranslatePKc12GDALDatasetHiP12GDALDatasetHPK28GDALMultiDimTranslateOptionsPi
|
835
|
+
# GDALDatasetH GDALMultiDimTranslate(
|
836
|
+
# const char *pszDest,
|
837
|
+
# GDALDatasetH hDstDataset,
|
838
|
+
# int nSrcCount,
|
839
|
+
# GDALDatasetH *pahSrcDS,
|
840
|
+
# const GDALMultiDimTranslateOptions *psOptions,
|
841
|
+
# int *pbUsageError
|
842
|
+
# )
|
843
|
+
#
|
844
|
+
# Converts raster data between different formats.
|
845
|
+
# This is the equivalent of the gdalmdimtranslate utility.
|
846
|
+
# GDALMultiDimTranslateOptions* must be allocated and freed with GDALMultiDimTranslateOptionsNew()
|
847
|
+
# and GDALMultiDimTranslateOptionsFree() respectively. pszDest and hDstDS cannot be used at the same time.
|
848
|
+
#
|
849
|
+
# Since
|
850
|
+
# GDAL 3.1
|
851
|
+
# Parameters:
|
852
|
+
# pszDest -- the destination dataset path or NULL.
|
853
|
+
# hDstDS -- the destination dataset or NULL.
|
854
|
+
# nSrcCount -- the number of input datasets.
|
855
|
+
# pahSrcDS -- the list of input datasets.
|
856
|
+
# psOptions -- the options struct returned by GDALMultiDimTranslateOptionsNew() or NULL.
|
857
|
+
# pbUsageError -- pointer to a integer output variable to store if any usage error has occurred or NULL.
|
858
|
+
# Returns:
|
859
|
+
# the output dataset (new dataset that must be closed using GDALClose(), or hDstDS is not NULL) or NULL
|
860
|
+
# in case of error.
|
861
|
+
attach_function :GDALMultiDimTranslate,
|
862
|
+
%i[pszDest hDstDS nSrcCount pahSrcDS GDALMultiDimTranslateOptions pbUsageError],
|
863
|
+
:GDALDatasetH
|
864
|
+
|
865
|
+
######################
|
866
|
+
### GDALVectorInfo ###
|
867
|
+
######################
|
868
|
+
|
869
|
+
# https://gdal.org/api/gdal_utils.html#_CPPv424GDALVectorInfoOptionsNewPPcP30GDALVectorInfoOptionsForBinary
|
870
|
+
# GDALVectorInfoOptions *GDALVectorInfoOptionsNew(
|
871
|
+
# char **papszArgv,
|
872
|
+
# GDALVectorInfoOptionsForBinary *psOptionsForBinary
|
873
|
+
# )
|
874
|
+
#
|
875
|
+
# Allocates a GDALVectorInfoOptions struct.
|
876
|
+
#
|
877
|
+
# Since
|
878
|
+
# GDAL 3.7
|
879
|
+
# Parameters:
|
880
|
+
# papszArgv -- NULL terminated list of options (potentially including filename and open options too), or NULL.
|
881
|
+
# The accepted options are the ones of the ogrinfo utility.
|
882
|
+
# psOptionsForBinary -- (output) may be NULL (and should generally be NULL), otherwise (ogrinfo_bin.cpp
|
883
|
+
# use case) must be allocated with GDALVectorInfoOptionsForBinaryNew() prior to this function.
|
884
|
+
# Will be filled with potentially present filename, open options, subdataset number...
|
885
|
+
# Returns:
|
886
|
+
# pointer to the allocated GDALVectorInfoOptions struct. Must be freed with GDALVectorInfoOptionsFree().
|
887
|
+
attach_function :GDALVectorInfoOptionsNew, %i[papszArgv psOptionsForBinary], :GDALVectorInfoOptions
|
888
|
+
|
889
|
+
# https://gdal.org/api/gdal_utils.html#_CPPv425GDALVectorInfoOptionsFreeP21GDALVectorInfoOptions
|
890
|
+
# void GDALVectorInfoOptionsFree(GDALVectorInfoOptions *psOptions)
|
891
|
+
#
|
892
|
+
# Frees the GDALVectorInfoOptions struct.
|
893
|
+
#
|
894
|
+
# Since
|
895
|
+
# GDAL 3.7
|
896
|
+
# Parameters:
|
897
|
+
# psOptions -- the options struct for GDALVectorInfo().
|
898
|
+
attach_function :GDALVectorInfoOptionsFree, [:GDALVectorInfoOptions], :void
|
899
|
+
|
900
|
+
# https://gdal.org/api/gdal_utils.html#_CPPv414GDALVectorInfo12GDALDatasetHPK21GDALVectorInfoOptions
|
901
|
+
# char *GDALVectorInfo(GDALDatasetH hDataset, const GDALVectorInfoOptions *psOptions)
|
902
|
+
#
|
903
|
+
# Lists various information about a GDAL supported vector dataset.
|
904
|
+
# This is the equivalent of the ogrinfo utility.
|
905
|
+
# GDALVectorInfoOptions* must be allocated and freed with GDALVectorInfoOptionsNew()
|
906
|
+
# and GDALVectorInfoOptionsFree() respectively.
|
907
|
+
#
|
908
|
+
# Since
|
909
|
+
# GDAL 3.7
|
910
|
+
# Parameters:
|
911
|
+
# hDataset -- the dataset handle.
|
912
|
+
# psOptions -- the options structure returned by GDALVectorInfoOptionsNew() or NULL.
|
913
|
+
# Returns:
|
914
|
+
# string corresponding to the information about the raster dataset (must be freed with CPLFree()), or NULL
|
915
|
+
# in case of error.
|
916
|
+
attach_function :GDALVectorInfo,
|
917
|
+
%i[hDataset GDALVectorInfoOptions],
|
918
|
+
:strptr
|
919
|
+
|
920
|
+
#####################
|
921
|
+
### GDALTileIndex ###
|
922
|
+
#####################
|
923
|
+
|
924
|
+
# https://gdal.org/api/gdal_utils.html#_CPPv423GDALTileIndexOptionsNewPPcP29GDALTileIndexOptionsForBinary
|
925
|
+
# GDALTileIndexOptions *GDALTileIndexOptionsNew(
|
926
|
+
# char **papszArgv,
|
927
|
+
# GDALTileIndexOptionsForBinary *psOptionsForBinary
|
928
|
+
# )
|
929
|
+
#
|
930
|
+
# Allocates a GDALTileIndexOptions struct.
|
931
|
+
#
|
932
|
+
# Since
|
933
|
+
# GDAL 3.9
|
934
|
+
# Parameters:
|
935
|
+
# papszArgv -- NULL terminated list of options (potentially including filename and open options too), or NULL.
|
936
|
+
# The accepted options are the ones of the gdaltindex utility.
|
937
|
+
# psOptionsForBinary -- (output) may be NULL (and should generally be NULL), otherwise (gdaltindex_bin.cpp
|
938
|
+
# use case) must be allocated with GDALTileIndexOptionsForBinaryNew() prior to this function.
|
939
|
+
# Will be filled with potentially present filename, open options,...
|
940
|
+
# Returns:
|
941
|
+
# pointer to the allocated GDALTileIndexOptions struct. Must be freed with GDALTileIndexOptionsFree().
|
942
|
+
attach_function :GDALTileIndexOptionsNew, %i[papszArgv psOptionsForBinary], :GDALTileIndexOptions
|
943
|
+
|
944
|
+
# https://gdal.org/api/gdal_utils.html#_CPPv424GDALTileIndexOptionsFreeP20GDALTileIndexOptions
|
945
|
+
# void GDALTileIndexOptionsFree(GDALTileIndexOptions *psOptions)
|
946
|
+
#
|
947
|
+
# Frees the GDALTileIndexOptions struct.
|
948
|
+
#
|
949
|
+
# Since
|
950
|
+
# GDAL 3.9
|
951
|
+
# Parameters:
|
952
|
+
# psOptions -- the options struct for GDALTileIndex().
|
953
|
+
attach_function :GDALTileIndexOptionsFree, [:GDALTileIndexOptions], :void
|
954
|
+
|
955
|
+
# https://gdal.org/api/gdal_utils.html#_CPPv413GDALTileIndexPKciPPCKcPK20GDALTileIndexOptionsPi
|
956
|
+
# GDALDatasetH GDALTileIndex(
|
957
|
+
# const char *pszDest,
|
958
|
+
# int nSrcCount,
|
959
|
+
# const char *const *papszSrcDSNames,
|
960
|
+
# const GDALTileIndexOptions *psOptions,
|
961
|
+
# int *pbUsageError
|
962
|
+
# )
|
963
|
+
#
|
964
|
+
# Build a tile index from a list of datasets.
|
965
|
+
# This is the equivalent of the gdaltindex utility.
|
966
|
+
# GDALTileIndexOptions* must be allocated and freed with GDALTileIndexOptionsNew()
|
967
|
+
# and GDALTileIndexOptionsFree() respectively.
|
968
|
+
#
|
969
|
+
# Since
|
970
|
+
# GDAL 3.9
|
971
|
+
# Parameters:
|
972
|
+
# pszDest -- the destination dataset path.
|
973
|
+
# nSrcCount -- the number of input datasets.
|
974
|
+
# papszSrcDSNames -- the list of input dataset names
|
975
|
+
# psOptionsIn -- the options struct returned by GDALTileIndexOptionsNew() or NULL.
|
976
|
+
# pbUsageError -- pointer to a integer output variable to store if any usage error has occurred.
|
977
|
+
# Returns:
|
978
|
+
# the output dataset (new dataset that must be closed using GDALClose()) or NULL in case of error.
|
979
|
+
attach_function :GDALTileIndex,
|
980
|
+
%i[pszDest nSrcCount pointer GDALTileIndexOptions pbUsageError],
|
981
|
+
:GDALDatasetH
|
982
|
+
end
|
983
|
+
end
|
984
|
+
end
|