Skip to content

Commit 012b755

Browse files
committed
ready for review
1 parent 881d495 commit 012b755

2 files changed

Lines changed: 32 additions & 10 deletions

File tree

CHANGES.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
## Changes in 0.2.5 (under development)
22

3-
* Added subsetting in analysis mode via parameter `bbox`.
3+
* Added subsetting and reprojection in analysis mode via parameters `crs`
4+
`resolution` and `bbox`.
45

56
## Changes in 0.2.4 (from 2025-11-17)
67

docs/guide.md

Lines changed: 30 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -36,25 +36,30 @@ form. All bands and quality flags are resampled to a unified, user-provided reso
3636
Parameters `**kwargs`:
3737

3838
- `resolution`: Target resolution for all spatial data variables / bands.
39+
- `crs`: Coordinate reference system of the output dataset. If not provided, a
40+
mission-specific default CRS is used (see the respective mission sections below).
41+
- `bbox`: Bounding box `[west, south, east, north]` used for spatial subsetting;
42+
coordinates must be in the same CRS as `crs`.
3943
- `interp_methods`: for upsampling / interpolating
40-
spatial data variables. Can be a single interpolation method for all
41-
variables or a dictionary mapping variable names or dtypes to
42-
interpolation method. Supported methods include:
44+
spatial data variables. Can be a single interpolation method for all
45+
variables or a dictionary mapping variable names or dtypes to
46+
interpolation method. Supported methods include:
4347

4448
- `0` (nearest neighbor)
4549
- `1` (linear / bilinear)
4650
- `"nearest"`
4751
- `"triangular"`
4852
- `"bilinear"`
4953

50-
The default is `0` for integer arrays (e.g. Sentinel-2 L2A SCL),
51-
else `1`.
54+
The default is `0` for integer arrays (e.g. Sentinel-2 L2A SCL),
55+
else `1`. For more information view [xcube-resampling Documentation](https://xcube-dev.github.io/xcube-resampling/guide/#spatial-resampling-algorithms).
5256
- `agg_methods`: Optional aggregation methods to be used for downsampling
5357
spatial data variables / bands. Can be a single method for all variables or
5458
a dictionary mapping variable names or dtypes to methods. Supported methods include:
5559
`"center"`, `"count"`, `"first"`, `"last"`, `"max"`, `"mean"`, `"median"`,
5660
`"mode"`, `"min"`, `"prod"`, `"std"`, `"sum"`, and `"var"`.
5761
Defaults to `"center"` for integer arrays (e.g. Sentinel-2 L2A SCL), else `"mean"`.
62+
For more information view [xcube-resampling Documentation](https://xcube-dev.github.io/xcube-resampling/guide/#spatial-resampling-algorithms).
5863
- `variables`: Variables to include in the dataset. Can be a name or regex pattern
5964
or iterable of the latter.
6065
- `product_type`: Product type name, such as `"MSIL1C"`.
@@ -90,10 +95,13 @@ bands from multiple resolutions onto the same grid using [affine transformation
9095

9196
**Specific Sentinel-2 parameters `**kwargs`:**
9297

93-
- `variables`: The common spectral band names specified in the [STAC EO extension](https://github.com/stac-extensions/eo?tab=readme-ov-file#common-band-names)
94-
are supported for the Sentinel-2 analysis mode.
95-
- `resolution`: Target resolution for all spatial data variables / bands.
96-
Must be one of `10`, `20`, or `60`.
98+
- `variables`: Select specific spectral bands using the names listed above.
99+
Common spectral band names from the [STAC EO extension](https://github.com/stac-extensions/eo?tab=readme-ov-file#common-band-names) are also supported for Sentinel-2 analysis mode.
100+
- `crs`: Coordinate reference system of the output dataset.
101+
If not specified, the UTM grid of the native data is used.
102+
- `resolution`: Target resolution for all spatial variables/bands.
103+
Choose 10, 20, or 60 meters to minimize resampling and retain some of the native
104+
data resolution.
97105

98106
Examples:
99107
- [Example notebook - open-sen2.ipynb](https://github.com/EOPF-Sample-Service/xarray-eopf/blob/main/examples/open-sen2.ipynb)
@@ -128,6 +136,19 @@ for details.
128136
- [Sentinel-3 SLSTR Level-1 RBT](https://stac.browser.user.eopf.eodc.eu/collections/sentinel-3-slstr-l1-rbt)
129137
- [Sentinel-3 SLSTR Level-2 LST](https://stac.browser.user.eopf.eodc.eu/collections/sentinel-3-slstr-l2-lst)
130138

139+
**Specific Sentinel-2 parameters `**kwargs`:**
140+
141+
- `crs`: Coordinate reference system of the output dataset.
142+
If not specified, [EPSG:4326](https://epsg.io/4326) is used.
143+
- `resolution`: Target resolution for all spatial variables/bands.
144+
If not specified, the default is set per product:
145+
146+
- Sentinel-3 OLCI Level-1 EFR: 300 meter
147+
- Sentinel-3 OLCI Level-1 ERR: 1200 meter
148+
- Sentinel-3 OLCI Level-2 LFR: 300 meter
149+
- Sentinel-3 SLSTR Level-1 RBT: 500 meter (1000 meter if selected variables come from F- or I-stripe)
150+
- Sentinel-3 SLSTR Level-2 LST: 1000 meter
151+
131152
Example:
132153
- [Example notebook (open-sen3.ipynb)](https://github.com/EOPF-Sample-Service/xarray-eopf/blob/main/examples/open-sen3.ipynb)
133154

0 commit comments

Comments
 (0)