Revision 30541 trunk/extensions/extRasterTools-SE/src/org/gvsig/rastertools/reproject/ReprojectProcess.java

View differences:

ReprojectProcess.java
18 18
*/
19 19
package org.gvsig.rastertools.reproject;
20 20

  
21
import java.io.IOException;
22

  
21 23
import javax.swing.SwingUtilities;
22 24

  
23 25
import org.cresques.cts.IProjection;
24 26
import org.gvsig.fmap.raster.layers.FLyrRasterSE;
25 27
import org.gvsig.raster.RasterProcess;
26 28
import org.gvsig.raster.util.RasterToolsUtil;
29
import org.gvsig.raster.util.RasterUtilities;
27 30

  
28 31
import com.iver.andami.PluginServices;
29 32
/**
......
51 54
		proj = (IProjection) getParam("projection");
52 55
		projsrc = (IProjection) getParam("srcprojection");
53 56
		isInTOC = (Boolean) getParam("isintoc");
57
		if(lyr.getFileName() != null)
58
		for (int i = 0; i < lyr.getFileName().length; i++) {
59
			try {
60
				if(!RasterUtilities.existsWorldFile(lyr.getFileName()[i]))
61
					RasterUtilities.createWorldFile(lyr.getFileName()[i], lyr.getAffineTransform(), (int)lyr.getPxWidth(), (int)lyr.getPxHeight());
62
			} catch (IOException e) {
63
				RasterToolsUtil.debug("Error creando los worldfile", null, e);
64
			}	
65
		}
54 66
	}
55 67

  
56 68
	/**
......
88 100
				}
89 101
			});
90 102
		} catch (ReprojectException e) {
91
			if (incrementableTask != null)
103
			if (incrementableTask != null) {
92 104
				incrementableTask.processFinalize();
93
			RasterToolsUtil.messageBoxError("error_reprojecting", this, e);
105
				setProgressActive(false);
106
			}
107
			RasterToolsUtil.messageBoxError(e.getMessage(), this, e);
108
			return;
94 109
		}
95 110
	}
96 111

  

Also available in: Unified diff