You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit 39b06d6
Browse filesBrowse the repository at this point in the historyBrowse files
revert: undo #281 work pushed to main by mistake (#286)
776d064 (single scale/offset encoding switch, #281) was pushed straight to
main from a branch that tracked origin/main, without review. Revert it so
main matches release 0.12.0 again; the work comes back through a normal PR.
This reverts commit 776d064.
Copy file name to clipboardExpand all lines: README.md
+3-10Lines changed: 3 additions & 10 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -292,13 +292,6 @@ layout (`convert-s2-optimized`). The three native resolution groups (10 m, 20 m
292
292
60 m) are reused as-is and coarser overviews (120 m, 360 m, 720 m) are computed
293
293
via /2 downsampling.
294
294
295
-
Every level keeps the packing of the source product (for example `uint16` for
296
-
reflectance). By default the Zarr `scale_offset` + `cast_value` codecs store it,
297
-
so Zarr readers return decoded values. Pass `--no-scale-offset-codec` to write the ESA
298
-
layout instead: packed integers with CF `scale_factor`, `add_offset` and
299
-
`_FillValue`, and STAC `raster:scale`/`raster:offset`/`nodata` (see
300
-
[docs/converter.md](docs/converter.md#encoding)).
301
-
302
295
### Sentinel-3 OLCI L1 EFR
303
296
304
297
Sentinel-3 OLCI (Ocean and Land Colour Instrument) Level-1 EFR (Full Resolution)
@@ -331,6 +324,7 @@ Key flags:
331
324
-`--min-dimension` — stop generating /2 overview levels once either spatial
332
325
dimension would drop below this value (default: 256)
333
326
-`--enable-sharding` — accepted but not yet wired into encoding (follow-up task)
327
+
-`--keep-scale-offset` — accepted but not yet wired into encoding (follow-up task)
334
328
-`--output-grid` — `native` (default) preserves the instrument swath geometry; any other value is parsed as a CRS (e.g. `EPSG:4326`) and the swath is warped once onto a regular grid
335
329
336
330
#### What is converted
@@ -352,9 +346,8 @@ Key flags:
352
346
> **Note:** OLCI support is initial/measurements-focused (v1). Tie-point grid
353
347
> groups (`conditions/geometry`, `meteorology`, `instrument`) are copied through but
354
348
> not converted to GeoZarr convention. Encoding wiring for `--enable-sharding`,
355
-
> `--spatial-chunk` and `--compression-level` is accepted but scheduled as a
356
-
> follow-up task. Radiance is written with the source packing (`uint16` with CF
357
-
> `scale_factor` and `_FillValue`).
349
+
> `--spatial-chunk`, `--compression-level`, and `--keep-scale-offset` is accepted
The result is a space-efficient multiscale pyramid: `/measurements/reflectance/{r10m, r20m, r60m, r120m, r360m, r720m}` where the native resolutions are preserved as-is and only the coarser levels are computed.
200
200
201
-
### Encoding
202
-
203
-
Every level of the reflectance pyramid keeps the packing of the source product
204
-
(for example `uint16`, `scale_factor` 0.0001, `add_offset` -0.1, nodata 0 for
205
-
S2 L2A). One option selects how that packing is stored:
206
-
207
-
| Mode | Option | On disk | Metadata |
208
-
|---|---|---|---|
209
-
| Default: Zarr codec | none | Source integer dtype, packed by the Zarr `scale_offset` + `cast_value` codecs; the array's logical dtype is `float32` and its fill value is NaN | No CF scale attributes and no STAC scale fields: Zarr readers return decoded values |
210
-
| ESA layout |`--no-scale-offset-codec` / `scale_offset_codec=False`| Source integer dtype, no scale codecs | CF `scale_factor`, `add_offset` and `_FillValue` on the arrays; `raster:scale`, `raster:offset` and `nodata` on the STAC `reflectance` asset |
211
-
212
-
What a reader needs:
213
-
214
-
- Default mode: a Zarr library that supports the `scale_offset` and
215
-
`cast_value` codecs, for example zarr-python with the `cast-value-rs` extra,
216
-
or zarrita (used by the OpenLayers `GeoZarr` source).
217
-
- ESA layout: a reader that applies the CF attributes. xarray does this by
218
-
default (`mask_and_scale=True`); zarrita does not.
219
-
220
-
The input can be opened raw (`mask_and_scale=False`, as in the CPM path) or
221
-
decoded (as in the CLI). Both give the same output. Arrays without a packing,
222
-
such as the classification and quality masks, keep their integer dtype and
223
-
fill value in both modes.
224
-
225
-
In the CPM writer (`eopf convert-geozarr --no-scale-offset-codec` or
226
-
`target_store_kwargs={"scale_offset_codec": False}`), the former
227
-
`keep_scale_offset` option is still accepted for one release with a
228
-
`DeprecationWarning`: `keep_scale_offset=True` selects the ESA layout.
229
-
230
201
## Sentinel-3 OLCI L1 EFR Conversion
231
202
232
203
Sentinel-3 OLCI (Ocean and Land Colour Instrument) Level-1 EFR (Full Resolution)
0 commit comments