Skip to main content

Is it possible to, if I have two point datasets that both intersect a polygon dataset, filter out the points that both intersect the same polygons ? I was using spatialrelator but it only takes one point dataset at a time; i want to see which polygons are intersected by both point sets at once. Hope that makes sense. Please helpme out, thank you!

One solution to handle both of these questions at the same time may be to start with the PointOnAreaOverlayer instead of a spatial relator. You will want to have an attribute on both point datasets that says what dataset it is in (fme_basename or fme_feature_type could work for this), and some ID attribute on the polygons. The points from both datasets can be sent in together. You will want to Generate Lists on the areas using the attribute for what dataset the features are from. And merge attributes so you can get a polygon ID attribute on the points.

For your first question you can then use a matcher to find points that intersect the same polygon.

For your second question, you can use the lists on the area features to filter to those intersected by both point datasets. This could be done a couple of ways; one method would be to use a ListDuplicateRemover, a ListElementCounter, and then filter to those areas which have a count of 2.


Thank you for the solution. So just to clarify, you’re suggesting I use pointonareaoverlayer, then follow with matcher, and then either listduplicateremover or listelementcounter? Not sure in the first paragraph is its own solution and the latter two are their own.


Thank you for the solution. So just to clarify, you’re suggesting I use pointonareaoverlayer, then follow with matcher, and then either listduplicateremover or listelementcounter? Not sure in the first paragraph is its own solution and the latter two are their own.

Sorry for any confusion, first paragraph was just to explain how to set up the PointOnAreaOverlayer. Next two paragraphs I separated as those are the two methods, one for each part of your question as I read it.

You would connect the Matcher to the PointOnAreaOverlayer’s Point output port. This would help you find multiple points that intersect the same polygon.

You would use the ListDuplicateRemover and the ListElementCounter together, both on the areas coming from the PointOnAreaOverlayer’s Area output port. You would then follow them up with a Tester to filter to features that have a count of 2.


Example layout of the transformers I had in mind, giving you the two different outputs.

 


Reply