Skip to main content
Solved

Update attributes based on spatial relation

  • July 3, 2020
  • 3 replies
  • 101 views

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

This post is closed to further activity.
It may be an old question, an answered question, an implemented idea, or a notification-only post.
Please check post dates before relying on any information in a question or answer.
For follow-up or related questions, please post a new question or idea.
If there is a genuine update to be made, please contact us and request that the post is reopened.

3 replies

deanhowell
Influencer
Forum|alt.badge.img+24
  • Influencer
  • 315 replies
  • 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+24
  • Influencer
  • 315 replies
  • 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