Skip to main content
Solved

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


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)

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

danilo_fme
Evangelist
Forum|alt.badge.img+42

Hi @lachichi_farah​ 

 

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

 

Thanks in Advance,

Danilo


Forum|alt.badge.img
danilo_fme wrote:

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+32
  • Influencer
  • 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
ebygomm wrote:

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
ebygomm wrote:

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
ebygomm wrote:

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+32
  • Influencer
  • July 20, 2022
lachichi_farah wrote:

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
lachichi_farah wrote:

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

@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
markatsafe wrote:

@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!


Reply


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