Skip to main content
Let me preface as I know this topic has been addressed in various iterations, but between reviewing past FME Community Answers, the old Google Forum, and the Knowledge Base I am still having some difficulties.

 

 

Short of the long, I am converting a vector (polygon) dataset to raster. So far so good as the NumericRasterizer works perfectly. The problem I am running into is that I need to set the area outside of my Area of Interest polygon to NoData.

 

 

Ideal Scenario:

 

 

 

 

 

Here is part of the Workbench having the issue: 

 

 

 

 

I get the following error message: 

 

 

RasterMosaicker(RasterMosaicFactory): The band nodata value 'NULL' of the selected band '1:0' does not match the band nodata value '255' of the corresponding band in the mosaicked raster

 

 

Basically, how do I force the outside to be set as NoData and then mosaic back together with inside features so that when it's writen out as a GeoTIFF, the correct values of 5 & 0 are inside and outside the polygon is NoData.

 

 

Thanks in advance,

 

 

 

 

Matt

 

 

HI Matthew,

 

 

Try this.

 

1) Set 255 to Nodata value before the Clipper with the RasterBandNodataSetter.

 

2) Replace all cell values of the Outside raster with 255 using the RasterCellValueReplacer.

 

 

Takashi
Awesome! Works flawlessley. Thanks Takashi.

 

 


Reply