3

Version: FME Desktop 2014 SP3

I have two shapes with polygons. Now i want to locate those polygons of shape A (polygon.shp) which intersects polygons of Shape B (POLYGONS) (or are within them).

I am using the AreaOnAreaOverlayer and the tester. But 8 features go into the AreaOnAreaOverlay and 22 features come out. The correct number of passes would be 6. It seems, that the AreaOnAreaOverlayer duplicates some objects from the polygon.shp

Anyway, i did the same workflow to locate points/lines in the polygons with the PointOn/LineOnAreaOverlay Transformer. And it works perfectly.

Anyone any ideas or improvement suggestions for the workbench?

workbench: workbench

The properties of the Tester_3: properties of the tester

4 Answers 4

9

It seems that you're misunderstanding the way the AreaOnAreaOverlayer behaves. It actually intersects the polygons and creates new ones if they intersect. The documentation states that the tool:

Performs an area-on-area overlay so that all input areas are intersected against each other and resultant area features are created and output. The resultant areas have all the attributes of all the original features in which they are contained.

And the image shows that two features come in and three come out.

enter image description here

If you want to output polygons from Shapefile A which intersect polygons from Shapefile B then I think the transformer you want is the SpatialFilter. You can test different types of spatial relationships.

enter image description here

The default settings will probably suit your specific purposes. But I suggest reading the full documentation as this tool is very powerful.

If you want to determine relationships between layers, then I recommend the SpatialRelator. That transformer adds an attribute with the spatial relationship.

1
  • You're right! I missunderstood the functionality of the transformer. I have tried the SpatialFilter before, but with the wrong parameters. Now, it works! Very helpfully answer with good explanations. Thank you all for your answers.
    – elbarado
    Commented Jul 3, 2015 at 7:56
1

If you want to locate Shapes from A within B, I think you could use a "tester" transformer to filter according "_overlaps" attribute that is created on each of the output elements. Something like this:

enter image description here

I hope it serves this idea.

2
  • I added the settings of my "Tester" in my post. They look like yours. But the output contains the correct and incorrect polygons.
    – elbarado
    Commented Jul 2, 2015 at 12:07
  • Once you take a condition, you meant to have what you are looking for. So in this case, those features not overlapping they would have an "-overlap" VALUE of "1". The Overlap Count Attribute holds the number of features that the resultant feature overlapped, which will be at least one. (extracted from help website: docs.safe.com/fme/2015.0/html/FME_Desktop_Documentation/…). If you need more help, add some pics of the issue.
    – juasmilla
    Commented Jul 2, 2015 at 12:32
1

You might want to try using the SpatialRelater and the 'intersects' test. This will find (and associate) all the features in one layer that touch another layer.

0

Without more information about your data sets and workspace its difficult to know why AreaOnAreaOverlayer isn't working as expected.

Perhaps try side-stepping the need for the AreaOnAreaOverlayer in your workspace by putting one of your polygons through the CenterOfGravityReplacer and then using the resulting points along with your other polygon as the two inputs to another PointOnAreaOverlayer transformer.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.