[gdal-dev] Re: Mask and GEOTiff

Jamie Adams jaadfoo at gmail.com
Thu Apr 28 12:53:48 EDT 2011


You could run gdal_polygonize on the mask geotiff and then use the output
vector with gdal_rasterize.  That's the only way I can think of without
writing a python script to do the pixel comparisons.

Jamie

On Thu, Apr 28, 2011 at 2:30 AM, canduc17 <candini at meeo.it> wrote:

> I think gdal merge is the easier way.
>
> But with a command like this:
> gdal_merge.py -of GTiff -separate -o cropped.tif orig.tif mask.tif
>
> I obtainn a GEOTiff with two bands: the first is the original image and the
> second is the mask.
> This is not what I want.
>
> I would like to obtain a single band GEOTiff with visible only the pixels
> of
> original image filtered by the mask.
>
> Is that possible with a further passage or with another tool?
>
> --
> View this message in context:
> http://osgeo-org.1803224.n2.nabble.com/Mask-and-GEOTiff-tp6312284p6312590.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
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osgeo.org/pipermail/gdal-dev/attachments/20110428/a7530d26/attachment.html


More information about the gdal-dev mailing list