Sentinel-2 source ownership#

Use this inventory to locate the semantic owner of Sentinel catalog, radiometry and sensor work. The extension contract defines the public interfaces and selection behavior. Each source below has one semantic owner; its location establishes no additional runtime support or qualification.

Catalog and bindings#

Paths are relative to cugeo-raster/.

Source or surface

Owner

src/sentinel2.rs, src/sentinel2/{assets,subdatasets}.rs

Core: bounded XML/profile validation, canonical roots/containment, level/granule/baseline, descriptors, raw source text, radiometry metadata, assets and typed groups

src/lib.rs

Unconditional crate-root SAFE type exports from the private sentinel2 implementation module

src/ffi/sentinel2.rs, src/ffi/sentinel2/subdatasets.rs

Core: product/asset/band/reader/group adapters using common FFI error/output/close helpers

include/cugeo/raster/raster.h

Common C declarations/layouts and exports in every selection

include/cugeo/raster/jpeg2000.hpp

Core cugeo::raster::io::sentinel2 catalog facade; adopts the same native JPEG2000 owner

cugeo/raster/io/sentinel2.py, cugeo/raster/io/_safe_subdataset.py

Core catalog and group readers, raw radiometry metadata, source retention and ordinary dispatch

cugeo/raster/io/_reader.py, cugeo/raster/io/_catalog.py

Core source/metadata adoption and common owned-catalog copying/close

extensions/sentinel2/mod.rs, extensions/sentinel2/python/__init__.py

Processing and explicit physical namespaces; no catalog type exports

The unconditional Rust crate-root types are Sentinel2Level, Sentinel2Grid, Sentinel2BandDescriptor, Sentinel2SourceOffset, Sentinel2Conversion, Sentinel2BandMetadata, Sentinel2BandView, Sentinel2Product, Sentinel2Reader, Sentinel2AssetDescriptor, Sentinel2AssetKind, Sentinel2AssetView, Sentinel2Subdataset, Sentinel2SubdatasetId and Sentinel2SubdatasetSelector. Their methods retain raw sample, metadata and selected-source lifetime contracts in every build.

Python’s canonical implementation is cugeo.raster.io.sentinel2, with Sentinel2Product, Sentinel2Band, Sentinel2Reader, Sentinel2Radiometry, Sentinel2SourceOffset, Sentinel2SourceOffsetState, Sentinel2Conversion, Sentinel2AssetDescriptor, Sentinel2AssetKind and Sentinel2AssetMetadata. The I/O facade exports these types. The ordinary root exports the existing six band/product/radiometry/offset/conversion types. Group views open through ordinary open. The C++ catalog resides in io::sentinel2; its product, reader, subdataset, band and asset types use the common C handles.

The core C adapter suffixes below all have the cugeo_raster_ prefix. Each function retains its spelling, signature and ordinary validation in every selection; none is a processing-omission stub.

Adapter

Exact symbol suffixes

src/ffi/sentinel2.rs

sentinel2_product_open_v1, sentinel2_product_info_v1, sentinel2_product_get_bands_v1, sentinel2_product_get_band_path_v1, sentinel2_product_get_root_v1, sentinel2_product_get_source_text_v1, sentinel2_product_get_metadata_v1, sentinel2_product_open_band_v1, sentinel2_product_close_v1, sentinel2_product_release, sentinel2_product_asset_count_v1, sentinel2_product_get_asset_v1, sentinel2_product_open_asset, sentinel2_product_open_bands_v1, sentinel2_reader_band_v1, sentinel2_reader_read_many_v1, sentinel2_reader_close_v1

src/ffi/sentinel2/subdatasets.rs

sentinel2_product_subdataset_count_v1, sentinel2_product_get_subdataset_v1, sentinel2_product_get_subdataset_name_v1, sentinel2_subdataset_open_v1, sentinel2_subdataset_open_name_v1, sentinel2_subdataset_get_info_v1, sentinel2_subdataset_get_metadata_v1, sentinel2_subdataset_select_bands_v1, sentinel2_subdataset_close_v1

Core owns stored TCI/SCL/cloud/snow/AOT/WVP identities, units, quantification, classes and pixels, including grouped L2A auxiliary planes. Optional offsets and typed conversions are source metadata; reads do not apply calibration. Metadata and selected sources retain their existing ownership after product or group closure. Pixel execution uses independently selected codec features.

Existing radiometry primitives#

The surface-reflectance domain includes native table decoding, explicit coefficient inversion, calibration, visibility retrieval, correction, encoding and SAFE-angle/DEM preparation. It contains implemented primitives and an experimental workflow; this inventory claims neither complete atmospheric retrieval nor qualified Sen2Cor equivalence.

Sources

Owner and public surface

extensions/sentinel2/surface_reflectance.rs and its same-named directory

Sentinel extension; public Rust items retain their names under extensions::sentinel2::surface_reflectance with extension-sentinel2 availability and the existing additional cuda conditions

lut.rs, atmospheric_lut.rs, atmospheric_lut_cuda.rs in that subtree

Sentinel table interpretation and band/atmosphere policy, including Sen2CorLut, AtmosphericLut and AtmosphericLutPrepared

