Sentinel-2 products and processing interfaces#
Core SAFE product I/O is a Python interface. Optional physical-model and surface-reflectance processing are separate C++ extension surfaces. Availability of an extension, admission of a particular input, and qualification of a result are separate questions.
SAFE assets, grids and band groups#
What you have or need |
Python lookup |
Grid or selection contract |
|---|---|---|
Product groupings |
|
Lists the product’s groupings. |
Individual entries |
|
Lists assets that can be selected individually. |
Missing spectral entries |
|
Identifies gaps in the spectral asset inventory. |
A selected asset |
|
Opens the selected entry. |
A band name |
|
Supply |
An ordered band group |
|
Preserves requested order and requires a common projected grid. Bands on different grids need a separate alignment step. See Read matching Sentinel-2 bands. |
The public SAFE path and its supported asset declarations are in sentinel2.py. Its XML handling rejects DTDs and nesting deeper than 128. The asset inventory is the basis for selecting files in a particular product. It does not imply that every possible product or codec is supported.
Stored samples, offsets and nodata#
Lookup |
Meaning |
|---|---|
Stored samples |
Reading radiometry metadata does not change stored sample values. |
Source offset |
A band can retain a source offset used by an optional radiometric conversion. |
Optional conversion |
Radiometry records conversion separately from the stored samples. |
Nodata |
A band can also carry a nodata marker identifying missing samples. It is independent of the source offset. |
See the SAFE radiometry implementation for the fields associated with a selected band.
Optional physical processing#
The following entries are C++ interfaces in cugeo::raster::extensions::sentinel2. They are separate from Python SAFE product I/O.
C++ lookup |
Preparation, artifacts and output |
Availability, admission and qualification |
|---|---|---|
|
|
Optional physical-model capability. Configuration and artifacts must pass the implementation’s admission checks. The capability reports |
|
A separately owned prepared handle. |
Its request and resources must be admitted for the prepared model and CUDA path. The capability reports |
Both owners use retryable destruction: retain an owner whose close fails and retry destruction when the failure has cleared. The model and grid are distinct handles, so account for each owner’s lifetime and its admitted artifacts. See physical.hpp and the physical implementation.
Surface-reflectance interfaces#
These C++ entries are in cugeo::raster::extensions::sentinel2::surface_reflectance. The declarations specify individual processing interfaces. They do not establish whole-scene surface-reflectance qualification. Consult the linked declarations and C ABI for exact descriptor fields, units and input restrictions.
C++ lookup |
Preparation and required inputs or buffers |
Emitted handle or product |
Build availability, admitted profile and qualification |
|---|---|---|---|
|
Create a host coefficient LUT from explicit band, provenance, axis metadata, nodes and values, then prepare it for a CUDA context and stream. |
Prepared LUT. |
CUDA preparation and sampling require the applicable compiled capability and admitted descriptors. The declarations do not establish whole-scene qualification. |
|
Upload an external band table into caller-owned |
Uploaded table and six SI radiative fields. |
Requires the applicable CUDA extension and admitted table, band, resolution and descriptors. Whole-scene qualification is not established. |
|
Prepare with transform, EPSG, dimensions, maximum rows and context. Query workspace size, then supply coordinates, registration, input fields and scratch to |
Three sampled source fields. |
Context-bound CUDA interface. Input admission follows its declarations. Whole-scene qualification is not established. |
|
Build a plan from a native product and options, inspect resource paths and workspace requirements, then prepare for a context, maximum rows and stream. |
Geometry, viewing, relative-azimuth, solar and registered illumination outputs. |
Requires admitted product resources and the applicable CUDA path. Whole-scene qualification is not established. |
|
Supply registered physical-node inputs and caller scratch. |
Source illumination field. |
CUDA path and declared input profile required. Whole-scene qualification is not established. |
|
Supply TOA, path, transmission and albedo fields and output storage. The native overload accepts Float32 or Float64 atmospheric inputs and produces Float32 output. |
Surface reflectance. |
CUDA path and admitted raster descriptors required. Whole-scene qualification is not established. |
|
Supply radiative fields and irradiance for normalization, and supply reflectance, quantification and offset for encoding. |
Normalized fields or UInt16 counts with ties-to-even rounding. |
CUDA path and declared input profile required. Encoding alone does not establish product qualification. |
|
Query caller-owned scratch capacity, then supply tables, source and destination fields and parameters. |
VIS and support, counts and statistics. |
CUDA path and admitted DDV inputs required. Whole-scene qualification is not established. |
|
Supply quality planes or elevation and solar geometry fields. |
Validity or terrain illumination fields. |
CUDA path and declared input profile required. Whole-scene qualification is not established. |
|
Query correction scratch where needed and supply the declared source fields, parameters and output buffers. |
Corrected surface or terrain-adjusted coefficients. |
CUDA path and admitted descriptors required. Whole-scene qualification is not established. |
|
Supply candidate and output fields, optional selection and a stream. Retain backing allocations and the stream through completion or error drain. |
Ordered geometry or illumination composition. |
Enqueues without a completion wait or device allocation. Observe execution errors when completing the supplied stream. Whole-scene qualification is not established. |
The complete public declarations are in surface_reflectance.hpp. Runtime capabilities report compile-time availability: device reads depend on nvtiff, host orthorectification on orthorect, CUDA orthorectification on cuda plus orthorect, and CUDA reprojection on cuda. These flags do not by themselves admit a particular Sentinel-2 input or qualify a surface-reflectance product. See capabilities.rs.