Skip to main content

Currently my workbench creates a polygon that I
convert to a Raster with a cumulative oil number as the Z Value.


 


Now, what I want to do with this Raster is:

 


 


From the middle of the Raster to the short side of the polygon (see attached
jpg) I want to slowly decrease the pixel value from 100% to 0%.

 


 


How can I accomplish this in FME 2017?

I would probably create an alpha band with the appropriate decay and add in to the raster with the value, and then mosaic it with an all 0 raster (alpha 255) with composite using alpha channel.

The 0 raster should be first into the mosaicker.

See https://knowledge.safe.com/articles/1219/alpha-compositing-blending-two-raster-images.html


Hi @jeffm, if I understand the requirement correctly, this workflow might be a solution. Assuming the input geometries are 3D polygons that forms a roof-like shape. The range of resulting cell values will be 0 - $(MAX_VALUE).

Left: Input (3D Polygons), Right: Output (Numeric Raster)


I would probably create an alpha band with the appropriate decay and add in to the raster with the value, and then mosaic it with an all 0 raster (alpha 255) with composite using alpha channel.

The 0 raster should be first into the mosaicker.

See https://knowledge.safe.com/articles/1219/alpha-compositing-blending-two-raster-images.html

I just have the one polygon, it isn't folded. The line in the middle of the graph is what is used to make the buffer. It's just a polygon with a value. It sounds like I need to break down the polygon into raster cells, then somehow calculate the cell values depending on it's spatial position.

 

 

 


I just have the one polygon, it isn't folded. The line in the middle of the graph is what is used to make the buffer. It's just a polygon with a value. It sounds like I need to break down the polygon into raster cells, then somehow calculate the cell values depending on it's spatial position.

 

 

 

If you look at the alphaCompositing workspace in the above link, there is a MultiBufferer custom transformer, that creates buffer rings, and an ExpressionEvaluator that creates a decay value based on the buffer id and number of buffers.

 

 

Use that on your line. I tend to use 20 buffers with a 5% drop in value, but that is completely customisable.

 


Reply