[Qgis-user] How to create a clipped grayscale raster with pixel values of 0 only on the unclipped areas

Andre Joost andre+joost at nurfuerspam.de
Wed Jul 2 11:12:35 PDT 2014


Am 02.07.2014 15:25, schrieb Andrea Acinelli:
> Hi everyone,
>
> I was hoping to get some help with the following problem. I'm working with
> a grayscale georeferenced and clipped raster (.tif). The raster has been
> clipped with the 'clipper' tool using a shapefile as a mask. The resulting
> raster has black bands of color along the four edges which can be turned
> off by assigning 0 pixel values to NO DATA values in the transparency tab
> of the raster properties. The problem I have is that many other pixels
> within the clipped area have 0 value which are also turned off. How can I
> obtain a final raster that has 0 values only outside the clipped area?

In Layer Properties, Style tab, load the extent. Then you can read the 
min and max values. It is save to put the nodata value to an unused 
number greater than max. That should be done best together with clipping.

HTH,
André Joost




More information about the Qgis-user mailing list