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