I have hundreds of rasters that I want to mosaic in one raster. These rasters are squares surrounded by larger squares of NoData values. I am using gdal_merge.py to this and I can use the -n option to indicate a NoData value. My problem is that some rasters have no data values equal to -9999 and others have -3.40282347e+38.
When I indicate one of the values, for instance, -9999, the NoData values of the other images are preserved.
Is there a way to assign more than one NoData value or is there a way to assign to all the rasters the same NoData value?
I would prefer a solution with GDAL that I can run in hundreds of files without hundreds of clicks.