Artefacts in script-configured indices


I have created a test configuration, based on Python scripts template, containing several indices, either pre-defined by SH or defined by myself. When I execute the WCS request to retrieve those indices over some area in Uganda, in some occasions the resulting images contain unwanted artefacts!
Artefact are either:

  • ‘thin diagonal polygons’ of width 200-400 m, aligned with the orbit direction, i.e. direction of scanning (note: I am not discussing here the “seam”, the border-line between the two images, which is just a line); or
  • ‘rectangular polygons’ parallel to the tile geometry in UTM reference system.

Therefore I suppose the issue has to be connected with mosaicking. I use mosaic order “Most recent” in all cases.
To be on the sure side I have checked also the original satellite images available on the Copernicus SciHub. Neither of the problematic images displays any artefacts or missing data (however, the seam-line is there!) in their original form.
Any suggestions how can I avoid these artefacts?


Can you include here some examples of requests URLs, keeping just first 4 letters of your instance ID and all the rest?


I compose request in python code, for several indices in a row. Here is my call:

INSTANCE_ID = ‘c637…’

output_folder = ‘e:\…’
timespan_tuple = (‘2015-06-25’, ‘2015-12-31’)
max_cloud_cover = 0.40 # of the whole Sentinel granule/tile!!
aoi_coords_utm = [302300, 397100, 331500, 377300]
aoi_bbox_utm = BBox(bbox=aoi_coords_utm, crs=CRS.UTM_36N)


for curr_layers_str in layers_str:
wcs_all_bands_request = WcsRequest(layer=curr_layers_str, data_folder=output_folder, bbox=aoi_bbox_utm, time=timespan_tuple, time_difference=datetime.timedelta(hours=2), resx=‘10m’, resy=‘10m’, image_format=MimeType.TIFF_d32f, maxcc=max_cloud_cover, custom_url_params={CustomUrlParam.SHOWLOGO: False}, instance_id=INSTANCE_ID)


Hi Peter!

Sentinel-2 became operational in November 2015 and data before that should not be regarded as high quality.

The artefacts from image above are almost 100% sure due to processing (by ESA), done in 2015; at that time there were still regular changes in processing pipeline, resulting in non-consistent imagery if data was processed on different ground stations.

Regarding the horizontal line - on the border of tiles we overlay both tiles with partial transparency. In general there should be no differences whatsoever as the data should be the same. However, we have noticed that sometimes (in rare cases) scenes actually have different values at the same location, probably result of processing artefacts (some of which I mention above).

If you really need pre-November-2015 data outside Europe, you’d probably have to manually filter such data.


Matej, hi,
thanks for quick answers! Some of the cases might thus be explained, however some not. I attach three examples (I should have done this already at the first iteration; it would be more clear; I apologize): NDVI from 2015, NDII from 2015 and NDII from 2018. On the picture there are merged cropped printscreens; below are the references to the images.



Yes, we’ve seen such problems in data from 2015. Unfortunately, such data was provided from ESA.


I have checked the bands themselves.

  • The big “rectangle” (in the figure above: left and middle image) is really due to the fact that the band B08 in image from 2015-12-25 is corrupt.
  • However the “thin diagonal line” parallel to the direction of scanning (in the figure above: middle and right image) is caused by the mis-alignment of the “seam” in bands B09, B10 (this one is aligned to other bands B01…B8A), B11 and B12. If computed index includes combination of aligned and mis-aligned bands (e.g. NDII: B08 and B11), than the anomaly “thin diagonal line” occurs. Apparently the mis-alignment of those bands appears only when image is cloudy. In can be noticed also on recent images. E.g. on the figure below I present the mis-alignment of the seam on bands B09 to B12 (top to bottom) of the 2018-07-12 image.


I also noticed a big rectangle like the one you have in one of my downloaded images…