Skip to main content
Question

how to extract the polygon that has the largest area at each value change of an attribute ?

  • January 19, 2018
  • 5 replies
  • 121 views

Forum|alt.badge.img

Example

 

Name Surface

2 15

2 25

4 10

4 20

4 15

5 15

5 10

Result

Name Surface

2 25

4 20

5 15

Thank you

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.

5 replies

oscard
Influencer
Forum|alt.badge.img+22
  • Influencer
  • 344 replies
  • January 19, 2018

Hi!

Have you tried the StatisticsCalculator transformer?

Group By: Name

Attributes to Analyze: Surface


ebygomm
Influencer
Forum|alt.badge.img+44
  • Influencer
  • 3430 replies
  • January 19, 2018

You could also sort by surface in reverse order then use a duplicatefilter filtering on name to keep only the polygon with the largest surface for each name


Forum|alt.badge.img
  • Author
  • 14 replies
  • January 19, 2018

Thank you egomm

 

how do i filter 250 names?

gio
Contributor
Forum|alt.badge.img+15
  • Contributor
  • 2252 replies
  • January 19, 2018

@40_eme

Sort by Area descending and name.

Then use a Sampler, 1, first N features.


Forum|alt.badge.img
  • Author
  • 14 replies
  • January 24, 2018

Thank you. The answer from Gio works perfectly.