Skip to main content
Solved

How to get the percentage of a feature compared to another ?

  • July 20, 2022
  • 10 replies
  • 528 views

Forum|alt.badge.img

For exemple, I would like to have "This feature A overlaps 5% of the feature B" and "The feature B overlaps 30% of the feature A" (I have one dataset)

 

For now, I used "AreaOnAreaOverLayer" to have overlaps. Then, I calculated the area of the overlaps and the features to know what part of the feature the overlap represents.

 

However, at the end, I have for a feature the percentage that represents the overlap compared to one feature, but I haven't the other feature. I only have " Field 1: Feature A / Field 2: 80%" . That's all

I want another field that tell me the name of the other feature.

 

Thank you for helping

 

 

 

Best answer by markatsafe

@lachichi_farah​ thanks for including the same data. that makes it much easy to test out a solution. Attached is an example workspace that I think more or less will give you what you want. (FME 2022.1)

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.

10 replies

danilo_fme
Celebrity
Forum|alt.badge.img+51
  • Celebrity
  • 2076 replies
  • July 20, 2022

Hi @lachichi_farah​ 

 

Did you choose the configuration Merge Incoming Attributes ( into transformer )?

 

Thanks in Advance,

Danilo


Forum|alt.badge.img

Hi @lachichi_farah​ 

 

Did you choose the configuration Merge Incoming Attributes ( into transformer )?

 

Thanks in Advance,

Danilo

I've just tried but I think it doesn't change anything


ebygomm
Influencer
Forum|alt.badge.img+44
  • Influencer
  • 3422 replies
  • July 20, 2022

You need to build a list in the AreaOnAreaOverlayer, then explode this list so that you can do the overlap sums for each feature. Something like this

image


Forum|alt.badge.img

You need to build a list in the AreaOnAreaOverlayer, then explode this list so that you can do the overlap sums for each feature. Something like this

image

I'm going to test. Thank you!


Forum|alt.badge.img

You need to build a list in the AreaOnAreaOverlayer, then explode this list so that you can do the overlap sums for each feature. Something like this

image

So I tested it but it doesn't work...or I did it wrong


Forum|alt.badge.img

You need to build a list in the AreaOnAreaOverlayer, then explode this list so that you can do the overlap sums for each feature. Something like this

image

I haven't in the same line the names of the two features which overlaps


ebygomm
Influencer
Forum|alt.badge.img+44
  • Influencer
  • 3422 replies
  • July 20, 2022

I haven't in the same line the names of the two features which overlaps

Can you provide some sample data?


Forum|alt.badge.img

I haven't in the same line the names of the two features which overlaps

Yes ! I attached it. Thank you.

So I would have in the same line for example that the feature "Quimper_B1" overlaps "Briec T3" at 31% . And also " Briec T3" overlaps "Quimper_B1" at 35% (maybe in an other line).

For now, I haven't both names in the same line. I only have "This overlap is 31% of Quimper_B1"

 

Thank you


Forum|alt.badge.img+2
  • 1891 replies
  • Best Answer
  • July 22, 2022

@lachichi_farah​ thanks for including the same data. that makes it much easy to test out a solution. Attached is an example workspace that I think more or less will give you what you want. (FME 2022.1)


Forum|alt.badge.img

@lachichi_farah​ thanks for including the same data. that makes it much easy to test out a solution. Attached is an example workspace that I think more or less will give you what you want. (FME 2022.1)

Hello ! Sorry for late, I was in vacation. Thank you so much ! It exactly what I wanted. Thank you !

 

Have a good day!