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/Changelog-0.x.md
ADDED
@@ -0,0 +1,512 @@
|
|
1
|
+
# Changelog: 0.x
|
2
|
+
|
3
|
+
Changes listed in this file (somewhat) reflect changes throughout 0.x-1.0.0-beta releases. The
|
4
|
+
1.0.0-beta\* releases ended up with many unexpected changes, often leading to API changes that didn't
|
5
|
+
get documented. Instead of keeping a mish-mash of valid and invalid change entries in the proper
|
6
|
+
[Changelog](Changelog.md), we've moved those here, as they were just prior to the 1.0.0 release.
|
7
|
+
|
8
|
+
---
|
9
|
+
|
10
|
+
## [Unreleased]
|
11
|
+
|
12
|
+
### Added
|
13
|
+
|
14
|
+
- Added `.release` class method for many `GDAL` types.
|
15
|
+
- Added `GDAL::Dataset.copy_whole_raster`.
|
16
|
+
- Added exception messages for `OGR` methods that raised using `OGR::ErrorHandling`.
|
17
|
+
- Added alias for `OGR::SpatialReferenceMixins::Exporters#to_gml` to `to_xml`.
|
18
|
+
- Wrapped `OGR_G_ExportToIsoWkt` and `OGR_G_ExportToJsonEx`.
|
19
|
+
- Merged `ffi-gdal-extensions` gem back to `ffi-gdal`.
|
20
|
+
|
21
|
+
### Changed
|
22
|
+
|
23
|
+
- _BREAKING_: All methods with default boolean args are now keyword args.
|
24
|
+
- _BREAKING_: `required_ruby_version` set to `>= 2.6`
|
25
|
+
|
26
|
+
#### GDAL
|
27
|
+
|
28
|
+
- _BREAKING_: `GDAL::RasterBand#no_data_value=` now accepts `nil` to allow unsetting the NODATA
|
29
|
+
value.
|
30
|
+
- _BREAKING_: Many methods were not communicating errors `CPLErr` back to the caller; these now
|
31
|
+
raise on `CE_Failure` or `CE_Fatal`:
|
32
|
+
- `GDAL::Dataset#add_band`
|
33
|
+
- `GDAL::Dataset#build_overviews`
|
34
|
+
- `GDAL::Dataset#create_mask_band`
|
35
|
+
- `GDAL::Dataset#geo_transform=`
|
36
|
+
- `GDAL::Dataset#geo_transform`
|
37
|
+
- `GDAL::Dataset#projection=`
|
38
|
+
- `GDAL::Dataset#raster_io`
|
39
|
+
- `GDAL::Driver#copy_dataset_files`
|
40
|
+
- `GDAL::Driver#delete_dataset`
|
41
|
+
- `GDAL::Driver#rename_dataset`
|
42
|
+
- `GDAL::MajorObject#set_metadata_item`
|
43
|
+
- `GDAL::RasterAttributeTable#create_column`
|
44
|
+
- `GDAL::RasterAttributeTable#set_linear_binning`
|
45
|
+
- `GDAL::RasterAttributeTable.from_color_table`
|
46
|
+
- `GDAL::RasterBand#category_names=`
|
47
|
+
- `GDAL::RasterBand#color_interpretation=`
|
48
|
+
- `GDAL::RasterBand#color_table=`
|
49
|
+
- `GDAL::RasterBand#compute_statistics=`
|
50
|
+
- `GDAL::RasterBand#copy_whole_raster`
|
51
|
+
- `GDAL::RasterBand#create_mask_band`
|
52
|
+
- `GDAL::RasterBand#default_raster_attribute_table=`
|
53
|
+
- `GDAL::RasterBand#fill`
|
54
|
+
- `GDAL::RasterBand#flush_cache`
|
55
|
+
- `GDAL::RasterBand#no_data_value=`
|
56
|
+
- `GDAL::RasterBand#offset=`
|
57
|
+
- `GDAL::RasterBand#scale=`
|
58
|
+
- `GDAL::RasterBand#unit_type=`
|
59
|
+
- `GDAL::RasterBand#write_block`
|
60
|
+
- `GDAL::RasterBand#write_block`
|
61
|
+
- `GDAL` errors that return `CPLE_AppDefined` now raise `GDAL::Error`.
|
62
|
+
- `GDAL` errors now truncate less of the backtrace.
|
63
|
+
- `GDAL::RasterBand#scale` and `#offset` now return the `Float` value and raise on a failed call
|
64
|
+
instead of returning a `Hash` with that info.
|
65
|
+
|
66
|
+
#### OGR
|
67
|
+
|
68
|
+
- _BREAKING_: `OGR::DataSource#copy_data_source` now raises instead of returning `nil` on a failure
|
69
|
+
to copy.
|
70
|
+
- _BREAKING_: `OGR::SpatialReferenceMixins::CoordinateSystemGetterSetters#set_utm`'s second param is
|
71
|
+
now a keyword arg, `north:` that defaults to `true` (like GDAL's default).
|
72
|
+
- `OGR::SpatialReferenceMixins::CoordinateSystemGetterSetters#set_towgs84`'s `z_distance` requires a
|
73
|
+
value internally, but was defaulted to `nil`; changed the default value to `0.0`.
|
74
|
+
- _BREAKING_: `OGR::SpatialReferenceMixins::CoordinateSystemGetterSetters#axis`'s `target_key` is
|
75
|
+
now required.
|
76
|
+
- _BREAKING_: `OGR::CoordinateTransformation.new` raises a `GDAL:Error` instead of `OGR::Failure`.
|
77
|
+
In GDAL 3, the GDAL error handler kicks in when bad data is used to instantiate the
|
78
|
+
`CoordinateTranformation`. In < 3, the Ruby code checks the returned pointer and raises if it's
|
79
|
+
null. Now these raise the same exception.
|
80
|
+
- _BREAKING_: `OGR::Driver.create_data_source` raises on failure instead of returning `nil`.
|
81
|
+
- `OGR::SpatialReferenceMixins::Importers` now return `self` instead of the `OGR` error code
|
82
|
+
`Symbol`.
|
83
|
+
|
84
|
+
### Fixed
|
85
|
+
|
86
|
+
- [DEV-12827] Fixed lots of double-free crashes resulting from misuse of `FFI::Pointer#autorelease`:
|
87
|
+
- `GDAL::CPLErrorHandler#custom_handle`
|
88
|
+
- `GDAL::ColorInterpretation.name`
|
89
|
+
- `GDAL::ColorTable#clone`
|
90
|
+
- `GDAL::ColorTable#initialize`
|
91
|
+
- `GDAL::DataType.name`
|
92
|
+
- `GDAL::Dataset#gcp_projection`
|
93
|
+
- `GDAL::Dataset#projection`
|
94
|
+
- `GDAL::Dataset#raster_band`
|
95
|
+
- `GDAL::Driver#creation_option_list`
|
96
|
+
- `GDAL::Driver#help_topic`
|
97
|
+
- `GDAL::Driver#long_name`
|
98
|
+
- `GDAL::Driver#short_name`
|
99
|
+
- `GDAL::MajorObject#description`
|
100
|
+
- `GDAL::MajorObject#metadata_item`
|
101
|
+
- `GDAL::Options.pointer`
|
102
|
+
- `GDAL::Options.to_hash`
|
103
|
+
- `GDAL::RasterAttributeTable#column_name`
|
104
|
+
- `GDAL::RasterAttributeTable#value_as_string`
|
105
|
+
- `GDAL::RasterBand#initialize`
|
106
|
+
- `GDAL::RasterBand#unit_type`
|
107
|
+
- `OGR::DataSource#new`
|
108
|
+
- `OGR::Driver#name`
|
109
|
+
- `OGR::Feature#field_as_string`
|
110
|
+
- `OGR::Feature#style_string`
|
111
|
+
- `OGR::FeatureDefinition#name`
|
112
|
+
- `OGR::FieldDefinition#name`
|
113
|
+
- `OGR::Geometry#name`
|
114
|
+
- `OGR::Geometry#type_to_name`
|
115
|
+
- `OGR::Geometry.type_to_name`
|
116
|
+
- `OGR::GeometryTypes#add_geometry_directly`
|
117
|
+
- `OGR::GeometryFieldDefinition#name`
|
118
|
+
- `OGR::Layer#name`
|
119
|
+
- `OGR::LayerMixins::OGRSQLMethods#fid_column`
|
120
|
+
- `OGR::LayerMixins::OGRSQLMethods#geometry_column`
|
121
|
+
- `OGR::SpatialReferenceMixins::CoordinateSystemGetterSetters#authority_code`
|
122
|
+
- `OGR::SpatialReferenceMixins::CoordinateSystemGetterSetters#authority_name`
|
123
|
+
- `OGR::StyleTool#param_as_string`
|
124
|
+
- `OGR::StyleTool#style_string`
|
125
|
+
|
126
|
+
### GDAL
|
127
|
+
|
128
|
+
- `GDAL::RasterBand#no_data_value` uses `BigDecimal` for checking the returned float value.
|
129
|
+
|
130
|
+
#### OGR
|
131
|
+
|
132
|
+
- [DEV-12827] Fixed a number of memory leaks where returned strings should be released using
|
133
|
+
`FFI::CPL::VSI.VSIFree()`:
|
134
|
+
- `OGR::Geometry#to_gml`
|
135
|
+
- `OGR::Geometry#to_kml`
|
136
|
+
- `OGR::Geometry#to_geo_json`
|
137
|
+
- `OGR::Geometry#to_wkt`
|
138
|
+
- `OGR::SpatialReference#to_mapinfo`
|
139
|
+
- `OGR::SpatialReference#to_pci`
|
140
|
+
- `OGR::SpatialReference#to_proj4`
|
141
|
+
- `OGR::SpatialReference#to_usgs`
|
142
|
+
- `OGR::SpatialReference#to_wkt`
|
143
|
+
- `OGR::SpatialReference#to_pretty_wkt`
|
144
|
+
- `OGR::SpatialReference#to_xml`
|
145
|
+
- `OGR::SpatialReferenceMixins::Importers::ClassMethods#new_from_epsga` was incorrectly calling
|
146
|
+
`import_from_epsg` instead of `import_from_epsga`.
|
147
|
+
- `OGR::SpatialReference.release` fixed to use `OSRRelease()` in order to avoid use-after-free.
|
148
|
+
- `OGR::SpatialReferenceMixins::CoordinateSystemGetterSetters#set_utm`'s internal call was expecting
|
149
|
+
an `int`, but was getting passed a `bool`.
|
150
|
+
- `OGR::SpatialReferenceMixins::CoordinateSystemGetterSetters#towgs84` now properly reads data out
|
151
|
+
of the internal C array.
|
152
|
+
- `OGR::SpatialReferenceMixins::CoordinateSystemGetterSetters#axis`: the `orientation` value in the
|
153
|
+
returned `Hash` wasn't calling a fully qualified module.
|
154
|
+
- `OGR::SpatialReferenceMixins::Exporters#to_xml` now actually works.
|
155
|
+
|
156
|
+
### Removed
|
157
|
+
|
158
|
+
- [DEV-361] Move extension methods to ffi-gdal-extensions.
|
159
|
+
- Removed attach_function to CPLURLGetValue and CPLURLAddKVP as they are not in GDAL 2.
|
160
|
+
- `GDAL::MajorObject#description=`
|
161
|
+
|
162
|
+
## 1.0.0.beta16 / 2022-06-09
|
163
|
+
|
164
|
+
### Bug Fixes
|
165
|
+
|
166
|
+
- [DEV-34269] Ensure `GDAL::RasterBandClassifier#equal_count_ranges` returns a range when only one is requested.
|
167
|
+
|
168
|
+
## 1.0.0.beta15 / 2022-05-12
|
169
|
+
|
170
|
+
### Improvements
|
171
|
+
|
172
|
+
- [DEV-20059] Ensure `GDAL::RasterBandClassifier#equal_count_ranges` has a minimum spacing between breakpoints.
|
173
|
+
|
174
|
+
## 1.0.0.beta14 / 2022-05-06
|
175
|
+
|
176
|
+
### Bug Fixes
|
177
|
+
|
178
|
+
- [DEV-34133] Don't URI.parse path in `GDAL::Dataset#initialize` and `OGR::DataSource#initialize`.
|
179
|
+
|
180
|
+
## 1.0.0.beta13 / 2022-04-20
|
181
|
+
|
182
|
+
### Bug Fixes
|
183
|
+
|
184
|
+
- [DEV-20247] Fix return value for `OGR::LayerMixins::Extensions#point_values` when no features are found.
|
185
|
+
|
186
|
+
## 1.0.0.beta12 / 2021-06-07
|
187
|
+
|
188
|
+
### Removed
|
189
|
+
|
190
|
+
- Removed `GDAL::MajorObject#description=`, as this shouldn't be called and causes problems.
|
191
|
+
|
192
|
+
### Bug Fixes
|
193
|
+
|
194
|
+
- [DEV-15804] Remove data that is outside all ranges when classifying.
|
195
|
+
|
196
|
+
## [1.0.0.beta11] - 2020-06-02
|
197
|
+
|
198
|
+
### Fixed
|
199
|
+
|
200
|
+
- Change CPLFileFinder callback return type to pointer.
|
201
|
+
|
202
|
+
## [1.0.0.beta10] - 2019-08-28
|
203
|
+
|
204
|
+
### Fixed
|
205
|
+
|
206
|
+
- [DEV-7980] Ensure `OGR::Feature#field_as_string` returns a UTF-8 encoded String.
|
207
|
+
|
208
|
+
## [1.0.0.beta9] - 2018-03-26
|
209
|
+
|
210
|
+
### Fixed
|
211
|
+
|
212
|
+
- [AGDEV-30729] Change `OGERR_NONE` to use a lambda.
|
213
|
+
|
214
|
+
### Changed
|
215
|
+
|
216
|
+
- Fix some new rubocops.
|
217
|
+
|
218
|
+
## [1.0.0.beta8] - 2017-04-24
|
219
|
+
|
220
|
+
### Changed
|
221
|
+
|
222
|
+
- Ruby 2.3 frozen string compatibility.
|
223
|
+
- Ruby 2.4 `DateTime` time zone handling in `OGR::Feature#set_field_date_time`.
|
224
|
+
|
225
|
+
### Fixed
|
226
|
+
|
227
|
+
- Ensure `GDAL::RasterBandMixinsIOExtensions#read_blocks_by_block` always yields an Array of pixels.
|
228
|
+
|
229
|
+
## [1.0.0.beta7] - 2016-09-21
|
230
|
+
|
231
|
+
### Added
|
232
|
+
|
233
|
+
#### GDAL
|
234
|
+
|
235
|
+
- Added wrapper for GDALCreateAndReprojectImage in `gdal/dataset_mixins/warp_methods.rb`.
|
236
|
+
- Added `GDAL::Options.to_hash` to convert a pointer of options to a Ruby Hash.
|
237
|
+
|
238
|
+
### Changed
|
239
|
+
|
240
|
+
#### GDAL
|
241
|
+
|
242
|
+
- (BREAKING CHANGE) Additionally, changed `GDAL::DatasetMixins::WarpMethods#reproject_image`'s
|
243
|
+
`destination_spatial_reference` named param to `destination_projection` which takes a String of
|
244
|
+
WKT for a projection instead of an `OGR::SpatialReference`.
|
245
|
+
- Return `nil` for missing NODATA values in `GDAL::RasterBand#no_data_value` and `#no_data_value=`.
|
246
|
+
|
247
|
+
### Fixed
|
248
|
+
|
249
|
+
#### Core
|
250
|
+
|
251
|
+
- Fixed specifying an alternate GDAL library using the `GDAL_LIBRARY_PATH`.
|
252
|
+
|
253
|
+
#### GDAL
|
254
|
+
|
255
|
+
- `GDAL::RasterBandMixins::IOExtensions#write_xy_narray` no longer duplicates data when blocks have
|
256
|
+
a remainder.
|
257
|
+
- `GDAL::WarpOptions` should properly act as a wrapper for `FFI::GDAL::WarpOptions`.
|
258
|
+
- `Updated extract methods to be compatible with latest `GDAL::Driver#create_dataset`.
|
259
|
+
- `GDAL::MajorObject` now gets autoloaded.
|
260
|
+
- Fix `GDAL::DatasetMixins::AlgorithmMethods` to use the right `FFI` module for
|
261
|
+
`#rasterize_geometries` and `#rasterize_layers`.
|
262
|
+
|
263
|
+
#### OGR
|
264
|
+
|
265
|
+
- [AGDEV-17357] Define constants from C using `const_set` instead of `class_eval`.
|
266
|
+
- Fixed `OGR::GeometryTypes::Curve#points` (missing local variable).
|
267
|
+
|
268
|
+
### Removed
|
269
|
+
|
270
|
+
- Removed all `#as_json` and `#to_json` definitions. They were out of date, not used, and sometimes
|
271
|
+
confusing (ex `OGR::Geometries#to_json` vs `#to_geo_json`).
|
272
|
+
|
273
|
+
## [1.0.0.beta6] - 2016-04-18
|
274
|
+
|
275
|
+
### Added
|
276
|
+
|
277
|
+
#### GDAL
|
278
|
+
|
279
|
+
- Added wrappers for the Grid API. It uses `GDAL::Gridder`, which is the programmatic equivalent to
|
280
|
+
the `gdal_grid` command-line utility, `GDAL::GridderOptions`, which is an object used to mimic the
|
281
|
+
options you pass to `gdal_grid`, and `GDAL::Grid`, which is the simple object that performs the
|
282
|
+
gridding.
|
283
|
+
- Added first wrapper of `gdalwarper.h` methods, found in `GDAL::DatasetMixins::WarpMethods`.
|
284
|
+
- Added `GDAL::GeoTransformMixins::Extensions.new_from_envelope` which lets you create a
|
285
|
+
`GDAL::GeoTransform` using the points from an `OGR::Envelope` and the destination raster's width
|
286
|
+
and height. It's convenient because it calculates the pixel size for you.
|
287
|
+
- Added `GDAL::RasterBand#write_block`. Somehow this went missing from previous `RasterBand`
|
288
|
+
wrapping.
|
289
|
+
- Added `GDAL::InternalHelpers._buffer_from_data_type` to compliment the existing
|
290
|
+
`._pointer_from_data_type`. Useful for creating buffer-specific pointers from a GDAL data type.
|
291
|
+
- Added `GDAL::InternalHelpers` methods for creating NArrays based on GDAL data types.
|
292
|
+
- `GDAL::Options` values all have `#to_s` called on them to ensure they're Strings before handing
|
293
|
+
them over to GDAL. The GDAL options "hash" requires that both keys and values be Strings.
|
294
|
+
- `GDAL::RasterBandMixins::AlgorithmMethods` that use GDALProgressFunc functions can now participate
|
295
|
+
in GDALScaledProgress functions.
|
296
|
+
- Added `GDAL::RasterBandMixins::Extensions#pixel_count`.
|
297
|
+
- Allow `GDAL::Dataset`s to be open in shared mode vs non-shared mode. All Datasets now default to
|
298
|
+
use shared mode.
|
299
|
+
- Added enumerator `RasterAttributeTableMixins::Extensions#each_column` to allow nicer iterating
|
300
|
+
over columns.
|
301
|
+
|
302
|
+
#### OGR
|
303
|
+
|
304
|
+
- Added `OGR::CoordinateTransform#transform_ex`.
|
305
|
+
- Added `OGR::FeatureExtensions#field()` which gets the field using the associated
|
306
|
+
`OGR::FieldDefinition#type`. Makes so you don't always have to request the field by its type
|
307
|
+
(`field_as_double`).
|
308
|
+
- Added `OGR::LayerMixins::Extensions#point_values()` which gets values for all of the points in the
|
309
|
+
layer. It also allows you to specify getting field values with that, which helps retrieving data
|
310
|
+
for the Grid API. You can also pass it a block to filter out points that don't match some criteria
|
311
|
+
defined in the block.
|
312
|
+
- Added `OGR::LayerMixins::Extensions#any_geometries_with_z?` which simply checks to see if the
|
313
|
+
layer has any geometries with Z values.
|
314
|
+
- `GDAL::DataType.by_name` always calls `#to_s` on the param now, letting you pass in Symbols.
|
315
|
+
- Added `OGR::Point#set_point`, `OGR::Point25#set_point`, and `OGR::GeometryTypes::Curve#set_point`
|
316
|
+
wrappers for `OGR_G_SetPoint_2D` and `OGR_G_SetPoint`.
|
317
|
+
- Added `OGR::LineString#add_geometry` to allow adding a OGR::Point object to the LineString instead
|
318
|
+
of having to pass coordinates in to #add_point.
|
319
|
+
- Added `OGR::GeometryMixins::Extensions#invalid?` to compliment `OGR::Geometry#valid?`.
|
320
|
+
- Added `OGR::LayerMixins::Extensions#point_geometry`, `#each_point_geometry`, and
|
321
|
+
`point_geometries`. Since `#point` implies it returns a Point object, but the OGR API's related
|
322
|
+
method returns point values (x, y, z), it seemed like it would be useful to have a method that
|
323
|
+
returned a geometry.
|
324
|
+
|
325
|
+
### Changed
|
326
|
+
|
327
|
+
#### GDAL
|
328
|
+
|
329
|
+
- Renamed `GDAL::GridTypes` to `GDAL::GridAlgorithms`. This shouldn't impact anyone/thing since it's
|
330
|
+
only relative to the newly added Grid API wrapper. There just happened to me some Grid cruft that
|
331
|
+
had been laying around for some time.
|
332
|
+
- Renamed `GDAL::RasterBandMixins::Extenions#each_by_block` to `#read_by_block`. Its functionality
|
333
|
+
was doing reading, yet implied reading or writing; since writing by block isn't needed anywhere
|
334
|
+
internally yet, I just renamed this.
|
335
|
+
- Renamed `GDAL::RasterBandMixins#write_array` to `#write_xy_narray`. This method's name inferred
|
336
|
+
that it could write any old Array, but that's not the case--it only writes 2D NArray data.
|
337
|
+
- `GDAL::DatasetMixins::Extensions#extent` now manually builds an `OGR::Polygon` instead of
|
338
|
+
polygonizing the entire dataset and taking the envelope of that. Much faster this way.
|
339
|
+
- Refactored `GDAL::RasterBandMixins::Exsentions#projected_points` to return a 3D NArray (indicating
|
340
|
+
pixel/row position) instead of just a 2D NArray of coordinates.
|
341
|
+
- Allow `GDAL::RasterBand#create_mask_band` to take a single flag or many.
|
342
|
+
- Allow `GDAL::Driver#create_dataset` and `GDAL::Dataset.open` to take a block, yielding the dataset
|
343
|
+
then closing it afterwards.
|
344
|
+
- `GDAL::RasterBandClassifier` now uses NArray to classify. Can result in quite a large performance
|
345
|
+
gain.
|
346
|
+
- `GDAL::RasterAttributeTable` methods that returned -1 when a value can't be returned now return
|
347
|
+
nil instead.
|
348
|
+
- Renamed `GDAL::RasterAttributeTable#value_to_*` methods to be named after their C functions. Also,
|
349
|
+
renamed `#add_value` to `#set_value` and refactored into `RasterAttributeTableMixins::Extensions`.
|
350
|
+
- Swapped order of params in `GDAL::Driver#rename_dataset` to be (old, new) instead of (new, old).
|
351
|
+
- `GDAL::Driver#copy_dataset` now yields a writable Dataset.
|
352
|
+
- `GDAL::Driver#copy_dataset` now properly takes progress block arguments.
|
353
|
+
|
354
|
+
#### OGR
|
355
|
+
|
356
|
+
- `OGR::DataSource.open` can now take a block, yielding the data source, then closing it afterwards.
|
357
|
+
- Extracted `OGR::LayerMixins::Extensions#each_feature` from `OGR::LayerMixins::Extensions#features`
|
358
|
+
to provide an Enumerator. This lets consumers utilize yielded `OGR::Feature`s as they're retrieved
|
359
|
+
instead of after the `features` Array has been built. `OGR::LayerMixins::Extensions#features` now
|
360
|
+
uses this too.
|
361
|
+
|
362
|
+
### Fixed
|
363
|
+
|
364
|
+
- Cleanup `OGR::Feature`s that were a result of `OGR::Layer#next_feature`. According to GDAL docs,
|
365
|
+
these _must_ be cleaned up before the layer is.
|
366
|
+
|
367
|
+
#### GDAL
|
368
|
+
|
369
|
+
- `GDAL::RasterBandMixins::AlgorithmMethods#fill_nodata!` was calling the old name of the C
|
370
|
+
function.
|
371
|
+
- `GDAL::EnvironmentMethods#dump_open_datasets` now works.
|
372
|
+
|
373
|
+
#### OGR
|
374
|
+
|
375
|
+
- `OGR::Field#date=` was casting the passed value to a `Time` object, which in doing so was setting
|
376
|
+
the time zone. If a user passes in an object that doesn't have the TZ set, the method shouldn't be
|
377
|
+
setting it for them.
|
378
|
+
- `OGR::Geometry#point_on_surface` now properly returns a geometry object.
|
379
|
+
- `OGR::CoordinateTransform#transform` never worked. Fixed.
|
380
|
+
- `OGR::GeometryMixins::Extensions#utm_zone` no longer creates invalid geometry.
|
381
|
+
- `OGR::Feature#dump_readable` never worked. Fixed.
|
382
|
+
- `OGR::Geometry#dump_readable` never worked. Fixed.
|
383
|
+
- Added missing output_layer param to `OGR::LayerMixins::OGRLayerMethodMethods`.
|
384
|
+
- `FFI::OGR::Core::WKBGeometryType` was using an INT32 instead of UINT32 and thus 25D geometry types
|
385
|
+
weren't completely accurate.
|
386
|
+
- `OGR::LayerMixins::Extensions#geometry_from_extent` now builds an `OGR::Polygon` using the same
|
387
|
+
algorithm that `GDAL::DatasetMixins::Extensions#extent` uses. One could argue that there was also
|
388
|
+
a bug here in that `geometry_from_extent` used to return the convex hull of the extent, not the
|
389
|
+
extent itself.
|
390
|
+
|
391
|
+
### Removed
|
392
|
+
|
393
|
+
- Removed all `ObjectSpace.define_finalizer` calls that "cleaned up" C pointers for Ruby-wrapped
|
394
|
+
objects that had not yet been closed/destroyed. This was keeping those Ruby objects from getting
|
395
|
+
collected (?) and effectively causing lots of unnecessary memory use.
|
396
|
+
|
397
|
+
## [1.0.0.beta5] - 2015-06-16
|
398
|
+
|
399
|
+
### Added
|
400
|
+
|
401
|
+
- Added `GDAL::RasterBand#raster_io` and refactored `GDAL::RasterBand#write_array` to use it.
|
402
|
+
|
403
|
+
### Changed
|
404
|
+
|
405
|
+
- `GDAL::RasterBandClassifier#equal_count_ranges` now returns `nil` if there aren't enough points
|
406
|
+
per group/class to return the requested number of breaks.
|
407
|
+
- Simplified NDVI (and related) methods in `GDAL::DatasetMixins::Extensions`.
|
408
|
+
- NDVI and related methods in `GDAL::DatasetMixins::Extensions` now close the newly created dataset
|
409
|
+
instead of leaving it open. It's been far too easy to forget to close the dataset after creation,
|
410
|
+
leaving seemingly incorrect resulting datasets (since GDAL doesn't flush writes until the dataset
|
411
|
+
is closed).
|
412
|
+
- NDVI methods in `GDAL::DatasetMixins::Extensions` no longer check for NaNs after doing the NDVI
|
413
|
+
calculations, thus speeding up the algorithm.
|
414
|
+
- `GDAL::DatasetMixins::Extensions#remove_negatives_from` now uses an NArray mask to remove the
|
415
|
+
negative values instead of looping through each value.
|
416
|
+
- `GDAL::DatasetMixins::Extensions` NDVI methods now default to NODATA of `-9999.0`.
|
417
|
+
|
418
|
+
## [1.0.0.beta4] - 2015-04-22
|
419
|
+
|
420
|
+
Whoa there's lots of changes here... Many are outlined below, but there's really a ton more.
|
421
|
+
|
422
|
+
### Added
|
423
|
+
|
424
|
+
- Added `GDAL::RasterClassifier` for classifying raster bands.
|
425
|
+
- Added some wrapper methods for classes that support capability testing.
|
426
|
+
- Better library finding on Linux.
|
427
|
+
- Wrapped most of `GDAL`'s Grid API.
|
428
|
+
- Wrapped some of `GDAL`'s Warp API.
|
429
|
+
- `GDAL::Dataset` can now open PostGISRaster datasets.
|
430
|
+
|
431
|
+
### Changed
|
432
|
+
|
433
|
+
- Full refactor of FFI/C function wrapper. Closer mapping of Ruby functions within modules to the
|
434
|
+
C-header files where the functions actually reside.
|
435
|
+
- Full redesign of the error handling mechanism; ffi-gdal now hooks in to GDAL's error handling,
|
436
|
+
thus errors raised from GDAL automagically get handed over as Ruby exceptions. (GDAL only; OGR
|
437
|
+
doesn't provide this.) This also entailed adding a bunch of new exceptions and renaming some old
|
438
|
+
ones.
|
439
|
+
- Lots more `OGR` love. Much of this API has now been vetted.
|
440
|
+
|
441
|
+
### Fixed
|
442
|
+
|
443
|
+
- Fixed some `GDAL::Dataset` extension methods (`extract_ndvi` and friends) that weren't properly
|
444
|
+
handling various data types.
|
445
|
+
- Better handling of large files.
|
446
|
+
- Fixed regular crashes when dealing with `OGR` Geometries and `SpatialReferences`.
|
447
|
+
|
448
|
+
## [1.0.0.beta3] - 2014-11-11
|
449
|
+
|
450
|
+
### Fixed
|
451
|
+
|
452
|
+
- `ogr/exceptions` wasn't being required for `ext/error_symbols.rb`, thus any use of an OGR
|
453
|
+
exception was causing a `NameError`.
|
454
|
+
|
455
|
+
## [1.0.0.beta2] - 2014-10-23
|
456
|
+
|
457
|
+
### Added
|
458
|
+
|
459
|
+
- Added more documentation
|
460
|
+
- Uncommented `attach_function` calls that had been commented out due to lack of support in versions
|
461
|
+
I'd tested on. These get handled now on load.
|
462
|
+
|
463
|
+
## [1.0.0.beta1] - 2014-10-23
|
464
|
+
|
465
|
+
Lots of changes, so just the highlights here...
|
466
|
+
|
467
|
+
### Added
|
468
|
+
|
469
|
+
- Added C and Ruby wrapper for most of `OGR`.
|
470
|
+
- Allow loading, even when C functions aren't defined in the version of `GDAL` that you're using.
|
471
|
+
- Added `#as_json`, `#to_json` to many classes.
|
472
|
+
|
473
|
+
### Changed
|
474
|
+
|
475
|
+
- Better handling of `CPLErr` return values.
|
476
|
+
- Split out additions to `GDAL/OGR` in `*_extensions.rb` modules. Methods contained in `Extensions`
|
477
|
+
modules don't directly wrap `GDAL`/`OGR` functions, but either provide new functionality or
|
478
|
+
attempt to make library usage more Rubyesque.
|
479
|
+
- Lots of cleanup of class internals.
|
480
|
+
- `autoload` child `GDAL` and `OGR` Ruby classes.
|
481
|
+
- Renamed files under `ffi/` that were derived from `GDAL`/`OGR` header files to include `_h` in the
|
482
|
+
name.
|
483
|
+
|
484
|
+
## [0.0.4] - 2014-09-27
|
485
|
+
|
486
|
+
### Fixed
|
487
|
+
|
488
|
+
- Fixed failure to load on Ubuntu 12.04 (GDAL v1.7.3).
|
489
|
+
|
490
|
+
## [0.0.3] - 2014-09-26
|
491
|
+
|
492
|
+
### Changed
|
493
|
+
|
494
|
+
- The `approx_ok` param for `RasterBand#histogram` should default to `false` (preferring data
|
495
|
+
exactness over performance).
|
496
|
+
|
497
|
+
### Fixed
|
498
|
+
|
499
|
+
- Fixed URL silliness introduced in 0.0.2.
|
500
|
+
- `Dataset#*_band` methods should return `nil` if the band with that color isn't found.
|
501
|
+
- `RasterBand#default_histogram` died if the band didn't have any values.
|
502
|
+
- `RasterBand#histogram` wasn't returning totals.
|
503
|
+
|
504
|
+
## [0.0.2] - 2014-09-26
|
505
|
+
|
506
|
+
### Added
|
507
|
+
|
508
|
+
- Added ability to pass a URL into `GDAL::Dataset`.
|
509
|
+
|
510
|
+
## [0.0.1] - 2014-09-26
|
511
|
+
|
512
|
+
- Happy Birthday!
|
data/Changelog.md
ADDED
@@ -0,0 +1,12 @@
|
|
1
|
+
# Changelog
|
2
|
+
|
3
|
+
All notable changes to this project will be documented in this file.
|
4
|
+
|
5
|
+
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project
|
6
|
+
adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
7
|
+
|
8
|
+
## [1.0.0] — 2023-01-06
|
9
|
+
|
10
|
+
Changes for all releases leading up to 1.0.0 can be found in [Changelog-0.x](/Changelog-0.x.md).
|
11
|
+
|
12
|
+
- Happy birthday!
|
data/Dockerfile.gdal2
ADDED
@@ -0,0 +1,110 @@
|
|
1
|
+
# syntax=docker/dockerfile:1
|
2
|
+
FROM ruby:3.1.2 as base
|
3
|
+
|
4
|
+
#------------------------------------------------------------------------------
|
5
|
+
# GDAL setup
|
6
|
+
# We don't need much for ffi-gdal...
|
7
|
+
# https://trac.osgeo.org/gdal/wiki/BuildingOnUnixWithMinimizedDrivers
|
8
|
+
#------------------------------------------------------------------------------
|
9
|
+
FROM base as gdal_builder
|
10
|
+
|
11
|
+
ARG GDAL_VERSION="2.4.4"
|
12
|
+
ARG GDAL_TARBALL="gdal-${GDAL_VERSION}.tar.gz"
|
13
|
+
|
14
|
+
WORKDIR /tmp
|
15
|
+
|
16
|
+
RUN apt-get update -yqq \
|
17
|
+
&& apt-get upgrade -yqq \
|
18
|
+
&& apt-get install -yqq --no-install-recommends \
|
19
|
+
build-essential \
|
20
|
+
ca-certificates \
|
21
|
+
curl \
|
22
|
+
libgeos-dev \
|
23
|
+
libproj-dev \
|
24
|
+
librttopo-dev \
|
25
|
+
&& rm -rf /var/lib/apt/lists/* \
|
26
|
+
&& curl -sSf -L -O "https://github.com/OSGeo/gdal/releases/download/v${GDAL_VERSION}/${GDAL_TARBALL}" \
|
27
|
+
&& curl -sSf -L -O "https://github.com/OSGeo/gdal/releases/download/v${GDAL_VERSION}/${GDAL_TARBALL}.md5" \
|
28
|
+
&& md5sum --strict --check "${GDAL_TARBALL}.md5" \
|
29
|
+
&& mkdir gdal \
|
30
|
+
&& tar -zxvf $GDAL_TARBALL -C /tmp/gdal --strip-components=1 \
|
31
|
+
&& rm ${GDAL_TARBALL} "${GDAL_TARBALL}.md5" \
|
32
|
+
&& cd /tmp/gdal \
|
33
|
+
&& ./configure \
|
34
|
+
--with-geos \
|
35
|
+
--with-geotiff=internal \
|
36
|
+
--with-libtiff=internal \
|
37
|
+
--with-libz=internal \
|
38
|
+
--with-threads \
|
39
|
+
--without-bsb \
|
40
|
+
--without-cfitsio \
|
41
|
+
--without-cryptopp \
|
42
|
+
--without-curl \
|
43
|
+
--without-ecw \
|
44
|
+
--without-expat \
|
45
|
+
--without-fme \
|
46
|
+
--without-freexl \
|
47
|
+
--without-gif \
|
48
|
+
--without-gnm \
|
49
|
+
--without-grass \
|
50
|
+
--without-grib \
|
51
|
+
--without-hdf4 \
|
52
|
+
--without-hdf5 \
|
53
|
+
--without-idb \
|
54
|
+
--without-ingres \
|
55
|
+
--without-jasper \
|
56
|
+
--without-jp2mrsid \
|
57
|
+
--without-jpeg \
|
58
|
+
--without-kakadu \
|
59
|
+
--without-libgrass \
|
60
|
+
--without-libkml \
|
61
|
+
--without-libtool \
|
62
|
+
--without-mrf \
|
63
|
+
--without-mrsid \
|
64
|
+
--without-mysql \
|
65
|
+
--without-netcdf \
|
66
|
+
--without-odbc \
|
67
|
+
--without-ogdi \
|
68
|
+
--without-openjpeg \
|
69
|
+
--without-pcidsk \
|
70
|
+
--without-pcraster \
|
71
|
+
--without-pcre \
|
72
|
+
--without-perl \
|
73
|
+
--without-pg \
|
74
|
+
--without-png \
|
75
|
+
--without-python \
|
76
|
+
--without-qhull \
|
77
|
+
--without-sde \
|
78
|
+
--without-sqlite3 \
|
79
|
+
--without-webp \
|
80
|
+
--without-xerces \
|
81
|
+
--without-xml2 \
|
82
|
+
&& make \
|
83
|
+
&& make install \
|
84
|
+
&& cd /tmp \
|
85
|
+
&& rm -rf gdal
|
86
|
+
|
87
|
+
#------------------------------------------------------------------------------
|
88
|
+
# Dev setup 1
|
89
|
+
#------------------------------------------------------------------------------
|
90
|
+
FROM gdal_builder as dev_builder
|
91
|
+
|
92
|
+
RUN gem update --system \
|
93
|
+
&& gem install bundler
|
94
|
+
|
95
|
+
COPY ./ffi-gdal.gemspec /usr/src/ffi-gdal/
|
96
|
+
COPY ./lib/ffi/gdal/version.rb /usr/src/ffi-gdal/lib/ffi/gdal/
|
97
|
+
COPY ./Gemfile* /usr/src/ffi-gdal/
|
98
|
+
|
99
|
+
WORKDIR /usr/src/ffi-gdal/
|
100
|
+
|
101
|
+
# Use a docker volume for storing gems
|
102
|
+
ENV BUNDLE_PATH /gems
|
103
|
+
RUN bundle install
|
104
|
+
|
105
|
+
#------------
|
106
|
+
# Copy over the rest of the lib
|
107
|
+
COPY . .
|
108
|
+
|
109
|
+
CMD ["tail", "-f", "/dev/null"]
|
110
|
+
# vim:ft=dockerfile
|