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/api.rb
CHANGED
@@ -30,14 +30,14 @@ module FFI
|
|
30
30
|
# Functions
|
31
31
|
# -----------------------------------------------------------------------
|
32
32
|
attach_function :OGR_G_CreateFromWkb,
|
33
|
-
|
34
|
-
|
33
|
+
[:pointer, FFI::OGR::SRSAPI.find_type(:OGRSpatialReferenceH), :pointer, :int],
|
34
|
+
FFI::OGR::Core::Err
|
35
35
|
attach_function :OGR_G_CreateFromWkt,
|
36
|
-
|
37
|
-
|
36
|
+
[:pointer, FFI::OGR::SRSAPI.find_type(:OGRSpatialReferenceH), :pointer],
|
37
|
+
FFI::OGR::Core::Err
|
38
38
|
attach_function :OGR_G_CreateFromFgf,
|
39
|
-
|
40
|
-
|
39
|
+
[:string, FFI::OGR::SRSAPI.find_type(:OGRSpatialReferenceH), :pointer, :int, :pointer],
|
40
|
+
FFI::OGR::Core::Err
|
41
41
|
|
42
42
|
# ~~~~~~~~~~~~~~~~
|
43
43
|
# Geometry-related
|
@@ -45,12 +45,12 @@ module FFI
|
|
45
45
|
attach_function :OGR_G_DestroyGeometry, %i[OGRGeometryH], :void
|
46
46
|
attach_function :OGR_G_CreateGeometry, [FFI::OGR::Core::WKBGeometryType], :OGRGeometryH
|
47
47
|
attach_function :OGR_G_ApproximateArcAngles,
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
|
48
|
+
[
|
49
|
+
:double, :double, :double, # X, Y, Z
|
50
|
+
:double, :double, :double, # primary radius, 2nd Axis, rotation
|
51
|
+
:double, :double, :double # start angle, end angle, max angle step size
|
52
|
+
],
|
53
|
+
:OGRGeometryH
|
54
54
|
|
55
55
|
attach_function :OGR_G_ForceToPolygon, %i[OGRGeometryH], :OGRGeometryH
|
56
56
|
attach_function :OGR_G_ForceToLineString, %i[OGRGeometryH], :OGRGeometryH
|
@@ -63,66 +63,67 @@ module FFI
|
|
63
63
|
attach_function :OGR_G_SetCoordinateDimension, %i[OGRGeometryH int], :void
|
64
64
|
attach_function :OGR_G_Clone, %i[OGRGeometryH], :OGRGeometryH
|
65
65
|
attach_function :OGR_G_GetEnvelope,
|
66
|
-
|
67
|
-
|
66
|
+
[:OGRGeometryH, FFI::OGR::Envelope.ptr],
|
67
|
+
:void
|
68
68
|
attach_function :OGR_G_GetEnvelope3D,
|
69
|
-
|
70
|
-
|
69
|
+
[:OGRGeometryH, FFI::OGR::Envelope3D.ptr],
|
70
|
+
:void
|
71
71
|
|
72
72
|
attach_function :OGR_G_ImportFromWkb,
|
73
|
-
|
74
|
-
|
73
|
+
%i[OGRGeometryH string int],
|
74
|
+
FFI::OGR::Core::Err
|
75
75
|
attach_function :OGR_G_ExportToWkb,
|
76
|
-
|
77
|
-
|
76
|
+
[:OGRGeometryH, FFI::OGR::Core::WKBByteOrder, :buffer_out],
|
77
|
+
FFI::OGR::Core::Err
|
78
78
|
attach_function :OGR_G_WkbSize, %i[OGRGeometryH], :int
|
79
79
|
|
80
80
|
attach_function :OGR_G_ImportFromWkt, %i[OGRGeometryH pointer], FFI::OGR::Core::Err
|
81
81
|
attach_function :OGR_G_ExportToWkt, %i[OGRGeometryH pointer], FFI::OGR::Core::Err
|
82
|
+
attach_function :OGR_G_ExportToIsoWkt, %i[OGRGeometryH pointer], FFI::OGR::Core::Err
|
82
83
|
|
83
84
|
attach_function :OGR_G_GetGeometryType, %i[OGRGeometryH], FFI::OGR::Core::WKBGeometryType
|
84
|
-
attach_function :OGR_G_GetGeometryName, %i[OGRGeometryH], :
|
85
|
+
attach_function :OGR_G_GetGeometryName, %i[OGRGeometryH], :strptr
|
85
86
|
attach_function :OGR_G_DumpReadable,
|
86
|
-
|
87
|
-
|
87
|
+
%i[OGRGeometryH pointer string],
|
88
|
+
:void
|
88
89
|
attach_function :OGR_G_FlattenTo2D, %i[OGRGeometryH], :void
|
89
90
|
attach_function :OGR_G_CloseRings, %i[OGRGeometryH], :void
|
90
91
|
|
91
92
|
attach_function :OGR_G_CreateFromGML, %i[string], :OGRGeometryH
|
92
|
-
attach_function :OGR_G_ExportToGML, %i[OGRGeometryH], :
|
93
|
-
attach_function :OGR_G_ExportToGMLEx, %i[OGRGeometryH pointer], :
|
93
|
+
attach_function :OGR_G_ExportToGML, %i[OGRGeometryH], :strptr
|
94
|
+
attach_function :OGR_G_ExportToGMLEx, %i[OGRGeometryH pointer], :strptr
|
94
95
|
attach_function :OGR_G_CreateFromGMLTree,
|
95
|
-
|
96
|
-
|
96
|
+
[FFI::CPL::XMLNode.ptr],
|
97
|
+
:OGRGeometryH
|
97
98
|
attach_function :OGR_G_ExportToGMLTree,
|
98
|
-
|
99
|
-
|
99
|
+
%i[OGRGeometryH],
|
100
|
+
FFI::CPL::XMLNode.ptr
|
100
101
|
attach_function :OGR_G_ExportEnvelopeToGMLTree,
|
101
|
-
|
102
|
-
|
102
|
+
%i[OGRGeometryH],
|
103
|
+
FFI::CPL::XMLNode.ptr
|
103
104
|
|
104
|
-
attach_function :OGR_G_ExportToKML, %i[OGRGeometryH string], :
|
105
|
-
attach_function :OGR_G_ExportToJson, %i[OGRGeometryH], :
|
106
|
-
attach_function :OGR_G_ExportToJsonEx, %i[OGRGeometryH
|
105
|
+
attach_function :OGR_G_ExportToKML, %i[OGRGeometryH string], :strptr
|
106
|
+
attach_function :OGR_G_ExportToJson, %i[OGRGeometryH], :strptr
|
107
|
+
attach_function :OGR_G_ExportToJsonEx, %i[OGRGeometryH pointer], :strptr
|
107
108
|
attach_function :OGR_G_CreateGeometryFromJson, %i[string], :OGRGeometryH
|
108
109
|
|
109
110
|
attach_function :OGR_G_AssignSpatialReference,
|
110
|
-
|
111
|
-
|
111
|
+
[:OGRGeometryH, FFI::OGR::SRSAPI.find_type(:OGRSpatialReferenceH)],
|
112
|
+
:void
|
112
113
|
attach_function :OGR_G_GetSpatialReference,
|
113
|
-
|
114
|
-
|
114
|
+
%i[OGRGeometryH],
|
115
|
+
FFI::OGR::SRSAPI.find_type(:OGRSpatialReferenceH)
|
115
116
|
|
116
117
|
attach_function :OGR_G_Transform,
|
117
|
-
|
118
|
-
|
118
|
+
[:OGRGeometryH, FFI::OGR::SRSAPI.find_type(:OGRCoordinateTransformationH)],
|
119
|
+
FFI::OGR::Core::Err
|
119
120
|
attach_function :OGR_G_TransformTo,
|
120
|
-
|
121
|
-
|
121
|
+
[:OGRGeometryH, FFI::OGR::SRSAPI.find_type(:OGRSpatialReferenceH)],
|
122
|
+
FFI::OGR::Core::Err
|
122
123
|
attach_function :OGR_G_Simplify, %i[OGRGeometryH double], :OGRGeometryH
|
123
124
|
attach_function :OGR_G_SimplifyPreserveTopology,
|
124
|
-
|
125
|
-
|
125
|
+
%i[OGRGeometryH double],
|
126
|
+
:OGRGeometryH
|
126
127
|
attach_function :OGR_G_Segmentize, %i[OGRGeometryH double], :void
|
127
128
|
attach_function :OGR_G_Intersects, %i[OGRGeometryH OGRGeometryH], :bool
|
128
129
|
attach_function :OGR_G_Equals, %i[OGRGeometryH OGRGeometryH], :bool
|
@@ -137,31 +138,31 @@ module FFI
|
|
137
138
|
attach_function :OGR_G_ConvexHull, %i[OGRGeometryH], :OGRGeometryH
|
138
139
|
attach_function :OGR_G_Buffer, %i[OGRGeometryH double int], :OGRGeometryH
|
139
140
|
attach_function :OGR_G_Intersection,
|
140
|
-
|
141
|
-
|
141
|
+
%i[OGRGeometryH OGRGeometryH],
|
142
|
+
:OGRGeometryH
|
142
143
|
attach_function :OGR_G_Union,
|
143
|
-
|
144
|
-
|
144
|
+
%i[OGRGeometryH OGRGeometryH],
|
145
|
+
:OGRGeometryH
|
145
146
|
attach_function :OGR_G_UnionCascaded, %i[OGRGeometryH], :OGRGeometryH
|
146
147
|
attach_function :OGR_G_PointOnSurface, %i[OGRGeometryH], :OGRGeometryH
|
147
148
|
attach_function :OGR_G_Difference,
|
148
|
-
|
149
|
-
|
149
|
+
%i[OGRGeometryH OGRGeometryH],
|
150
|
+
:OGRGeometryH
|
150
151
|
attach_function :OGR_G_SymDifference,
|
151
|
-
|
152
|
-
|
152
|
+
%i[OGRGeometryH OGRGeometryH],
|
153
|
+
:OGRGeometryH
|
153
154
|
attach_function :OGR_G_Distance,
|
154
|
-
|
155
|
-
|
155
|
+
%i[OGRGeometryH OGRGeometryH],
|
156
|
+
:double
|
156
157
|
attach_function :OGR_G_Length,
|
157
|
-
|
158
|
-
|
158
|
+
%i[OGRGeometryH],
|
159
|
+
:double
|
159
160
|
attach_function :OGR_G_Area,
|
160
|
-
|
161
|
-
|
161
|
+
%i[OGRGeometryH],
|
162
|
+
:double
|
162
163
|
attach_function :OGR_G_Centroid,
|
163
|
-
|
164
|
-
|
164
|
+
%i[OGRGeometryH OGRGeometryH],
|
165
|
+
:int
|
165
166
|
attach_function :OGR_G_Empty, %i[OGRGeometryH], :void
|
166
167
|
attach_function :OGR_G_IsEmpty, %i[OGRGeometryH], :bool
|
167
168
|
attach_function :OGR_G_IsValid, %i[OGRGeometryH], :bool
|
@@ -171,32 +172,32 @@ module FFI
|
|
171
172
|
attach_function :OGR_G_Polygonize, %i[OGRGeometryH], :OGRGeometryH
|
172
173
|
attach_function :OGR_G_GetPointCount, %i[OGRGeometryH], :int
|
173
174
|
attach_function :OGR_G_GetPoints,
|
174
|
-
|
175
|
-
|
175
|
+
%i[OGRGeometryH buffer_out int buffer_out int buffer_out int],
|
176
|
+
:int
|
176
177
|
attach_function :OGR_G_GetX, %i[OGRGeometryH int], :double
|
177
178
|
attach_function :OGR_G_GetY, %i[OGRGeometryH int], :double
|
178
179
|
attach_function :OGR_G_GetZ, %i[OGRGeometryH int], :double
|
179
180
|
attach_function :OGR_G_GetPoint,
|
180
|
-
|
181
|
-
|
181
|
+
%i[OGRGeometryH int pointer pointer pointer],
|
182
|
+
:double
|
182
183
|
attach_function :OGR_G_SetPointCount,
|
183
|
-
|
184
|
-
|
184
|
+
%i[OGRGeometryH int],
|
185
|
+
:void
|
185
186
|
attach_function :OGR_G_SetPoint,
|
186
|
-
|
187
|
-
|
187
|
+
%i[OGRGeometryH int double double double],
|
188
|
+
:void
|
188
189
|
attach_function :OGR_G_SetPoint_2D,
|
189
|
-
|
190
|
-
|
190
|
+
%i[OGRGeometryH int double double],
|
191
|
+
:void
|
191
192
|
attach_function :OGR_G_AddPoint,
|
192
|
-
|
193
|
-
|
193
|
+
%i[OGRGeometryH double double double],
|
194
|
+
:void
|
194
195
|
attach_function :OGR_G_AddPoint_2D,
|
195
|
-
|
196
|
-
|
196
|
+
%i[OGRGeometryH double double],
|
197
|
+
:void
|
197
198
|
attach_function :OGR_G_SetPoints,
|
198
|
-
|
199
|
-
|
199
|
+
%i[OGRGeometryH int pointer int pointer int pointer int],
|
200
|
+
:void
|
200
201
|
|
201
202
|
attach_function :OGR_G_GetGeometryCount, %i[OGRGeometryH], :int
|
202
203
|
attach_function :OGR_G_GetGeometryRef, %i[OGRGeometryH int], :OGRGeometryH
|
@@ -206,8 +207,8 @@ module FFI
|
|
206
207
|
attach_function :OGR_G_RemoveGeometry, %i[OGRGeometryH int bool], FFI::OGR::Core::Err
|
207
208
|
|
208
209
|
attach_function :OGRBuildPolygonFromEdges,
|
209
|
-
|
210
|
-
|
210
|
+
%i[OGRGeometryH bool bool double pointer],
|
211
|
+
:OGRGeometryH
|
211
212
|
|
212
213
|
# ~~~~~~~~~~~~~~~~
|
213
214
|
# Field-related
|
@@ -215,7 +216,7 @@ module FFI
|
|
215
216
|
attach_function :OGR_Fld_Create, [:string, FFI::OGR::Core::FieldType], :OGRFieldDefnH
|
216
217
|
attach_function :OGR_Fld_Destroy, %i[OGRFieldDefnH], :void
|
217
218
|
attach_function :OGR_Fld_SetName, %i[OGRFieldDefnH string], :void
|
218
|
-
attach_function :OGR_Fld_GetNameRef, %i[OGRFieldDefnH], :
|
219
|
+
attach_function :OGR_Fld_GetNameRef, %i[OGRFieldDefnH], :strptr
|
219
220
|
attach_function :OGR_Fld_GetType, %i[OGRFieldDefnH], FFI::OGR::Core::FieldType
|
220
221
|
attach_function :OGR_Fld_SetType, [:OGRFieldDefnH, FFI::OGR::Core::FieldType], :void
|
221
222
|
attach_function :OGR_Fld_GetJustify, %i[OGRFieldDefnH], FFI::OGR::Core::Justification
|
@@ -226,32 +227,32 @@ module FFI
|
|
226
227
|
attach_function :OGR_Fld_SetPrecision, %i[OGRFieldDefnH int], :void
|
227
228
|
|
228
229
|
attach_function :OGR_Fld_Set,
|
229
|
-
|
230
|
-
|
230
|
+
[:OGRFieldDefnH, :string, FFI::OGR::Core::FieldType, :int, :int, FFI::OGR::Core::Justification],
|
231
|
+
:void
|
231
232
|
attach_function :OGR_Fld_IsIgnored, %i[OGRFieldDefnH], :bool
|
232
233
|
attach_function :OGR_Fld_SetIgnored, %i[OGRFieldDefnH bool], :void
|
233
234
|
|
234
|
-
attach_function :OGR_GetFieldTypeName, [FFI::OGR::Core::FieldType], :
|
235
|
+
attach_function :OGR_GetFieldTypeName, [FFI::OGR::Core::FieldType], :strptr
|
235
236
|
|
236
237
|
# ~~~~~~~~~~~~~~~~
|
237
238
|
# Geometry Field-related
|
238
239
|
# ~~~~~~~~~~~~~~~~
|
239
240
|
attach_function :OGR_GFld_Create,
|
240
|
-
|
241
|
-
|
241
|
+
[:string, FFI::OGR::Core::WKBGeometryType],
|
242
|
+
:OGRGeomFieldDefnH
|
242
243
|
attach_function :OGR_GFld_Destroy, %i[OGRGeomFieldDefnH], :void
|
243
244
|
attach_function :OGR_GFld_SetName, %i[OGRGeomFieldDefnH string], :void
|
244
|
-
attach_function :OGR_GFld_GetNameRef, %i[OGRGeomFieldDefnH], :
|
245
|
+
attach_function :OGR_GFld_GetNameRef, %i[OGRGeomFieldDefnH], :strptr
|
245
246
|
attach_function :OGR_GFld_GetType, %i[OGRGeomFieldDefnH], FFI::OGR::Core::WKBGeometryType
|
246
247
|
attach_function :OGR_GFld_SetType,
|
247
|
-
|
248
|
-
|
248
|
+
[:OGRGeomFieldDefnH, FFI::OGR::Core::WKBGeometryType],
|
249
|
+
:void
|
249
250
|
attach_function :OGR_GFld_GetSpatialRef,
|
250
|
-
|
251
|
-
|
251
|
+
%i[OGRGeomFieldDefnH],
|
252
|
+
FFI::OGR::SRSAPI.find_type(:OGRSpatialReferenceH)
|
252
253
|
attach_function :OGR_GFld_SetSpatialRef,
|
253
|
-
|
254
|
-
|
254
|
+
[:OGRGeomFieldDefnH, FFI::OGR::SRSAPI.find_type(:OGRSpatialReferenceH)],
|
255
|
+
:void
|
255
256
|
attach_function :OGR_GFld_IsIgnored, %i[OGRGeomFieldDefnH], :bool
|
256
257
|
attach_function :OGR_GFld_SetIgnored, %i[OGRGeomFieldDefnH bool], :void
|
257
258
|
|
@@ -261,20 +262,20 @@ module FFI
|
|
261
262
|
attach_function :OGR_FD_Create, %i[string], :OGRFeatureDefnH
|
262
263
|
attach_function :OGR_FD_Destroy, %i[OGRFeatureDefnH], :void
|
263
264
|
attach_function :OGR_FD_Release, %i[OGRFeatureDefnH], :void
|
264
|
-
attach_function :OGR_FD_GetName, %i[OGRFeatureDefnH], :
|
265
|
+
attach_function :OGR_FD_GetName, %i[OGRFeatureDefnH], :strptr
|
265
266
|
attach_function :OGR_FD_GetFieldCount, %i[OGRFeatureDefnH], :int
|
266
267
|
attach_function :OGR_FD_GetFieldDefn, %i[OGRFeatureDefnH int], :OGRFieldDefnH
|
267
268
|
attach_function :OGR_FD_GetFieldIndex, %i[OGRFeatureDefnH string], :int
|
268
269
|
attach_function :OGR_FD_AddFieldDefn,
|
269
|
-
|
270
|
-
|
270
|
+
%i[OGRFeatureDefnH OGRFieldDefnH],
|
271
|
+
:void
|
271
272
|
attach_function :OGR_FD_DeleteFieldDefn,
|
272
|
-
|
273
|
-
|
273
|
+
%i[OGRFeatureDefnH int],
|
274
|
+
FFI::OGR::Core::Err
|
274
275
|
attach_function :OGR_FD_GetGeomType, %i[OGRFeatureDefnH], FFI::OGR::Core::WKBGeometryType
|
275
276
|
attach_function :OGR_FD_SetGeomType,
|
276
|
-
|
277
|
-
|
277
|
+
[:OGRFeatureDefnH, FFI::OGR::Core::WKBGeometryType],
|
278
|
+
:void
|
278
279
|
attach_function :OGR_FD_IsGeometryIgnored, %i[OGRFeatureDefnH], :bool
|
279
280
|
attach_function :OGR_FD_SetGeometryIgnored, %i[OGRFeatureDefnH bool], :void
|
280
281
|
attach_function :OGR_FD_IsStyleIgnored, %i[OGRFeatureDefnH], :bool
|
@@ -284,21 +285,21 @@ module FFI
|
|
284
285
|
attach_function :OGR_FD_GetReferenceCount, %i[OGRFeatureDefnH], :int
|
285
286
|
attach_function :OGR_FD_GetGeomFieldCount, %i[OGRFeatureDefnH], :int
|
286
287
|
attach_function :OGR_FD_GetGeomFieldDefn,
|
287
|
-
|
288
|
-
|
288
|
+
%i[OGRFeatureDefnH int],
|
289
|
+
:OGRGeomFieldDefnH
|
289
290
|
attach_function :OGR_FD_GetGeomFieldIndex,
|
290
|
-
|
291
|
-
|
291
|
+
%i[OGRFeatureDefnH string],
|
292
|
+
:int
|
292
293
|
attach_function :OGR_FD_AddGeomFieldDefn,
|
293
|
-
|
294
|
-
|
294
|
+
%i[OGRFeatureDefnH OGRGeomFieldDefnH],
|
295
|
+
:void
|
295
296
|
attach_function :OGR_FD_DeleteGeomFieldDefn,
|
296
|
-
|
297
|
-
|
297
|
+
%i[OGRFeatureDefnH int],
|
298
|
+
FFI::OGR::Core::Err
|
298
299
|
|
299
300
|
attach_function :OGR_FD_IsSame,
|
300
|
-
|
301
|
-
|
301
|
+
%i[OGRFeatureDefnH OGRFeatureDefnH],
|
302
|
+
:bool
|
302
303
|
|
303
304
|
# ~~~~~~~~~~~~~~~~
|
304
305
|
# Feature-related
|
@@ -307,11 +308,11 @@ module FFI
|
|
307
308
|
attach_function :OGR_F_Destroy, %i[OGRFeatureH], :void
|
308
309
|
attach_function :OGR_F_GetDefnRef, %i[OGRFeatureH], :OGRFeatureDefnH
|
309
310
|
attach_function :OGR_F_SetGeometryDirectly,
|
310
|
-
|
311
|
-
|
311
|
+
%i[OGRFeatureH OGRGeometryH],
|
312
|
+
FFI::OGR::Core::Err
|
312
313
|
attach_function :OGR_F_SetGeometry,
|
313
|
-
|
314
|
-
|
314
|
+
%i[OGRFeatureH OGRGeometryH],
|
315
|
+
FFI::OGR::Core::Err
|
315
316
|
attach_function :OGR_F_GetGeometryRef, %i[OGRFeatureH], :OGRGeometryH
|
316
317
|
attach_function :OGR_F_StealGeometry, %i[OGRFeatureH], :OGRGeometryH
|
317
318
|
|
@@ -326,14 +327,14 @@ module FFI
|
|
326
327
|
|
327
328
|
attach_function :OGR_F_GetFieldAsInteger, %i[OGRFeatureH int], :int
|
328
329
|
attach_function :OGR_F_GetFieldAsDouble, %i[OGRFeatureH int], :double
|
329
|
-
attach_function :OGR_F_GetFieldAsString, %i[OGRFeatureH int], :
|
330
|
+
attach_function :OGR_F_GetFieldAsString, %i[OGRFeatureH int], :strptr
|
330
331
|
attach_function :OGR_F_GetFieldAsIntegerList, %i[OGRFeatureH int pointer], :pointer
|
331
332
|
attach_function :OGR_F_GetFieldAsDoubleList, %i[OGRFeatureH int pointer], :pointer
|
332
333
|
attach_function :OGR_F_GetFieldAsStringList, %i[OGRFeatureH int], :pointer
|
333
334
|
attach_function :OGR_F_GetFieldAsBinary, %i[OGRFeatureH int pointer], :pointer
|
334
335
|
attach_function :OGR_F_GetFieldAsDateTime,
|
335
|
-
|
336
|
-
|
336
|
+
%i[OGRFeatureH int pointer pointer pointer pointer pointer pointer pointer],
|
337
|
+
:int
|
337
338
|
attach_function :OGR_F_SetFieldInteger, %i[OGRFeatureH int int], :void
|
338
339
|
attach_function :OGR_F_SetFieldDouble, %i[OGRFeatureH int double], :void
|
339
340
|
attach_function :OGR_F_SetFieldString, %i[OGRFeatureH int string], :void
|
@@ -343,8 +344,8 @@ module FFI
|
|
343
344
|
attach_function :OGR_F_SetFieldRaw, [:OGRFeatureH, :int, FFI::OGR::Field.ptr], :void
|
344
345
|
attach_function :OGR_F_SetFieldBinary, %i[OGRFeatureH int int pointer], :void
|
345
346
|
attach_function :OGR_F_SetFieldDateTime,
|
346
|
-
|
347
|
-
|
347
|
+
%i[OGRFeatureH int int int int int int int int],
|
348
|
+
:void
|
348
349
|
|
349
350
|
attach_function :OGR_F_GetGeomFieldCount, %i[OGRFeatureH], :int
|
350
351
|
attach_function :OGR_F_GetGeomFieldDefnRef, %i[OGRFeatureH int], :OGRGeomFieldDefnH
|
@@ -359,7 +360,7 @@ module FFI
|
|
359
360
|
attach_function :OGR_F_SetFrom, %i[OGRFeatureH OGRFeatureH int], FFI::OGR::Core::Err
|
360
361
|
attach_function :OGR_F_SetFromWithMap, %i[OGRFeatureH OGRFeatureH int pointer], FFI::OGR::Core::Err
|
361
362
|
|
362
|
-
attach_function :OGR_F_GetStyleString, %i[OGRFeatureH], :
|
363
|
+
attach_function :OGR_F_GetStyleString, %i[OGRFeatureH], :strptr
|
363
364
|
attach_function :OGR_F_SetStyleString, %i[OGRFeatureH string], :void
|
364
365
|
attach_function :OGR_F_SetStyleStringDirectly, %i[OGRFeatureH string], :void
|
365
366
|
attach_function :OGR_F_GetStyleTable, %i[OGRFeatureH], :OGRStyleTableH
|
@@ -369,17 +370,17 @@ module FFI
|
|
369
370
|
# ~~~~~~~~~~~~~~~~
|
370
371
|
# Layer-related
|
371
372
|
# ~~~~~~~~~~~~~~~~
|
372
|
-
attach_function :OGR_L_GetName, %i[OGRLayerH], :
|
373
|
+
attach_function :OGR_L_GetName, %i[OGRLayerH], :strptr
|
373
374
|
attach_function :OGR_L_GetGeomType, %i[OGRLayerH], FFI::OGR::Core::WKBGeometryType
|
374
375
|
attach_function :OGR_L_GetSpatialFilter, %i[OGRLayerH], :OGRGeometryH
|
375
376
|
attach_function :OGR_L_SetSpatialFilter, %i[OGRLayerH OGRGeometryH], :void
|
376
377
|
attach_function :OGR_L_SetSpatialFilterRect,
|
377
|
-
|
378
|
-
|
378
|
+
%i[OGRLayerH double double double double],
|
379
|
+
:void
|
379
380
|
attach_function :OGR_L_SetSpatialFilterEx, %i[OGRLayerH int OGRGeometryH], :void
|
380
381
|
attach_function :OGR_L_SetSpatialFilterRectEx,
|
381
|
-
|
382
|
-
|
382
|
+
%i[OGRLayerH int double double double double],
|
383
|
+
:void
|
383
384
|
attach_function :OGR_L_SetAttributeFilter, %i[OGRLayerH string], FFI::OGR::Core::Err
|
384
385
|
attach_function :OGR_L_ResetReading, %i[OGRLayerH], :void
|
385
386
|
|
@@ -396,13 +397,13 @@ module FFI
|
|
396
397
|
|
397
398
|
attach_function :OGR_L_GetExtent, [:OGRLayerH, FFI::OGR::Envelope.ptr, :bool], FFI::OGR::Core::Err
|
398
399
|
attach_function :OGR_L_GetExtentEx,
|
399
|
-
|
400
|
-
|
400
|
+
[:OGRLayerH, :int, FFI::OGR::Envelope.ptr, :bool],
|
401
|
+
FFI::OGR::Core::Err
|
401
402
|
attach_function :OGR_L_TestCapability, %i[OGRLayerH string], :bool
|
402
403
|
attach_function :OGR_L_CreateField, %i[OGRLayerH OGRFieldDefnH bool], FFI::OGR::Core::Err
|
403
404
|
attach_function :OGR_L_CreateGeomField,
|
404
|
-
|
405
|
-
|
405
|
+
%i[OGRLayerH OGRGeomFieldDefnH bool],
|
406
|
+
FFI::OGR::Core::Err
|
406
407
|
attach_function :OGR_L_DeleteField, %i[OGRLayerH int], FFI::OGR::Core::Err
|
407
408
|
attach_function :OGR_L_ReorderFields, %i[OGRLayerH pointer], FFI::OGR::Core::Err
|
408
409
|
attach_function :OGR_L_ReorderField, %i[OGRLayerH int int], FFI::OGR::Core::Err
|
@@ -418,79 +419,86 @@ module FFI
|
|
418
419
|
attach_function :OGR_L_SyncToDisk, %i[OGRLayerH], FFI::OGR::Core::Err
|
419
420
|
|
420
421
|
attach_function :OGR_L_GetFeaturesRead, %i[OGRLayerH], CPL::Port.find_type(:GIntBig)
|
421
|
-
attach_function :OGR_L_GetFIDColumn, %i[OGRLayerH], :
|
422
|
-
attach_function :OGR_L_GetGeometryColumn, %i[OGRLayerH], :
|
422
|
+
attach_function :OGR_L_GetFIDColumn, %i[OGRLayerH], :strptr
|
423
|
+
attach_function :OGR_L_GetGeometryColumn, %i[OGRLayerH], :strptr
|
423
424
|
attach_function :OGR_L_GetStyleTable, %i[OGRLayerH], :OGRStyleTableH
|
424
425
|
attach_function :OGR_L_SetStyleTableDirectly, %i[OGRLayerH OGRStyleTableH], :void
|
425
426
|
attach_function :OGR_L_SetStyleTable, %i[OGRLayerH OGRStyleTableH], :void
|
426
427
|
attach_function :OGR_L_SetIgnoredFields, %i[OGRLayerH pointer], FFI::OGR::Core::Err
|
427
428
|
|
428
429
|
attach_function :OGR_L_Intersection,
|
429
|
-
|
430
|
-
|
430
|
+
[:OGRLayerH, :OGRLayerH, :OGRLayerH, :pointer, FFI::GDAL::GDAL.find_type(:GDALProgressFunc),
|
431
|
+
:pointer],
|
432
|
+
FFI::OGR::Core::Err
|
431
433
|
attach_function :OGR_L_Union,
|
432
|
-
|
433
|
-
|
434
|
+
[:OGRLayerH, :OGRLayerH, :OGRLayerH, :pointer, FFI::GDAL::GDAL.find_type(:GDALProgressFunc),
|
435
|
+
:pointer],
|
436
|
+
FFI::OGR::Core::Err
|
434
437
|
attach_function :OGR_L_SymDifference,
|
435
|
-
|
436
|
-
|
438
|
+
[:OGRLayerH, :OGRLayerH, :OGRLayerH, :pointer, FFI::GDAL::GDAL.find_type(:GDALProgressFunc),
|
439
|
+
:pointer],
|
440
|
+
FFI::OGR::Core::Err
|
437
441
|
attach_function :OGR_L_Identity,
|
438
|
-
|
439
|
-
|
442
|
+
[:OGRLayerH, :OGRLayerH, :OGRLayerH, :pointer, FFI::GDAL::GDAL.find_type(:GDALProgressFunc),
|
443
|
+
:pointer],
|
444
|
+
FFI::OGR::Core::Err
|
440
445
|
attach_function :OGR_L_Update,
|
441
|
-
|
442
|
-
|
446
|
+
[:OGRLayerH, :OGRLayerH, :OGRLayerH, :pointer, FFI::GDAL::GDAL.find_type(:GDALProgressFunc),
|
447
|
+
:pointer],
|
448
|
+
FFI::OGR::Core::Err
|
443
449
|
attach_function :OGR_L_Clip,
|
444
|
-
|
445
|
-
|
450
|
+
[:OGRLayerH, :OGRLayerH, :OGRLayerH, :pointer, FFI::GDAL::GDAL.find_type(:GDALProgressFunc),
|
451
|
+
:pointer],
|
452
|
+
FFI::OGR::Core::Err
|
446
453
|
attach_function :OGR_L_Erase,
|
447
|
-
|
448
|
-
|
454
|
+
[:OGRLayerH, :OGRLayerH, :OGRLayerH, :pointer, FFI::GDAL::GDAL.find_type(:GDALProgressFunc),
|
455
|
+
:pointer],
|
456
|
+
FFI::OGR::Core::Err
|
449
457
|
|
450
458
|
# ~~~~~~~~~~~~~~~~
|
451
459
|
# DataSource-related
|
452
460
|
# ~~~~~~~~~~~~~~~~
|
453
461
|
attach_function :OGR_DS_Destroy, %i[OGRDataSourceH], :void
|
454
|
-
attach_function :OGR_DS_GetName, %i[OGRDataSourceH], :
|
462
|
+
attach_function :OGR_DS_GetName, %i[OGRDataSourceH], :pointer
|
455
463
|
attach_function :OGR_DS_GetLayerCount, %i[OGRDataSourceH], :int
|
456
464
|
attach_function :OGR_DS_GetLayer, %i[OGRDataSourceH int], :OGRLayerH
|
457
465
|
attach_function :OGR_DS_GetLayerByName, %i[OGRDataSourceH string], :OGRLayerH
|
458
466
|
attach_function :OGR_DS_DeleteLayer, %i[OGRDataSourceH int], FFI::OGR::Core::Err
|
459
467
|
attach_function :OGR_DS_GetDriver, %i[OGRDataSourceH], :OGRSFDriverH
|
460
468
|
attach_function :OGR_DS_CreateLayer,
|
461
|
-
|
462
|
-
|
463
|
-
|
464
|
-
|
465
|
-
|
466
|
-
|
467
|
-
|
469
|
+
[
|
470
|
+
:OGRDataSourceH,
|
471
|
+
:string,
|
472
|
+
FFI::OGR::SRSAPI.find_type(:OGRSpatialReferenceH),
|
473
|
+
FFI::OGR::Core::WKBGeometryType, :pointer
|
474
|
+
],
|
475
|
+
:OGRLayerH
|
468
476
|
attach_function :OGR_DS_CopyLayer,
|
469
|
-
|
470
|
-
|
477
|
+
%i[OGRDataSourceH OGRLayerH string pointer],
|
478
|
+
:OGRLayerH
|
471
479
|
attach_function :OGR_DS_TestCapability, %i[OGRDataSourceH string], :bool
|
472
480
|
attach_function :OGR_DS_ExecuteSQL,
|
473
|
-
|
474
|
-
|
481
|
+
%i[OGRDataSourceH string OGRGeometryH string],
|
482
|
+
:OGRLayerH
|
475
483
|
attach_function :OGR_DS_ReleaseResultSet, %i[OGRDataSourceH OGRLayerH], :void
|
476
484
|
|
477
485
|
attach_function :OGR_DS_SyncToDisk, %i[OGRDataSourceH], FFI::OGR::Core::Err
|
478
486
|
attach_function :OGR_DS_GetStyleTable, %i[OGRDataSourceH], :OGRStyleTableH
|
479
487
|
attach_function :OGR_DS_SetStyleTableDirectly,
|
480
|
-
|
481
|
-
|
488
|
+
%i[OGRDataSourceH OGRStyleTableH],
|
489
|
+
:void
|
482
490
|
attach_function :OGR_DS_SetStyleTable, %i[OGRDataSourceH OGRStyleTableH], :void
|
483
491
|
|
484
492
|
# ~~~~~~~~~~~~~~~~
|
485
493
|
# Driver-related
|
486
494
|
# ~~~~~~~~~~~~~~~~
|
487
|
-
attach_function :OGR_Dr_GetName, %i[OGRSFDriverH], :
|
495
|
+
attach_function :OGR_Dr_GetName, %i[OGRSFDriverH], :strptr
|
488
496
|
attach_function :OGR_Dr_Open, %i[OGRSFDriverH string bool], :OGRDataSourceH
|
489
497
|
attach_function :OGR_Dr_TestCapability, %i[OGRSFDriverH string], :bool
|
490
498
|
attach_function :OGR_Dr_CreateDataSource, %i[OGRSFDriverH string pointer], :OGRDataSourceH
|
491
499
|
attach_function :OGR_Dr_CopyDataSource,
|
492
|
-
|
493
|
-
|
500
|
+
%i[OGRSFDriverH OGRDataSourceH string pointer],
|
501
|
+
:OGRDataSourceH
|
494
502
|
attach_function :OGR_Dr_DeleteDataSource, %i[OGRSFDriverH string], FFI::OGR::Core::Err
|
495
503
|
|
496
504
|
# ~~~~~~~~~~~~~~~~
|
@@ -498,12 +506,12 @@ module FFI
|
|
498
506
|
# ~~~~~~~~~~~~~~~~
|
499
507
|
attach_function :OGR_SM_Create, %i[OGRStyleTableH], :OGRStyleMgrH
|
500
508
|
attach_function :OGR_SM_Destroy, %i[OGRStyleTableH], :void
|
501
|
-
attach_function :OGR_SM_InitFromFeature, %i[OGRStyleTableH OGRFeatureH], :
|
509
|
+
attach_function :OGR_SM_InitFromFeature, %i[OGRStyleTableH OGRFeatureH], :strptr
|
502
510
|
attach_function :OGR_SM_InitStyleString, %i[OGRStyleTableH string], :int
|
503
511
|
attach_function :OGR_SM_GetPartCount, %i[OGRStyleTableH string], :int
|
504
512
|
attach_function :OGR_SM_GetPart,
|
505
|
-
|
506
|
-
|
513
|
+
%i[OGRStyleTableH int string],
|
514
|
+
:OGRStyleToolH
|
507
515
|
attach_function :OGR_SM_AddPart, %i[OGRStyleTableH OGRStyleToolH], :int
|
508
516
|
attach_function :OGR_SM_AddStyle, %i[OGRStyleTableH string string], :int
|
509
517
|
|
@@ -515,16 +523,16 @@ module FFI
|
|
515
523
|
attach_function :OGR_ST_GetType, %i[OGRStyleToolH], FFI::OGR::Core::STClassId
|
516
524
|
attach_function :OGR_ST_GetUnit, %i[OGRStyleToolH], FFI::OGR::Core::STUnitId
|
517
525
|
attach_function :OGR_ST_SetUnit, [:OGRStyleToolH, FFI::OGR::Core::STUnitId, :double], :void
|
518
|
-
attach_function :OGR_ST_GetParamStr, %i[OGRStyleToolH int pointer], :
|
526
|
+
attach_function :OGR_ST_GetParamStr, %i[OGRStyleToolH int pointer], :strptr
|
519
527
|
attach_function :OGR_ST_GetParamNum, %i[OGRStyleToolH int pointer], :int
|
520
528
|
attach_function :OGR_ST_GetParamDbl, %i[OGRStyleToolH int pointer], :double
|
521
529
|
attach_function :OGR_ST_SetParamStr, %i[OGRStyleToolH int string], :void
|
522
530
|
attach_function :OGR_ST_SetParamNum, %i[OGRStyleToolH int int], :void
|
523
531
|
attach_function :OGR_ST_SetParamDbl, %i[OGRStyleToolH int double], :void
|
524
|
-
attach_function :OGR_ST_GetStyleString, %i[OGRStyleToolH], :
|
532
|
+
attach_function :OGR_ST_GetStyleString, %i[OGRStyleToolH], :strptr
|
525
533
|
attach_function :OGR_ST_GetRGBFromString,
|
526
|
-
|
527
|
-
|
534
|
+
%i[OGRStyleToolH string pointer pointer pointer pointer],
|
535
|
+
:bool
|
528
536
|
|
529
537
|
# ~~~~~~~~~~~~~~~~
|
530
538
|
# Style Table-related
|
@@ -6,10 +6,10 @@ module FFI
|
|
6
6
|
module OGR
|
7
7
|
class ContourWriterInfo < FFI::Struct
|
8
8
|
layout :layer, :pointer,
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
9
|
+
:geo_transform, [:double, 6],
|
10
|
+
:elev_field, :int,
|
11
|
+
:id_field, :int,
|
12
|
+
:next_id, :int
|
13
13
|
end
|
14
14
|
end
|
15
15
|
end
|