Question

Hi! I have two layers of polygons and would like to aggregate all polygons in one layer that falls within a certain distance of polygons in the other layer. Is this possible in FME? Grateful for any help!

  • 8 September 2022
  • 4 replies
  • 1 view

In the screenshot attached: I want to aggregate all the green polygons (they are within 2 meters of a building) that belongs to one building into a single polygon.


4 replies

Userlevel 5
Badge +25

Yes, you can use a NeighborFinder on the green polygons to find the closest building (within a max distance) and then,assuming the buildings have an id attribute, aggregate them on that building id.

 

Do note that this will simply look at distance, if you have more complex criteria to specify which polygons belong to which building you'll need to accomodate for that.

Badge +20

I would do a buffer for the buildings by 2 metres and then use SpatialRelator with List generation turned on. Send the Output to a ListExploder (this creates copies of the green polygons for each building that they could belong to).

The NeighborFinder seems less useful in this situation.

 

Yes, you can use a NeighborFinder on the green polygons to find the closest building (within a max distance) and then,assuming the buildings have an id attribute, aggregate them on that building id.

 

Do note that this will simply look at distance, if you have more complex criteria to specify which polygons belong to which building you'll need to accomodate for that.

Thank you for the input, that worked. :)

 

I would do a buffer for the buildings by 2 metres and then use SpatialRelator with List generation turned on. Send the Output to a ListExploder (this creates copies of the green polygons for each building that they could belong to).

The NeighborFinder seems less useful in this situation.

 

Thank you for the input!

 

Reply