Merge bug?


I want to make a mosaic of satellite images.
I have 7 images clipped each one to fill my BBOX exactly. Loading that images in QGIS i can see that is totally fulfilled and without gaps.

Now, reading these images with rasterio and than merging(files_to_join it's a list of opened images with

mosaic, out_trans = merge(files_to_join, precision=50)

and saving it with out_trans and sizes updated, I get:

that has gaps and missing pieces.

Why this is happening? (Same CRS and same ZONE)

Alan Snow

One thing to check would be if the nodata values are properly set on the rasters. If they are not, then merging could cause the nodata values to fill in those areas instead of the correct values.


Yes, all rasters have nodata set to match the correct nodata value. QGIS correctly mask the nodata zone(transparent).