Skip to main content
Solved

Update attributes based on spatial relation


Hi All,

 

I am having grid (red) polygons as shown below and I want to update Grid id to other polygons (black) when it covers maximum portion in that grid. Can any one suggest how it can be achieved in FME.

 

 

Thanks,

Ram.

Best answer by deanhowell

Hello again @kumarbangaram

Here is a suggestion for your requirements. I created some test data as I could get your test data to display correctly.

The Counters add the ID for each polygon in both Grid and Shapes.

The AreaOnAreaOverlayer intersects the two datasets.

The Tester removes the open space and any shapes that don't intersect.

The AreaCalculator then calculates the intersected areas.

The SpatialRelator then used to create the list

The ListSorter is used to sort based on area and then the first element in the list will be the one with the largest area. Hope this helps.

 

filegdb2none.fmw

View original
Did this help you find an answer to your question?

3 replies

deanhowell
Influencer
Forum|alt.badge.img+23
  • Influencer
  • July 3, 2020

Hello @kumarbangaram

I would think an approach like the following:

1. Calculate the area of each of the black polygons

2. Intersect with red grid

3. Sort based on red id and black area

4. Add black id to red polygon

 

Do you have some sample data, and I will have a play in FME for you?


@deanhowell Thanks for reply.

Please find the Data.zip for your reference

Finally GridID attribute from Grid needs to transfer to GridID attribute of Parcel.

 

 


deanhowell
Influencer
Forum|alt.badge.img+23
  • Influencer
  • Best Answer
  • July 3, 2020

Hello again @kumarbangaram

Here is a suggestion for your requirements. I created some test data as I could get your test data to display correctly.

The Counters add the ID for each polygon in both Grid and Shapes.

The AreaOnAreaOverlayer intersects the two datasets.

The Tester removes the open space and any shapes that don't intersect.

The AreaCalculator then calculates the intersected areas.

The SpatialRelator then used to create the list

The ListSorter is used to sort based on area and then the first element in the list will be the one with the largest area. Hope this helps.

 

filegdb2none.fmw


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