-
Outputs description:
A direct location grid is a grid which maps sensor coordinates with ground ones in WGS84 coordinates (EPSG:4326). Direct location grid is regular and in sensor reference frame (for one band/detector couple).
Sen2VM direct location grid computation takes as input the L1B product, the auxiliary information, GIPP, Altitude, IERS and the grid parametrization:
- Bands/detectors to process,
- 3 steps, one per band resolution (10m, 20m, 60m) in pixels (double)
For more details on these inputs (including the step value constraint for direct location grids), please refer to Input Description.
As output:
- At granule level: geolocation grids will be written (per granules/bands).
- At datastrip level:
- several .vrt (virtual dataset) will be written (per detectors/bands).
- The configuration file used in input with the date/time will be added in with the vrt files
Output grids will be integrated directly in the input product.
Caution
Please note that writing permissions in the L1B input folder are mandatory.
Before processing, a verification will be done to determine whether direct location grids are already available in the input L1B product folder, for the detectors/bands selected. If at least one is present for one couple detector/band, Sen2VM will raise an error and stop. Both granules and datastrip folder will be inspected (see output grids format and location in the following sections).
Grids’ location and naming is at granules level:
-
1 grid per couple “L1B granule”/”Sentinel-2 band”,
-
Grids include 2 (optionally 3) bands (Long/Lat/alt)
-
Grids are in geotiff format with float32 coding positions which allow approximately centimetre precision for lat/lon coordinates. JP2000 is not suitable, as it does not support Float32 encoding, resulting in insufficient precision.
-
Grids location will be inside a GEO_DATA folder which will be inside each granules folders (at the same level than IMG_DATA and QI_DATA folders),
-
Grids naming conventions will respect the corresponding image data inside the IMG_DATA folder with:
- GEO instead of MSI
- .tif instead of .jp2 extension as jp2 encoding is not possible for float32 data.
As example, for an image of the IMG_DATA folder, named:
- S2B_OPER_MSI_L1B_GR_DPRM_20140630T140000_S20230428T151505_D02_B01.jp2
The direct location grid will be generated in the GEO_DATA folder, and named:
- S2B_OPER_GEO_L1B_GR_DPRM_20140630T140000_S20230428T151505_D02_B01.tif
Note
The configuration file used in input with the date/time will be added in with the vrt files
At datastrip level grids’ location and naming is:
-
1 vrt per couple “detector”/”Sentinel-2 band”,
-
Grids include 2 (optionally 3) bands (Long/Lat/alt)
-
Grid location will be located inside a GEO_DATA folder, which resides within the DATASTRIP directory, at the same level as the QI_DATA folder.
-
Grids naming conventions will respect the corresponding datastrip metadata convention with:
- GEO instead of MTD
- _DXX_BYY.vrt instead of .xml extension.
As example, for an datastrip metadata of the DATASTRIP folder, named:
- S2B_OPER_MTD_L1B_DS_DPRM_20140630T140000_S20230428T150801.xml
A folder named GEO_DATA, beside the QI_DATA folder and datastrip metadata will contain 156 vrt files (12 detectors x 13 bands) named:
- S2B_OPER_GEO_L1B_DS_DPRM_20140630T140000_S20230428T150801_DXX_BYY.vrt
Example of product with grid inside it:
Note
To be consistent with granules convention with first pixel center, outputs grids have the same first pixel centres.
Grids characteristics are:
-
Convention: grid raster type is "point" with first grid cell centre at first pixel centre of the first granule (referred by PIXEL_ORIGIN in granule geometric info). Grid position given an image position (row, col), is
with (grid row,grid col) = (Pixel Origin, Pixel Origin) = (1,1) at center of first grid cell
Example:
-
Grid Metadata: Grids will contain Metadata information of GDAL geolocation grids:
- SRS: WGS84 WKT format
- PIXEL_OFFSET
- LINE_OFFSET
- PIXEL_STEP: GRID STEP
- LINE_STEP: GRID STEP
- GEOREFERENCING_CONVENTION: PIXEL_CENTER
-
Overlap: to ensure grid granule continuity, one pixel overlap will be added. Taking advantage of this overlap, one granule can be individually resampled, or multiple granules (whole Datastrip for example) using the vrt grid concatenation without extra disk cost). Thus PIXEL/LINE OFFSET of the Grid Metadata will vary for each grid.
Direct location grids are intended to be used with bilinear interpolation operation. Direct location (i.e lon/lat positions) should be as follow:
-
Given an image position (row/col) compute grid fractional position (grid row, grid col):
-
Use bilinear interpolation on (grid row, grid col) to retrieve lon/lat/(alt).
Caution
Note that based on the used convention, the [1,1] coordinate is the first pixel of the grid
Tip
If user wants to perform direct location of a position outside the granule footprint, a bilinear extrapolation is possible.
Grids should at least have 2x2 cells


