Revision 1740 org.gvsig.raster.georeferencing/trunk/org.gvsig.raster.georeferencing/org.gvsig.raster.georeferencing.app/org.gvsig.raster.georeferencing.app.georeferencingclient/src/main/java/org/gvsig/raster/georeferencing/app/georeferencingclient/GeoreferencingProcessActions.java

View differences:

GeoreferencingProcessActions.java
46 46
 */
47 47
public class GeoreferencingProcessActions implements IProcessActions {
48 48
	private ViewMapRequestManager             viewMapRequestManager          = null;
49
	private GeoPointList                      gpList                         = null;
50 49
	private String                            fileName                       = null;
51 50
	
52 51
	//?ltima capa procesada con los puntos de control. Al cerrar la aplicaci?n 
......
61 60
	 * Asigna el panel con la tabla
62 61
	 * @param tablePanel
63 62
	 */
64
	public void setGeoPointList(GeoPointList gpList) {
63
	/*public void setGeoPointList(GeoPointList gpList) {
65 64
		this.gpList = gpList;
66
	}
65
	}*/
67 66
	
68 67
	/**
69 68
	 * A?ade una capa en la vista del mapa para previsualizar el resultado
......
79 78
									double cellsizeX,
80 79
									double cellsizeY,
81 80
									GeoTransformDataResult result) throws LoadLayerException {
82
		if(!testNumberOfPoints(order))
81
		if(!testNumberOfPoints(order, result.getGpcs()))
83 82
			return;
84 83
		
85 84
		fileName = file;
......
116 115
			RasterProcess process;
117 116
			try {
118 117
				process = RasterBaseAlgorithmLibrary.getManager().createRasterTask("GeoreferencingProcess");
119
				process.addParam("fLayer", lyr);
120
				process.addParam("filename", file);
121
				process.addParam("method", new Integer(method));
122
				process.addParam("gcps", gpList);
118
				process.addParam("RasterStore", lyr.getDataStore());
119
				process.addParam("FileName", file);
120
				process.addParam("Interpolation", new Integer(method));
121
				process.addParam("gcps", result.getGpcs());
123 122
				process.addParam("Order", new Integer(order));
124 123
				process.addParam("xCellSize", new Double(cellsizeX));
125 124
				process.addParam("yCellSize", new Double(cellsizeY));
......
147 146
	 * @param order Orden del polinomio a utilizar
148 147
	 * @return true si hay suficientes puntos de control y false si no los hay
149 148
	 */
150
	private boolean testNumberOfPoints(int order) {
149
	private boolean testNumberOfPoints(int order, GeoPointList gpList) {
151 150
		if (gpList != null) {
152 151
			if(gpList.size() <= 0) {
153 152
				GeoreferencingSwingImplLibrary.messageBoxError("no_selected_points", null);
......
191 190
		if(viewMapRequestManager != null) {
192 191
			try {
193 192
				String f = RasterLocator.getManager().getFileUtils().getLastPart(fileName, File.separator);
194
				FLyrRaster lyr = DefaultFLyrRaster.createLayer(fileName, new File(f));
193
				FLyrRaster lyr = DefaultFLyrRaster.createLayer(f, new File(fileName));
195 194
				viewMapRequestManager.addTestRasterLayer(lyr);
196 195
				lastTestLyr = lyr;
197 196
			} catch (InvalidRequestException e) {

Also available in: Unified diff