Skip to main content

Hello,

 

My current workbench is outputting an incorrect amount of Polygons using the FeatureMerger Transformer and I think the issue is partly to do with the number of vertices that make up some of the polygons and the fact some double back?

Or is it perhaps at the PointOnAreaOverlayer Transformers as they seem to be creating too many records as well?

 

Hopefully my images capture in essence what I want to achieve and the issues I am encountering. Perhaps FeatureMerger is not the correct Transformer I need?

 

Thank you in advance

I would recommend comparing the input (283) and output (298) of the PointOnAreaOverlayers first to figure out what the issue is. I don't think it's the number of vertices, but the doubling back (self intersection) may be. You can use a GeometryValidator to try and fix that.


I would recommend comparing the input (283) and output (298) of the PointOnAreaOverlayers first to figure out what the issue is. I don't think it's the number of vertices, but the doubling back (self intersection) may be. You can use a GeometryValidator to try and fix that.

If I inspect the data after PointOnAreaOverlayer then I think the issue may indeed be self intersections and islands. Although after the data goes through FeatureMerger the polygons do seem to resolve but are duplicated. Obviously would want to fix at the start I guess.

I assume I would want to put the GeometryValidator straight after PointOnAreaOverlayer?

If so what values would be required? I'm assuming "self-Intersections in 2D"

Thank you

 


If I inspect the data after PointOnAreaOverlayer then I think the issue may indeed be self intersections and islands. Although after the data goes through FeatureMerger the polygons do seem to resolve but are duplicated. Obviously would want to fix at the start I guess.

I assume I would want to put the GeometryValidator straight after PointOnAreaOverlayer?

If so what values would be required? I'm assuming "self-Intersections in 2D"

Thank you

 

I've managed to reduce issues from 298 to 295 (took a stab at settings). Islands still an issue though.

GeometryValidator1


Check that the input features aren't aggregates (multi polygons). By default the PointOnAreaOverlayer will Deaggregate any multi features​. If you change the Aggregate handelling in the PointOnAreaOverlayer to Reject instead of Aggregate you should get the problem features out of the Rejected port.

You can also use an AggregateFilter to test if a feature is an aggregate or not​.​


Check that the input features aren't aggregates (multi polygons). By default the PointOnAreaOverlayer will Deaggregate any multi features​. If you change the Aggregate handelling in the PointOnAreaOverlayer to Reject instead of Aggregate you should get the problem features out of the Rejected port.

You can also use an AggregateFilter to test if a feature is an aggregate or not​.​

Thank you

I tried your advice and altered PointOnAreaOverlayer to Reject 'Aggregate Handling'. I would have expected 283 input Polygons but has been reduced to 60 which seems odd?

Also tried the Aggregate Filter and would definitely indicate there are 10 multi/aggregated polygons? Can these be fixed?


Thank you

I tried your advice and altered PointOnAreaOverlayer to Reject 'Aggregate Handling'. I would have expected 283 input Polygons but has been reduced to 60 which seems odd?

Also tried the Aggregate Filter and would definitely indicate there are 10 multi/aggregated polygons? Can these be fixed?

Ahh, so by default FME will fail when if it rejects a feature - this screen tells me that it processed the first 59 or 60 areas without issue but on 60 or 61 is where the first issue it. You can change the behaviour of FME to continue on Rejection

continueFor fixing it depends on how you want to go. An aggregate in itself is not invalid, however, depending on what you want to do or your output it can be invalid.

You can deaggregate the multi-features yourself with a Deaggregator. This should give you single polygons, but you'll still have 298.

If you want to 'fix' the input polygons you could try to buffer the inputs (by a very small amount and then dissolve - Make sure you group by the original id). If these multi-polygon features were touching this should turn them into a single polygon. This wont work though if the multi-polygons have a gap.

If you're happy to keep multi-polygons then you can Reaggregate after doing the overlay with an Aggregator, just be sure to group-by the original id. This will again give you multi-features.


Thank you

I tried your advice and altered PointOnAreaOverlayer to Reject 'Aggregate Handling'. I would have expected 283 input Polygons but has been reduced to 60 which seems odd?

Also tried the Aggregate Filter and would definitely indicate there are 10 multi/aggregated polygons? Can these be fixed?

Thanks @virtualcitymatt​, a bit closer now.... I think. What I have pictured 'seems' to work...

The Passed output in the GeometryValidator is generating 280 records (correct) contrary to 179 indicated.

I'm getting 283 Polygons in the Inspector which is what I wanted.


Reply