device.rs, native_math.rs, visibility.rs, correction.rs

Sentinel radiometry/calibration/QA/correction/encoding functions and VisibilityStatistics/SurfaceCorrection; use existing raster and CUDA owners

geometry.rs, geometry_cuda.rs, geometry_terrain.rs

SAFE solar/view-angle and surface-processing grid/DEM policy: SurfaceAngleMetadata, SolarAngleGrid, MeanViewingAngle, SurfaceGeometryGrid, SurfaceGeometryPlan, SurfaceGeometryPrepared, SurfaceDem, SurfaceDemInterpolation, SurfaceHeightDatum

source.rs, source_fields.rs

Surface-processing illumination/coefficient-field composition and SurfaceFieldSampler, using core registered coordinates and cugeo-proj

extensions/sentinel2/ffi/{surface_reflectance,surface_geometry,surface_lut,surface_source}.rs

Sentinel extension C adapters; existing flat C names remain their sole spellings

extensions/sentinel2/kernels/surface_reflectance.cu

Sentinel extension kernel source; compile only with the extension and CUDA

extensions/sentinel2/python/{surface_reflectance,_surface_geometry,_surface_lut}.py

Installed beneath cugeo.raster.extensions.sentinel2; public operations belong to its surface_reflectance module

include/cugeo/raster/extensions/sentinel2/surface_reflectance.hpp

C++ radiometry in cugeo::raster::extensions::sentinel2::surface_reflectance; included explicitly

experiments/surface_reflectance_pipeline/

Source-only experiment; uses public extension imports. Its private orchestration is not an installed processor or an independent sensor oracle.

The named surface geometry is the SAFE-angle/atmospheric-processing adapter, not the generic geolocation inverse or a physical push-broom model. Its EGM96/north-up terrain policies do not establish the physical sensor’s DEM/geoid/frame contract. Shared TIFF/HGT access, coordinate operations and sensor-independent raster geometry retain their core/proj owners.

The radiometry C adapter inventory is grouped below. Each name has the cugeo_raster_ prefix. Grouping assigns every current export in these four adapter files; it creates no additional public spelling.

Adapter

Exact symbol suffixes

surface_reflectance.rs

toa_to_surface_cuda, sen2cor_lut_decode, sen2cor_lut_upload, sen2cor_lut_sample_cuda, radiative_terms_normalize_cuda, encode_l2a_cuda, ddv_workspace_bytes, ddv_retrieve_cuda, l1b_to_reflectance_cuda, quality_validity_cuda, terrain_illumination_cuda, surface_correction_workspace_bytes, surface_correction_cuda, terrain_coefficients_cuda

surface_geometry.rs

surface_geometry_compose_cuda, surface_geometry_plan_create, surface_geometry_plan_release, surface_geometry_plan_info, surface_geometry_resource_path, surface_geometry_workspace_bytes, surface_geometry_illumination_workspace_bytes, surface_geometry_prepare_cuda, surface_geometry_prepared_release, surface_geometry_execute_cuda, surface_geometry_sample_illumination_cuda, source_illumination_workspace_bytes, source_illumination_cuda

surface_lut.rs

atmospheric_lut_create, atmospheric_lut_release, atmospheric_lut_staging_bytes, atmospheric_lut_prepare_cuda, atmospheric_lut_prepared_release, atmospheric_lut_sample_cuda, toa_to_surface_native_cuda, atmospheric_lut_prepare_device_cuda, atmospheric_lut_prepared_staging_bytes

surface_source.rs

surface_field_sampler_create, surface_field_sampler_release, surface_field_sampler_workspace_bytes, surface_field_sampler_sample_cuda

The Python module’s literal __all__ supplies the radiometry export inventory: AtmosphericCoefficients, AtmosphericLUT, BandCalibration, RadiativeTerms, Sen2CorLUT, SurfaceFieldSampler, SurfaceGeometryFields, SurfaceGeometryPlan, SurfaceGeometryPrepared, VisibilityResult, compose_surface_geometry, correct_surface, correction_workspace_bytes, encode_l2a, l1b_to_reflectance, quality_validity, read_sen2cor_lut, retrieve_visibility, source_illumination, source_illumination_workspace_bytes, terrain_coefficients, terrain_illumination, toa_to_surface, and visibility_workspace_bytes. Their selected module has this same export set; private helpers remain private.

Shared facilities and physical sensor boundary#

Existing source/interface

Sole owner

src/jpeg2000*, src/nvjpeg2k*, src/tiff/, src/nvtiff/, src/io/, src/read_batch/, src/device_read/, generic codec FFI and kernels/io/

Core: containers, metadata catalogs, decode, source selection, masks, shared pools, scheduling, gathers and receipts, including when Sentinel is the caller

src/rpc.rs, sensor-model C functions in src/ffi/warp_host.rs, cugeo/raster/_core.py RpcModel, cugeo/raster/_rpc_grid.py

Core: generic RPC model/polynomial and grid proposal. src/rpc_transform.rs, src/rpc_correction.rs, src/rpc_uncertainty.rs and Python transform.py/lowlevel retain point transforms, separate image-plane correction and explicit uncertainty. These interfaces do not substitute for physical Sentinel geometry.

src/sensor.rs

Core: sealed SensorModel, SensorModelHandle, SensorKind, SensorResult, SensorReceipt; delivered implementation set is RPC00B only. This is not third-party model registration.

src/geolocation/, src/geolocation.rs, src/ffi/reproject.rs, src/warp.rs, src/window.rs, src/raster_grid/, kernels/cuda/geolocation.cu

Core: registered coordinates, generic grid arithmetic/inverse, raster grids/windows and sampling; descriptor admission does not establish delivered inverse execution

src/terrain.rs, src/hgt.rs, generic orthorectification and kernels/cuda/orthorectify.cu

Core: terrain/raster composition and generic sensor consumption

src/memory*, src/scheduler.rs, src/cuda/, common FFI and Python _ffi/

Core: descriptors, allocations, budgets, context/stream safety, errors, completion and ownership

src/cugeo_proj*, src/proj_abi.rs

Raster’s use of cugeo-proj for terrestrial and vertical coordinate transformations

The physical Sentinel model has a separately built optional native-artifact boundary under extensions/sentinel2/physical/, isolating ERFA 2.0.1. Its installed Rust, C, C++ and Python preparation/direct-grid interfaces are independent of processing selection. Explicit preparation requires the artifact; CUDA production also requires core CUDA and a CUDA-enabled artifact. Linked execution requires separate qualification. Explicit physical preparation activates its astronomical preparation and physical resources; core import, ordinary opening, catalog access and capability inspection remain independent of them.

The optional artifact’s prepared owner holds immutable instrument/calibration snapshots, timing/state and ray evaluation, and produces registered direct-location grids for core reprojection. Terrestrial and vertical transformations remain in cugeo-proj; generic grids, inverses and resampling remain in core. A point-query facade over physical grids retains their terrain-bound meaning. It does not copy the generic CUDA inverse or replace RPC internals.

physical/native/cuda/direct.cu belongs to the optional artifact. It consumes core-owned device allocations and the shared terrain header include/cugeo/raster/detail/terrain_ray.cuh. The fixed private loader table checks its descriptor layout and terrain interface. physical/device.rs retains allocations, stream/context and completion owners; the artifact links no second core. Host-only artifacts expose preparation and typed unavailable device production, with no CPU-grid fallback.

The core sensor abstraction remains sealed and its delivered implementation set is RPC00B. Physical state does not belong in a metadata-only SensorModel with a placeholder inverse. Direct-grid production does not require another core sensor-handle constructor or external callback registration. Physical frame, epoch, resource closure and numerical acceptance remain separate from catalog and radiometry support. Offline independent Sen2VM node comparisons do not establish installed native physical support or absolute accuracy.

Tests, generated surfaces and reference ownership#

Core SAFE tests in src/sentinel2.rs, its child modules and C adapters run in standard, core-only and explicit-processing selections. The test_sentinel2_safe, test_sentinel2_l1b, test_sentinel2_l1b_gpu and test_sentinel2_safe_qualifier Python modules use core catalog imports and preserve their independent metadata/pixel, containment, invalid-input, retained-reader and failure-draining assertions.

Core JPEG2000 inspection, mask, pool and finishing suites retain their SAFE-associated cases in every selection. tests/metadata_catalog.rs, Python properties/mask-source tests and the C++ facade likewise inspect real core catalogs. A direct codestream does not replace product-associated nodata or conversion metadata. Generic HGT stays core; SurfaceDem policy stays with processing. In the mixed array-contract suite only the atmospheric-processing case requires the processing capability.

Only processing semantic cases follow extension-sentinel2; CUDA/backend prerequisites remain independent. Report unavailable Python cases as explicit skips and standalone unavailable runners as SKIP/77. Never skip an entire mixed suite or count zero comparisons as a pass. Rust processing cases compile out under their documented conditions. Installed consumers require core SAFE opening/discovery in every selection and check processing omission separately.

tests/surface_reflectance.rs and the test_surface_reflectance* and test_surface_geometry Python suites exercise the radiometry domain. Their independent analytic expectations and existing on-demand CUDA tiers survive the move. An unchanged test registration or a source import alone is not an executed qualification.

The ABI snapshots and tests/abi/mirrors.json retain the one-header policy. Their generated Rust guards and Python mirror paths follow the selected source owners. tests/api/ snapshots record the public namespaces and Rust feature conditions; they do not require omitted Rust stub APIs. Regenerate them with their owning tools, including support for the explicit Rust source path, and explain every changed pin.

scripts/generate_sentinel2_safe_fixtures.py, tests/data/sentinel2_safe/, tools/qualify-sentinel2-safe.py and tools/test-sentinel2-l1b.sh retain fixture/reference provenance and qualification scope. They consume the public core catalog and raw readers. GDAL raw pixels, metadata and codec reductions remain separate comparisons from independent physical Sen2VM reference coordinates. Neither changing ownership nor passing generic reprojection tests establishes authentic L2A coverage, physical sensor accuracy or acceleration.