Question

max value of two attribute of a feature

  • 9 August 2017
  • 7 replies
  • 25 views

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


7 replies

Userlevel 2
Badge +16

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.

Userlevel 5
Badge +25

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'?

 

 

Userlevel 2
Badge +16
Shouldn't that be 'max' instead of 'min'?

 

 

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

 

 

Badge +4

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

@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

Badge +3

@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

Badge +4

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

 

 

Reply