root / org.gvsig.toolbox / trunk / org.gvsig.toolbox / org.gvsig.toolbox.algorithm / src / main / java / es / unex / sextante / gridStatistics / multiGridCountGreaterThan / MultiGridCountGreaterThanAlgorithm.java @ 59
History | View | Annotate | Download (978 Bytes)
1 |
package es.unex.sextante.gridStatistics.multiGridCountGreaterThan; |
---|---|
2 |
|
3 |
import es.unex.sextante.core.Sextante; |
4 |
import es.unex.sextante.gridStatistics.base.MultiGridStatsExtendedBaseAlgorithm; |
5 |
|
6 |
public class MultiGridCountGreaterThanAlgorithm |
7 |
extends
|
8 |
MultiGridStatsExtendedBaseAlgorithm { |
9 |
|
10 |
@Override
|
11 |
public void defineCharacteristics() { |
12 |
|
13 |
setName(Sextante.getText("Larger_values_count"));
|
14 |
setGroup(Sextante.getText("Local_statistics"));
|
15 |
setGroup(Sextante.getText("Local_statistics"));
|
16 |
super.defineCharacteristics();
|
17 |
|
18 |
} |
19 |
|
20 |
|
21 |
@Override
|
22 |
protected double processValues(final double[] dValues) { |
23 |
|
24 |
int i;
|
25 |
double dValue;
|
26 |
|
27 |
int iCount = 0; |
28 |
|
29 |
for (i = 0; i < dValues.length; i++) { |
30 |
dValue = dValues[i]; |
31 |
if (dValue != NO_DATA) {
|
32 |
if (dValue > m_dValue) {
|
33 |
iCount++; |
34 |
} |
35 |
} |
36 |
} |
37 |
|
38 |
return iCount;
|
39 |
|
40 |
} |
41 |
|
42 |
} |