geedim
geedim copied to clipboard
Q mosaic gives strange artifacts
See the uploaded image. Other methods look fine (ish) with the same settings.

q-mosaic
will not give good results in all situations, but this does look a bit odd. Please could you provide code, or a command line to re-create this image.
GeoJSON
{
"type": "FeatureCollection",
"features": [
{
"type": "Feature",
"properties": {},
"geometry": {
"coordinates": [
[
[
3.2320803252100063,
6.60534144003347
],
[
3.2320803252100063,
6.317907838094598
],
[
3.5334997324700907,
6.317907838094598
],
[
3.5334997324700907,
6.60534144003347
],
[
3.2320803252100063,
6.60534144003347
]
]
],
"type": "Polygon"
}
}
]
}
Code:
polygon = data["features"][0]["geometry"]
coll = gd.MaskedCollection.from_name('COPERNICUS/S2_SR_HARMONIZED')
coll = coll.search(start_date="2019-01-01", end_date="2020-01-01", region=polygon, cloudless_portion=0.0)
comp_im = coll.composite(method='q-mosaic', region=polygon)
comp_im.download(output_path, region=polygon, crs='EPSG:32735', scale=10, max_tile_size=8)
q-mosaic
is working correctly for your example from what I can tell. The component images span a range of wet/dry conditions, and the composite consists of parts of these different images where they happened to have the largest distance to cloud.