root / trunk / extensions / extGeoreferencing / src / org / gvsig / georeferencing / main / GeorefOptions.java @ 19621
History | View | Annotate | Download (7.17 KB)
1 |
/* gvSIG. Sistema de Informaci?n Geogr?fica de la Generalitat Valenciana
|
---|---|
2 |
*
|
3 |
* Copyright (C) 2007 IVER T.I. and Generalitat Valenciana.
|
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., 59 Temple Place - Suite 330, Boston, MA 02111-1307,USA.
|
18 |
*/
|
19 |
package org.gvsig.georeferencing.main; |
20 |
|
21 |
import java.awt.Color; |
22 |
|
23 |
import org.gvsig.raster.grid.GridInterpolated; |
24 |
|
25 |
/**
|
26 |
* Clase para el almacenamiento de opciones. Contiene propiedades y m?todos para
|
27 |
* su asignaci?n y recuperaci?n.
|
28 |
*
|
29 |
* 31/01/2008
|
30 |
* @author Nacho Brodin nachobrodin@gmail.com
|
31 |
*/
|
32 |
public class GeorefOptions { |
33 |
// Opciones
|
34 |
private int algorithm = Georeferencing.AFFINE; |
35 |
private int degree = Georeferencing.DEFAULT_DEGREE; |
36 |
private Color backgroundColor = Color.BLACK; |
37 |
private Color textColor = Color.RED; |
38 |
private boolean showNumber = true; |
39 |
private boolean addErrorsCSV = false; |
40 |
private boolean centerView = false; |
41 |
private double threshold = 2.0; |
42 |
private int interpolationMethod = GridInterpolated.INTERPOLATION_NearestNeighbour; |
43 |
private String outFile = null; |
44 |
private int type = Georeferencing.WITH_MAP; |
45 |
private double xCellSize = 0; |
46 |
private double yCellSize = 0; |
47 |
|
48 |
/**
|
49 |
* Obtiene el grado del polin?mio
|
50 |
* @return entero con el valor que representa el grado del polin?mio
|
51 |
*/
|
52 |
public int getDegree() { |
53 |
return degree;
|
54 |
} |
55 |
|
56 |
/**
|
57 |
* Asigna el grado del polin?mio
|
58 |
* @param entero con el valor que representa el grado del polin?mio
|
59 |
*/
|
60 |
public void setDegree(int optiondegree) { |
61 |
degree = optiondegree; |
62 |
} |
63 |
|
64 |
/**
|
65 |
* Obtiene el color de los gr?ficos
|
66 |
* @return Color
|
67 |
*/
|
68 |
public Color getTextColor() { |
69 |
return textColor;
|
70 |
} |
71 |
|
72 |
/**
|
73 |
* Asigna el color de los gr?ficos
|
74 |
* @param optionTextColor
|
75 |
*/
|
76 |
public void setTextColor(Color optionTextColor) { |
77 |
textColor = optionTextColor; |
78 |
} |
79 |
|
80 |
/**
|
81 |
* Obtiene al algoritmo a utilizar (Transformaci?n af?n, polin?mico, ...)
|
82 |
* Las constantes est?n definidas en la clase Georreferencing
|
83 |
* @return
|
84 |
*/
|
85 |
public int getAlgorithm() { |
86 |
return algorithm;
|
87 |
} |
88 |
|
89 |
/**
|
90 |
* Asigna el algoritmo a utilizar (Transformaci?n af?n, polin?mico, ...)
|
91 |
* Las constantes est?n definidas en la clase Georreferencing
|
92 |
* @param
|
93 |
*/
|
94 |
public void setAlgorithm(int optionAlgorithm) { |
95 |
algorithm = optionAlgorithm; |
96 |
} |
97 |
|
98 |
/**
|
99 |
* Obtiene el color de fondo de las vistas
|
100 |
* @return Color
|
101 |
*/
|
102 |
public Color getBackgroundColor() { |
103 |
return backgroundColor;
|
104 |
} |
105 |
|
106 |
/**
|
107 |
* Asigna el color de fondo de las vistas
|
108 |
* @param optionBackgroundColor
|
109 |
*/
|
110 |
public void setBackgroundColor(Color optionBackgroundColor) { |
111 |
backgroundColor = optionBackgroundColor; |
112 |
} |
113 |
|
114 |
/**
|
115 |
* Consulta si los errores se escriben en el fichero CSV
|
116 |
* @return true si se escriben en el fichero y false si no se hace
|
117 |
*/
|
118 |
public boolean isAddErrorsCSV() { |
119 |
return addErrorsCSV;
|
120 |
} |
121 |
|
122 |
/**
|
123 |
* Asigna el flag que dice si los errores se escriben en el fichero CSV
|
124 |
* @param true para escribirlos en el fichero y false para no hacerlo
|
125 |
*/
|
126 |
public void setAddErrorsCSV(boolean addErrorsCSV) { |
127 |
this.addErrorsCSV = addErrorsCSV;
|
128 |
} |
129 |
|
130 |
/**
|
131 |
* Consulta si est? activo el flag de centrar las vistas autom?ticamente sobre
|
132 |
* el punto que est? seleccionado en la tabla.
|
133 |
* @return true para centrar autom?ticamente y false para no hacerlo
|
134 |
*/
|
135 |
public boolean isCenterView() { |
136 |
return centerView;
|
137 |
} |
138 |
|
139 |
/**
|
140 |
* Asigna el flag que dice si se centran las vistas autom?ticamente sobre
|
141 |
* el punto que est? seleccionado en la tabla.
|
142 |
* @return true para centrar autom?ticamente y false para no hacerlo
|
143 |
*/
|
144 |
public void setCenterView(boolean centerView) { |
145 |
this.centerView = centerView;
|
146 |
} |
147 |
|
148 |
/**
|
149 |
* Consulta el flag que informa si se muestra el n?mero del punto en la vista
|
150 |
* @return true si se muestra y false si no
|
151 |
*/
|
152 |
public boolean isShowNumber() { |
153 |
return showNumber;
|
154 |
} |
155 |
|
156 |
/**
|
157 |
* Asigna el flag que dice si se muestra el n?mero del punto en la vista
|
158 |
* @param true para mostrarlo y false para no hacerlo
|
159 |
*/
|
160 |
public void setShowNumber(boolean showNumber) { |
161 |
this.showNumber = showNumber;
|
162 |
} |
163 |
|
164 |
/**
|
165 |
* Obtiene el umbral de error a partir del cual se iluminan en rojo en la tabla
|
166 |
* @return double con el valor del umbral
|
167 |
*/
|
168 |
public double getThreshold() { |
169 |
return threshold;
|
170 |
} |
171 |
|
172 |
/**
|
173 |
* Asigna el umbral de error a partir del cual se iluminan en rojo en la tabla
|
174 |
* @param double con el valor del umbral
|
175 |
*/
|
176 |
public void setThreshold(double threshold) { |
177 |
this.threshold = threshold;
|
178 |
} |
179 |
|
180 |
/**
|
181 |
* Obtiene el m?todo de interpolaci?n del m?todo polinomial
|
182 |
* @return Entero contenido como constante en la clas GridInterpolation
|
183 |
*/
|
184 |
public int getInterpolationMethod() { |
185 |
return interpolationMethod;
|
186 |
} |
187 |
|
188 |
/**
|
189 |
* Asigna el m?todo de interpolaci?n del m?todo polinomial
|
190 |
* @param Entero contenido como constante en la clas GridInterpolation
|
191 |
*/
|
192 |
public void setInterpolationMethod(int interpolationMethod) { |
193 |
this.interpolationMethod = interpolationMethod;
|
194 |
} |
195 |
|
196 |
/**
|
197 |
* Obtiene el fichero de salida
|
198 |
* @return
|
199 |
*/
|
200 |
public String getOutFile() { |
201 |
return outFile;
|
202 |
} |
203 |
|
204 |
/**
|
205 |
* Asigna el fichero de salida
|
206 |
* @param outputFile
|
207 |
*/
|
208 |
public void setOutFile(String outFile) { |
209 |
this.outFile = outFile;
|
210 |
} |
211 |
|
212 |
/**
|
213 |
* Obtiene el tipo de georreferenciaci?n especificado en las constantes de la clase
|
214 |
* georreferencing.
|
215 |
* @return
|
216 |
*/
|
217 |
public int getType() { |
218 |
return type;
|
219 |
} |
220 |
|
221 |
/**
|
222 |
* Asigna el tipo de georreferenciaci?n especificado en las constantes de la clase
|
223 |
* georreferencing.
|
224 |
* @param
|
225 |
*/
|
226 |
public void setType(int type) { |
227 |
this.type = type;
|
228 |
} |
229 |
|
230 |
/**
|
231 |
* Obtiene el tama?o de celda en X para la georreferenciaci?n con remuestreo
|
232 |
* asignada por el usuario.
|
233 |
* @return
|
234 |
*/
|
235 |
public double getXCellSize() { |
236 |
return xCellSize;
|
237 |
} |
238 |
|
239 |
/**
|
240 |
* Asigna el tama?o de celda en X para la georreferenciaci?n con remuestreo
|
241 |
* asignada por el usuario.
|
242 |
* @param
|
243 |
*/
|
244 |
public void setXCellSize(double cellSize) { |
245 |
this.xCellSize = cellSize;
|
246 |
} |
247 |
|
248 |
/**
|
249 |
* Obtiene el tama?o de celda en Y para la georreferenciaci?n con remuestreo
|
250 |
* asignada por el usuario.
|
251 |
* @return
|
252 |
*/
|
253 |
public double getYCellSize() { |
254 |
return yCellSize;
|
255 |
} |
256 |
|
257 |
/**
|
258 |
* Asigna el tama?o de celda en Y para la georreferenciaci?n con remuestreo
|
259 |
* asignada por el usuario.
|
260 |
* @param
|
261 |
*/
|
262 |
public void setYCellSize(double cellSize) { |
263 |
this.yCellSize = cellSize;
|
264 |
} |
265 |
} |
266 |
|