Skip to main content
I have about 3500 8-bit RGB geotiffs with black borders. I use the Clipper to remove/define the pixels that are outside my polygons to NoData. In combination with the RasterBandNodataSetter.

 

 

But when I use 0 as a value it also removes black pixels in my map. The same with 255, it also removes white from my map. I can't find a proper value to use without losing pixels in my map/raster.

 

 

Any suggestions for this? thanks!
In a similar situation I used the RasterExpressionEvaluator to set my black pixels (0,0,0) to almost black (1,1,1) prior to clippping.  The difference is visually not noticeable.

 

 
Thank you very much for this tip JDH!

 

 

I used the RasterExpressionEvaluator to set the black pixels from 0,0,0 to 1,1,1 but there where still some missing pixels in the output. Not as much as before but still too much. So I also used the RasterCellValueReplacer after the RasterExpressionEvaluator to force remaining pixels with the 0 value to 1. And now my output is okay!

 

 

Thnks

 

 

 

Reply