Reprojection and GeoTIFF outputs for Sentinel-3

Frequently Asked Questions
Post Reply
quinten
Posts: 1021
Joined: Tue Mar 03, 2015 8:13 am

Reprojection and GeoTIFF outputs for Sentinel-3

Post by quinten »

It is possible to output GeoTIFF files from ACOLITE by setting the appropriate setting to True (note the ACOLITE file types l1r, l2t, l2r, l2w):

Code: Select all

l1r_export_geotiff=True
l2t_export_geotiff=True
l2r_export_geotiff=True
l2w_export_geotiff=True
By default this is only possible for input files that are already provided in projected geometry, such as imagery from Landsat, Sentinel-2 and Planet. Sentinel-3 imagery is provided as unprojected swath data, and this type of data cannot be directly represented in a projected GeoTIFF file. To output Sentinel-3 images as GeoTIFF, they need to be reprojected from the swath geometry to a projection supported in GeoTIFF. The most accurate way of doing this is probably setting up your own projection and warping code to match your specifications.

Experimental support to do this reprojection automatically is however included in ACOLITE since early 2022, including the 20220222 binary release. This functionality is experimental and to be used at your own risk. Data can be warped to a specified projection with latitude and longitude limits, through a 4 element S,W,N,E region of interest box. If no EPSG projection code is specified, the most appropriate UTM zone will be selected. The pyresample package is used for the reprojection, using a bilinear interpolation by default. For Sentinel-3 the latitude and longitude tie point grids are interpolated to get a per pixel geolocation, which is then used as input to the reprojection scheme. This option can be enabled by providing a output_projection_limit (replace S,W,N,E by the bounding box in decimal latitude and longitude) and by setting output_projection:

Code: Select all

output_projection_limit=S,W,N,E
output_projection=True
If no limits at all are given, no data will be reprojected. If output_projection_limit is not provided, the limit data (also S,W,N,E) will be used (Git clones since 2022, binary version 20220222), or a bounding box derived from a provided polygon file (Git clones after 2022-06-07 and future binary versions). Note that cropping to limit occurs before reprojection to output_projection_limit, so for best results make the limit box a bit larger than the output_projection_limit box. Each dataset is individually reprojected after processing, and this may take a rather long time.

Update 2022-07-06:
It is no longer required to provide output_projection_limit or limit. If none are provided, the projection extent will then be determined from the NetCDF lat and lon datasets. For consistent results using an output_projection_limit is still recommended. It is now also possible to reproject the file before performing the atmospheric correction, by setting reproject_before_ac:

Code: Select all

reproject_before_ac=True
output_projection=True
Issues
At larger view angles, the pyresample output may produce some holes in the data.
quinten
Posts: 1021
Joined: Tue Mar 03, 2015 8:13 am

Re: GeoTIFF outputs for Sentinel-3

Post by quinten »

Some examples

Note: In ACOLITE, Sentinel-3 imagery is cropped to approximately the given region of interest by using the latitude and longitude tie point grids.

Example 1
Processing of S3 scenes of the Belgian coastal zone, with no reprojection of the outputs. Note the slightly different geographical coverage of the outputs, which is the result of subsetting the swath geometry.

Code: Select all

limit=50.9230,2.4026,51.5697,3.4359
output_projection=False 
S3B_OLCI_2020_04_19_10_41_37_L2R_rgb_rhos.png
S3B_OLCI_2020_04_19_10_41_37_L2R_rgb_rhos.png (429.26 KiB) Viewed 70024 times
S3A_OLCI_2021_12_21_10_41_40_L2R_rgb_rhos.png
S3A_OLCI_2021_12_21_10_41_40_L2R_rgb_rhos.png (467.04 KiB) Viewed 70024 times
Example 2
Processing of S3 scenes of the Belgian coastal zone, with reprojection of the outputs. Note that the outputs are in the same projection with the same geographical coverage. Some data is missing in the corners as a rectangular subset in the swath geometry is not rectangular in UTM projection.

