Revision 20914
trunk/extensions/extGeoreferencing/src/org/gvsig/georeferencing/process/GeoreferencingProcess.java | ||
---|---|---|
44 | 44 |
import java.io.IOException; |
45 | 45 |
|
46 | 46 |
import org.gvsig.fmap.raster.layers.FLyrRasterSE; |
47 |
import org.gvsig.georeferencing.process.geotransform.GeoTransformDataResult; |
|
48 | 47 |
import org.gvsig.georeferencing.process.geotransform.GeoTransformProcess; |
49 | 48 |
import org.gvsig.raster.IProcessActions; |
50 | 49 |
import org.gvsig.raster.RasterProcess; |
... | ... | |
84 | 83 |
//Fichero de salida |
85 | 84 |
private String filename = null; |
86 | 85 |
|
87 |
// resutado de la transformacion |
|
88 |
private GeoTransformDataResult transformData = null; |
|
89 | 86 |
|
90 | 87 |
// Lista puntos de control |
91 | 88 |
private GeoPoint gpcs[] = null; |
... | ... | |
165 | 162 |
double xmax=Math.max(p2[0],p4[0]); |
166 | 163 |
double ymax=Math.max(p1[1],p2[1]); |
167 | 164 |
|
168 |
|
|
169 |
// OJO CON EL TAMA?O DE CELDA: CONSULTAR PARA EJEMPLO DE JOSE ES 25 |
|
170 |
|
|
171 | 165 |
if(xCellSize <= 1) |
172 | 166 |
xCellSize = (xmax - xmin) / (double)rasterSE.getPxWidth(); |
173 | 167 |
if(yCellSize <= 1) |
174 | 168 |
yCellSize = (ymax - ymin) / (double)rasterSE.getPxHeight(); |
175 |
|
|
176 |
// Por ahora el grid se crea con xCellSize ante la imposibilidad de crearlo con dos tama?os de celda diferentes |
|
169 |
|
|
177 | 170 |
newExtend= new GridExtent(xmin, ymin, xmax, ymax, xCellSize); |
178 | 171 |
int datatype= rasterSE.getBufferFactory().getRasterBuf().getDataType(); |
179 | 172 |
|
... | ... | |
367 | 360 |
} |
368 | 361 |
|
369 | 362 |
|
363 |
/* |
|
364 |
* (non-Javadoc) |
|
365 |
* @see org.gvsig.gui.beans.incrementabletask.IIncrementable#getLabel() |
|
366 |
*/ |
|
367 |
public String getLog() { |
|
368 |
return PluginServices.getText(this,"georreferencing_log_message"); |
|
369 |
} |
|
370 |
|
|
370 | 371 |
|
371 | 372 |
public void interrupted() { |
372 | 373 |
// TODO Auto-generated method stub |
373 | 374 |
} |
374 | 375 |
|
375 | 376 |
public void end(Object param) { |
376 |
transformData = (GeoTransformDataResult)param; |
|
377 | 377 |
} |
378 | 378 |
|
379 | 379 |
} |
trunk/extensions/extGeoreferencing/src/org/gvsig/georeferencing/process/geotransform/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 |
|
trunk/extensions/extGeoreferencing/.classpath | ||
---|---|---|
9 | 9 |
<classpathentry combineaccessrules="false" kind="src" path="/libDriverManager"/> |
10 | 10 |
<classpathentry kind="src" path="src-test"/> |
11 | 11 |
<classpathentry kind="src" path="src"/> |
12 |
<classpathentry kind="lib" path="/libFMap/lib/org.gvsig.fmap.raster.jar" sourcepath="/extRasterTools-SE"/>
|
|
13 |
<classpathentry kind="lib" path="/libFMap/lib/org.gvsig.raster.gui.jar" sourcepath="/extRasterTools-SE/src"/>
|
|
14 |
<classpathentry kind="lib" path="/_fwAndami/lib/org.gvsig.ui.jar" sourcepath="/libUIComponent/src"/>
|
|
12 |
<classpathentry sourcepath="/extRasterTools-SE" kind="lib" path="/libFMap/lib/org.gvsig.fmap.raster.jar"/>
|
|
13 |
<classpathentry sourcepath="/extRasterTools-SE/src" kind="lib" path="/libFMap/lib/org.gvsig.raster.gui.jar"/>
|
|
14 |
<classpathentry sourcepath="/libUIComponent/src" kind="lib" path="/_fwAndami/lib/org.gvsig.ui.jar"/>
|
|
15 | 15 |
<classpathentry combineaccessrules="false" kind="src" path="/libRaster"/> |
16 |
<classpathentry kind="lib" path="/_fwAndami/lib/iver-utiles.jar" sourcepath="/libIverUtiles/src"/>
|
|
16 |
<classpathentry sourcepath="/libIverUtiles/src" kind="lib" path="/_fwAndami/lib/iver-utiles.jar"/>
|
|
17 | 17 |
<classpathentry kind="lib" path="/libFMap/lib/org.cresques.cts.jar"/> |
18 |
<classpathentry kind="lib" path="/_fwAndami/lib/org.gvsig.exceptions.jar" sourcepath="/libExceptions/src"/> |
|
19 |
<classpathentry kind="lib" path="/libFMap/lib/gdbms-0.8-SNAPSHOT.jar" sourcepath="/libGDBMS"/> |
|
18 |
<classpathentry sourcepath="/libExceptions/src" kind="lib" path="/_fwAndami/lib/org.gvsig.exceptions.jar"/> |
|
19 |
<classpathentry sourcepath="/libGDBMS" kind="lib" path="/libFMap/lib/gdbms-0.8-SNAPSHOT.jar"/> |
|
20 |
<classpathentry kind="lib" path="flanagan.jar"/> |
|
20 | 21 |
<classpathentry kind="output" path="bin"/> |
21 | 22 |
</classpath> |
trunk/extensions/extGeoreferencing/config/text.properties | ||
---|---|---|
55 | 55 |
lineal_directo=Lineal directo |
56 | 56 |
lineas=Lineas |
57 | 57 |
linf_der=Inf Der |
58 |
georreferencing_log_message= Georreferenciando imagen. Esta operacion puede tardar varios minutos. Por favor, espere... |
|
58 | 59 |
lsup_izq=Sup Izq |
59 | 60 |
msg_save_raster=Se va a cancelar la operaci\u00f3n. \u00bfDesea continuar? |
60 | 61 |
preview_not_available=La previsualizaci?n no est? disponible. La capa no ha podido clonarse. |
Also available in: Unified diff