Releases: xcube-dev/xcube-resampling
Releases · xcube-dev/xcube-resampling
0.3.2
Changes in 0.3.2
- Change inconsistent license classifier in
pyproject.toml - Removed the dependency on
zarr. As part of this change,
xcube_resampling.grid_mapping.cfconv.add_spatial_refhas been removed, as it
only loosely fit the scope of the xcube-resampling repository. - Added
xcube_resampling.utils.get_utm_crsto return the UTM CRS for a given
longitude and latitude pair. - In
xcube_resampling.reproject_dataset, the dataset is now clipped when the target
grid-mapping covers less than 80% of the source grid-mapping, improving performance
for reprojected cutouts. - In
xcube_resampling.affine_transform_dataset, resampling is now performed per
spatial slice, ensuring that interpolation is applied only along the spatial axes
and no longer across non-spatial dimensions (e.g., time). - When
prevent_nan_propagation=True, computation is now fully lazy. Previously, the
implementation checked for NaN values in the source array, which triggered loading
of the entire dataset into memory. - Enhanced
GridMappingAPI documentation.
Full Changelog: v0.3.1...v0.3.2
0.3.1
Changes in 0.3.1
- Fixed a bug in
xcube_resampling.rectify_datasetthat occurred when processing
datasets with decreasing x-coordinates. - Boolean (
bool) data arrays now default to nearest-neighbor interpolation.
For spatial aggregation, values are centered, and0is used as the default fill
value—matching the behavior of integer arrays to ensure consistent and valid results.
Full Changelog: v0.3.0...v0.3.1
0.3.0
What's Changed
- Fixed an issue when retrieving coordinate names from regular grid mappings.
- Improved documentation for the
frequencyandtolerancearguments of
xcube_resampling.resample_in_time. - Fixed incorrect time coverage metadata in dataset attributes after calling
xcube_resampling.resample_in_time. xcube_resampling.rectify_datasetis now fully lazy and scalable.- Removed methods
test_ij_bbox_from_xy_bboxandtest_ij_bboxes_from_xy_bboxesfrom
xcube_resampling.gridmapping.GridMapping. These methods were only used by
xcube_resampling.rectify_dataset; their updated implementations now live in
xcube_resampling.rectify._compute_source_tile_indexing. - Added support for rectifying datasets with decreasing x-coordinate in
xcube_resampling.rectify_dataset.
Full Changelog: v0.2.4...v0.3.0
0.2.4
Changes in 0.2.4
- Improved performance when creating
GridMappingfrom 2D coordinates.
Parameter estimation now uses only corner points instead of the full set of
coordinates, significantly reducing runtime for large datasets. - Bug fix in affine transformations.
Fixed a half-pixel shift that occurred inxcube_resampling.affine_transform_dataset
andxcube_resampling.resample_in_spacewhen the source and target grid mappings
shared the same CRS and were regular.
Full Changelog: v0.2.3...v0.2.4
0.2.3
Changes in 0.2.3
- In
xcube_resampling.resample_in_time, the method suffix in the output data variable
names is now added only when theagg_methodsorinterp_methodsparameters are
provided as mappings, or when multiple resampling methods are applied to the data
variable.
Full Changelog: v0.2.2...v0.2.3
0.2.2
Changes in 0.2.2
- Added support for spatial rectification of datasets in
xcube_resampling.rectify_dataseteven when spatial coordinates are not stored in
the dataset’s coordinate variables
Full Changelog: v0.2.1...v0.2.2
0.2.1
Changes in 0.2.1
- Added the
output_indices_namesparameter toxcube_resampling.rectify_datasetto
allow storing the source pixel indices.
Full Changelog: v0.2.0...v0.2.1
0.2.0
Changes in 0.2.0
- Enhanced the function
bbox_overlapso that it can handle bounding boxes crossing
the antimeridian - Added new class method
GridMapping.regular_from_bbox, which allows creating a
regular grid mapping directly from a bounding box, spatial resolution, and CRS. - Added new function
utils.resolution_meters_to_degreeswhich converts spatial
resolution from meters to degrees in latitude and longitude at a given geographic
latitude.- 1 degree of latitude ≈ 111,320 meters (constant approximation).
- 1 degree of longitude ≈ 111,320 * cos(latitude) meters.
- Bug fix: fixed grid mapping creation for irregular grids with decreasing longitude
along axis 1. - Added
xcube_resampling.resample_in_timewhich allows to resample a dataset along
the time axis. It supports up- and down-sampling. - Renamed the parameter
recover_nanstoprevent_nan_propagations, which can be
a boolean or a mapping (from variable name or dtype to boolean) that, whenTrue,
prevents NaN propagation during upsampling or interpolation.
0.1.1
Changes in 0.1.1
- Improved
xcube_resampling.utils.clip_dataset_by_bboxto support datasets with
2D coordinates. This function is also used internally by
xcube_resampling.rectify.rectify_dataset. - Added
reproject_bbox, a utility to reproject a bounding box from one CRS to another. - Added
bbox_overlap, a utility that computes the fraction of the source bounding box
overlapped by the target bounding box.
0.1.0
Changes in 0.1.0
- Added algorithm for affine transformation. (#4)
- Added algorithm for rectification of non-regular grids. (#4)
- Added algorithm for reprojection to a different coordinate reference system (CRS).
(#4) - Introduced main function
resample_in_space, which dynamically selects the
appropriate resampling algorithm based on the input dataset. (#4) - Added initial unit tests to verify core functionality. (#4)
- Introduced a new unified keyword argument
interp_methodthat supports values0,
1,"nearest","triangular", and"bilinear". This argument applies
consistently across all three resampling algorithms, simplifying usage and
improving API consistency. (#8) - Documentation added, which is available at
https://xcube-dev.github.io/xcube-resampling/. (#10)