You could run gdal_polygonize on the mask geotiff and then use the output vector with gdal_rasterize.  That&#39;s the only way I can think of without writing a python script to do the pixel comparisons.  <div><br></div><div>
Jamie<br><br><div class="gmail_quote">On Thu, Apr 28, 2011 at 2:30 AM, canduc17 <span dir="ltr">&lt;<a href="mailto:candini@meeo.it">candini@meeo.it</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
I think gdal merge is the easier way.<br>
<br>
But with a command like this:<br>
gdal_merge.py -of GTiff -separate -o cropped.tif orig.tif mask.tif<br>
<br>
I obtainn a GEOTiff with two bands: the first is the original image and the<br>
second is the mask.<br>
This is not what I want.<br>
<br>
I would like to obtain a single band GEOTiff with visible only the pixels of<br>
original image filtered by the mask.<br>
<br>
Is that possible with a further passage or with another tool?<br>
<font color="#888888"><br>
--<br>
View this message in context: <a href="http://osgeo-org.1803224.n2.nabble.com/Mask-and-GEOTiff-tp6312284p6312590.html" target="_blank">http://osgeo-org.1803224.n2.nabble.com/Mask-and-GEOTiff-tp6312284p6312590.html</a><br>

</font><div><div></div><div class="h5">Sent from the GDAL - Dev mailing list archive at Nabble.com.<br>
_______________________________________________<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></div>