<html><head><style type="text/css"><!-- DIV {margin:0px;} --></style></head><body><div style="font-family:times new roman, new york, times, serif;font-size:12pt"><DIV>Thank you Frank:</DIV>
<DIV> </DIV>
<DIV>It solved my problem :)</DIV>
<DIV> </DIV>
<DIV>Best regards,</DIV>
<DIV> </DIV>
<DIV>William<BR></DIV>
<DIV style="FONT-SIZE: 12pt; FONT-FAMILY: times new roman, new york, times, serif"><BR>
<DIV style="FONT-SIZE: 13px; FONT-FAMILY: arial, helvetica, sans-serif"><FONT face=Tahoma size=2>
<HR SIZE=1>
<B><SPAN style="FONT-WEIGHT: bold">From:</SPAN></B> Frank Warmerdam <warmerdam@pobox.com><BR><B><SPAN style="FONT-WEIGHT: bold">To:</SPAN></B> william paul <williampaul28@yahoo.com><BR><B><SPAN style="FONT-WEIGHT: bold">Cc:</SPAN></B> gdal-dev@lists.osgeo.org<BR><B><SPAN style="FONT-WEIGHT: bold">Sent:</SPAN></B> Friday, October 31, 2008 3:12:07 PM<BR><B><SPAN style="FONT-WEIGHT: bold">Subject:</SPAN></B> Re: [gdal-dev] gdal_merge<BR></FONT><BR>william paul wrote:<BR>> <BR>> Hello to everybody:<BR>> <BR>> I want to use <A href="http://gdal_merge.py/" target=_blank>gdal_merge.py</A> to mosaic four images. The images have the <BR>> same size, but the content of the images overlaps only in some areas. <BR>> The value for each images is something like : 1, 2, 3, 4<BR>> I want to mosaic all the files, but I want to be able to specify which <BR>> image will overlap what image, for example, the order of
overlapping <BR>> should be: 1 covers 2, 2 covers 3, 3 covers 4 without no blending <BR>> (opaque), so the final image will have values 1, 2, 3, 4, each values <BR>> corresponding to its position in the overlapping images<BR>> <BR>> I have tried with: gdal_merge.py -0 merge.tif -of GTiff image1.tif <BR>> image2.tif image3.tif image4.tif, but I get the merge images with 0 <BR>> values on most of the image and a 4 value on the position of the last image<BR>> <BR>> Please, may I receive and example for doing this?<BR><BR>William,<BR><BR>No the four images include regions that should be considered "nodata"? That<BR>is areas that should not be copied into the destination image? Would the<BR>pixel value in these areas happen to be zero? If so, try adding the<BR>switch "-n 0" to the command.<BR><BR>eg.<BR>gdal_merge.py -0 merge.tif -of GTiff -n 0 \<BR> image1.tif image2.tif
image3.tif image4.tif<BR><BR>By the way, to get the order of precidence you want you should also reverse<BR>the order of the input images so that image1.tif is last (overlayed to top<BR>of everything else).<BR><BR>Best regards,<BR>-- <BR>---------------------------------------+--------------------------------------<BR>I set the clouds in motion - turn up | Frank Warmerdam, <A href="mailto:warmerdam@pobox.com" ymailto="mailto:warmerdam@pobox.com">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 Programmer for Rent<BR><BR></DIV></DIV></div><br>
</body></html>