<div dir="ltr">Adi, <div><br></div><div>As previously mentioned the input images have different coordinate systems. gdal_merge.py does not support this situation. </div><div><br></div><div style>I was able to somewhat successfully merge them like this:</div>
<div style><br></div><div style><div>gdalwarp img1.img img1_wgs84.img -t_srs WGS84</div><div>gdalwarp img2.img img2_wgs84.img -t_srs WGS84<br></div><div>gdal_merge.py img1_wgs84.img img2_wgs84.img -o mosaic.tif -n 0<br></div>
<div><br></div><div style>Note the use of -n 0 when merging to treat areas of zero value as nodata. The gdalwarp commands are used in this case to transform to WGS84 so the images will be in a common coordinate system. </div>
<div style><br></div><div style>It could also likely be done all with one gdalwarp command. </div><div style><br></div><div style>Best regards,</div><div style>Frank</div><div style><br></div></div></div><div class="gmail_extra">
<br><br><div class="gmail_quote">On Tue, Jun 4, 2013 at 11:43 PM, adi_khan <span dir="ltr"><<a href="mailto:adiba.nizami@gmail.com" target="_blank">adiba.nizami@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
img1.img <<a href="http://osgeo-org.1560.x6.nabble.com/file/n5057994/img1.img" target="_blank">http://osgeo-org.1560.x6.nabble.com/file/n5057994/img1.img</a>><br>
img2.img <<a href="http://osgeo-org.1560.x6.nabble.com/file/n5057994/img2.img" target="_blank">http://osgeo-org.1560.x6.nabble.com/file/n5057994/img2.img</a>><br>
I have attached the inputs images ( reduced resolution).<br>
<br>
<br>
<br>
--<br>
View this message in context: <a href="http://osgeo-org.1560.x6.nabble.com/gdal-merge-does-not-mosaic-tp5057095p5057994.html" target="_blank">http://osgeo-org.1560.x6.nabble.com/gdal-merge-does-not-mosaic-tp5057095p5057994.html</a><br>
<div class="im HOEnZb">Sent from the GDAL - Dev mailing list archive at Nabble.com.<br>
</div><div class="HOEnZb"><div class="h5">_______________________________________________<br>
gdal-dev mailing list<br>
<a href="mailto:gdal-dev@lists.osgeo.org">gdal-dev@lists.osgeo.org</a><br>
<a href="http://lists.osgeo.org/mailman/listinfo/gdal-dev" target="_blank">http://lists.osgeo.org/mailman/listinfo/gdal-dev</a><br>
</div></div></blockquote></div><br><br clear="all"><div><br></div>-- <br>---------------------------------------+--------------------------------------<br>I set the clouds in motion - turn up | Frank Warmerdam, <a href="mailto:warmerdam@pobox.com" target="_blank">warmerdam@pobox.com</a><br>
light and sound - activate the windows | <a href="http://pobox.com/~warmerdam" target="_blank">http://pobox.com/~warmerdam</a><br>and watch the world go round - Rush | Geospatial Software Developer<br>
</div>