gvsig-raster / org.gvsig.raster / branches / org.gvsig.raster.2.4 / org.gvsig.raster / org.gvsig.raster.lib / org.gvsig.raster.lib.buffer / org.gvsig.raster.lib.buffer.api / src / main / java / org / gvsig / raster / lib / buffer / api / statistics / StatisticsBand.java @ 6701
History | View | Annotate | Download (4.2 KB)
1 |
/* gvSIG. Desktop Geographic Information System.
|
---|---|
2 |
*
|
3 |
* Copyright ? 2007-2016 gvSIG Association
|
4 |
*
|
5 |
* This program is free software; you can redistribute it and/or
|
6 |
* modify it under the terms of the GNU General Public License
|
7 |
* as published by the Free Software Foundation; either version 2
|
8 |
* of the License, or (at your option) any later version.
|
9 |
*
|
10 |
* This program is distributed in the hope that it will be useful,
|
11 |
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
12 |
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
13 |
* GNU General Public License for more details.
|
14 |
*
|
15 |
* You should have received a copy of the GNU General Public License
|
16 |
* along with this program; if not, write to the Free Software
|
17 |
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
|
18 |
* MA 02110-1301, USA.
|
19 |
*
|
20 |
* For any additional information, do not hesitate to contact us
|
21 |
* at info AT gvsig.com, or visit our website www.gvsig.com.
|
22 |
*/
|
23 |
package org.gvsig.raster.lib.buffer.api.statistics; |
24 |
|
25 |
import org.gvsig.tools.task.SimpleTaskStatus; |
26 |
|
27 |
|
28 |
/**
|
29 |
* @author fdiaz
|
30 |
*
|
31 |
*/
|
32 |
public interface StatisticsBand { |
33 |
|
34 |
/**
|
35 |
* Gets the number of values by band
|
36 |
*
|
37 |
* @return the number of values by band
|
38 |
*/
|
39 |
public long getBandLength(); |
40 |
|
41 |
|
42 |
/**
|
43 |
* Obtiene el tipo de datos de la banda
|
44 |
*
|
45 |
* @return el tipo de datos de la banda
|
46 |
*/
|
47 |
public int getDataType(); |
48 |
|
49 |
/**
|
50 |
* Obtiene el valor del segundo m?ximo
|
51 |
*
|
52 |
* @return Valor del segundo m?ximo
|
53 |
*/
|
54 |
public double getSecondMax(); |
55 |
|
56 |
/**
|
57 |
* Obtiene el valor del segundo m?nimo
|
58 |
*
|
59 |
* @return Valor del segundo m?nimo
|
60 |
*/
|
61 |
public double getSecondMin(); |
62 |
|
63 |
/**
|
64 |
* Devuelve el m?ximo valor de la banda
|
65 |
*
|
66 |
* @return maximum
|
67 |
*/
|
68 |
public double getMaximum(); |
69 |
|
70 |
/**
|
71 |
* Devuelve el m?nimo valor de la banda
|
72 |
*
|
73 |
* @return minimum
|
74 |
*/
|
75 |
public double getMinimum(); |
76 |
|
77 |
/**
|
78 |
* Obtiene el valor medio
|
79 |
*
|
80 |
* @return Valor medio
|
81 |
*/
|
82 |
public double getMean(); |
83 |
|
84 |
/**
|
85 |
* Obtiene la varianza
|
86 |
*
|
87 |
* @return Varianza
|
88 |
*/
|
89 |
public double getVariance(); |
90 |
|
91 |
|
92 |
/**
|
93 |
* Obtiene la covarianza entre ?sta y la banda que se pasa como par?metro
|
94 |
*
|
95 |
* @param statisticBand
|
96 |
* estadisticas de la banda
|
97 |
*
|
98 |
* @return Covariance
|
99 |
*/
|
100 |
public double getCovariance(StatisticsBand statisticBand); |
101 |
|
102 |
/**
|
103 |
* Obtiene la mediana
|
104 |
*
|
105 |
* @return Median
|
106 |
*/
|
107 |
public double getMedian(); |
108 |
|
109 |
/**
|
110 |
* Obtiene un valor de recorte de colas para un porcentaje dado. Este
|
111 |
* recorte consiste en ordenar los elementos del
|
112 |
* raster (o una muestra de ellos) y devolver el valor que corresponde al
|
113 |
* porcentaje comenzando
|
114 |
* desde el principio del array ordenado y desde el final de ?l (m?nimo y
|
115 |
* m?ximo).
|
116 |
*
|
117 |
* @param percent
|
118 |
* Porcentaje de recorte
|
119 |
* @return El valor de recorte de colas para el porcentaje dado
|
120 |
*/
|
121 |
public double[] getTailTrimValue(double percent); |
122 |
|
123 |
/**
|
124 |
* Obtiene un valor de recorte de colas para una posici?n dada. Este recorte
|
125 |
* consiste en ordenar los elementos del
|
126 |
* raster (o una muestra de ellos) y devolver el valor que corresponde al
|
127 |
* porcentaje comenzando
|
128 |
* desde el principio del array ordenado y desde el final de ?l (m?nimo y
|
129 |
* m?ximo).
|
130 |
*
|
131 |
* @param pos
|
132 |
* posici?n de recorte
|
133 |
* @return el valor de recorte de colas para la posici?n dada
|
134 |
*/
|
135 |
public double[] getTailTrimValue(int pos); |
136 |
|
137 |
/**
|
138 |
* Obtiene el flag que informa de si las estad?sticas est?n calculadas o no.
|
139 |
*
|
140 |
* @return true indica que est?n calculadas y false que no lo est?n
|
141 |
*/
|
142 |
public boolean isCalculated(); |
143 |
|
144 |
/**
|
145 |
* Throws the thread which figure out statistics
|
146 |
*
|
147 |
* @param status
|
148 |
* @throws FileNotOpenException
|
149 |
* @throws RasterDriverException
|
150 |
* @throws ProcessInterruptedException
|
151 |
*/
|
152 |
public void calculate(SimpleTaskStatus status); //??? scale ??? |
153 |
|
154 |
/**
|
155 |
* Gets histogram of the band
|
156 |
*
|
157 |
* @return HistogramBand
|
158 |
*/
|
159 |
public HistogramBand getHistogramBand();
|
160 |
|
161 |
/**
|
162 |
* @return NoData values count
|
163 |
*/
|
164 |
public long getNoDataValuesCount(); |
165 |
|
166 |
|
167 |
|
168 |
} |