Revision 20914 trunk/extensions/extGeoreferencing/src/org/gvsig/georeferencing/process/geotransform/GeoTransformProcess.java
GeoTransformProcess.java | ||
---|---|---|
45 | 45 |
import org.gvsig.raster.util.RasterToolsUtil; |
46 | 46 |
|
47 | 47 |
import Jama.Matrix; |
48 |
import Jama.QRDecomposition; |
|
49 | 48 |
|
50 | 49 |
/** |
51 | 50 |
* Clase que representa una transformacion polinomial para la convertir las |
... | ... | |
235 | 234 |
for (int i=0; i<columResult.length;i++) |
236 | 235 |
a[i][0]=columResult[i]; |
237 | 236 |
Matrix c=null; |
238 |
|
|
239 | 237 |
if(matrix.det()==0.0){ |
240 |
QRDecomposition descomposition = new QRDecomposition(matrix);
|
|
241 |
Matrix A= new Matrix(a);
|
|
242 |
c=descomposition.solve(A);
|
|
238 |
// Resolucion del sistema usando la libreria flanagan
|
|
239 |
flanagan.math.Matrix matrixFL= new flanagan.math.Matrix(matrix.getArray());
|
|
240 |
xCoef= matrixFL.solveLinearSet(columResult);
|
|
243 | 241 |
} |
244 |
else
|
|
242 |
else{
|
|
245 | 243 |
c= matrix.solve(new Matrix(a)); |
246 |
for (int i=0; i<columResult.length;i++) |
|
247 |
xCoef[i]=c.get(i,0); |
|
244 |
for (int i=0; i<columResult.length;i++) |
|
245 |
xCoef[i]=c.get(i,0); |
|
246 |
} |
|
248 | 247 |
return xCoef; |
249 | 248 |
} |
250 | 249 |
|
Also available in: Unified diff