Solved

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


Badge

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

 

 

 

icon

Best answer by markatsafe 22 July 2022, 22:50

View original

10 replies

Userlevel 4
Badge +30

Hi @lachichi_farah​ 

 

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

 

Thanks in Advance,

Danilo

Badge

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

Userlevel 1
Badge +10

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

Badge

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!

Badge

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

Badge

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

Userlevel 1
Badge +10

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

Can you provide some sample data?

Badge

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

Badge +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)

Badge

@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