Skip to main content
Question

Clipper is not consistent with Raster Image

  • February 18, 2025
  • 2 replies
  • 29 views

miguelaugusto17
Contributor
Forum|alt.badge.img+2

The main idea:
I have this combination of transformers that are meant to clip a raster and from the result of that clip extract the values for every point using the RasterCellCoercer. This way I can do some statistics with the values of the raster that fall inside some polygons. 

The problem:
I started realizing that the results coming out of the clipper were not consistent. I thought I was losing my mind. Sometimes when I use the clipper using multiple polygons the clipper clips as expected, tight and beautiful (what I need), some other times the clipper clips using the bounding box of every polygon feature that is supposed to be clipping. Also I get way more points, which is a pain bc I am working with big numbers here.

Case 1 (Expected):

Case 1, its clipped tight
Case 1 transformer view: As you can see I have 153k Points coming out of the RasterCellCoercer and none of the points has a value 0 (last tester RetirarCotas 0)

Case 2 (The unwanted):
 

Case 2: The clipper clipped using the bounding box and the RasterCellCoercer gives all of this extra points outside of my feature.
Case 2: As you can see there are 296K points (before I had 153k points) coming out of the RasterCellCoercer. On top of that half of them have 0 value.

Just for completion here are my Clipper settings:

Clipper settings



Think this should not be the expected behaviour of a transformer. It is inconsistent, since the input raster and polygon features are exactly the same. I don’t know it it has something to do with some technical limitation of maybe something about things being cached, but I would like to understand what is happening and find a solution.

Of course I have a found a workaround, which is in the set of transformers I have shown you. At the end I check if the values are 0.
But this is not a good solution for several reasons. 

  1. The clipper still has inconsistent behaviour.
  2. The amount of points I get approximately double of the needed ones when it fails. This takes a significant time to filter the trash out.
  3. In case I was using some raster that could have real 0 values, I would not be able to filter the outside points as easily, and I would be forced to use another kind of expensive operation (like clipping again millions of points). I plan on running this with several million points, so that is not a good option.
  4. I just think FME would be a better place without this solved.

Probably another solution could be to use the RasterStatisticsCalculator, but if the clipper does not work properly I don’t see a clear solution using that.

So if anyone know how to help me, or someone working in FME wants to solve this inconsistency (in case it is and its not me not understanding something) I would really appreciate it.

Thanks in advance for your time.

2 replies

nielsgerrits
VIP
Forum|alt.badge.img+53

The best way to get the attention of someone from Safe Software for cases like this is to submit a ticket.

https://support.safe.com/hc/en-us/p/support

 


miguelaugusto17
Contributor
Forum|alt.badge.img+2
nielsgerrits wrote:

The best way to get the attention of someone from Safe Software for cases like this is to submit a ticket.

https://support.safe.com/hc/en-us/p/support

 

Thanks for the advice. I just submitted a ticket. :)


Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings