[gdal-dev] gdal_merge does not mosaic

Frank Warmerdam warmerdam at pobox.com
Tue Jun 4 23:57:21 PDT 2013


Adi,

As previously mentioned the input images have different coordinate systems.
 gdal_merge.py does not support this situation.

I was able to somewhat successfully merge them like this:

gdalwarp img1.img img1_wgs84.img -t_srs WGS84
gdalwarp img2.img img2_wgs84.img -t_srs WGS84
gdal_merge.py img1_wgs84.img img2_wgs84.img -o mosaic.tif -n 0

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.

It could also likely be done all with one gdalwarp command.

Best regards,
Frank



On Tue, Jun 4, 2013 at 11:43 PM, adi_khan <adiba.nizami at gmail.com> wrote:

> img1.img <http://osgeo-org.1560.x6.nabble.com/file/n5057994/img1.img>
> img2.img <http://osgeo-org.1560.x6.nabble.com/file/n5057994/img2.img>
> I have attached the inputs images ( reduced resolution).
>
>
>
> --
> View this message in context:
> http://osgeo-org.1560.x6.nabble.com/gdal-merge-does-not-mosaic-tp5057095p5057994.html
> Sent from the GDAL - Dev mailing list archive at Nabble.com.
> _______________________________________________
> gdal-dev mailing list
> gdal-dev at lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/gdal-dev
>



-- 
---------------------------------------+--------------------------------------
I set the clouds in motion - turn up   | Frank Warmerdam,
warmerdam at pobox.com
light and sound - activate the windows | http://pobox.com/~warmerdam
and watch the world go round - Rush    | Geospatial Software Developer
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/gdal-dev/attachments/20130604/238999ae/attachment.html>


More information about the gdal-dev mailing list