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
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 47c036d0cf23730afb86eeae6fddf3be5c319574e0de33d9ca0cb3a9bf71aeda
|
4
|
+
data.tar.gz: 16f1252a580de33a2b4779993f7a962db2182d49a56adaec5fd4a6e7e1e519bf
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 67e94c7de204e4a3b2b5c11b3fc9eeabcfae1f52e4fa6786f1ad7594fb69c76ba43adbf8c9ae7defd0578dee6113761cec225f37240aa7b5926b2f84bde53438
|
7
|
+
data.tar.gz: 4d16c5f9b75e968bd2177be1bc9eb123ea4dc054b38e5367df8e89efd35e5daac66bfabbdd272488d55ebf23db234981ec6b455b85218276577b9ff271f4a5d5
|
data/.dockerignore
ADDED
@@ -0,0 +1,61 @@
|
|
1
|
+
# This workflow uses actions that are not certified by GitHub.
|
2
|
+
# They are provided by a third-party and are governed by
|
3
|
+
# separate terms of service, privacy policy, and support
|
4
|
+
# documentation.
|
5
|
+
|
6
|
+
# This workflow checks out code, performs a Codacy security scan
|
7
|
+
# and integrates the results with the
|
8
|
+
# GitHub Advanced Security code scanning feature. For more information on
|
9
|
+
# the Codacy security scan action usage and parameters, see
|
10
|
+
# https://github.com/codacy/codacy-analysis-cli-action.
|
11
|
+
# For more information on Codacy Analysis CLI in general, see
|
12
|
+
# https://github.com/codacy/codacy-analysis-cli.
|
13
|
+
|
14
|
+
name: Codacy Security Scan
|
15
|
+
|
16
|
+
on:
|
17
|
+
push:
|
18
|
+
branches: [ "develop", master ]
|
19
|
+
pull_request:
|
20
|
+
# The branches below must be a subset of the branches above
|
21
|
+
branches: [ "develop" ]
|
22
|
+
schedule:
|
23
|
+
- cron: '26 14 * * 5'
|
24
|
+
|
25
|
+
permissions:
|
26
|
+
contents: read
|
27
|
+
|
28
|
+
jobs:
|
29
|
+
codacy-security-scan:
|
30
|
+
permissions:
|
31
|
+
contents: read # for actions/checkout to fetch code
|
32
|
+
security-events: write # for github/codeql-action/upload-sarif to upload SARIF results
|
33
|
+
actions: read # only required for a private repository by github/codeql-action/upload-sarif to get the Action run status
|
34
|
+
name: Codacy Security Scan
|
35
|
+
runs-on: ubuntu-latest
|
36
|
+
steps:
|
37
|
+
# Checkout the repository to the GitHub Actions runner
|
38
|
+
- name: Checkout code
|
39
|
+
uses: actions/checkout@v3
|
40
|
+
|
41
|
+
# Execute Codacy Analysis CLI and generate a SARIF output with the security issues identified during the analysis
|
42
|
+
- name: Run Codacy Analysis CLI
|
43
|
+
uses: codacy/codacy-analysis-cli-action@d840f886c4bd4edc059706d09c6a1586111c540b
|
44
|
+
with:
|
45
|
+
# Check https://github.com/codacy/codacy-analysis-cli#project-token to get your project token from your Codacy repository
|
46
|
+
# You can also omit the token and run the tools that support default configurations
|
47
|
+
project-token: ${{ secrets.CODACY_PROJECT_TOKEN }}
|
48
|
+
verbose: true
|
49
|
+
output: results.sarif
|
50
|
+
format: sarif
|
51
|
+
# Adjust severity of non-security issues
|
52
|
+
gh-code-scanning-compat: true
|
53
|
+
# Force 0 exit code to allow SARIF file generation
|
54
|
+
# This will handover control about PR rejection to the GitHub side
|
55
|
+
max-allowed-issues: 2147483647
|
56
|
+
|
57
|
+
# Upload the SARIF file generated in the previous step
|
58
|
+
- name: Upload SARIF results file
|
59
|
+
uses: github/codeql-action/upload-sarif@v2
|
60
|
+
with:
|
61
|
+
sarif_file: results.sarif
|
@@ -0,0 +1,74 @@
|
|
1
|
+
# For most projects, this workflow file will not need changing; you simply need
|
2
|
+
# to commit it to your repository.
|
3
|
+
#
|
4
|
+
# You may wish to alter this file to override the set of languages analyzed,
|
5
|
+
# or to provide custom queries or build logic.
|
6
|
+
#
|
7
|
+
# ******** NOTE ********
|
8
|
+
# We have attempted to detect the languages in your repository. Please check
|
9
|
+
# the `language` matrix defined below to confirm you have the correct set of
|
10
|
+
# supported CodeQL languages.
|
11
|
+
#
|
12
|
+
name: "CodeQL"
|
13
|
+
|
14
|
+
on:
|
15
|
+
push:
|
16
|
+
branches: [ "develop", master ]
|
17
|
+
pull_request:
|
18
|
+
# The branches below must be a subset of the branches above
|
19
|
+
branches: [ "develop" ]
|
20
|
+
schedule:
|
21
|
+
- cron: '38 16 * * 3'
|
22
|
+
|
23
|
+
jobs:
|
24
|
+
analyze:
|
25
|
+
name: Analyze
|
26
|
+
runs-on: ubuntu-latest
|
27
|
+
permissions:
|
28
|
+
actions: read
|
29
|
+
contents: read
|
30
|
+
security-events: write
|
31
|
+
|
32
|
+
strategy:
|
33
|
+
fail-fast: false
|
34
|
+
matrix:
|
35
|
+
language: [ 'ruby' ]
|
36
|
+
# CodeQL supports [ 'cpp', 'csharp', 'go', 'java', 'javascript', 'python', 'ruby' ]
|
37
|
+
# Learn more about CodeQL language support at https://aka.ms/codeql-docs/language-support
|
38
|
+
|
39
|
+
steps:
|
40
|
+
- name: Checkout repository
|
41
|
+
uses: actions/checkout@v3
|
42
|
+
|
43
|
+
# Initializes the CodeQL tools for scanning.
|
44
|
+
- name: Initialize CodeQL
|
45
|
+
uses: github/codeql-action/init@v2
|
46
|
+
with:
|
47
|
+
languages: ${{ matrix.language }}
|
48
|
+
# If you wish to specify custom queries, you can do so here or in a config file.
|
49
|
+
# By default, queries listed here will override any specified in a config file.
|
50
|
+
# Prefix the list here with "+" to use these queries and those in the config file.
|
51
|
+
|
52
|
+
# Details on CodeQL's query packs refer to : https://docs.github.com/en/code-security/code-scanning/automatically-scanning-your-code-for-vulnerabilities-and-errors/configuring-code-scanning#using-queries-in-ql-packs
|
53
|
+
# queries: security-extended,security-and-quality
|
54
|
+
|
55
|
+
|
56
|
+
# Autobuild attempts to build any compiled languages (C/C++, C#, or Java).
|
57
|
+
# If this step fails, then you should remove it and run the build manually (see below)
|
58
|
+
- name: Autobuild
|
59
|
+
uses: github/codeql-action/autobuild@v2
|
60
|
+
|
61
|
+
# ℹ️ Command-line programs to run using the OS shell.
|
62
|
+
# 📚 See https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#jobsjob_idstepsrun
|
63
|
+
|
64
|
+
# If the Autobuild fails above, remove it and uncomment the following three lines.
|
65
|
+
# modify them (or add more) to build your code if your project, please refer to the EXAMPLE below for guidance.
|
66
|
+
|
67
|
+
# - run: |
|
68
|
+
# echo "Run, Build Application using script"
|
69
|
+
# ./location_of_script_within_repo/buildscript.sh
|
70
|
+
|
71
|
+
- name: Perform CodeQL Analysis
|
72
|
+
uses: github/codeql-action/analyze@v2
|
73
|
+
with:
|
74
|
+
category: "/language:${{matrix.language}}"
|
@@ -0,0 +1,36 @@
|
|
1
|
+
name: Continuous Integration
|
2
|
+
|
3
|
+
on:
|
4
|
+
push:
|
5
|
+
|
6
|
+
jobs:
|
7
|
+
test:
|
8
|
+
name: Test
|
9
|
+
runs-on: ubuntu-18.04
|
10
|
+
steps:
|
11
|
+
- uses: actions/checkout@v2
|
12
|
+
- name: Set up Ruby
|
13
|
+
uses: ruby/setup-ruby@v1
|
14
|
+
with:
|
15
|
+
bundler-cache: true
|
16
|
+
- name: Install dependencies
|
17
|
+
run: |
|
18
|
+
sudo apt-get update
|
19
|
+
sudo apt-get install -y libgdal-dev librttopo-dev
|
20
|
+
bundle install --jobs 4 --retry 3
|
21
|
+
- name: Run specs
|
22
|
+
run: bundle exec rspec spec --format RSpec::Github::Formatter --format progress
|
23
|
+
|
24
|
+
static_analysis:
|
25
|
+
name: Rubocop
|
26
|
+
runs-on: ubuntu-18.04
|
27
|
+
steps:
|
28
|
+
- uses: actions/checkout@v2
|
29
|
+
- name: Set up Ruby
|
30
|
+
uses: ruby/setup-ruby@v1
|
31
|
+
with:
|
32
|
+
bundler-cache: true
|
33
|
+
- name: Install dependencies
|
34
|
+
run: bundle install --jobs 4 --retry 3
|
35
|
+
- name: Rubocop
|
36
|
+
run: bundle exec rubocop --format github --parallel
|
@@ -0,0 +1,20 @@
|
|
1
|
+
# Dependency Review Action
|
2
|
+
#
|
3
|
+
# This Action will scan dependency manifest files that change as part of a Pull Request, surfacing known-vulnerable versions of the packages declared or updated in the PR. Once installed, if the workflow run is marked as required, PRs introducing known-vulnerable packages will be blocked from merging.
|
4
|
+
#
|
5
|
+
# Source repository: https://github.com/actions/dependency-review-action
|
6
|
+
# Public documentation: https://docs.github.com/en/code-security/supply-chain-security/understanding-your-software-supply-chain/about-dependency-review#dependency-review-enforcement
|
7
|
+
name: 'Dependency Review'
|
8
|
+
on: [pull_request]
|
9
|
+
|
10
|
+
permissions:
|
11
|
+
contents: read
|
12
|
+
|
13
|
+
jobs:
|
14
|
+
dependency-review:
|
15
|
+
runs-on: ubuntu-latest
|
16
|
+
steps:
|
17
|
+
- name: 'Checkout Repository'
|
18
|
+
uses: actions/checkout@v3
|
19
|
+
- name: 'Dependency Review'
|
20
|
+
uses: actions/dependency-review-action@v2
|
@@ -0,0 +1,27 @@
|
|
1
|
+
name: Specs in Docker
|
2
|
+
|
3
|
+
on:
|
4
|
+
push:
|
5
|
+
|
6
|
+
jobs:
|
7
|
+
test:
|
8
|
+
name: Test
|
9
|
+
runs-on: ubuntu-latest
|
10
|
+
steps:
|
11
|
+
- uses: actions/checkout@v2
|
12
|
+
- name: Set up Docker Buildx
|
13
|
+
id: buildx
|
14
|
+
uses: docker/setup-buildx-action@master
|
15
|
+
- name: Cache Docker layers
|
16
|
+
uses: actions/cache@v2
|
17
|
+
with:
|
18
|
+
path: /tmp/.buildx-cache
|
19
|
+
key: ${{ runner.os }}-buildx-${{ github.sha }}
|
20
|
+
restore-keys: |
|
21
|
+
${{ runner.os }}-buildx-
|
22
|
+
- name: Build gdal2 image
|
23
|
+
run: |
|
24
|
+
docker compose version
|
25
|
+
docker compose build gdal2
|
26
|
+
- name: Run specs
|
27
|
+
run: docker compose run --rm gdal2 bundle exec rspec spec --format RSpec::Github::Formatter --format progress
|
data/.gitignore
CHANGED
data/.rspec
CHANGED
data/.rubocop.yml
CHANGED
@@ -1,104 +1,34 @@
|
|
1
1
|
---
|
2
2
|
inherit_from: .rubocop_todo.yml
|
3
|
+
require:
|
4
|
+
- rubocop-performance
|
3
5
|
|
4
|
-
Layout/
|
5
|
-
|
6
|
-
|
7
|
-
Layout/DotPosition:
|
8
|
-
EnforcedStyle: trailing
|
6
|
+
Layout/LineLength:
|
7
|
+
Max: 120
|
9
8
|
|
10
|
-
|
11
|
-
|
12
|
-
- examples/geometries.rb
|
13
|
-
- examples/testing_gdal.rb
|
9
|
+
Layout/ParameterAlignment:
|
10
|
+
EnforcedStyle: with_fixed_indentation
|
14
11
|
|
15
12
|
Metrics/BlockLength:
|
16
13
|
Exclude:
|
17
14
|
- spec/**/*_spec.rb
|
18
15
|
- spec/support/shared_examples/**/*.rb
|
19
16
|
|
20
|
-
# Commenting out until .rubocop_todo things are fixed.
|
21
|
-
# Metrics/ClassLength:
|
22
|
-
# Max: 300
|
23
|
-
|
24
|
-
Metrics/LineLength:
|
25
|
-
Max: 120
|
26
|
-
|
27
|
-
# Commenting out until .rubocop_todo things are fixed.
|
28
|
-
# Metrics/MethodLength:
|
29
|
-
# Max: 20
|
30
|
-
|
31
|
-
Metrics/ModuleLength:
|
32
|
-
Exclude:
|
33
|
-
- lib/ffi/gdal/alg.rb
|
34
|
-
- lib/ffi/gdal/gdal.rb
|
35
|
-
- lib/ffi/ogr/api.rb
|
36
|
-
- lib/ffi/ogr/srs_api.rb
|
37
|
-
Max: 300
|
38
|
-
|
39
|
-
Metrics/ParameterLists:
|
40
|
-
Exclude:
|
41
|
-
- lib/gdal/dataset.rb
|
42
|
-
- lib/gdal/dataset_mixins/algorithm_methods.rb
|
43
|
-
- lib/gdal/dataset_mixins/extensions.rb
|
44
|
-
- lib/gdal/dataset_mixins/warp_methods.rb
|
45
|
-
- lib/gdal/driver.rb
|
46
|
-
- lib/gdal/raster_band.rb
|
47
|
-
- lib/gdal/raster_band_mixins/algorithm_methods.rb
|
48
|
-
- lib/gdal/transformers/general_image_projection_transformer.rb
|
49
|
-
- lib/gdal/virtual_dataset.rb
|
50
|
-
- lib/gdal/warp_operation.rb
|
51
|
-
- lib/ogr/spatial_reference_mixins/coordinate_system_getter_setters.rb
|
52
|
-
|
53
|
-
Naming/AccessorMethodName:
|
54
|
-
Exclude:
|
55
|
-
- lib/ogr/layer_mixins/ogr_field_methods.rb
|
56
|
-
- lib/ogr/layer_mixins/ogr_query_filter_methods.rb
|
57
|
-
- lib/ogr/spatial_reference_mixins/coordinate_system_getter_setters.rb
|
58
|
-
|
59
17
|
Naming/FileName:
|
60
18
|
Exclude:
|
61
|
-
- Rakefile
|
62
19
|
- lib/ffi-gdal.rb
|
63
20
|
- spec/ffi-gdal_spec.rb
|
64
21
|
|
65
|
-
Naming/
|
66
|
-
|
67
|
-
- lib/ogr/geometry_mixins/extensions.rb
|
68
|
-
|
69
|
-
Naming/UncommunicativeMethodParamName:
|
70
|
-
Exclude:
|
71
|
-
- lib/gdal/raster_band_mixins/io_extensions.rb
|
72
|
-
- lib/ogr/geometries/line_string.rb
|
73
|
-
- lib/ogr/geometries/line_string_25d.rb
|
74
|
-
- lib/ogr/geometries/point.rb
|
75
|
-
- lib/ogr/geometries/point_25d.rb
|
76
|
-
- lib/ogr/geometry_types/curve.rb
|
22
|
+
Naming/MethodParameterName:
|
23
|
+
AllowedNames: [x, y, z]
|
77
24
|
|
78
25
|
Style/Documentation:
|
79
26
|
Enabled: false
|
80
27
|
|
81
|
-
Style/DoubleNegation:
|
82
|
-
Enabled: false
|
83
|
-
|
84
|
-
Style/FormatString:
|
85
|
-
EnforcedStyle: percent
|
86
|
-
|
87
|
-
Style/PercentLiteralDelimiters:
|
88
|
-
PreferredDelimiters:
|
89
|
-
'%i': '[]'
|
90
|
-
'%w': '[]'
|
91
|
-
'%W': '[]'
|
92
|
-
|
93
|
-
Style/SymbolArray:
|
94
|
-
Enabled: true
|
95
|
-
|
96
28
|
AllCops:
|
97
29
|
DisplayCopNames: true
|
98
30
|
DisplayStyleGuide: true
|
99
|
-
Include:
|
100
|
-
- Gemfile
|
101
|
-
- ffi-gdal.gemspec
|
102
31
|
Exclude:
|
103
32
|
- vendor/bundle/**/*
|
104
|
-
|
33
|
+
NewCops: enable
|
34
|
+
TargetRubyVersion: 2.6
|
data/.rubocop_todo.yml
CHANGED
@@ -1,65 +1,48 @@
|
|
1
1
|
# This configuration was generated by
|
2
2
|
# `rubocop --auto-gen-config`
|
3
|
-
# on
|
3
|
+
# on 2022-12-29 19:47:47 UTC using RuboCop version 1.41.1.
|
4
4
|
# The point is for the user to remove these configuration records
|
5
5
|
# one by one as the offenses are removed from the code base.
|
6
6
|
# Note that changes in the inspected code, or installation of new
|
7
7
|
# versions of RuboCop, may require this file to be generated again.
|
8
8
|
|
9
|
-
# Offense count:
|
9
|
+
# Offense count: 46
|
10
|
+
# Configuration parameters: AllowedMethods, AllowedPatterns, IgnoredMethods, CountRepeatedAttributes.
|
10
11
|
Metrics/AbcSize:
|
11
|
-
Max:
|
12
|
+
Max: 86
|
12
13
|
|
13
14
|
# Offense count: 3
|
14
|
-
# Configuration parameters: CountComments, ExcludedMethods.
|
15
|
+
# Configuration parameters: CountComments, CountAsOne, ExcludedMethods, AllowedMethods, AllowedPatterns, IgnoredMethods.
|
16
|
+
# AllowedMethods: refine
|
15
17
|
Metrics/BlockLength:
|
16
|
-
Max:
|
18
|
+
Max: 54
|
17
19
|
|
18
|
-
# Offense count:
|
19
|
-
# Configuration parameters: CountComments.
|
20
|
+
# Offense count: 9
|
21
|
+
# Configuration parameters: CountComments, CountAsOne.
|
20
22
|
Metrics/ClassLength:
|
21
|
-
Max:
|
23
|
+
Max: 307
|
22
24
|
|
23
|
-
# Offense count:
|
25
|
+
# Offense count: 14
|
26
|
+
# Configuration parameters: AllowedMethods, AllowedPatterns, IgnoredMethods.
|
24
27
|
Metrics/CyclomaticComplexity:
|
25
28
|
Max: 21
|
26
29
|
|
27
|
-
# Offense count:
|
28
|
-
# Configuration parameters: CountComments.
|
30
|
+
# Offense count: 93
|
31
|
+
# Configuration parameters: CountComments, CountAsOne, ExcludedMethods, AllowedMethods, AllowedPatterns, IgnoredMethods.
|
29
32
|
Metrics/MethodLength:
|
30
33
|
Max: 78
|
31
34
|
|
32
|
-
# Offense count:
|
33
|
-
# Configuration parameters:
|
35
|
+
# Offense count: 13
|
36
|
+
# Configuration parameters: CountComments, CountAsOne.
|
37
|
+
Metrics/ModuleLength:
|
38
|
+
Max: 533
|
39
|
+
|
40
|
+
# Offense count: 22
|
41
|
+
# Configuration parameters: CountKeywordArgs, MaxOptionalParameters.
|
34
42
|
Metrics/ParameterLists:
|
35
43
|
Max: 9
|
36
44
|
|
37
|
-
# Offense count:
|
45
|
+
# Offense count: 7
|
46
|
+
# Configuration parameters: AllowedMethods, AllowedPatterns, IgnoredMethods.
|
38
47
|
Metrics/PerceivedComplexity:
|
39
48
|
Max: 11
|
40
|
-
|
41
|
-
# Offense count: 1
|
42
|
-
# Configuration parameters: MinBodyLength.
|
43
|
-
Style/GuardClause:
|
44
|
-
Exclude:
|
45
|
-
- 'lib/gdal/gridder/point_extracting.rb'
|
46
|
-
|
47
|
-
# Offense count: 1
|
48
|
-
Style/MixinUsage:
|
49
|
-
Exclude:
|
50
|
-
- 'examples/ogr_layer_to_layer.rb'
|
51
|
-
|
52
|
-
# Offense count: 10
|
53
|
-
# Cop supports --auto-correct.
|
54
|
-
# Configuration parameters: AutoCorrect, EnforcedStyle.
|
55
|
-
# SupportedStyles: predicate, comparison
|
56
|
-
Style/NumericPredicate:
|
57
|
-
Exclude:
|
58
|
-
- 'spec/**/*'
|
59
|
-
- 'lib/gdal/merger.rb'
|
60
|
-
- 'lib/gdal/raster_attribute_table.rb'
|
61
|
-
- 'lib/ogr/feature.rb'
|
62
|
-
- 'lib/ogr/feature_definition.rb'
|
63
|
-
- 'lib/ogr/field.rb'
|
64
|
-
- 'lib/ogr/geometry.rb'
|
65
|
-
- 'lib/ogr/layer_mixins/ogr_field_methods.rb'
|
data/.ruby-version
CHANGED
@@ -1 +1 @@
|
|
1
|
-
2.
|
1
|
+
2.7
|