[gdal-dev] gdal_merge does not mosaic

adi_khan adiba.nizami at gmail.com
Tue Jun 4 02:52:48 PDT 2013


Thanks!


On Tue, Jun 4, 2013 at 2:57 PM, Rahkonen Jukka [via OSGeo.org] <
ml-node+s1560n5057691h22 at n6.nabble.com> wrote:

> adi_khan <adiba.nizami <at> gmail.com> writes:
>
> >
> > <http://osgeo-org.1560.x6.nabble.com/file/n5057631/inputimgs.jpg>
> > <http://osgeo-org.1560.x6.nabble.com/file/n5057631/gdalinfo.jpg>
> > <http://osgeo-org.1560.x6.nabble.com/file/n5057631/output.jpg>
> >
> > Hi all,
> > here please find the input and output I used.
> >
> > The attached images :
> > 1. First image is a snapshot of 2 input images in different views
> > 2. gdalinfo of first and second image.
> > 3. Output mosaic along with info.
> >
> > Note :
> > I used gdal_merge.py and gdalwarp as well. But the output remains the
> same.
>
> Hi,
>
> Lambert conformal conic is totally unknown system to me and I am not sure
> if
> you should be able to use gdal_merge with your source images as they are
> at
> all. The gdal_merge document page says:
> "All the images must be in the same coordinate system and have a matching
> number of bands"
> If you compare the PROJCS parameters in the gdalinfo reports they are not
> the same but I do not what gdal_merge thinks about that.
>
> You were adviced to use gdalwarp as
> gdalwarp -of HFA img1.img img2.img img3.img mosaic.img
>
> I made some trials and it seems that if img1.img and img2.img are in
> different coordinate systems then gdalwarp does not create correct output.
> For me it is anyway not so good idea to run gdalwarp without giving -t_srs
> parameter. Why to let some program to decide the target projection if you
> can give it yourself and know for sure what will happen?
>
> Another thing is that your images have nodata areas which appears to be
> black. However, no colour is labeled as nodata colour in image metadata
> and
> therefore gdalwarp believes that black borders belong to the images.
>
> So my untested suggestion for the command is
>
> gdalwarp -of HFA -t_srs [some_definition_here] -srsnodata 0 0 0 img1.img
> img2.img mosaic.img
>
> -Jukka Rahkonen-
>
>
> _______________________________________________
> gdal-dev mailing list
> [hidden email] <http://user/SendEmail.jtp?type=node&node=5057691&i=0>
> http://lists.osgeo.org/mailman/listinfo/gdal-dev
>
>
> ------------------------------
>  If you reply to this email, your message will be added to the discussion
> below:
>
> http://osgeo-org.1560.x6.nabble.com/gdal-merge-does-not-mosaic-tp5057095p5057691.html
>  To unsubscribe from gdal_merge does not mosaic, click here<http://osgeo-org.1560.x6.nabble.com/template/NamlServlet.jtp?macro=unsubscribe_by_code&node=5057095&code=YWRpYmEubml6YW1pQGdtYWlsLmNvbXw1MDU3MDk1fC0xNTgzOTQ1MTgw>
> .
> NAML<http://osgeo-org.1560.x6.nabble.com/template/NamlServlet.jtp?macro=macro_viewer&id=instant_html%21nabble%3Aemail.naml&base=nabble.naml.namespaces.BasicNamespace-nabble.view.web.template.NabbleNamespace-nabble.view.web.template.NodeNamespace&breadcrumbs=notify_subscribers%21nabble%3Aemail.naml-instant_emails%21nabble%3Aemail.naml-send_instant_email%21nabble%3Aemail.naml>
>



-- 
Regards,
Adiba Khan




--
View this message in context: http://osgeo-org.1560.x6.nabble.com/gdal-merge-does-not-mosaic-tp5057095p5057701.html
Sent from the GDAL - Dev mailing list archive at Nabble.com.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/gdal-dev/attachments/20130604/5a9af224/attachment-0001.html>


More information about the gdal-dev mailing list