william paul wrote:
Hello to everybody:
I want to use gdal_merge.py to mosaic four images. The images have the
same size, but the content of the images overlaps only in some areas.
The value for each images is something like : 1, 2, 3, 4
I want to mosaic all the files, but I want to be able to specify which
image will overlap what image, for example, the order of overlapping
should be: 1 covers 2, 2 covers 3, 3 covers 4 without no blending
(opaque), so the final image will have values 1, 2, 3, 4, each values
corresponding to its position in the overlapping images
I have tried with: gdal_merge.py -0 merge.tif -of GTiff image1.tif
image2.tif image3.tif image4.tif, but I get the merge images with 0
values on most of the image and a 4 value on the position of the last image
Please, may I receive and example for doing this?
William,
No the four images include regions that should be considered "nodata"? That
is areas that should not be copied into the destination image? Would the
pixel value in these areas happen to be zero? If so, try adding the
switch "-n 0" to the command.
eg.
gdal_merge.py -0 merge.tif -of GTiff -n 0 \
image1.tif image2.tif image3.tif image4.tif
By the way, to get the order of precidence you want you should also reverse
the order of the input images so that image1.tif is last (overlayed to top
of everything else).
Best regards,
--
---------------------------------------+--------------------------------------
I set the clouds in motion - turn up | Frank Warmerdam, [EMAIL PROTECTED]
light and sound - activate the windows | http://pobox.com/~warmerdam
and watch the world go round - Rush | Geospatial Programmer for Rent
_______________________________________________
gdal-dev mailing list
[email protected]
http://lists.osgeo.org/mailman/listinfo/gdal-dev