Code: Select all

limit=50.9230,2.4026,51.5697,3.4359
output_projection=True
output_projection_limit=None
S3B_OLCI_2020_04_19_10_41_37_L2R_projected_rgb_rhos_small.png
S3B_OLCI_2020_04_19_10_41_37_L2R_projected_rgb_rhos_small.png (256.43 KiB) Viewed 70024 times
S3A_OLCI_2021_12_21_10_41_40_L2R_projected_rgb_rhos_small.png
S3A_OLCI_2021_12_21_10_41_40_L2R_projected_rgb_rhos_small.png (284.4 KiB) Viewed 70024 times
Example 3
Processing of S3 scenes of the Belgian coastal zone, with reprojection of the outputs and setting a slightly larger initial limit box. Note that the outputs are in the same projection with the same geographical coverage. No data is missing in the corners as a larger initial crop adds enough buffer around the UTM projection rectangular region of interest.

Code: Select all

limit=50.8,2.2,51.8,3.6
output_projection=True
output_projection_limit=50.9230,2.4026,51.5697,3.4359
S3B_OLCI_2020_04_19_10_41_37_L2R_projected_rgb_rhos_large.png
S3B_OLCI_2020_04_19_10_41_37_L2R_projected_rgb_rhos_large.png (257.16 KiB) Viewed 70024 times
S3A_OLCI_2021_12_21_10_41_40_L2R_projected_rgb_rhos_large.png
S3A_OLCI_2021_12_21_10_41_40_L2R_projected_rgb_rhos_large.png (282.94 KiB) Viewed 70024 times
quinten
Posts: 1021
Joined: Tue Mar 03, 2015 8:13 am

Re: GeoTIFF outputs for Sentinel-3

Post by quinten »

Further settings
Some additional settings can be provided that are briefly covered here and in section 4.2 of the ACOLITE manual. All these are experimental and to be used at your own risk.

reproject_outputs=L1R,L2R,L2W
Controls which NetCDF outputs should be projected to a map projection. Options: comma separated list of output types (L1R, L2R, L2W, L2T).

output_projection=False
Controls whether outputfiles are projected to a map projection. Options: True/False.

output_projection_name=None
Name to append to the projected outputfiles. If None, _projected will be appended to the standard filename.

output_projection_epsg=None
EPSG code of the target projection. If output_projection_epsg and output_projection_proj4 not provided the scene center coordinates will be used to select a UTM zone.

output_projection_proj4=None
Proj4 string of the target projection, only used if output_projection_epsg is None. If output_projection_epsg and output_projection_proj4 not provided the scene center coordinates will be used to select a UTM zone.

output_projection_resolution=None
Resolution of the output grid in metres. X and Y resolution in comma separated values. E.g. output_projection_resolution=300,300 for OLCI and MERIS Full Resolution data.

output_projection_limit=None
Bounding coordinates of the output grid, decimal degrees in S,W,N,E order. If not set, the limit bounding coordinate value will be used. If output_projection_metres is set, then the coordinates need to provided in projected metres in the output_projection_xrange and output_projection_yrange settings.

output_projection_metres=False
Controls whether to use the xrange and yrange limits in projection space. Options=True/False

output_projection_xrange=None
Controls the xrange in projection space, if output_projection_metres is set.

output_projection_yrange=None
Controls the yrange in projection space, if output_projection_metres is set.

output_projection_resolution_align=True
Controls whether the reprojected grid is aligned with the output resolution size in metres.

output_projection_resampling_method=bilinear
Controls reprojection method.

default_projection_resolution=None
Set default projection resolution for a given sensor. Set in sensor specific settings files.

output_projection_fillnans=False
For some projected images lines of zeros are retrieved. Set this option to fill them with interpolated values. May cause issues at swath edge. Options=True/False
Post Reply