- Core Grid Resampling (
grid_resampling.py)- Fixed an UnboundLocalError in
calculate_source_extent()when grid metrics could not be computed - the variable was referenced before assignment in that code path. - Added the
test_grid_resampling_standalone_no_idendity_1_1_full_invalid_grid()intest_grid_resampling.pyto cover the previous mentioned path.
- Fixed an UnboundLocalError in
- Updated README banner logo and switched to PNG format for better mobile compatibility
- Fixed panic when resampling with degenerate windows (1-pixel in any dimension) at grid edges
-
B-Spline Interpolation Implementation
- Added B-Spline interpolation support for orders 3, 5, 7, 9, and 11
- Added Rust module
core/interp/gx_bspline_prefilteringimplementing B-Spline prefiltering methods and mask handling - Added Rust module
core/interp/gx_bspline_kernelimplementingGxArrayViewInterpolatortrait for B-Spline - Implemented
GxBSplineInterpolatorTrait<const N: usize>trait using monomorphic approach for compile-time B-Spline order specification - Created Python bindings for
BSpline<N>Interpolatorclasses for all supported orders - Added Rust test suite for B-Spline interpolation
- Created API documentation
-
Interpolator Margins
- Added
total_margins()method toGxArrayViewInterpolatortrait to compute required margins on each side for interpolation - For B-Spline interpolators,
total_margins()includes pre-filtering domain extension for controlled precision in infinite sum approximations - Note:
initialize()method must be called beforetotal_margins()on B-Spline interpolator objects - Created Python bindings for
total_margins()method - Added Python test suite for margin computation
- Added
-
Array Arithmetic Functions
- Added
array1_addRust function ingx_array_utils.rsmodule - Added
array1_add_win2Rust function ingx_array_utils.rsmodule - Created Python bindings for
array1_addandarray1_add_win2functions - Implemented
array_addmethod ingridr.core.array_utilswith comprehensive tests
- Added
-
Grid Coordinate Operations
- Added
array_shift_grid_coordinatesmethod tocore.grid.grid_utilsfor in-place grid coordinate shifting
- Added
-
Source Boundary Computation
- Added
array1_compute_resampling_grid_src_boundariesRust function ingx_grid_geometry.rsmodule - Created Python bindings for
array1_compute_resampling_grid_src_boundariesfunction - Implemented
array_compute_resampling_grid_src_boundariesmethod ingridr.core.grid.grid_utilswith comprehensive tests
- Added
-
Core Grid Resampling (
array_grid_resampling)- Added
check_boundariesboolean parameter to activate safe grid boundaries computation (see Source Boundary Computation) - Added
boundary_conditionparameter accepting values: 'edge', 'reflect', 'symmetric', 'wrap' - Added
standaloneparameters togridr.core.grid.grid_resampling.array_grid_resampling - Standalone mode performs: automatic grid metrics computation, source image required region computation (considering interpolation margins), optional padding operation, and B-Spline prefiltering
- Updated test suite to include standalone mode validation
- Added
-
Grid Resampling Chain (
basic_grid_resampling_chain)- Added
grid_shiftparameter to apply global bias to grid coordinates - Added
boundary_conditionparameter accepting values: 'edge', 'reflect', 'symmetric', 'wrap' - Added
SAFECHECK_SOURCE_BOUNDARIESconstant (default: True) to determine read window using all valid coordinates within working grid subset (see Source Boundary Computation) - Method now creates and initialize interpolator objects internally
- Added
- Array Padding
- Added
gridr.core.utils.array_padPython module derived fromnumpy.pad - Operates in-place with limited mode support
- Created API documentation for
core.utils.array_pad
- Added
-
Theoretical Foundations
- Initialized "Theoretical Foundations" section in documentation
- Added image geometry definitions
- Added detailed grid resampling convention documentation
-
API Documentation Structure
- Added
core.interpsection to API documentation - Added
core.interp.bspline_prefilteringdocumentation page - Added
core.interp.interpolatordocumentation page - Added
core.utils.array_paddocumentation page
- Added
-
User Guides
- Expanded user documentation with standalone mode details
- Added documentation for grid shift feature
- Added documentation for boundary conditions
- Added documentation for B-Spline mask handling
- Rust
- Added
transposecrate dependency (v0.2.6) - Upgraded
pyo3crate dependency to version 0.27.2
- Added
-
Interpolator Interface
- Added
Sendtrait implementation toGxArrayViewInterpolator - Introduced
GxArrayViewInterpolatorArgstrait to provide arguments for interpolator creation
- Added
-
Interpolator Type System
- Moved
PyInterpolatorTypeto dedicated Rust modulepyapi/interp/py_interp.rs - Added
AnyInterpolatorenum to replacePyInterpolatorTypeinpy_grid_resampling - Changed interpolator passing mechanism: now passed as Python object instead of string literal
- Implemented
FromPyObjecttrait forAnyInterpolatorto retrieve Rust object from Python object AnyInterpolatorenum variants wrap interpolator implementations usingArc(Atomic Reference Counting) andRwLockfor thread-safe shared ownership- Note: This change requires interpolator creation on Python side before passing to Rust functions
- Moved
- Function Location
- Moved
read_win_from_grid_metrics()function fromgridr.chain.grid_resampling_chaintogridr.core.grid.grid_utils
- Moved
- Grid Coordinate Calculations
- Implemented controlled rounding to 12 decimal digits for internal full-resolution grid calculations in
gx_grid_resampling.rs
- Implemented controlled rounding to 12 decimal digits for internal full-resolution grid calculations in
-
Sphinx Configuration
- Updated MathJax from version 2 to version 3
- Changed MathJax CDN URL from
https://cdn.jsdelivr.net/npm/mathjax@2/MathJax.js?config=TeX-AMS-MML_HTMLorMMLtohttps://cdn.jsdelivr.net/npm/mathjax@3/es5/tex-mml-chtml.js - Added
mathjax3_configwith inline math delimiters:[['$', '$'], ['\\(', '\\)']]and display math delimiters:[['$$', '$$'], ['\\[', '\\]']] - Added
sphinxcontrib.bibtexextension - Configured
bibtex_bibfilesto['references.bib'] - Set
bibtex_default_styleto'plain' - Added MyST extensions:
dollarmathandamsmath - Set
myst_dmath_double_inlinetoTrue
-
Documentation Structure
- Changed page title from "API Documentation" to "API Reference" in
docs/source/api_python/modules.rst - Reorganized Sphinx main menu structure
- Removed
docs/source/developer_guide/index.rstsection heading - Removed
docs/source/api_python/misc/index.rstmodule documentation - Removed
docs/source/api_python/misc/mandrill.rstdocumentation page
- Changed page title from "API Documentation" to "API Reference" in
-
Notebook References
- Updated notebook reference from
grid_resampling_001_work.ipynbtogrid_resampling_001.ipynbindocs/source/_notebooks/index.rst
- Updated notebook reference from
-
Images
- Added new SVG file
docs/source/images/numeric_image.svg
- Added new SVG file
- README Badges
- Updated minimum pyo3 version badge from "0.26+" to "0.27.2+"
- Changed logo image source from
./doc/images/gridr_logo.svgtohttps://github.com/CNES/gridr/tree/main/doc/images/gridr_logo.svg
- Out-of-Bounds Access
- Resolved panic when addressing index out-of-bounds of source array
- Issue occurred for grids that do not preserve source topology
- Fixed through implementation of safe grid source boundaries computation
- Floating-Point Precision
- Resolved floating-point precision issues in grid coordinate calculations in
gx_grid_resampling.rs - Fixed nearest neighbor interpolation bug caused by precision limitations
- Addressed discrepancies between chain method and monolithic core method
- Resolved floating-point precision issues in grid coordinate calculations in
- Missing Dependencies
- Added missing Shapely dependency in
pyproject.toml
- Added missing Shapely dependency in
- Styling
- Improved CSS styling of log extracts in
grid_resampling_chainnotebook for proper line breaking
- Improved CSS styling of log extracts in
- Documentation for antialiasing filter creation
- Documentation: Fixed style errors for contributing guidelines.
- Documentation for antialiasing filter creation
- Documentation: Added
.readthedocs.yamlfor automated docs builds. - Build: Support for custom Sphinx HTML output directory in
Makefile.
- CI/CD: Release jobs now trigger only on semantic version tags (e.g.,
vX.Y.Z). - Dependencies: Upgraded
pyo3to v0.26.0 to address security vulnerability . - Documentation: Changed the contributing part in order to adhere the strict linear trunk-based branching strategy.
- Build: Generate ABI3-compatible wheels for Python 3.10+.
- Documentation: Fix indentations in array_utils.py docstrings.
- Dependencies: Patched
pyo3to v0.26.0 (addresses GHSA-pph8-gcv7-4qj5).
- Documentation for antialiasing filter creation
- Added usage of pre-commit with flake8, isort and black
- Added license and opensource related files : LICENSE, NOTICE, AUTHORS.md, CONTRIBUTING.md, Clause of License Aggreements files
- Added Developer_Guide (WIP) and License sections in sphinx documentation
- scripts:
- Added scripts directory in project tree
- Added generate_notice.py and generate_Rust_notice.sh script
- templates:
- Added templates directory in project tree
- Added templates to generate main NOTICE and Python/Rust 3rd party notices sections.
- Added Rust tests for
GxNearestInterpolatorandGxLinearInterpolatorto verify mask usage - Added Python test for the core
grid.grid_resampling.pymodule. The test currently covers only identity grid transforms at full resolution. - Added
array_convert,is_clip_requiredandis_clip_to_dtype_limits_safePython methods in thegridr.core.utils.array_utils.pymodule as well as corresponding tests. These methods are used by thegrid_resampling_chainto convert data type before writing to disk in order to match the output dataset type.
- Added license related header in Python and Rust source files
- Apply pre-commit hooks (flake8, isort, black) to existing Python source files in Python/gridr and tests
- Documentation
- Added a temporary change in
grid_resampling_chainto adapt margin to the interpolation function. - Tests for
grid_resampling_chainhave been enhanced to include interpolators other thancubicand output types different fromnp.float64. Thelinearinterpolator is now tested, while thenearestinterpolator is not due to an identified bug. - Tests for
grid_resampling_chainnow use the newly local implemented utility methodassert_all_close_with_details, which provides detailed information about differences when they occur.
- Fixed the
array1_interp2forGxNearestInterpolatorto properly set the nodata value for masked output pixels. - Fixed the
grid_resampling_chainmethod to work with output datasets whose types are different from float64. - Fixed the test class name in
test_array_utilsfrom TestArrayWindow to TestArrayUtils.
- Documentation for antialiasing filter creation
- Grid Masks:
- (Rust Core) GridNodeValidator trait and implementation supporting No Mask, Raster mask and Sentinel value options.
- Configurable valid cell value in grid masks (replaces hardcoded value of 1)
- Configurable sentinel value within grid coordinates to identify invalid cells
- Using grid masks or a sentinel value are optional and mutually exclusive
- Test coverage for new masking options
- Grid Geometric Metrics:
- New data structure to hold grid geometric metrics
- Computation of grid geometric metrics for in-memory grids
- Grid Resampling
- (Rust Core) Introduced trait strategies design concept for Input data masks, Output data masks and Bound checks
- (Rust Core) Implemented strategies traits to cover both with and without options
- (Rust Core) Added GxArrayViewInterpolationContextTrait trait to wrap the strategies traits
- Nearest neighbor and linear interpolation methods
- Configurable interpolation method
- Configurable indexing shift for input array coordinates
- Configurable target window for output buffer
- Safe method
grid_resolution_window_safefor handling edge cases in grid definitions - Chain module for managing I/O (input/output image, grids and input/output masks) and memory with tiling capabilities
- Antialiasing
- Added reciprocal cell frequential filter functionality
- Implemented core method to compute antialiasing filter from a grid using reciprocal cell frequential filter
- Documentation
- Add documentation notebooks for the grid mask and grid resampling chains
- Branding
- Added SVG version of GridR logo
- Rust required version is now 1.80+
- Geometry mask definition
- Modified signature of geometry_mask related methods (core and chain) to:
- Allow setting both valid and invalid geometry masks
- Remove assumptions about mask roles (previously implicit)
- Modified signature of geometry_mask related methods (core and chain) to:
- Mask Default Value:
- Changed default valid value for masks from 0 to 1
- This change allows to use masks as factors
- Note: This is an implicit convention change that may affect existing code
- Grid Resampling (Rust Core):
- Fully embedded grid mesh iteration within the GridMesh implementation
- Refactored to use GxArrayViewInterpolationContextTrait trait and related strategies
- Cubic interpolator (Rust Core)
- Optimized weight computation through factorization of common terms for performance improvement
- Refactored to use GxArrayViewInterpolationContextTrait trait and related strategies
- Docstrings
- Adopted NumPy-style convention for docstrings
- Reformulated code documentation
- Documentation
- Updated core grid resampling notebook documentation to reflect grid resampling masks updates
- Cleaned the
notebook_utils.pymodule
- Resolved warning in Sphinx documentation building
- Fixed warning in Rust code compilation