ffi-gdal 1.0.0.beta16 → 1.0.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.dockerignore +17 -0
- data/.github/workflows/codacy.yml +61 -0
- data/.github/workflows/codeql.yml +74 -0
- data/.github/workflows/continuous-integration.yml +36 -0
- data/.github/workflows/dependency-review.yml +20 -0
- data/.github/workflows/specs-in-docker.yml +27 -0
- data/.gitignore +3 -0
- data/.rspec +1 -0
- data/.rubocop.yml +10 -80
- data/.rubocop_todo.yml +23 -40
- data/.ruby-version +1 -1
- data/Changelog-0.x.md +512 -0
- data/Changelog.md +12 -0
- data/Dockerfile.gdal2 +110 -0
- data/Dockerfile.gdal3 +73 -0
- data/README.md +25 -14
- data/Rakefile +0 -8
- data/Tiltfile +91 -0
- data/bin/bundle +123 -0
- data/bin/docker-clean +8 -0
- data/bin/rake +29 -0
- data/bin/rspec +29 -0
- data/bin/rubocop +29 -0
- data/docker-compose.yml +25 -0
- data/examples/extract_and_colorize.rb +0 -13
- data/examples/geometries.rb +14 -14
- data/examples/ogr_layer_to_layer.rb +1 -3
- data/examples/raster_erasing.rb +1 -0
- data/examples/remove_small_polygons.rb +1 -1
- data/examples/testing_gdal.rb +20 -17
- data/examples/warping.rb +9 -7
- data/ffi-gdal.gemspec +12 -6
- data/lib/ext/ffi_library_function_checks.rb +2 -2
- data/lib/ext/to_bool.rb +5 -3
- data/lib/ffi/cpl/conv.rb +27 -25
- data/lib/ffi/cpl/error.rb +19 -20
- data/lib/ffi/cpl/hash_set.rb +4 -4
- data/lib/ffi/cpl/http.rb +3 -3
- data/lib/ffi/cpl/http_result.rb +8 -8
- data/lib/ffi/cpl/list.rb +1 -1
- data/lib/ffi/cpl/mime_part.rb +2 -2
- data/lib/ffi/cpl/minixml.rb +7 -7
- data/lib/ffi/cpl/progress.rb +8 -8
- data/lib/ffi/cpl/quad_tree.rb +14 -14
- data/lib/ffi/cpl/rect_obj.rb +3 -3
- data/lib/ffi/cpl/string.rb +17 -20
- data/lib/ffi/cpl/vsi.rb +13 -13
- data/lib/ffi/cpl/xml_node.rb +3 -3
- data/lib/ffi/extensions/gdal/extensions/all.rb +4 -0
- data/lib/ffi/extensions/gdal/extensions/version.rb +9 -0
- data/lib/ffi/extensions/gdal/extensions.rb +12 -0
- data/lib/ffi/extensions/rttopo/gbox.rb +19 -0
- data/lib/ffi/extensions/rttopo/geom.rb +16 -0
- data/lib/ffi/extensions/rttopo.rb +41 -0
- data/lib/ffi/gdal/alg.rb +277 -277
- data/lib/ffi/gdal/color_entry.rb +3 -3
- data/lib/ffi/gdal/gcp.rb +6 -6
- data/lib/ffi/gdal/gdal.rb +349 -349
- data/lib/ffi/gdal/grid.rb +134 -134
- data/lib/ffi/gdal/grid_data_metrics_options.rb +4 -4
- data/lib/ffi/gdal/grid_inverse_distance_to_a_power_options.rb +9 -9
- data/lib/ffi/gdal/grid_moving_average_options.rb +4 -4
- data/lib/ffi/gdal/grid_nearest_neighbor_options.rb +3 -3
- data/lib/ffi/gdal/matching.rb +3 -3
- data/lib/ffi/gdal/rpc_info.rb +17 -17
- data/lib/ffi/gdal/transformer_info.rb +4 -4
- data/lib/ffi/gdal/version.rb +1 -1
- data/lib/ffi/gdal/vrt.rb +39 -39
- data/lib/ffi/gdal/warp_options.rb +34 -34
- data/lib/ffi/gdal/warper.rb +90 -90
- data/lib/ffi/gdal.rb +2 -31
- data/lib/ffi/ogr/api.rb +175 -167
- data/lib/ffi/ogr/contour_writer_info.rb +4 -4
- data/lib/ffi/ogr/core.rb +107 -107
- data/lib/ffi/ogr/envelope.rb +3 -3
- data/lib/ffi/ogr/envelope_3d.rb +5 -5
- data/lib/ffi/ogr/featurestyle.rb +3 -3
- data/lib/ffi/ogr/field.rb +22 -22
- data/lib/ffi/ogr/geocoding.rb +4 -4
- data/lib/ffi/ogr/srs_api.rb +154 -155
- data/lib/ffi/ogr/style_param.rb +3 -3
- data/lib/ffi/ogr/style_value.rb +4 -4
- data/lib/gdal/color_entry.rb +1 -5
- data/lib/gdal/color_interpretation.rb +7 -3
- data/lib/gdal/color_table.rb +46 -27
- data/lib/gdal/cpl_error_handler.rb +26 -6
- data/lib/gdal/data_type.rb +10 -3
- data/lib/gdal/dataset.rb +171 -85
- data/lib/gdal/dataset_mixins/algorithm_methods.rb +44 -44
- data/lib/gdal/dataset_mixins/matching.rb +1 -1
- data/lib/gdal/dataset_mixins/warp_methods.rb +4 -2
- data/lib/gdal/driver.rb +38 -21
- data/lib/gdal/environment_methods.rb +6 -6
- data/lib/gdal/extensions/all.rb +3 -0
- data/lib/gdal/{color_entry_mixins → extensions/color_entry}/extensions.rb +4 -1
- data/lib/gdal/{color_table_mixins → extensions/color_table}/extensions.rb +3 -0
- data/lib/gdal/extensions/dataset/extensions.rb +205 -0
- data/lib/gdal/{driver_mixins → extensions/driver}/extensions.rb +6 -2
- data/lib/gdal/{geo_transform_mixins → extensions/geo_transform}/extensions.rb +10 -8
- data/lib/gdal/{gridder → extensions/gridder}/point_extracting.rb +7 -5
- data/lib/gdal/{gridder.rb → extensions/gridder.rb} +33 -33
- data/lib/gdal/{gridder_options.rb → extensions/gridder_options.rb} +13 -14
- data/lib/gdal/{raster_attribute_table_mixins → extensions/raster_attribute_table}/extensions.rb +8 -6
- data/lib/gdal/{raster_band_mixins → extensions/raster_band}/algorithm_extensions.rb +8 -6
- data/lib/gdal/{raster_band_mixins → extensions/raster_band}/coloring_extensions.rb +6 -4
- data/lib/gdal/{raster_band_mixins → extensions/raster_band}/extensions.rb +9 -5
- data/lib/gdal/{raster_band_mixins → extensions/raster_band}/io_extensions.rb +18 -14
- data/lib/gdal/{raster_band_classifier.rb → extensions/raster_band_classifier.rb} +3 -5
- data/lib/gdal/geo_transform.rb +1 -6
- data/lib/gdal/grid.rb +3 -2
- data/lib/gdal/grid_algorithms.rb +9 -9
- data/lib/gdal/internal_helpers.rb +46 -9
- data/lib/gdal/major_object.rb +11 -3
- data/lib/gdal/options.rb +26 -32
- data/lib/gdal/raster_attribute_table.rb +63 -37
- data/lib/gdal/raster_band.rb +164 -116
- data/lib/gdal/raster_band_mixins/algorithm_methods.rb +26 -25
- data/lib/gdal/rpc_info.rb +3 -2
- data/lib/gdal/transformers/approximate_transformer.rb +12 -3
- data/lib/gdal/transformers/base_general_image_projection_transformer.rb +15 -2
- data/lib/gdal/transformers/gcp_transformer.rb +27 -19
- data/lib/gdal/transformers/general_image_projection_transformer.rb +8 -6
- data/lib/gdal/transformers/general_image_projection_transformer2.rb +9 -6
- data/lib/gdal/transformers/general_image_projection_transformer3.rb +6 -2
- data/lib/gdal/transformers/geolocation_transformer.rb +12 -4
- data/lib/gdal/transformers/reprojection_transformer.rb +11 -3
- data/lib/gdal/transformers/rpc_transformer.rb +11 -2
- data/lib/gdal/transformers/tps_transformer.rb +12 -4
- data/lib/gdal/version_info.rb +2 -2
- data/lib/gdal/virtual_dataset.rb +2 -0
- data/lib/gdal/warp_operation.rb +65 -54
- data/lib/gdal/warp_options.rb +9 -11
- data/lib/ogr/coordinate_transformation.rb +23 -9
- data/lib/ogr/data_source.rb +68 -37
- data/lib/ogr/driver.rb +18 -17
- data/lib/ogr/envelope.rb +0 -3
- data/lib/ogr/error_handling.rb +22 -24
- data/lib/ogr/extensions/all.rb +3 -0
- data/lib/ogr/{data_source_mixins → extensions/data_source}/capability_methods.rb +2 -0
- data/lib/ogr/extensions/data_source/data_source_extensions.rb +16 -0
- data/lib/ogr/{driver_mixins → extensions/driver}/capability_methods.rb +5 -1
- data/lib/ogr/extensions/envelope/extensions.rb +114 -0
- data/lib/ogr/extensions/feature/extensions.rb +87 -0
- data/lib/ogr/extensions/feature_definition/extensions.rb +43 -0
- data/lib/ogr/extensions/geometries/point/extensions.rb +19 -0
- data/lib/ogr/extensions/geometry/container_mixins.rb +56 -0
- data/lib/ogr/extensions/geometry/ewkb_io_extensions.rb +44 -0
- data/lib/ogr/extensions/geometry/ewkb_record.rb +94 -0
- data/lib/ogr/{geometry_mixins → extensions/geometry}/extensions.rb +16 -9
- data/lib/ogr/extensions/geometry/rttopo_extensions.rb +48 -0
- data/lib/ogr/extensions/geometry/wkb_record.rb +63 -0
- data/lib/ogr/extensions/geometry_types/curve/extensions.rb +68 -0
- data/lib/ogr/{layer_mixins → extensions/layer}/capability_methods.rb +4 -0
- data/lib/ogr/{layer_mixins → extensions/layer}/extensions.rb +11 -6
- data/lib/ogr/extensions/spatial_reference/extensions.rb +38 -0
- data/lib/ogr/extensions/spatial_reference/initializers.rb +138 -0
- data/lib/ogr/extensions/style_table/extensions.rb +31 -0
- data/lib/ogr/feature.rb +173 -88
- data/lib/ogr/feature_definition.rb +53 -45
- data/lib/ogr/field.rb +17 -19
- data/lib/ogr/field_definition.rb +30 -18
- data/lib/ogr/geocoder.rb +11 -4
- data/lib/ogr/geometries/line_string.rb +1 -0
- data/lib/ogr/geometries/line_string_25d.rb +0 -9
- data/lib/ogr/geometries/linear_ring.rb +2 -2
- data/lib/ogr/geometries/point.rb +0 -9
- data/lib/ogr/geometry.rb +116 -49
- data/lib/ogr/geometry_field_definition.rb +31 -15
- data/lib/ogr/geometry_types/container.rb +26 -28
- data/lib/ogr/geometry_types/curve.rb +5 -61
- data/lib/ogr/geometry_types/surface.rb +1 -1
- data/lib/ogr/internal_helpers.rb +2 -2
- data/lib/ogr/layer.rb +12 -10
- data/lib/ogr/layer_mixins/ogr_feature_methods.rb +39 -27
- data/lib/ogr/layer_mixins/ogr_field_methods.rb +66 -50
- data/lib/ogr/layer_mixins/ogr_layer_method_methods.rb +17 -8
- data/lib/ogr/layer_mixins/ogr_query_filter_methods.rb +7 -6
- data/lib/ogr/layer_mixins/ogr_sql_methods.rb +15 -7
- data/lib/ogr/spatial_reference.rb +79 -42
- data/lib/ogr/spatial_reference_mixins/coordinate_system_getter_setters.rb +149 -118
- data/lib/ogr/spatial_reference_mixins/exporters.rb +87 -51
- data/lib/ogr/spatial_reference_mixins/importers.rb +88 -43
- data/lib/ogr/spatial_reference_mixins/morphers.rb +12 -8
- data/lib/ogr/spatial_reference_mixins/parameter_getter_setters.rb +27 -13
- data/lib/ogr/style_table.rb +15 -5
- data/lib/ogr/style_tool.rb +29 -15
- data/lib/ogr.rb +1 -0
- data/rakelib/docker.rake +10 -0
- data/sorbet/rbi/hidden-definitions/errors.txt +21790 -0
- data/tilt/gdal2.yml +22 -0
- data/tilt/gdal3.yml +22 -0
- metadata +116 -280
- data/History.md +0 -360
- data/lib/ext/error_symbols.rb +0 -7
- data/lib/gdal/dataset_mixins/extensions.rb +0 -380
- data/lib/gdal/merger.rb +0 -132
- data/lib/ogr/data_source_extensions.rb +0 -10
- data/lib/ogr/envelope_extensions.rb +0 -110
- data/lib/ogr/feature_definition_extensions.rb +0 -39
- data/lib/ogr/feature_extensions.rb +0 -87
- data/lib/ogr/geometry_mixins/container_mixins.rb +0 -25
- data/lib/ogr/spatial_reference_extensions.rb +0 -34
- data/lib/ogr/style_table_extensions.rb +0 -26
- data/spec/ffi-gdal_spec.rb +0 -24
- data/spec/integration/gdal/color_table_info_spec.rb +0 -78
- data/spec/integration/gdal/dataset_info_spec.rb +0 -342
- data/spec/integration/gdal/driver_info_spec.rb +0 -170
- data/spec/integration/gdal/geo_transform_info_spec.rb +0 -226
- data/spec/integration/gdal/gridder_spec.rb +0 -331
- data/spec/integration/gdal/raster_attribute_table_info_spec.rb +0 -229
- data/spec/integration/gdal/raster_band_algorithms_spec.rb +0 -35
- data/spec/integration/gdal/raster_band_info_spec.rb +0 -320
- data/spec/integration/ogr/layer_spec.rb +0 -95
- data/spec/spec_helper.rb +0 -116
- data/spec/support/images/123.tiff +0 -0
- data/spec/support/images/osgeo/gdal/data/hfa/float-rle.img +0 -0
- data/spec/support/images/osgeo/geotiff/GeogToWGS84GeoKey/GeogToWGS84GeoKey5.lgo +0 -31
- data/spec/support/images/osgeo/geotiff/GeogToWGS84GeoKey/GeogToWGS84GeoKey5.tif +0 -0
- data/spec/support/images/osgeo/geotiff/GeogToWGS84GeoKey/GeogToWGS84GeoKey5.tif.msk +0 -0
- data/spec/support/images/osgeo/geotiff/GeogToWGS84GeoKey/GeogToWGS84GeoKey5.txt +0 -10
- data/spec/support/images/osgeo/geotiff/gdal_eg/cea.tif +0 -0
- data/spec/support/images/osgeo/geotiff/gdal_eg/cea.txt +0 -84
- data/spec/support/images/osgeo/geotiff/zi_imaging/image0.lgo +0 -45
- data/spec/support/images/osgeo/geotiff/zi_imaging/image0.tif +0 -0
- data/spec/support/integration_help.rb +0 -34
- data/spec/support/shapefiles/states_21basic/states.dbf +0 -0
- data/spec/support/shapefiles/states_21basic/states.prj +0 -1
- data/spec/support/shapefiles/states_21basic/states.sbn +0 -0
- data/spec/support/shapefiles/states_21basic/states.sbx +0 -0
- data/spec/support/shapefiles/states_21basic/states.shp +0 -0
- data/spec/support/shapefiles/states_21basic/states.shp.xml +0 -3
- data/spec/support/shapefiles/states_21basic/states.shx +0 -0
- data/spec/support/shared_contexts.rb +0 -28
- data/spec/support/shared_examples/gdal/major_object_examples.rb +0 -55
- data/spec/support/shared_examples/ogr/a_25d_geometry.rb +0 -9
- data/spec/support/shared_examples/ogr/a_container_geometry.rb +0 -49
- data/spec/support/shared_examples/ogr/a_geometry.rb +0 -406
- data/spec/support/shared_examples/ogr/a_line_string.rb +0 -18
- data/spec/support/test_style_table.txt +0 -3
- data/spec/support/worldfiles/SR_50M/SR_50M.VERSION.txt +0 -1
- data/spec/support/worldfiles/SR_50M/SR_50M.prj +0 -1
- data/spec/support/worldfiles/SR_50M/SR_50M.tfw +0 -6
- data/spec/support/worldfiles/SR_50M/SR_50M.tif +0 -0
- data/spec/unit/ext/error_symbols_spec.rb +0 -69
- data/spec/unit/ext/numeric_as_data_type_spec.rb +0 -115
- data/spec/unit/ffi/gdal_spec.rb +0 -73
- data/spec/unit/gdal/color_entry_spec.rb +0 -8
- data/spec/unit/gdal/color_interpretation_spec.rb +0 -8
- data/spec/unit/gdal/color_table_mixins/extensions_spec.rb +0 -62
- data/spec/unit/gdal/color_table_spec.rb +0 -146
- data/spec/unit/gdal/data_type_spec.rb +0 -74
- data/spec/unit/gdal/dataset_mixins/warp_methods_spec.rb +0 -55
- data/spec/unit/gdal/dataset_spec.rb +0 -148
- data/spec/unit/gdal/driver_mixins/extensions_spec.rb +0 -24
- data/spec/unit/gdal/driver_spec.rb +0 -51
- data/spec/unit/gdal/environment_methods_spec.rb +0 -8
- data/spec/unit/gdal/geo_transform_mixins/extensions_spec.rb +0 -69
- data/spec/unit/gdal/geo_transform_spec.rb +0 -265
- data/spec/unit/gdal/grid_spec.rb +0 -98
- data/spec/unit/gdal/gridder/point_extracting_spec.rb +0 -101
- data/spec/unit/gdal/gridder_options_spec.rb +0 -185
- data/spec/unit/gdal/gridder_spec.rb +0 -182
- data/spec/unit/gdal/internal_helpers_spec.rb +0 -278
- data/spec/unit/gdal/major_object_spec.rb +0 -10
- data/spec/unit/gdal/options_spec.rb +0 -33
- data/spec/unit/gdal/raster_attribute_table_spec.rb +0 -7
- data/spec/unit/gdal/raster_band_classifier_spec.rb +0 -260
- data/spec/unit/gdal/raster_band_mixins/extensions_spec.rb +0 -73
- data/spec/unit/gdal/raster_band_mixins/io_extensions_spec.rb +0 -135
- data/spec/unit/gdal/raster_band_spec.rb +0 -8
- data/spec/unit/gdal/rpc_info_spec.rb +0 -8
- data/spec/unit/gdal/version_info_spec.rb +0 -10
- data/spec/unit/gdal/virtual_dataset_spec.rb +0 -34
- data/spec/unit/gdal/warp_operation_spec.rb +0 -8
- data/spec/unit/gdal/warp_options_spec.rb +0 -338
- data/spec/unit/ogr/coordinate_transformation_spec.rb +0 -104
- data/spec/unit/ogr/data_source_mixins/capability_methods_spec.rb +0 -32
- data/spec/unit/ogr/data_source_spec.rb +0 -223
- data/spec/unit/ogr/driver_mixins/capability_methods_spec.rb +0 -20
- data/spec/unit/ogr/driver_spec.rb +0 -152
- data/spec/unit/ogr/envelope_spec.rb +0 -324
- data/spec/unit/ogr/feature_definition_spec.rb +0 -296
- data/spec/unit/ogr/feature_extensions_spec.rb +0 -90
- data/spec/unit/ogr/feature_spec.rb +0 -363
- data/spec/unit/ogr/field_definition_spec.rb +0 -118
- data/spec/unit/ogr/field_spec.rb +0 -195
- data/spec/unit/ogr/geometries/geometry_collection_25d_spec.rb +0 -25
- data/spec/unit/ogr/geometries/geometry_collection_spec.rb +0 -188
- data/spec/unit/ogr/geometries/line_string_25d_spec.rb +0 -25
- data/spec/unit/ogr/geometries/line_string_spec.rb +0 -107
- data/spec/unit/ogr/geometries/linear_ring_spec.rb +0 -92
- data/spec/unit/ogr/geometries/multi_line_string_25d_spec.rb +0 -25
- data/spec/unit/ogr/geometries/multi_line_string_spec.rb +0 -16
- data/spec/unit/ogr/geometries/multi_point_25d_spec.rb +0 -25
- data/spec/unit/ogr/geometries/multi_point_spec.rb +0 -16
- data/spec/unit/ogr/geometries/multi_polygon_25d_spec.rb +0 -25
- data/spec/unit/ogr/geometries/multi_polygon_spec.rb +0 -43
- data/spec/unit/ogr/geometries/none_geometry_spec.rb +0 -14
- data/spec/unit/ogr/geometries/point_25d_spec.rb +0 -25
- data/spec/unit/ogr/geometries/point_spec.rb +0 -307
- data/spec/unit/ogr/geometries/polygon_25d_spec.rb +0 -25
- data/spec/unit/ogr/geometries/polygon_spec.rb +0 -19
- data/spec/unit/ogr/geometries/unknown_geometry_spec.rb +0 -12
- data/spec/unit/ogr/geometry_field_definition_spec.rb +0 -73
- data/spec/unit/ogr/geometry_spec.rb +0 -711
- data/spec/unit/ogr/internal_helpers_spec.rb +0 -70
- data/spec/unit/ogr/layer_mixins/capability_methods_spec.rb +0 -90
- data/spec/unit/ogr/layer_mixins/ogr_feature_methods_spec.rb +0 -155
- data/spec/unit/ogr/layer_mixins/ogr_field_methods_spec.rb +0 -434
- data/spec/unit/ogr/layer_mixins/ogr_layer_method_methods_spec.rb +0 -22
- data/spec/unit/ogr/layer_mixins/ogr_query_filter_methods_spec.rb +0 -44
- data/spec/unit/ogr/layer_mixins/ogr_sql_methods_spec.rb +0 -14
- data/spec/unit/ogr/layer_spec.rb +0 -98
- data/spec/unit/ogr/spatial_reference_mixins/coordinate_system_getter_setters_spec.rb +0 -48
- data/spec/unit/ogr/spatial_reference_mixins/exporters_spec.rb +0 -151
- data/spec/unit/ogr/spatial_reference_mixins/importers_spec.rb +0 -40
- data/spec/unit/ogr/spatial_reference_mixins/morphers_spec.rb +0 -38
- data/spec/unit/ogr/spatial_reference_mixins/parameter_getter_setters_spec.rb +0 -105
- data/spec/unit/ogr/spatial_reference_mixins/type_checks_spec.rb +0 -159
- data/spec/unit/ogr/spatial_reference_spec.rb +0 -44
- data/spec/unit/ogr/style_table_spec.rb +0 -108
- data/spec/unit/ogr/style_tool_spec.rb +0 -159
- data/spec/unit/version_info_spec.rb +0 -50
data/lib/ffi/ogr/srs_api.rb
CHANGED
@@ -14,29 +14,29 @@ module FFI
|
|
14
14
|
# Enums
|
15
15
|
# -----------------------------------------------------------------------
|
16
16
|
AxisOrientation = enum :OAO_Other, 0,
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
17
|
+
:OAO_North, 1,
|
18
|
+
:OAO_South, 2,
|
19
|
+
:OAO_East, 3,
|
20
|
+
:OAO_West, 4,
|
21
|
+
:OAO_Up, 5,
|
22
|
+
:OAO_Down, 6
|
23
23
|
|
24
24
|
DatumType = enum :ODT_HD_Min, 1000,
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
25
|
+
:ODT_HD_Other, 1000,
|
26
|
+
:ODT_HD_Classic, 1001,
|
27
|
+
:ODT_HD_Geocentric, 1002,
|
28
|
+
:ODT_HD_Max, 1999,
|
29
|
+
:ODT_VD_Min, 2000,
|
30
|
+
:ODT_VD_Other, 2000,
|
31
|
+
:ODT_VD_Orthometric, 2001,
|
32
|
+
:ODT_VD_Ellipsoidal, 2002,
|
33
|
+
:ODT_VD_AltitudeBarometric, 2003,
|
34
|
+
:ODT_VD_Normal, 2004,
|
35
|
+
:ODT_VD_GeoidModelDerived, 2005,
|
36
|
+
:ODT_VD_Depth, 2006,
|
37
|
+
:ODT_VD_Max, 2999,
|
38
|
+
:ODT_LD_Min, 10_000,
|
39
|
+
:ODT_LD_Max, 32_767
|
40
40
|
|
41
41
|
# -----------------------------------------------------------------------
|
42
42
|
# Constants
|
@@ -120,7 +120,7 @@ module FFI
|
|
120
120
|
# ~~~~~~~~~~~~~
|
121
121
|
# AxisOrientations
|
122
122
|
# ~~~~~~~~~~~~~
|
123
|
-
attach_function :OSRAxisEnumToName, [AxisOrientation], :
|
123
|
+
attach_function :OSRAxisEnumToName, [AxisOrientation], :strptr
|
124
124
|
|
125
125
|
# ~~~~~~~~~~~~~
|
126
126
|
# SpatialReference
|
@@ -144,32 +144,32 @@ module FFI
|
|
144
144
|
attach_function :OSRImportFromProj4, %i[OGRSpatialReferenceH string], FFI::OGR::Core::Err
|
145
145
|
attach_function :OSRImportFromESRI, %i[OGRSpatialReferenceH pointer], FFI::OGR::Core::Err
|
146
146
|
attach_function :OSRImportFromPCI,
|
147
|
-
|
148
|
-
|
147
|
+
%i[OGRSpatialReferenceH string string pointer],
|
148
|
+
FFI::OGR::Core::Err
|
149
149
|
attach_function :OSRImportFromUSGS,
|
150
|
-
|
151
|
-
|
150
|
+
%i[OGRSpatialReferenceH long long pointer long],
|
151
|
+
FFI::OGR::Core::Err
|
152
152
|
attach_function :OSRImportFromXML, %i[OGRSpatialReferenceH string], FFI::OGR::Core::Err
|
153
153
|
attach_function :OSRImportFromMICoordSys, %i[OGRSpatialReferenceH string], FFI::OGR::Core::Err
|
154
154
|
attach_function :OSRImportFromERM,
|
155
|
-
|
156
|
-
|
155
|
+
%i[OGRSpatialReferenceH string string string],
|
156
|
+
FFI::OGR::Core::Err
|
157
157
|
attach_function :OSRImportFromUrl, %i[OGRSpatialReferenceH string], FFI::OGR::Core::Err
|
158
158
|
|
159
159
|
attach_function :OSRExportToWkt, %i[OGRSpatialReferenceH pointer], FFI::OGR::Core::Err
|
160
160
|
attach_function :OSRExportToPrettyWkt, %i[OGRSpatialReferenceH pointer bool], FFI::OGR::Core::Err
|
161
161
|
attach_function :OSRExportToProj4, %i[OGRSpatialReferenceH pointer], FFI::OGR::Core::Err
|
162
162
|
attach_function :OSRExportToPCI,
|
163
|
-
|
164
|
-
|
163
|
+
%i[OGRSpatialReferenceH pointer pointer pointer],
|
164
|
+
FFI::OGR::Core::Err
|
165
165
|
attach_function :OSRExportToUSGS,
|
166
|
-
|
167
|
-
|
166
|
+
%i[OGRSpatialReferenceH pointer pointer pointer pointer],
|
167
|
+
FFI::OGR::Core::Err
|
168
168
|
attach_function :OSRExportToXML, %i[OGRSpatialReferenceH pointer buffer_out], FFI::OGR::Core::Err
|
169
169
|
attach_function :OSRExportToMICoordSys, %i[OGRSpatialReferenceH pointer], FFI::OGR::Core::Err
|
170
170
|
attach_function :OSRExportToERM,
|
171
|
-
|
172
|
-
|
171
|
+
%i[OGRSpatialReferenceH buffer_out buffer_out buffer_out],
|
172
|
+
FFI::OGR::Core::Err
|
173
173
|
attach_function :OSRMorphToESRI, %i[OGRSpatialReferenceH], FFI::OGR::Core::Err
|
174
174
|
attach_function :OSRMorphFromESRI, %i[OGRSpatialReferenceH], FFI::OGR::Core::Err
|
175
175
|
|
@@ -183,167 +183,167 @@ module FFI
|
|
183
183
|
attach_function :OSRGetTargetLinearUnits, %i[OGRSpatialReferenceH string pointer], :double
|
184
184
|
attach_function :OSRGetPrimeMeridian, %i[OGRSpatialReferenceH pointer], :double
|
185
185
|
attach_function :OSRSetLinearUnitsAndUpdateParameters,
|
186
|
-
|
187
|
-
|
186
|
+
%i[OGRSpatialReferenceH string double],
|
187
|
+
FFI::OGR::Core::Err
|
188
188
|
attach_function :OSRGetSemiMajor, %i[OGRSpatialReferenceH pointer], :double
|
189
189
|
attach_function :OSRGetSemiMinor, %i[OGRSpatialReferenceH pointer], :double
|
190
190
|
attach_function :OSRGetInvFlattening, %i[OGRSpatialReferenceH pointer], :double
|
191
191
|
attach_function :OSRSetAuthority,
|
192
|
-
|
193
|
-
|
194
|
-
attach_function :OSRGetAuthorityCode, %i[OGRSpatialReferenceH string], :
|
195
|
-
attach_function :OSRGetAuthorityName, %i[OGRSpatialReferenceH string], :
|
192
|
+
%i[OGRSpatialReferenceH string string int],
|
193
|
+
FFI::OGR::Core::Err
|
194
|
+
attach_function :OSRGetAuthorityCode, %i[OGRSpatialReferenceH string], :strptr
|
195
|
+
attach_function :OSRGetAuthorityName, %i[OGRSpatialReferenceH string], :strptr
|
196
196
|
attach_function :OSRSetProjection, %i[OGRSpatialReferenceH string], FFI::OGR::Core::Err
|
197
197
|
attach_function :OSRSetProjParm, %i[OGRSpatialReferenceH string double], FFI::OGR::Core::Err
|
198
198
|
attach_function :OSRGetProjParm,
|
199
|
-
|
200
|
-
|
199
|
+
%i[OGRSpatialReferenceH string double pointer],
|
200
|
+
:double
|
201
201
|
attach_function :OSRSetNormProjParm, %i[OGRSpatialReferenceH string double], FFI::OGR::Core::Err
|
202
202
|
attach_function :OSRGetNormProjParm,
|
203
|
-
|
204
|
-
|
205
|
-
attach_function :OSRSetUTM, %i[OGRSpatialReferenceH int
|
203
|
+
%i[OGRSpatialReferenceH string double pointer],
|
204
|
+
:double
|
205
|
+
attach_function :OSRSetUTM, %i[OGRSpatialReferenceH int bool], FFI::OGR::Core::Err
|
206
206
|
attach_function :OSRGetUTMZone, %i[OGRSpatialReferenceH pointer], :int
|
207
207
|
attach_function :OSRSetStatePlane, %i[OGRSpatialReferenceH int bool], FFI::OGR::Core::Err
|
208
208
|
attach_function :OSRSetStatePlaneWithUnits,
|
209
|
-
|
210
|
-
|
209
|
+
%i[OGRSpatialReferenceH int int string double],
|
210
|
+
FFI::OGR::Core::Err
|
211
211
|
attach_function :OSRAutoIdentifyEPSG, %i[OGRSpatialReferenceH], FFI::OGR::Core::Err
|
212
212
|
attach_function :OSREPSGTreatsAsLatLong, %i[OGRSpatialReferenceH], :bool
|
213
213
|
attach_function :OSREPSGTreatsAsNorthingEasting, %i[OGRSpatialReferenceH], :bool
|
214
214
|
attach_function :OSRGetAxis,
|
215
|
-
|
216
|
-
|
215
|
+
%i[OGRSpatialReferenceH string int pointer],
|
216
|
+
:string
|
217
217
|
|
218
218
|
attach_function :OSRSetACEA,
|
219
|
-
|
220
|
-
|
219
|
+
%i[OGRSpatialReferenceH double double double double double double],
|
220
|
+
FFI::OGR::Core::Err
|
221
221
|
attach_function :OSRSetAE,
|
222
|
-
|
223
|
-
|
222
|
+
%i[OGRSpatialReferenceH double double double double],
|
223
|
+
FFI::OGR::Core::Err
|
224
224
|
attach_function :OSRSetBonne,
|
225
|
-
|
226
|
-
|
225
|
+
%i[OGRSpatialReferenceH double double double double],
|
226
|
+
FFI::OGR::Core::Err
|
227
227
|
attach_function :OSRSetCEA,
|
228
|
-
|
229
|
-
|
228
|
+
%i[OGRSpatialReferenceH double double double double],
|
229
|
+
FFI::OGR::Core::Err
|
230
230
|
attach_function :OSRSetCS,
|
231
|
-
|
232
|
-
|
231
|
+
%i[OGRSpatialReferenceH double double double double],
|
232
|
+
FFI::OGR::Core::Err
|
233
233
|
attach_function :OSRSetEC,
|
234
|
-
|
235
|
-
|
234
|
+
%i[OGRSpatialReferenceH double double double double double double],
|
235
|
+
FFI::OGR::Core::Err
|
236
236
|
attach_function :OSRSetEckert,
|
237
|
-
|
238
|
-
|
237
|
+
%i[OGRSpatialReferenceH int double double double],
|
238
|
+
FFI::OGR::Core::Err
|
239
239
|
attach_function :OSRSetEckertIV,
|
240
|
-
|
241
|
-
|
240
|
+
%i[OGRSpatialReferenceH double double double],
|
241
|
+
FFI::OGR::Core::Err
|
242
242
|
attach_function :OSRSetEckertVI,
|
243
|
-
|
244
|
-
|
243
|
+
%i[OGRSpatialReferenceH double double double],
|
244
|
+
FFI::OGR::Core::Err
|
245
245
|
attach_function :OSRSetEquirectangular,
|
246
|
-
|
247
|
-
|
246
|
+
%i[OGRSpatialReferenceH double double double double],
|
247
|
+
FFI::OGR::Core::Err
|
248
248
|
attach_function :OSRSetEquirectangular2,
|
249
|
-
|
250
|
-
|
249
|
+
%i[OGRSpatialReferenceH double double double double double],
|
250
|
+
FFI::OGR::Core::Err
|
251
251
|
attach_function :OSRSetGS,
|
252
|
-
|
253
|
-
|
252
|
+
%i[OGRSpatialReferenceH double double double],
|
253
|
+
FFI::OGR::Core::Err
|
254
254
|
attach_function :OSRSetGH,
|
255
|
-
|
256
|
-
|
255
|
+
%i[OGRSpatialReferenceH double double double],
|
256
|
+
FFI::OGR::Core::Err
|
257
257
|
attach_function :OSRSetIGH,
|
258
|
-
|
259
|
-
|
258
|
+
%i[OGRSpatialReferenceH],
|
259
|
+
FFI::OGR::Core::Err
|
260
260
|
attach_function :OSRSetGEOS,
|
261
|
-
|
262
|
-
|
261
|
+
%i[OGRSpatialReferenceH double double double double],
|
262
|
+
FFI::OGR::Core::Err
|
263
263
|
attach_function :OSRSetGaussSchreiberTMercator,
|
264
|
-
|
265
|
-
|
264
|
+
%i[OGRSpatialReferenceH double double double double double],
|
265
|
+
FFI::OGR::Core::Err
|
266
266
|
attach_function :OSRSetGnomonic,
|
267
|
-
|
268
|
-
|
267
|
+
%i[OGRSpatialReferenceH double double double double],
|
268
|
+
FFI::OGR::Core::Err
|
269
269
|
attach_function :OSRSetHOM,
|
270
|
-
|
271
|
-
|
270
|
+
%i[OGRSpatialReferenceH double double double double double double double],
|
271
|
+
FFI::OGR::Core::Err
|
272
272
|
attach_function :OSRSetHOM2PNO,
|
273
|
-
|
274
|
-
|
273
|
+
%i[OGRSpatialReferenceH double double double double double double double double],
|
274
|
+
FFI::OGR::Core::Err
|
275
275
|
attach_function :OSRSetIWMPolyconic,
|
276
|
-
|
277
|
-
|
276
|
+
%i[OGRSpatialReferenceH double double double double double],
|
277
|
+
FFI::OGR::Core::Err
|
278
278
|
attach_function :OSRSetKrovak,
|
279
|
-
|
280
|
-
|
279
|
+
%i[OGRSpatialReferenceH double double double double double double double],
|
280
|
+
FFI::OGR::Core::Err
|
281
281
|
attach_function :OSRSetLAEA,
|
282
|
-
|
283
|
-
|
282
|
+
%i[OGRSpatialReferenceH double double double double],
|
283
|
+
FFI::OGR::Core::Err
|
284
284
|
attach_function :OSRSetLCC,
|
285
|
-
|
286
|
-
|
285
|
+
%i[OGRSpatialReferenceH double double double double double double],
|
286
|
+
FFI::OGR::Core::Err
|
287
287
|
attach_function :OSRSetLCC1SP,
|
288
|
-
|
289
|
-
|
288
|
+
%i[OGRSpatialReferenceH double double double double double],
|
289
|
+
FFI::OGR::Core::Err
|
290
290
|
attach_function :OSRSetLCCB,
|
291
|
-
|
292
|
-
|
291
|
+
%i[OGRSpatialReferenceH double double double double double double],
|
292
|
+
FFI::OGR::Core::Err
|
293
293
|
attach_function :OSRSetMC,
|
294
|
-
|
295
|
-
|
294
|
+
%i[OGRSpatialReferenceH double double double double],
|
295
|
+
FFI::OGR::Core::Err
|
296
296
|
attach_function :OSRSetMercator,
|
297
|
-
|
298
|
-
|
297
|
+
%i[OGRSpatialReferenceH double double double double double],
|
298
|
+
FFI::OGR::Core::Err
|
299
299
|
attach_function :OSRSetMollweide,
|
300
|
-
|
301
|
-
|
300
|
+
%i[OGRSpatialReferenceH double double double],
|
301
|
+
FFI::OGR::Core::Err
|
302
302
|
attach_function :OSRSetNZMG,
|
303
|
-
|
304
|
-
|
303
|
+
%i[OGRSpatialReferenceH double double double double],
|
304
|
+
FFI::OGR::Core::Err
|
305
305
|
attach_function :OSRSetOS,
|
306
|
-
|
307
|
-
|
306
|
+
%i[OGRSpatialReferenceH double double double double double],
|
307
|
+
FFI::OGR::Core::Err
|
308
308
|
attach_function :OSRSetOrthographic,
|
309
|
-
|
310
|
-
|
309
|
+
%i[OGRSpatialReferenceH double double double double],
|
310
|
+
FFI::OGR::Core::Err
|
311
311
|
attach_function :OSRSetPolyconic,
|
312
|
-
|
313
|
-
|
312
|
+
%i[OGRSpatialReferenceH double double double double],
|
313
|
+
FFI::OGR::Core::Err
|
314
314
|
attach_function :OSRSetPS,
|
315
|
-
|
316
|
-
|
315
|
+
%i[OGRSpatialReferenceH double double double double double],
|
316
|
+
FFI::OGR::Core::Err
|
317
317
|
attach_function :OSRSetRobinson,
|
318
|
-
|
319
|
-
|
318
|
+
%i[OGRSpatialReferenceH double double double],
|
319
|
+
FFI::OGR::Core::Err
|
320
320
|
attach_function :OSRSetSinusoidal,
|
321
|
-
|
322
|
-
|
321
|
+
%i[OGRSpatialReferenceH double double double],
|
322
|
+
FFI::OGR::Core::Err
|
323
323
|
attach_function :OSRSetStereographic,
|
324
|
-
|
325
|
-
|
324
|
+
%i[OGRSpatialReferenceH double double double double double],
|
325
|
+
FFI::OGR::Core::Err
|
326
326
|
attach_function :OSRSetSOC,
|
327
|
-
|
328
|
-
|
327
|
+
%i[OGRSpatialReferenceH double double double double],
|
328
|
+
FFI::OGR::Core::Err
|
329
329
|
attach_function :OSRSetTM,
|
330
|
-
|
331
|
-
|
330
|
+
%i[OGRSpatialReferenceH double double double double double],
|
331
|
+
FFI::OGR::Core::Err
|
332
332
|
attach_function :OSRSetTMVariant,
|
333
|
-
|
334
|
-
|
333
|
+
%i[OGRSpatialReferenceH string double double double double double],
|
334
|
+
FFI::OGR::Core::Err
|
335
335
|
attach_function :OSRSetTMG,
|
336
|
-
|
337
|
-
|
336
|
+
%i[OGRSpatialReferenceH double double double double],
|
337
|
+
FFI::OGR::Core::Err
|
338
338
|
attach_function :OSRSetTMSO,
|
339
|
-
|
340
|
-
|
339
|
+
%i[OGRSpatialReferenceH double double double double double],
|
340
|
+
FFI::OGR::Core::Err
|
341
341
|
attach_function :OSRSetVDG,
|
342
|
-
|
343
|
-
|
342
|
+
%i[OGRSpatialReferenceH double double double],
|
343
|
+
FFI::OGR::Core::Err
|
344
344
|
attach_function :OSRSetWagner,
|
345
|
-
|
346
|
-
|
345
|
+
%i[OGRSpatialReferenceH int double double],
|
346
|
+
FFI::OGR::Core::Err
|
347
347
|
|
348
348
|
attach_function :OSRIsGeographic, %i[OGRSpatialReferenceH], :bool
|
349
349
|
attach_function :OSRIsLocal, %i[OGRSpatialReferenceH], :bool
|
@@ -359,22 +359,22 @@ module FFI
|
|
359
359
|
attach_function :OSRSetProjCS, %i[OGRSpatialReferenceH string], FFI::OGR::Core::Err
|
360
360
|
attach_function :OSRSetGeocCS, %i[OGRSpatialReferenceH string], FFI::OGR::Core::Err
|
361
361
|
attach_function :OSRSetGeogCS,
|
362
|
-
|
363
|
-
|
364
|
-
|
365
|
-
|
366
|
-
|
362
|
+
%i[OGRSpatialReferenceH
|
363
|
+
string string string
|
364
|
+
double double string
|
365
|
+
double string double],
|
366
|
+
FFI::OGR::Core::Err
|
367
367
|
attach_function :OSRSetWellKnownGeogCS, %i[OGRSpatialReferenceH string], FFI::OGR::Core::Err
|
368
368
|
attach_function :OSRSetFromUserInput, %i[OGRSpatialReferenceH string], FFI::OGR::Core::Err
|
369
369
|
attach_function :OSRCopyGeogCSFrom, %i[OGRSpatialReferenceH OGRSpatialReferenceH], FFI::OGR::Core::Err
|
370
370
|
attach_function :OSRSetTOWGS84,
|
371
|
-
|
372
|
-
|
371
|
+
%i[OGRSpatialReferenceH double double double double double double double],
|
372
|
+
FFI::OGR::Core::Err
|
373
373
|
attach_function :OSRGetTOWGS84, %i[OGRSpatialReferenceH pointer int], FFI::OGR::Core::Err
|
374
374
|
attach_function :OSRSetVertCS, %i[OGRSpatialReferenceH string string int], FFI::OGR::Core::Err
|
375
375
|
attach_function :OSRSetCompoundCS,
|
376
|
-
|
377
|
-
|
376
|
+
%i[OGRSpatialReferenceH string OGRSpatialReferenceH OGRSpatialReferenceH],
|
377
|
+
FFI::OGR::Core::Err
|
378
378
|
|
379
379
|
attach_function :OSRCleanup, [], :void
|
380
380
|
|
@@ -382,18 +382,17 @@ module FFI
|
|
382
382
|
# CoordinateTransformations
|
383
383
|
# ~~~~~~~~~~~~~
|
384
384
|
attach_function :OCTDestroyCoordinateTransformation,
|
385
|
-
|
386
|
-
|
385
|
+
%i[OGRCoordinateTransformationH],
|
386
|
+
:void
|
387
387
|
attach_function :OCTNewCoordinateTransformation,
|
388
|
-
|
389
|
-
|
388
|
+
%i[OGRSpatialReferenceH OGRSpatialReferenceH],
|
389
|
+
:OGRCoordinateTransformationH
|
390
390
|
attach_function :OCTTransform,
|
391
|
-
|
392
|
-
|
391
|
+
%i[OGRCoordinateTransformationH int pointer pointer pointer],
|
392
|
+
:bool
|
393
393
|
attach_function :OCTTransformEx,
|
394
|
-
|
395
|
-
|
396
|
-
attach_function :OCTProj4Normalize, %i[string], :string
|
394
|
+
%i[OGRCoordinateTransformationH int pointer pointer pointer pointer],
|
395
|
+
:bool
|
397
396
|
|
398
397
|
# ~~~~~~~~~~~~~
|
399
398
|
# Parameters
|
@@ -401,8 +400,8 @@ module FFI
|
|
401
400
|
attach_function :OPTGetProjectionMethods, %i[], :pointer
|
402
401
|
attach_function :OPTGetParameterList, %i[string pointer], :pointer
|
403
402
|
attach_function :OPTGetParameterInfo,
|
404
|
-
|
405
|
-
|
403
|
+
%i[string string pointer pointer pointer],
|
404
|
+
:int
|
406
405
|
end
|
407
406
|
end
|
408
407
|
end
|
data/lib/ffi/ogr/style_param.rb
CHANGED
@@ -7,9 +7,9 @@ module FFI
|
|
7
7
|
module OGR
|
8
8
|
class StyleParam < FFI::Struct
|
9
9
|
layout :param, :int,
|
10
|
-
|
11
|
-
|
12
|
-
|
10
|
+
:token, :string,
|
11
|
+
:georef, FFI::CPL::Port.find_type(:GBool),
|
12
|
+
:type, FFI::OGR::Featurestyle::SType
|
13
13
|
end
|
14
14
|
end
|
15
15
|
end
|
data/lib/ffi/ogr/style_value.rb
CHANGED
@@ -6,10 +6,10 @@ module FFI
|
|
6
6
|
module OGR
|
7
7
|
class StyleValue < FFI::Struct
|
8
8
|
layout :string_value, :string,
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
9
|
+
:double_value, :double,
|
10
|
+
:int_value, :int,
|
11
|
+
:valid, FFI::CPL::Port.find_type(:GBool),
|
12
|
+
:unit, Core::STUnitId
|
13
13
|
end
|
14
14
|
end
|
15
15
|
end
|
data/lib/gdal/color_entry.rb
CHANGED
@@ -1,11 +1,7 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
|
-
require_relative 'color_entry_mixins/extensions'
|
4
|
-
|
5
3
|
module GDAL
|
6
4
|
class ColorEntry
|
7
|
-
include ColorEntryMixins::Extensions
|
8
|
-
|
9
5
|
# @return [FFI::GDAL::ColorEntry]
|
10
6
|
attr_reader :c_struct
|
11
7
|
|
@@ -14,7 +10,7 @@ module GDAL
|
|
14
10
|
@c_struct = color_entry || FFI::GDAL::ColorEntry.new
|
15
11
|
end
|
16
12
|
|
17
|
-
# @return [FFI::
|
13
|
+
# @return [FFI::Pointer] Pointer to the C struct.
|
18
14
|
def c_pointer
|
19
15
|
@c_struct.pointer
|
20
16
|
end
|
@@ -2,14 +2,18 @@
|
|
2
2
|
|
3
3
|
module GDAL
|
4
4
|
class ColorInterpretation
|
5
|
-
# @param gdal_color_interp [FFI::GDAL::ColorInterp]
|
5
|
+
# @param gdal_color_interp [FFI::GDAL::GDAL::ColorInterp]
|
6
6
|
# @return [String]
|
7
7
|
def self.name(gdal_color_interp)
|
8
|
-
|
8
|
+
# The returned strings are static strings and should not be modified or freed by the application.
|
9
|
+
name, ptr = FFI::GDAL::GDAL.GDALGetColorInterpretationName(gdal_color_interp)
|
10
|
+
ptr.autorelease = false
|
11
|
+
|
12
|
+
name
|
9
13
|
end
|
10
14
|
|
11
15
|
# @param name [String]
|
12
|
-
# @return [FFI::GDAL::ColorInterp]
|
16
|
+
# @return [FFI::GDAL::GDAL::ColorInterp]
|
13
17
|
def self.by_name(name)
|
14
18
|
FFI::GDAL::GDAL.GDALGetColorInterpretationByName(name)
|
15
19
|
end
|