<div dir="ltr"><br><div>Hi,</div><div><br></div><div>I have two satellite images of an area near the coast and I would like to merge them somehow to get the best of both.</div><div><br></div><div>The larger image has black areas out to sea because the WMS service doesn't have tiles at the highest resolution offshore.  (I've used "gdal_translate -a_nodata 0" to mark the 0 values bands as "nodata.")</div><div><br></div><div>The smaller image covers the same area and has data over the whole area.</div><div><br></div><div>How can I merge them to get an image over the whole area where the higher resolution data from the larger image is used where available, and the data from the smaller image fills in the nodata values?</div><div><br></div><div>I tried various command lines for gdal_merge.  For instance</div><div><br></div><div>gdal_merge.py -o merge.tif larger.tif smaller.tif </div><div><br></div><div>but the result is basically a larger version of "smaller.tif" because it "wins" in the overlapping areas.  The low-resolution image is sampled at the higher resolution.</div><div><br></div><div>This command line</div><div><br></div><div>gdal_merge.py -o merge.tif  -px X Y smaller.tif larger.tif</div><div><br></div><div>(where X and Y are the pixel sizes for the larger image)</div><div><br></div><div>seems to keep all of the "nodata" values from the larger image unfortunately.</div><div><br></div><div>Can you suggest a workflow to get what I want?  Is there another tool for this I should use instead?<br></div><div><br></div><div>Thanks very much,</div><div><br></div><div>carl</div><div><br></div></div>