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/grid.rb
CHANGED
@@ -11,48 +11,165 @@ module FFI
|
|
11
11
|
# Typedefs
|
12
12
|
#------------------------------------------------------------------------
|
13
13
|
callback :GDALGridFunction,
|
14
|
-
|
15
|
-
|
14
|
+
[
|
15
|
+
:pointer,
|
16
|
+
CPL::Port.find_type(:GUInt32),
|
17
|
+
:pointer,
|
18
|
+
:pointer,
|
19
|
+
:pointer,
|
20
|
+
:double,
|
21
|
+
:double,
|
22
|
+
:pointer,
|
23
|
+
:pointer
|
24
|
+
],
|
25
|
+
CPL::Error::CPLErr
|
16
26
|
|
17
27
|
#------------------------------------------------------------------------
|
18
28
|
# Functions
|
19
29
|
#------------------------------------------------------------------------
|
20
30
|
attach_function :GDALGridInverseDistanceToAPower,
|
21
|
-
|
22
|
-
|
31
|
+
[
|
32
|
+
:pointer,
|
33
|
+
CPL::Port.find_type(:GUInt32),
|
34
|
+
:pointer,
|
35
|
+
:pointer,
|
36
|
+
:pointer,
|
37
|
+
:double,
|
38
|
+
:double,
|
39
|
+
:pointer,
|
40
|
+
:pointer
|
41
|
+
],
|
42
|
+
CPL::Error::CPLErr
|
43
|
+
|
23
44
|
attach_function :GDALGridInverseDistanceToAPointerNoSearch,
|
24
|
-
|
25
|
-
|
45
|
+
[
|
46
|
+
:pointer,
|
47
|
+
CPL::Port.find_type(:GUInt32),
|
48
|
+
:pointer,
|
49
|
+
:pointer,
|
50
|
+
:pointer,
|
51
|
+
:double,
|
52
|
+
:double,
|
53
|
+
:pointer,
|
54
|
+
:pointer
|
55
|
+
],
|
56
|
+
CPL::Error::CPLErr
|
26
57
|
|
27
58
|
attach_function :GDALGridMovingAverage,
|
28
|
-
|
29
|
-
|
59
|
+
[
|
60
|
+
:pointer,
|
61
|
+
CPL::Port.find_type(:GUInt32),
|
62
|
+
:pointer,
|
63
|
+
:pointer,
|
64
|
+
:pointer,
|
65
|
+
:double,
|
66
|
+
:double,
|
67
|
+
:pointer,
|
68
|
+
:pointer
|
69
|
+
],
|
70
|
+
CPL::Error::CPLErr
|
30
71
|
|
31
72
|
attach_function :GDALGridNearestNeighbor,
|
32
|
-
|
33
|
-
|
73
|
+
[
|
74
|
+
:pointer,
|
75
|
+
CPL::Port.find_type(:GUInt32),
|
76
|
+
:pointer,
|
77
|
+
:pointer,
|
78
|
+
:pointer,
|
79
|
+
:double,
|
80
|
+
:double,
|
81
|
+
:pointer,
|
82
|
+
:pointer
|
83
|
+
],
|
84
|
+
CPL::Error::CPLErr
|
34
85
|
|
35
86
|
attach_function :GDALGridDataMetricMinimum,
|
36
|
-
|
37
|
-
|
87
|
+
[
|
88
|
+
:pointer,
|
89
|
+
CPL::Port.find_type(:GUInt32),
|
90
|
+
:pointer,
|
91
|
+
:pointer,
|
92
|
+
:pointer,
|
93
|
+
:double,
|
94
|
+
:double,
|
95
|
+
:pointer,
|
96
|
+
:pointer
|
97
|
+
],
|
98
|
+
CPL::Error::CPLErr
|
99
|
+
|
38
100
|
attach_function :GDALGridDataMetricMaximum,
|
39
|
-
|
40
|
-
|
101
|
+
[
|
102
|
+
:pointer,
|
103
|
+
CPL::Port.find_type(:GUInt32),
|
104
|
+
:pointer,
|
105
|
+
:pointer,
|
106
|
+
:pointer,
|
107
|
+
:double,
|
108
|
+
:double,
|
109
|
+
:pointer,
|
110
|
+
:pointer
|
111
|
+
],
|
112
|
+
CPL::Error::CPLErr
|
113
|
+
|
41
114
|
attach_function :GDALGridDataMetricRange,
|
42
|
-
|
43
|
-
|
115
|
+
[
|
116
|
+
:pointer,
|
117
|
+
CPL::Port.find_type(:GUInt32),
|
118
|
+
:pointer,
|
119
|
+
:pointer,
|
120
|
+
:pointer,
|
121
|
+
:double,
|
122
|
+
:double,
|
123
|
+
:pointer,
|
124
|
+
:pointer
|
125
|
+
],
|
126
|
+
CPL::Error::CPLErr
|
127
|
+
|
44
128
|
attach_function :GDALGridDataMetricCount,
|
45
|
-
|
46
|
-
|
129
|
+
[
|
130
|
+
:pointer,
|
131
|
+
CPL::Port.find_type(:GUInt32),
|
132
|
+
:pointer,
|
133
|
+
:pointer,
|
134
|
+
:pointer,
|
135
|
+
:double,
|
136
|
+
:double,
|
137
|
+
:pointer,
|
138
|
+
:pointer
|
139
|
+
],
|
140
|
+
CPL::Error::CPLErr
|
141
|
+
|
47
142
|
attach_function :GDALGridDataMetricAverageDistance,
|
48
|
-
|
49
|
-
|
143
|
+
[
|
144
|
+
:pointer,
|
145
|
+
CPL::Port.find_type(:GUInt32),
|
146
|
+
:pointer,
|
147
|
+
:pointer,
|
148
|
+
:pointer,
|
149
|
+
:double,
|
150
|
+
:double,
|
151
|
+
:pointer,
|
152
|
+
:pointer
|
153
|
+
],
|
154
|
+
CPL::Error::CPLErr
|
155
|
+
|
50
156
|
attach_function :GDALGridDataMetricAverageDistancePts,
|
51
|
-
|
52
|
-
|
157
|
+
[
|
158
|
+
:pointer,
|
159
|
+
CPL::Port.find_type(:GUInt32),
|
160
|
+
:pointer,
|
161
|
+
:pointer,
|
162
|
+
:pointer,
|
163
|
+
:double,
|
164
|
+
:double,
|
165
|
+
:pointer,
|
166
|
+
:pointer
|
167
|
+
],
|
168
|
+
CPL::Error::CPLErr
|
169
|
+
|
53
170
|
attach_function :ParseAlgorithmAndOptions,
|
54
|
-
[:string,
|
55
|
-
CPLErr
|
171
|
+
[:string, Alg::GridAlgorithm, :pointer],
|
172
|
+
CPL::Error::CPLErr
|
56
173
|
end
|
57
174
|
end
|
58
175
|
end
|
data/lib/ffi/gdal/matching.rb
CHANGED
data/lib/ffi/gdal/version.rb
CHANGED
data/lib/ffi/gdal/vrt.rb
CHANGED
@@ -1,18 +1,14 @@
|
|
1
1
|
require 'ffi'
|
2
|
-
require_relative 'gdal'
|
3
|
-
require_relative 'alg'
|
4
2
|
|
5
3
|
module FFI
|
6
4
|
module GDAL
|
7
|
-
autoload :Warper, File.expand_path('warper', __dir__)
|
8
|
-
|
9
5
|
class WarpOptions < FFI::Struct
|
10
|
-
layout :
|
6
|
+
layout :warp_operation_options, :pointer,
|
11
7
|
:warp_memory_limit, :double,
|
12
8
|
:resample_alg, FFI::GDAL::Warper::ResampleAlg,
|
13
|
-
:working_data_type, FFI::GDAL::DataType,
|
14
|
-
:source_dataset, :GDALDatasetH,
|
15
|
-
:destination_dataset, :GDALDatasetH,
|
9
|
+
:working_data_type, FFI::GDAL::GDAL::DataType,
|
10
|
+
:source_dataset, GDAL.find_type(:GDALDatasetH),
|
11
|
+
:destination_dataset, GDAL.find_type(:GDALDatasetH),
|
16
12
|
:band_count, :int,
|
17
13
|
:source_bands, :pointer,
|
18
14
|
:destination_bands, :pointer,
|
@@ -22,22 +18,24 @@ module FFI
|
|
22
18
|
:source_no_data_imaginary, :pointer,
|
23
19
|
:destination_no_data_real, :pointer,
|
24
20
|
:destination_no_data_imaginary, :pointer,
|
25
|
-
:progress, :GDALProgressFunc,
|
21
|
+
:progress, GDAL.find_type(:GDALProgressFunc),
|
26
22
|
:progress_arg, :pointer,
|
27
|
-
:transformer,
|
23
|
+
:transformer, Alg.find_type(:GDALTransformerFunc),
|
28
24
|
:transformer_arg, :pointer,
|
29
25
|
:source_per_band_validity_mask_function, :pointer,
|
30
26
|
:source_per_band_validity_mask_function_arg, :pointer,
|
31
|
-
:source_validity_mask_function, :
|
27
|
+
:source_validity_mask_function, Warper.find_type(:GDALMaskFunc),
|
32
28
|
:source_validity_mask_function_arg, :pointer,
|
33
|
-
:source_density_mask_function, :
|
29
|
+
:source_density_mask_function, Warper.find_type(:GDALMaskFunc),
|
34
30
|
:source_density_mask_function_arg, :pointer,
|
35
|
-
:destination_density_mask_function, :
|
31
|
+
:destination_density_mask_function, Warper.find_type(:GDALMaskFunc),
|
36
32
|
:destination_density_mask_function_arg, :pointer,
|
37
|
-
:destination_validity_mask_function, :
|
33
|
+
:destination_validity_mask_function, Warper.find_type(:GDALMaskFunc),
|
38
34
|
:destination_validity_mask_function_arg, :pointer,
|
35
|
+
# :pre_warp_chunk_processor, CPL::Error::CPLErr,
|
39
36
|
:pre_warp_chunk_processor, :pointer,
|
40
37
|
:pre_warp_processor_arg, :pointer,
|
38
|
+
# :post_warp_chunk_processor, CPL::Error::CPLErr,
|
41
39
|
:post_warp_chunk_processor, :pointer,
|
42
40
|
:post_warp_processor_arg, :pointer,
|
43
41
|
:cutline, :pointer,
|
data/lib/ffi/gdal/warper.rb
CHANGED
@@ -1,11 +1,8 @@
|
|
1
1
|
require 'ffi'
|
2
2
|
require_relative '../../ext/ffi_library_function_checks'
|
3
|
-
require_relative '../cpl/error'
|
4
3
|
|
5
4
|
module FFI
|
6
5
|
module GDAL
|
7
|
-
autoload :WarpOptions, File.expand_path('warp_options', __dir__)
|
8
|
-
|
9
6
|
module Warper
|
10
7
|
extend ::FFI::Library
|
11
8
|
ffi_lib [FFI::CURRENT_PROCESS, FFI::GDAL.gdal_library_path]
|
@@ -18,7 +15,7 @@ module FFI
|
|
18
15
|
[
|
19
16
|
:pointer,
|
20
17
|
:int,
|
21
|
-
FFI::GDAL::DataType,
|
18
|
+
FFI::GDAL::GDAL::DataType,
|
22
19
|
:int,
|
23
20
|
:int,
|
24
21
|
:int,
|
@@ -44,14 +41,72 @@ module FFI
|
|
44
41
|
# Functions
|
45
42
|
#------------------------------------------------------------------------
|
46
43
|
attach_function :GDALCreateWarpOptions, [], FFI::GDAL::WarpOptions.ptr
|
44
|
+
attach_function :GDALDestroyWarpOptions, [FFI::GDAL::WarpOptions.ptr], :void
|
45
|
+
attach_function :GDALCloneWarpOptions, [FFI::GDAL::WarpOptions.ptr], FFI::GDAL::WarpOptions.ptr
|
47
46
|
attach_function :GDALSerializeWarpOptions,
|
48
47
|
[FFI::GDAL::WarpOptions.ptr],
|
49
48
|
FFI::CPL::XMLNode.ptr
|
49
|
+
attach_function :GDALDeserializeWarpOptions,
|
50
|
+
[FFI::CPL::XMLNode.ptr],
|
51
|
+
FFI::GDAL::WarpOptions.ptr
|
50
52
|
|
51
53
|
attach_function :GDALCreateWarpOperation,
|
52
54
|
[FFI::GDAL::WarpOptions.ptr],
|
53
55
|
:GDALWarpOperationH
|
54
|
-
attach_function :GDALDestroyWarpOperation, [
|
56
|
+
attach_function :GDALDestroyWarpOperation, %i[GDALWarpOperationH], :void
|
57
|
+
|
58
|
+
attach_function :GDALWarpNoDataMasker,
|
59
|
+
[:pointer, :int, GDAL::DataType, :int, :int, :int, :int, :pointer, :int, :pointer],
|
60
|
+
CPL::Error::CPLErr
|
61
|
+
attach_function :GDALWarpDstAlphaMasker,
|
62
|
+
[:pointer, :int, GDAL::DataType, :int, :int, :int, :int, :pointer, :int, :pointer],
|
63
|
+
CPL::Error::CPLErr
|
64
|
+
attach_function :GDALWarpSrcAlphaMasker,
|
65
|
+
[:pointer, :int, GDAL::DataType, :int, :int, :int, :int, :pointer, :int, :pointer],
|
66
|
+
CPL::Error::CPLErr
|
67
|
+
attach_function :GDALWarpSrcMaskMasker,
|
68
|
+
[:pointer, :int, GDAL::DataType, :int, :int, :int, :int, :pointer, :int, :pointer],
|
69
|
+
CPL::Error::CPLErr
|
70
|
+
attach_function :GDALWarpCutlineMasker,
|
71
|
+
[:pointer, :int, GDAL::DataType, :int, :int, :int, :int, :pointer, :int, :pointer],
|
72
|
+
CPL::Error::CPLErr
|
73
|
+
|
74
|
+
attach_function :GDALReprojectImage,
|
75
|
+
[
|
76
|
+
FFI::GDAL::GDAL.find_type(:GDALDatasetH),
|
77
|
+
:string,
|
78
|
+
FFI::GDAL::GDAL.find_type(:GDALDatasetH),
|
79
|
+
:string,
|
80
|
+
ResampleAlg,
|
81
|
+
:double,
|
82
|
+
:double,
|
83
|
+
FFI::GDAL::GDAL.find_type(:GDALProgressFunc),
|
84
|
+
:pointer,
|
85
|
+
FFI::GDAL::WarpOptions.ptr
|
86
|
+
],
|
87
|
+
CPL::Error::CPLErr
|
88
|
+
attach_function :GDALAutoCreateWarpedVRT,
|
89
|
+
[
|
90
|
+
FFI::GDAL::GDAL.find_type(:GDALDatasetH),
|
91
|
+
:string,
|
92
|
+
:string,
|
93
|
+
ResampleAlg,
|
94
|
+
:double,
|
95
|
+
FFI::GDAL::WarpOptions.ptr
|
96
|
+
],
|
97
|
+
FFI::GDAL::GDAL.find_type(:GDALDatasetH)
|
98
|
+
attach_function :GDALCreateWarpedVRT,
|
99
|
+
[
|
100
|
+
FFI::GDAL::GDAL.find_type(:GDALDatasetH),
|
101
|
+
:int,
|
102
|
+
:int,
|
103
|
+
:double,
|
104
|
+
FFI::GDAL::WarpOptions.ptr
|
105
|
+
],
|
106
|
+
FFI::GDAL::GDAL.find_type(:GDALDatasetH)
|
107
|
+
attach_function :GDALInitializeWarpedVRT,
|
108
|
+
[FFI::GDAL::GDAL.find_type(:GDALDatasetH), FFI::GDAL::WarpOptions.ptr],
|
109
|
+
CPL::Error::CPLErr
|
55
110
|
|
56
111
|
attach_function :GDALChunkAndWarpImage,
|
57
112
|
%i[GDALWarpOperationH int int int int],
|
@@ -63,7 +118,7 @@ module FFI
|
|
63
118
|
%i[GDALWarpOperationH int int int int int int int int],
|
64
119
|
CPL::Error::CPLErr
|
65
120
|
attach_function :GDALWarpRegionToBuffer,
|
66
|
-
[:GDALWarpOperationH, :int, :int, :int, :int, :pointer, DataType, :int, :int, :int, :int],
|
121
|
+
[:GDALWarpOperationH, :int, :int, :int, :int, :pointer, GDAL::DataType, :int, :int, :int, :int],
|
67
122
|
CPL::Error::CPLErr
|
68
123
|
end
|
69
124
|
end
|
data/lib/ffi/gdal.rb
CHANGED
@@ -7,6 +7,23 @@ module FFI
|
|
7
7
|
module GDAL
|
8
8
|
extend ::FFI::Library
|
9
9
|
|
10
|
+
autoload :Alg, File.expand_path('gdal/alg.rb', __dir__)
|
11
|
+
autoload :ColorEntry, File.expand_path('gdal/color_entry.rb', __dir__)
|
12
|
+
autoload :GDAL, File.expand_path('gdal/gdal.rb', __dir__)
|
13
|
+
autoload :GCP, File.expand_path('gdal/gcp.rb', __dir__)
|
14
|
+
autoload :Grid, File.expand_path('gdal/grid.rb', __dir__)
|
15
|
+
autoload :GridDataMetricsOptions, File.expand_path('gdal/grid_data_metrics_options.rb', __dir__)
|
16
|
+
autoload :GridInverseDistanceToAPowerOptions,
|
17
|
+
File.expand_path('gdal/grid_inverse_distance_to_a_power_options.rb', __dir__)
|
18
|
+
autoload :GridMovingAverageOptions, File.expand_path('gdal/grid_moving_average_options.rb', __dir__)
|
19
|
+
autoload :GridNearestNeighborOptions, File.expand_path('gdal/grid_nearest_neighbor_options.rb', __dir__)
|
20
|
+
autoload :Matching, File.expand_path('gdal/matching.rb', __dir__)
|
21
|
+
autoload :RPCInfo, File.expand_path('gdal/rpc_info.rb', __dir__)
|
22
|
+
autoload :TransformerInfo, File.expand_path('gdal/transformer_info.rb', __dir__)
|
23
|
+
autoload :VRT, File.expand_path('gdal/vrt.rb', __dir__)
|
24
|
+
autoload :Warper, File.expand_path('gdal/warper.rb', __dir__)
|
25
|
+
autoload :WarpOptions, File.expand_path('gdal/warp_options.rb', __dir__)
|
26
|
+
|
10
27
|
# @return [String]
|
11
28
|
def self.gdal_library_path
|
12
29
|
@gdal_library_path ||= find_lib('{lib,}gdal*')
|
@@ -69,7 +86,7 @@ module FFI
|
|
69
86
|
end
|
70
87
|
|
71
88
|
if gdal_library_path.nil? || gdal_library_path.empty?
|
72
|
-
|
89
|
+
raise FFI::GDAL::LibraryNotFound, "Can't find required gdal library using path: '#{gdal_library_path}'"
|
73
90
|
end
|
74
91
|
|
75
92
|
ffi_lib(gdal_library_path)
|
@@ -79,7 +96,5 @@ module FFI
|
|
79
96
|
end
|
80
97
|
end
|
81
98
|
|
82
|
-
require_relative 'cpl/conv'
|
83
|
-
require_relative 'gdal/gdal'
|
84
99
|
require_relative 'gdal/version'
|
85
100
|
require_relative '../ext/to_bool'
|
data/lib/ffi/ogr/api.rb
CHANGED
@@ -1,12 +1,4 @@
|
|
1
1
|
require_relative '../../ext/ffi_library_function_checks'
|
2
|
-
require_relative '../cpl/conv'
|
3
|
-
require_relative 'core'
|
4
|
-
require_relative 'envelope'
|
5
|
-
require_relative 'envelope_3d'
|
6
|
-
require_relative 'field'
|
7
|
-
require_relative 'srs_api'
|
8
|
-
require_relative '../cpl/xml_node'
|
9
|
-
require_relative '../gdal/gdal'
|
10
2
|
|
11
3
|
module FFI
|
12
4
|
module OGR
|
@@ -34,7 +26,7 @@ module FFI
|
|
34
26
|
# Functions
|
35
27
|
# -----------------------------------------------------------------------
|
36
28
|
attach_function :OGR_G_CreateFromWkb,
|
37
|
-
[:
|
29
|
+
[:pointer, FFI::OGR::SRSAPI.find_type(:OGRSpatialReferenceH), :pointer, :int],
|
38
30
|
FFI::OGR::Core::Err
|
39
31
|
attach_function :OGR_G_CreateFromWkt,
|
40
32
|
[:pointer, FFI::OGR::SRSAPI.find_type(:OGRSpatialReferenceH), :pointer],
|
@@ -87,7 +79,7 @@ module FFI
|
|
87
79
|
attach_function :OGR_G_GetGeometryType, %i[OGRGeometryH], FFI::OGR::Core::WKBGeometryType
|
88
80
|
attach_function :OGR_G_GetGeometryName, %i[OGRGeometryH], :string
|
89
81
|
attach_function :OGR_G_DumpReadable,
|
90
|
-
%i[OGRGeometryH
|
82
|
+
%i[OGRGeometryH pointer string],
|
91
83
|
:void
|
92
84
|
attach_function :OGR_G_FlattenTo2D, %i[OGRGeometryH], :void
|
93
85
|
attach_function :OGR_G_CloseRings, %i[OGRGeometryH], :void
|
@@ -275,9 +267,6 @@ module FFI
|
|
275
267
|
attach_function :OGR_FD_DeleteFieldDefn,
|
276
268
|
%i[OGRFeatureDefnH int],
|
277
269
|
FFI::OGR::Core::Err
|
278
|
-
attach_function :OGR_FD_ReorderFieldDefns,
|
279
|
-
%i[OGRFeatureDefnH pointer],
|
280
|
-
FFI::OGR::Core::Err
|
281
270
|
attach_function :OGR_FD_GetGeomType, %i[OGRFeatureDefnH], FFI::OGR::Core::WKBGeometryType
|
282
271
|
attach_function :OGR_FD_SetGeomType,
|
283
272
|
[:OGRFeatureDefnH, FFI::OGR::Core::WKBGeometryType],
|
@@ -362,7 +351,7 @@ module FFI
|
|
362
351
|
|
363
352
|
attach_function :OGR_F_GetFID, %i[OGRFeatureH], :long
|
364
353
|
attach_function :OGR_F_SetFID, %i[OGRFeatureH long], FFI::OGR::Core::Err
|
365
|
-
attach_function :OGR_F_DumpReadable, %i[OGRFeatureH
|
354
|
+
attach_function :OGR_F_DumpReadable, %i[OGRFeatureH pointer], :void
|
366
355
|
attach_function :OGR_F_SetFrom, %i[OGRFeatureH OGRFeatureH int], FFI::OGR::Core::Err
|
367
356
|
attach_function :OGR_F_SetFromWithMap, %i[OGRFeatureH OGRFeatureH int pointer], FFI::OGR::Core::Err
|
368
357
|
|
@@ -433,25 +422,25 @@ module FFI
|
|
433
422
|
attach_function :OGR_L_SetIgnoredFields, %i[OGRLayerH pointer], FFI::OGR::Core::Err
|
434
423
|
|
435
424
|
attach_function :OGR_L_Intersection,
|
436
|
-
[:OGRLayerH, :OGRLayerH, :OGRLayerH, :pointer, FFI::GDAL.find_type(:GDALProgressFunc), :pointer],
|
425
|
+
[:OGRLayerH, :OGRLayerH, :OGRLayerH, :pointer, FFI::GDAL::GDAL.find_type(:GDALProgressFunc), :pointer],
|
437
426
|
FFI::OGR::Core::Err
|
438
427
|
attach_function :OGR_L_Union,
|
439
|
-
[:OGRLayerH, :OGRLayerH, :OGRLayerH, :pointer, FFI::GDAL.find_type(:GDALProgressFunc), :pointer],
|
428
|
+
[:OGRLayerH, :OGRLayerH, :OGRLayerH, :pointer, FFI::GDAL::GDAL.find_type(:GDALProgressFunc), :pointer],
|
440
429
|
FFI::OGR::Core::Err
|
441
430
|
attach_function :OGR_L_SymDifference,
|
442
|
-
[:OGRLayerH, :OGRLayerH, :OGRLayerH, :pointer, FFI::GDAL.find_type(:GDALProgressFunc), :pointer],
|
431
|
+
[:OGRLayerH, :OGRLayerH, :OGRLayerH, :pointer, FFI::GDAL::GDAL.find_type(:GDALProgressFunc), :pointer],
|
443
432
|
FFI::OGR::Core::Err
|
444
433
|
attach_function :OGR_L_Identity,
|
445
|
-
[:OGRLayerH, :OGRLayerH, :OGRLayerH, :pointer, FFI::GDAL.find_type(:GDALProgressFunc), :pointer],
|
434
|
+
[:OGRLayerH, :OGRLayerH, :OGRLayerH, :pointer, FFI::GDAL::GDAL.find_type(:GDALProgressFunc), :pointer],
|
446
435
|
FFI::OGR::Core::Err
|
447
436
|
attach_function :OGR_L_Update,
|
448
|
-
[:OGRLayerH, :OGRLayerH, :OGRLayerH, :pointer, FFI::GDAL.find_type(:GDALProgressFunc), :pointer],
|
437
|
+
[:OGRLayerH, :OGRLayerH, :OGRLayerH, :pointer, FFI::GDAL::GDAL.find_type(:GDALProgressFunc), :pointer],
|
449
438
|
FFI::OGR::Core::Err
|
450
439
|
attach_function :OGR_L_Clip,
|
451
|
-
[:OGRLayerH, :OGRLayerH, :OGRLayerH, :pointer, FFI::GDAL.find_type(:GDALProgressFunc), :pointer],
|
440
|
+
[:OGRLayerH, :OGRLayerH, :OGRLayerH, :pointer, FFI::GDAL::GDAL.find_type(:GDALProgressFunc), :pointer],
|
452
441
|
FFI::OGR::Core::Err
|
453
442
|
attach_function :OGR_L_Erase,
|
454
|
-
[:OGRLayerH, :OGRLayerH, :OGRLayerH, :pointer, FFI::GDAL.find_type(:GDALProgressFunc), :pointer],
|
443
|
+
[:OGRLayerH, :OGRLayerH, :OGRLayerH, :pointer, FFI::GDAL::GDAL.find_type(:GDALProgressFunc), :pointer],
|
455
444
|
FFI::OGR::Core::Err
|
456
445
|
|
457
446
|
# ~~~~~~~~~~~~~~~~
|
data/lib/ffi/ogr/core.rb
CHANGED
@@ -24,7 +24,8 @@ module FFI
|
|
24
24
|
:OGRERR_UNSUPPORTED_SRS,
|
25
25
|
:OGRERR_INVALID_HANDLE
|
26
26
|
|
27
|
-
WKBGeometryType = enum
|
27
|
+
WKBGeometryType = enum FFI::Type::UINT,
|
28
|
+
:wkbUnknown, 0,
|
28
29
|
:wkbPoint, 1,
|
29
30
|
:wkbLineString, 2,
|
30
31
|
:wkbPolygon, 3,
|
@@ -34,13 +35,13 @@ module FFI
|
|
34
35
|
:wkbGeometryCollection, 7,
|
35
36
|
:wkbNone, 100, # non-standard, for pure attribute records
|
36
37
|
:wkbLinearRing, 101, # non-standard, just for createGeometry
|
37
|
-
:wkbPoint25D,
|
38
|
-
:wkbLineString25D,
|
39
|
-
:wkbPolygon25D,
|
40
|
-
:wkbMultiPoint25D,
|
41
|
-
:wkbMultiLineString25D,
|
42
|
-
:wkbMultiPolygon25D,
|
43
|
-
:wkbGeometryCollection25D,
|
38
|
+
:wkbPoint25D, 0x8000_0001,
|
39
|
+
:wkbLineString25D, 0x8000_0002,
|
40
|
+
:wkbPolygon25D, 0x8000_0003,
|
41
|
+
:wkbMultiPoint25D, 0x8000_0004,
|
42
|
+
:wkbMultiLineString25D, 0x8000_0005,
|
43
|
+
:wkbMultiPolygon25D, 0x8000_0006,
|
44
|
+
:wkbGeometryCollection25D, 0x8000_0007
|
44
45
|
|
45
46
|
WKBVariant = enum :wkbVariantOgc, :wkbVariantIso
|
46
47
|
WKBByteOrder = enum :wkbXDR, 0,
|
@@ -165,16 +166,12 @@ module FFI
|
|
165
166
|
attach_function :OGRMalloc, [:size_t], :pointer
|
166
167
|
attach_function :OGRCalloc, %i[size_t size_t], :pointer
|
167
168
|
attach_function :OGRRealloc, %i[pointer size_t], :pointer
|
168
|
-
attach_function :OGRStrdup, [:string], :string
|
169
169
|
attach_function :OGRFree, [:pointer], :void
|
170
170
|
|
171
171
|
attach_function :OGRGeometryTypeToName, [WKBGeometryType], :string
|
172
172
|
attach_function :OGRMergeGeometryTypes,
|
173
173
|
[WKBGeometryType, WKBGeometryType],
|
174
174
|
WKBGeometryType
|
175
|
-
attach_function :OGRMergeGeometryTypesEx,
|
176
|
-
[WKBGeometryType, WKBGeometryType, :bool],
|
177
|
-
WKBGeometryType
|
178
175
|
attach_function :OGRParseDate, [:string, FFI::OGR::Field.ptr, :int], :int
|
179
176
|
end
|
180
177
|
end
|
data/lib/ffi/ogr/featurestyle.rb
CHANGED
@@ -2,11 +2,6 @@ require 'ffi'
|
|
2
2
|
|
3
3
|
module FFI
|
4
4
|
module OGR
|
5
|
-
autoload :StyleParam,
|
6
|
-
File.expand_path('style_param', __dir__)
|
7
|
-
autoload :StyleValue,
|
8
|
-
File.expand_path('style_value', __dir__)
|
9
|
-
|
10
5
|
module Featurestyle
|
11
6
|
extend ::FFI::Library
|
12
7
|
ffi_lib [::FFI::CURRENT_PROCESS, ::FFI::GDAL.gdal_library_path]
|
data/lib/ffi/ogr/geocoding.rb
CHANGED
data/lib/ffi/ogr/srs_api.rb
CHANGED
@@ -1,5 +1,4 @@
|
|
1
1
|
require_relative '../../ext/ffi_library_function_checks'
|
2
|
-
require_relative '../ogr/core'
|
3
2
|
|
4
3
|
module FFI
|
5
4
|
module OGR
|
@@ -262,9 +261,6 @@ module FFI
|
|
262
261
|
attach_function :OSRSetGnomonic,
|
263
262
|
%i[OGRSpatialReferenceH double double double double],
|
264
263
|
FFI::OGR::Core::Err
|
265
|
-
attach_function :OSRSetOM,
|
266
|
-
%i[OGRSpatialReferenceH double double double double double double double],
|
267
|
-
FFI::OGR::Core::Err
|
268
264
|
attach_function :OSRSetHOM,
|
269
265
|
%i[OGRSpatialReferenceH double double double double double double double],
|
270
266
|
FFI::OGR::Core::Err
|
data/lib/ffi/ogr/style_value.rb
CHANGED
@@ -1,5 +1,4 @@
|
|
1
1
|
require 'ffi'
|
2
|
-
require_relative '../cpl/port'
|
3
2
|
|
4
3
|
module FFI
|
5
4
|
module OGR
|
@@ -8,7 +7,7 @@ module FFI
|
|
8
7
|
:double_value, :double,
|
9
8
|
:int_value, :int,
|
10
9
|
:valid, FFI::CPL::Port.find_type(:GBool),
|
11
|
-
:unit,
|
10
|
+
:unit, Core::STUnitId
|
12
11
|
end
|
13
12
|
end
|
14
13
|
end
|
data/lib/ffi/ogr.rb
CHANGED
@@ -1,12 +1,15 @@
|
|
1
|
-
|
2
|
-
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
1
|
+
module FFI
|
2
|
+
module OGR
|
3
|
+
autoload :API, File.expand_path('ogr/api.rb', __dir__)
|
4
|
+
autoload :Core, File.expand_path('ogr/core.rb', __dir__)
|
5
|
+
autoload :ContourWriterInfo, File.expand_path('ogr/contour_writer_info.rb', __dir__)
|
6
|
+
autoload :Envelope, File.expand_path('ogr/envelope.rb', __dir__)
|
7
|
+
autoload :Envelope3D, File.expand_path('ogr/envelope_3d.rb', __dir__)
|
8
|
+
autoload :Featurestyle, File.expand_path('ogr/featurestyle.rb', __dir__)
|
9
|
+
autoload :Field, File.expand_path('ogr/field.rb', __dir__)
|
10
|
+
autoload :Geocoding, File.expand_path('ogr/geocoding.rb', __dir__)
|
11
|
+
autoload :SRSAPI, File.expand_path('ogr/srs_api.rb', __dir__)
|
12
|
+
autoload :StyleParam, File.expand_path('ogr/style_param.rb', __dir__)
|
13
|
+
autoload :StyleValue, File.expand_path('ogr/style_value.rb', __dir__)
|
14
|
+
end
|
15
|
+
end
|
data/lib/ffi-gdal.rb
CHANGED
@@ -1,9 +1,11 @@
|
|
1
1
|
require 'ffi'
|
2
|
-
|
3
2
|
require_relative 'ext/ffi_library_function_checks'
|
4
3
|
require_relative 'ext/narray_ext'
|
5
4
|
require_relative 'ext/numeric_as_data_type'
|
6
5
|
require_relative 'ext/float_ext'
|
7
6
|
|
8
|
-
|
9
|
-
|
7
|
+
module FFI
|
8
|
+
autoload :CPL, File.expand_path('ffi/cpl.rb', __dir__)
|
9
|
+
autoload :GDAL, File.expand_path('ffi/gdal.rb', __dir__)
|
10
|
+
autoload :OGR, File.expand_path('ffi/ogr.rb', __dir__)
|
11
|
+
end
|