Skip to content

Commit 6058af1

Browse files
authored
Merge pull request #40 from EOPF-Sample-Service/konstntokas-039-bug_fix_reprojection
Resolve issue #39 by switching to xcube-resampling
2 parents 28b16be + f3bc6a7 commit 6058af1

File tree

11 files changed

+568
-508
lines changed

11 files changed

+568
-508
lines changed

CHANGES.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,12 @@
1+
## Changes in 0.2.0
2+
3+
* Switched to [xcube-resampling](https://xcube-dev.github.io/xcube-resampling/)
4+
for dataset resampling and reprojection.
5+
* Renamed the keyword argument `spline_orders` to `interp_methods` to align with
6+
the naming convention used in xcube-resampling.
7+
* Fixed issue #39: resolved `AttributeError: 'dict' object has no attribute 'coords'`.
8+
9+
110
## Changes in 0.1.1
211

312
* Fixed a bug in Sentinel-2 cube generation where, during mosaicking of adjacent tiles

docs/guide.md

Lines changed: 12 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -174,7 +174,7 @@ These tiles are stored in their native UTM CRS, which varies by geographic locat
174174
| Condition | Requested bounding box lies within a single UTM zone, native CRS is requested, and the spatial resolution matches the native resolution. | Data spans multiple UTM zones, a different CRS is requested (e.g., EPSG:4326), or a custom spatial resolution is requested. |
175175
| Processing steps | Only upsampling or downsampling is applied to align the differing resolutions of the spectral bands. Data cube is directly cropped using the requested bounding box, preserving original pixel values. Spatial extent may deviate slightly due to alignment with native pixel grid. | A target grid mapping is computed from bounding box, spatial resolution, and CRS. Data from each UTM zone is reprojected/resampled to this grid. Overlaps resolved by first non-NaN pixel. |
176176

177-
Upsampling and downsampling are controlled using the `agg_methods` and `spline_order`
177+
Upsampling and downsampling are controlled using the `agg_methods` and `interp_methods`
178178
parameters ([see below](#remarks-to-opening-parameters)).
179179

180180
#### Data Identifiers
@@ -209,20 +209,21 @@ subsequently performs the reprojection.
209209

210210
**Upsampling / Reprojecting:**
211211

212-
- Controlled via 2D interpolation using the `spline_orders` parameter.
213-
- Accepts a single order for all variables, or a dictionary mapping orders to variable
214-
names or data types.
215-
- Supported spline orders:
216-
- `0`: nearest neighbor (default for `scl`)
217-
- `1`: linear
218-
- `2`: bi-linear
219-
- `3`: cubic (default)
212+
- Controlled via 2D interpolation using the `interp_methods` parameter.
213+
- Accepts a single interpolation method for all variables, or a dictionary mapping from
214+
variable names or data types to specific interpolation methods.
215+
- Supported interpolation methods:
216+
- `0` (nearest neighbor)
217+
- `1` (linear / bilinear)
218+
- `"nearest"`
219+
- `"triangular"`
220+
- `"bilinear"`
220221

221222
**Downsampling:**
222223

223224
- Controlled via the `agg_methods` parameter.
224-
- Can be specified as a single method for all variables, or as a dictionary mapping
225-
methods to variable names or data types.
225+
- Can be specified as a single method for all variables, or a dictionary mapping from
226+
variable names or data types to specific interpolation methods.
226227
- Supported aggregation methods:
227228
- `"center"` (default for `scl`)
228229
- `"count"`

environment.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ dependencies:
1212
- xarray
1313
- xarray-eopf >=0.1.1
1414
- xcube >=1.11.0
15+
- xcube-resampling
1516
# Development Dependencies - Tools
1617
- black
1718
- isort

0 commit comments

Comments
 (0)