Skip to main content
Question

max value of two attribute of a feature

  • August 9, 2017
  • 7 replies
  • 194 views

nmatton
Contributor
Forum|alt.badge.img+4

Hi !

I have a set of feature, for each feature, multiple attributes (A,B,C), all having numbers. I have to extract, for each feature, the maximum value value among the attributes A,B and C.

Since the StatisticCalculator limit to compute the max/min/... value of an attribute among all feature, how can archive my goal ?

thanks in advance !

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.

7 replies

erik_jan
Contributor
Forum|alt.badge.img+26
  • Contributor
  • August 9, 2017

Use the AttributeCreator transformer to create a new attribute MAX.

The value will be from the Arithmetic Editor using the function @max() as in the image, where each <FLOAT> is replaced by an attribute value.


redgeographics
Celebrity
Forum|alt.badge.img+62

Use the AttributeCreator transformer to create a new attribute MAX.

The value will be from the Arithmetic Editor using the function @max() as in the image, where each <FLOAT> is replaced by an attribute value.

Shouldn't that be 'max' instead of 'min'?

 

 


erik_jan
Contributor
Forum|alt.badge.img+26
  • Contributor
  • August 9, 2017
Shouldn't that be 'max' instead of 'min'?

 

 

Too late, Hans. I saw it and changed the text.

 

 


nmatton
Contributor
Forum|alt.badge.img+4
  • Author
  • Contributor
  • August 9, 2017

Use the AttributeCreator transformer to create a new attribute MAX.

The value will be from the Arithmetic Editor using the function @max() as in the image, where each <FLOAT> is replaced by an attribute value.

 

thanks ! that's exactly what's I mean ! was sure that it was a simple way to get this result :)

gio
Contributor
Forum|alt.badge.img+15
  • Contributor
  • August 9, 2017

@nmatton

the statistics calculator can calculate statistics (including max min) for all features, you can simply select them. It will add a prefix to each:

max_feature1,max_feature2 etc.

To get them in a single max attribute you would need to use a bulk attribute renamer with a regex

max_.+ => max


gio
Contributor
Forum|alt.badge.img+15
  • Contributor
  • August 10, 2017

@nmatton

I see I misinterpreted the question....thanks for the demerit

If you don't want to have to click all the attributes in the max or min function, which is ...

The superior solution then is


nmatton
Contributor
Forum|alt.badge.img+4
  • Author
  • Contributor
  • August 11, 2017

@nmatton

I see I misinterpreted the question....thanks for the demerit

If you don't want to have to click all the attributes in the max or min function, which is ...

The superior solution then is

That's very nice ! elegant and powerfull when having much more attributes. In my case it's limited to 2... but anyway, I love this way of thinking ! Thanks !