Index: org.gvsig.raster.reproject/tags/org.gvsig.raster.reproject-2.2.77/org.gvsig.raster.reproject.algorithm/pom.xml
===================================================================
--- org.gvsig.raster.reproject/tags/org.gvsig.raster.reproject-2.2.77/org.gvsig.raster.reproject.algorithm/pom.xml	(revision 0)
+++ org.gvsig.raster.reproject/tags/org.gvsig.raster.reproject-2.2.77/org.gvsig.raster.reproject.algorithm/pom.xml	(revision 9578)
@@ -0,0 +1,77 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+	<modelVersion>4.0.0</modelVersion>
+	<artifactId>org.gvsig.raster.reproject.algorithm</artifactId>
+	<packaging>jar</packaging>
+	<name>org.gvsig.raster.reproject.algorithm</name>
+	
+	<parent>
+		<groupId>org.gvsig</groupId>
+		<artifactId>org.gvsig.raster.reproject</artifactId>
+		<version>2.2.77</version>
+	</parent>
+	
+    <dependencies>
+		<dependency>
+			<groupId>org.gvsig</groupId>
+			<artifactId>org.gvsig.raster.algorithm</artifactId>
+            <scope>compile</scope>
+		</dependency>
+        <dependency>
+            <groupId>org.gvsig</groupId>
+            <artifactId>org.gvsig.i18n</artifactId>
+            <scope>compile</scope>
+        </dependency>
+		 <dependency>
+            <groupId>org.gvsig</groupId>
+            <artifactId>org.gvsig.ui</artifactId>
+            <scope>compile</scope>
+        </dependency>
+        <dependency>
+			<groupId>org.gvsig</groupId>
+			<artifactId>org.gvsig.raster.swing.api</artifactId>
+			 <scope>compile</scope>
+		</dependency>
+	    <dependency>
+	        <groupId>org.gvsig</groupId>
+	        <artifactId>org.gvsig.raster.swing.impl</artifactId>
+	         <scope>runtime</scope>
+	    </dependency>
+	    <dependency>
+            <groupId>org.gvsig</groupId>
+            <artifactId>org.gvsig.metadata.lib.basic.api</artifactId>
+            <scope>compile</scope>
+        </dependency>
+        <dependency>
+            <groupId>org.gvsig</groupId>
+            <artifactId>org.gvsig.tools.lib</artifactId>
+            <scope>compile</scope>
+        </dependency>
+        
+        <dependency>
+            <groupId>org.gvsig</groupId>
+            <artifactId>org.gvsig.projection.api</artifactId>
+            <scope>compile</scope>
+        </dependency>
+        <dependency>
+            <groupId>org.gvsig</groupId>
+            <artifactId>org.gvsig.projection.cresques.ui</artifactId>
+            <scope>compile</scope>
+        </dependency>
+        <dependency>
+            <groupId>org.gvsig</groupId>
+            <artifactId>org.gvsig.projection.cresques.impl</artifactId>
+            <scope>runtime</scope>
+        </dependency>
+        <dependency>
+            <groupId>org.gvsig</groupId>
+            <artifactId>org.gvsig.fmap.dal.api</artifactId>
+            <scope>compile</scope>
+        </dependency>
+        <dependency>
+            <groupId>org.gvsig</groupId>
+            <artifactId>org.gvsig.fmap.dal.impl</artifactId>
+            <scope>compile</scope>
+        </dependency>
+	</dependencies>
+</project>

Property changes on: org.gvsig.raster.reproject/tags/org.gvsig.raster.reproject-2.2.77/org.gvsig.raster.reproject.algorithm/pom.xml
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.raster.reproject/tags/org.gvsig.raster.reproject-2.2.77/org.gvsig.raster.reproject.algorithm/src/main/resources/META-INF/services/org.gvsig.tools.library.Library
===================================================================
--- org.gvsig.raster.reproject/tags/org.gvsig.raster.reproject-2.2.77/org.gvsig.raster.reproject.algorithm/src/main/resources/META-INF/services/org.gvsig.tools.library.Library	(revision 0)
+++ org.gvsig.raster.reproject/tags/org.gvsig.raster.reproject-2.2.77/org.gvsig.raster.reproject.algorithm/src/main/resources/META-INF/services/org.gvsig.tools.library.Library	(revision 9578)
@@ -0,0 +1 @@
+org.gvsig.raster.reproject.algorithm.RasterReprojectionAlgorithmLibrary
\ No newline at end of file
Index: org.gvsig.raster.reproject/tags/org.gvsig.raster.reproject-2.2.77/org.gvsig.raster.reproject.algorithm/src/main/resources/org/gvsig/raster/reproject/algorithm/i18n/text.properties
===================================================================
--- org.gvsig.raster.reproject/tags/org.gvsig.raster.reproject-2.2.77/org.gvsig.raster.reproject.algorithm/src/main/resources/org/gvsig/raster/reproject/algorithm/i18n/text.properties	(revision 0)
+++ org.gvsig.raster.reproject/tags/org.gvsig.raster.reproject-2.2.77/org.gvsig.raster.reproject.algorithm/src/main/resources/org/gvsig/raster/reproject/algorithm/i18n/text.properties	(revision 9578)
@@ -0,0 +1,13 @@
+reprojection
+origen=Origen
+dest_proj=CRS de destino
+src_proj=CRS de origen
+interpolation=Interpolaci�n
+yes=Si
+no=No
+sizex=Ancho
+sizey=Alto
+cellsize=Tama�o de celda
+output_options=Opciones
+value=Valor
+layer=Capa

Property changes on: org.gvsig.raster.reproject/tags/org.gvsig.raster.reproject-2.2.77/org.gvsig.raster.reproject.algorithm/src/main/resources/org/gvsig/raster/reproject/algorithm/i18n/text.properties
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.raster.reproject/tags/org.gvsig.raster.reproject-2.2.77/org.gvsig.raster.reproject.algorithm/src/main/resources/org/gvsig/raster/reproject/algorithm/i18n/text_en.properties
===================================================================
--- org.gvsig.raster.reproject/tags/org.gvsig.raster.reproject-2.2.77/org.gvsig.raster.reproject.algorithm/src/main/resources/org/gvsig/raster/reproject/algorithm/i18n/text_en.properties	(revision 0)
+++ org.gvsig.raster.reproject/tags/org.gvsig.raster.reproject-2.2.77/org.gvsig.raster.reproject.algorithm/src/main/resources/org/gvsig/raster/reproject/algorithm/i18n/text_en.properties	(revision 9578)
@@ -0,0 +1,12 @@
+origen=Source
+dest_proj=CRS of destination
+src_proj=CRS source
+interpolation=Interpolation
+yes=Yes
+no=No
+sizex=Width
+sizey=Height
+cellsize=Cell size
+output_options=Options
+value=Value
+layer=Layer

Property changes on: org.gvsig.raster.reproject/tags/org.gvsig.raster.reproject-2.2.77/org.gvsig.raster.reproject.algorithm/src/main/resources/org/gvsig/raster/reproject/algorithm/i18n/text_en.properties
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.raster.reproject/tags/org.gvsig.raster.reproject-2.2.77/org.gvsig.raster.reproject.algorithm/src/main/java/org/gvsig/raster/reproject/algorithm/RasterReprojectionAlgorithmLibrary.java
===================================================================
--- org.gvsig.raster.reproject/tags/org.gvsig.raster.reproject-2.2.77/org.gvsig.raster.reproject.algorithm/src/main/java/org/gvsig/raster/reproject/algorithm/RasterReprojectionAlgorithmLibrary.java	(revision 0)
+++ org.gvsig.raster.reproject/tags/org.gvsig.raster.reproject-2.2.77/org.gvsig.raster.reproject.algorithm/src/main/java/org/gvsig/raster/reproject/algorithm/RasterReprojectionAlgorithmLibrary.java	(revision 9578)
@@ -0,0 +1,69 @@
+/*
+ * gvSIG. Desktop Geographic Information System.
+ *
+ * Copyright (C) 2007-2012 gvSIG Association.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
+ * MA  02110-1301, USA.
+ *
+ * For any additional information, do not hesitate to contact us
+ * at info AT gvsig.com, or visit our website www.gvsig.com.
+ */
+package org.gvsig.raster.reproject.algorithm;
+
+import org.gvsig.i18n.Messages;
+import org.gvsig.raster.algorithm.RasterBaseAlgorithmLibrary;
+import org.gvsig.raster.reproject.algorithm.swing.api.RasterReprojectionSwingManager;
+import org.gvsig.raster.reproject.algorithm.swing.impl.DefaultRasterReprojectionSwingManager;
+import org.gvsig.tools.library.AbstractLibrary;
+import org.gvsig.tools.library.LibraryException;
+import org.gvsig.tools.locator.ReferenceNotRegisteredException;
+
+/**
+ * Initialization of RasterReprojectAlgorithmLibrary library.
+ * 
+ * @author <a href="mailto:nachobrodin@gmail.com">Nacho Brodin</a>
+ */
+public class RasterReprojectionAlgorithmLibrary extends AbstractLibrary {
+	public static final String         PROCESS_LABEL   = "RasterReprojectionProcess";
+	
+    @Override
+    protected void doInitialize() throws LibraryException {
+        // Nothing to do
+    }
+
+    @Override
+    protected void doPostInitialize() throws LibraryException {
+    	//Registers the process and its parameters
+    	RasterBaseAlgorithmLibrary.register(PROCESS_LABEL, ReprojectProcess.class);
+    	ReprojectProcess.registerParameters();
+    	
+        Messages.addResourceFamily(
+            "org.gvsig.raster.reproject.algorithm.i18n.text", 
+            RasterReprojectionAlgorithmLibrary.class.getClassLoader(), 
+            RasterReprojectionAlgorithmLibrary.class.getClass().getName());
+        
+        RasterReprojectionSwingLocator.registerSwingManager(
+        		DefaultRasterReprojectionSwingManager.class);
+        
+        RasterReprojectionSwingManager manager =
+        	RasterReprojectionSwingLocator.getSwingManager();
+        if (manager == null) {
+            throw new ReferenceNotRegisteredException(
+            		RasterReprojectionSwingLocator.SWING_MANAGER_NAME,
+            		RasterReprojectionSwingLocator.getInstance());
+        }
+    }
+}

Property changes on: org.gvsig.raster.reproject/tags/org.gvsig.raster.reproject-2.2.77/org.gvsig.raster.reproject.algorithm/src/main/java/org/gvsig/raster/reproject/algorithm/RasterReprojectionAlgorithmLibrary.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.raster.reproject/tags/org.gvsig.raster.reproject-2.2.77/org.gvsig.raster.reproject.algorithm/src/main/java/org/gvsig/raster/reproject/algorithm/RasterReprojectionSwingLocator.java
===================================================================
--- org.gvsig.raster.reproject/tags/org.gvsig.raster.reproject-2.2.77/org.gvsig.raster.reproject.algorithm/src/main/java/org/gvsig/raster/reproject/algorithm/RasterReprojectionSwingLocator.java	(revision 0)
+++ org.gvsig.raster.reproject/tags/org.gvsig.raster.reproject-2.2.77/org.gvsig.raster.reproject.algorithm/src/main/java/org/gvsig/raster/reproject/algorithm/RasterReprojectionSwingLocator.java	(revision 9578)
@@ -0,0 +1,97 @@
+/* gvSIG. Geographic Information System of the Valencian Government
+ *
+ * Copyright (C) 2007-2008 Infrastructures and Transports Department
+ * of the Valencian Government (CIT)
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
+ * MA  02110-1301, USA.
+ *
+ */
+package org.gvsig.raster.reproject.algorithm;
+
+import org.gvsig.raster.reproject.algorithm.swing.api.RasterReprojectionSwingManager;
+import org.gvsig.tools.locator.BaseLocator;
+
+/**
+ * This locator is the entry point for the Validation swing library,
+ * providing access to all Validation swing services through the
+ * {@link RasterReprojectionSwingManager} .
+ * 
+ * @author gvSIG team
+ * @version $Id$
+ */
+public class RasterReprojectionSwingLocator extends BaseLocator {
+
+    /**
+     * Validation swing manager name.
+     */
+    public static final String SWING_MANAGER_NAME =
+        "RasterReproject.swing.manager";
+
+    /**
+     * Validation swing manager description.
+     */
+    public static final String SWING_MANAGER_DESCRIPTION =
+        "RasterReproject UIManager";
+
+    private static final String LOCATOR_NAME = "RasterReproject.swing.locator";
+
+    /**
+     * Unique instance.
+     */
+    private static final RasterReprojectionSwingLocator INSTANCE =
+        new RasterReprojectionSwingLocator();
+
+    /**
+     * Return the singleton instance.
+     * 
+     * @return the singleton instance
+     */
+    public static RasterReprojectionSwingLocator getInstance() {
+        return INSTANCE;
+    }
+
+    /**
+     * Return the Locator's name
+     * 
+     * @return a String with the Locator's name
+     */
+    public final String getLocatorName() {
+        return LOCATOR_NAME;
+    }
+
+    /**
+     * Registers the Class implementing the PersistenceManager interface.
+     * 
+     * @param clazz
+     *            implementing the PersistenceManager interface
+     */
+    public static void registerSwingManager(
+        Class<? extends RasterReprojectionSwingManager> clazz) {
+        getInstance().register(SWING_MANAGER_NAME, SWING_MANAGER_DESCRIPTION,
+            clazz);
+    }
+
+    /**
+     * Gets the instance of the {@link RasterReprojectUIManager} registered.
+     * 
+     * @return {@link RasterReprojectUIManager}
+     */
+    public static RasterReprojectionSwingManager getSwingManager() {
+        return (RasterReprojectionSwingManager) getInstance()
+            .get(SWING_MANAGER_NAME);
+    }
+
+}

Property changes on: org.gvsig.raster.reproject/tags/org.gvsig.raster.reproject-2.2.77/org.gvsig.raster.reproject.algorithm/src/main/java/org/gvsig/raster/reproject/algorithm/RasterReprojectionSwingLocator.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.raster.reproject/tags/org.gvsig.raster.reproject-2.2.77/org.gvsig.raster.reproject.algorithm/src/main/java/org/gvsig/raster/reproject/algorithm/swing/impl/DefaultRasterReprojectionSwingManager.java
===================================================================
--- org.gvsig.raster.reproject/tags/org.gvsig.raster.reproject-2.2.77/org.gvsig.raster.reproject.algorithm/src/main/java/org/gvsig/raster/reproject/algorithm/swing/impl/DefaultRasterReprojectionSwingManager.java	(revision 0)
+++ org.gvsig.raster.reproject/tags/org.gvsig.raster.reproject-2.2.77/org.gvsig.raster.reproject.algorithm/src/main/java/org/gvsig/raster/reproject/algorithm/swing/impl/DefaultRasterReprojectionSwingManager.java	(revision 9578)
@@ -0,0 +1,40 @@
+/* gvSIG. Geographic Information System of the Valencian Government
+ *
+ * Copyright (C) 2007-2008 Infrastructures and Transports Department
+ * of the Valencian Government (CIT)
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
+ * MA  02110-1301, USA.
+ *
+ */
+package org.gvsig.raster.reproject.algorithm.swing.impl;
+
+import org.gvsig.raster.reproject.algorithm.swing.api.RasterReprojectionPanel;
+import org.gvsig.raster.reproject.algorithm.swing.api.RasterReprojectionSwingManager;
+import org.gvsig.raster.reproject.algorithm.swing.api.ReprojectionPanelDataModel;
+
+/**
+ * Default implementation of the {@link RasterReprojectionSwingManager}.
+ * 
+ * @author gvSIG Team
+ * @version $Id$
+ */
+public class DefaultRasterReprojectionSwingManager implements RasterReprojectionSwingManager {
+
+	public RasterReprojectionPanel createRasterReprojectPanel(ReprojectionPanelDataModel dataModel) {
+		return new RasterReprojectionPanelImpl(dataModel);
+	}
+
+}

Property changes on: org.gvsig.raster.reproject/tags/org.gvsig.raster.reproject-2.2.77/org.gvsig.raster.reproject.algorithm/src/main/java/org/gvsig/raster/reproject/algorithm/swing/impl/DefaultRasterReprojectionSwingManager.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.raster.reproject/tags/org.gvsig.raster.reproject-2.2.77/org.gvsig.raster.reproject.algorithm/src/main/java/org/gvsig/raster/reproject/algorithm/swing/impl/RasterReprojectionPanelImpl.java
===================================================================
--- org.gvsig.raster.reproject/tags/org.gvsig.raster.reproject-2.2.77/org.gvsig.raster.reproject.algorithm/src/main/java/org/gvsig/raster/reproject/algorithm/swing/impl/RasterReprojectionPanelImpl.java	(revision 0)
+++ org.gvsig.raster.reproject/tags/org.gvsig.raster.reproject-2.2.77/org.gvsig.raster.reproject.algorithm/src/main/java/org/gvsig/raster/reproject/algorithm/swing/impl/RasterReprojectionPanelImpl.java	(revision 9578)
@@ -0,0 +1,321 @@
+/* gvSIG. Geographic Information System of the Valencian Government
+*
+* Copyright (C) 2007-2008 Infrastructures and Transports Department
+* of the Valencian Government (CIT)
+* 
+* This program is free software; you can redistribute it and/or
+* modify it under the terms of the GNU General Public License
+* as published by the Free Software Foundation; either version 2
+* of the License, or (at your option) any later version.
+* 
+* This program is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+* GNU General Public License for more details.
+* 
+* You should have received a copy of the GNU General Public License
+* along with this program; if not, write to the Free Software
+* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, 
+* MA  02110-1301, USA.
+* 
+*/
+package org.gvsig.raster.reproject.algorithm.swing.impl;
+
+import java.awt.BorderLayout;
+import java.awt.GridBagConstraints;
+import java.awt.GridBagLayout;
+import java.awt.Insets;
+import java.awt.event.ActionEvent;
+import java.awt.event.ActionListener;
+import java.awt.event.KeyEvent;
+import java.awt.event.KeyListener;
+import java.util.List;
+
+import javax.swing.BorderFactory;
+import javax.swing.JComponent;
+import javax.swing.JLabel;
+import javax.swing.JPanel;
+
+import org.gvsig.app.gui.panels.CRSSelectPanel;
+import org.gvsig.app.gui.panels.CRSSelectPanelFactory;
+import org.gvsig.fmap.dal.coverage.exception.RasterDriverException;
+import org.gvsig.gui.beans.buttonspanel.ButtonsPanel;
+import org.gvsig.gui.beans.defaultbuttonspanel.DefaultButtonsPanel;
+import org.gvsig.i18n.Messages;
+import org.gvsig.raster.reproject.algorithm.swing.api.RasterReprojectionPanel;
+import org.gvsig.raster.reproject.algorithm.swing.api.ReprojectionPanelDataModel;
+import org.gvsig.raster.swing.RasterSwingLocator;
+import org.gvsig.raster.swing.newlayer.CreateNewLayerPanel;
+
+/**
+ * Panel para la reproyecci�n de capas cargadas.
+ * 
+ * @author Nacho Brodin (nachobrodin@gmail.com)
+ */
+public class RasterReprojectionPanelImpl extends DefaultButtonsPanel implements ActionListener, RasterReprojectionPanel, KeyListener {
+	private static final long          serialVersionUID      = -1011688195806336071L;
+	private CRSSelectPanel             projectionSrcSelector = null;
+	private CRSSelectPanel             projectionDstSelector = null;
+	private InterpolationPanel         interpolationPanel    = null;
+	private OutputLayerOptionsPanel    layerOptions          = null;
+	private CreateNewLayerPanel        newLayerPanel         = null;
+	private ReprojectionPanelDataModel dataModel             = null;
+	private JLabel                     layerName             = null;
+
+	/**
+	 * Constructor
+	 * @throws RasterDriverException 
+	 */
+	public RasterReprojectionPanelImpl(
+			ReprojectionPanelDataModel dataModel) {
+		super(ButtonsPanel.BUTTONS_ACCEPTCANCEL);
+		this.dataModel = dataModel;
+		init();
+		loadPanelFromDataModel();
+		getInterpolationPanel().getComboInterpolationMethod().addActionListener(this);
+		getInterpolationPanel().getRadioYes().addActionListener(this);
+		getInterpolationPanel().getRadioNo().addActionListener(this);
+	}
+	
+	private void loadPanelFromDataModel() {
+		getLayerOptionsPanel().getTextFieldCellSize().setText(dataModel.getCellSize() + "");
+		getLayerOptionsPanel().getTextFieldSizeX().setText(dataModel.getSize()[0] + "");
+		getLayerOptionsPanel().getTextFieldSizeY().setText(dataModel.getSize()[1] + "");
+		getLayerName().setText("<html><b>" + dataModel.getLayerName() + "</b></html>");
+		List<String> list = dataModel.getInterpolationMethodList();
+		for (int i = 0; i < list.size(); i++) {
+			getInterpolationPanel().getComboInterpolationMethod().addItem(list.get(i));	
+		}
+		
+		if(dataModel.getInterpolationMethodSelected() < 0) {
+			getInterpolationPanel().getRadioYes().setSelected(false);
+			getInterpolationPanel().getRadioNo().setSelected(true);
+		} else {
+			getInterpolationPanel().getRadioYes().setSelected(true);
+			getInterpolationPanel().getRadioNo().setSelected(false);
+			getInterpolationPanel().getComboInterpolationMethod().setEnabled(true);
+		}
+	}
+	
+	/**
+	 * Inicializaci�n de los componentes gr�ficos.
+	 * @throws RasterDriverException 
+	 */
+	private void init() {
+		GridBagConstraints gridBagConstraints;
+
+		setLayout(new GridBagLayout());
+		
+		int posy = 0;
+		
+		gridBagConstraints = new GridBagConstraints();
+		gridBagConstraints.fill = GridBagConstraints.BOTH;
+		gridBagConstraints.gridx = 0;
+		gridBagConstraints.gridy = posy;
+		gridBagConstraints.weightx = 1.0;
+		gridBagConstraints.insets = new Insets(2, 2, 2, 2);
+		JPanel panelFile = new JPanel();
+		panelFile.setLayout(new BorderLayout());
+		panelFile.setBorder(BorderFactory.createTitledBorder(Messages.getText("origen")));
+		panelFile.add(getLayerName(), BorderLayout.CENTER);
+		add(panelFile, gridBagConstraints);
+		
+		posy++;
+		gridBagConstraints = new GridBagConstraints();
+		gridBagConstraints.fill = GridBagConstraints.BOTH;
+		gridBagConstraints.gridx = 0;
+		gridBagConstraints.gridy = posy;
+		gridBagConstraints.weightx = 1.0;
+		gridBagConstraints.insets = new Insets(2, 2, 2, 2);
+		add(getProjectionSrcSelector(), gridBagConstraints);
+
+		posy++;
+		gridBagConstraints = new GridBagConstraints();
+		gridBagConstraints.fill = GridBagConstraints.BOTH;
+		gridBagConstraints.gridx = 0;
+		gridBagConstraints.gridy = posy;
+		gridBagConstraints.weightx = 1.0;
+		gridBagConstraints.insets = new Insets(2, 2, 2, 2);
+		add(getProjectionDstSelector(), gridBagConstraints);
+		
+		posy++;
+		gridBagConstraints = new GridBagConstraints();
+		gridBagConstraints.fill = GridBagConstraints.BOTH;
+		gridBagConstraints.gridx = 0;
+		gridBagConstraints.gridy = posy;
+		gridBagConstraints.weightx = 1.0;
+		gridBagConstraints.insets = new Insets(2, 2, 2, 2);
+		add(getInterpolationPanel(), gridBagConstraints);
+		
+		posy++;
+		gridBagConstraints = new GridBagConstraints();
+		gridBagConstraints.fill = GridBagConstraints.BOTH;
+		gridBagConstraints.gridx = 0;
+		gridBagConstraints.gridy = posy;
+		gridBagConstraints.weightx = 1.0;
+		gridBagConstraints.insets = new Insets(2, 2, 2, 2);
+		add(getLayerOptionsPanel(), gridBagConstraints);
+		
+		posy++;
+		gridBagConstraints = new GridBagConstraints();
+		gridBagConstraints.fill = GridBagConstraints.BOTH;
+		gridBagConstraints.gridx = 0;
+		gridBagConstraints.gridy = posy;
+		gridBagConstraints.weightx = 1.0;
+		gridBagConstraints.insets = new Insets(2, 2, 2, 2);
+		add((JComponent)getCreateNewLayerPanel(), gridBagConstraints);
+
+		// Insertamos un panel vacio
+		posy++;
+		gridBagConstraints = new GridBagConstraints();
+		gridBagConstraints.gridx = 0;
+		gridBagConstraints.gridy = posy;
+		gridBagConstraints.weighty = 1.0;
+		gridBagConstraints.insets = new Insets(0, 0, 0, 0);
+		JPanel emptyPanel = new JPanel();
+		add(emptyPanel, gridBagConstraints);
+	}
+	
+	private JLabel getLayerName() {
+		if(layerName == null)
+			layerName = new JLabel();
+		return layerName;
+	}
+	
+	public CreateNewLayerPanel getCreateNewLayerPanel() {
+		if(newLayerPanel == null) {
+			newLayerPanel = RasterSwingLocator.getSwingManager().createNewLayerPanel();
+			//newLayerPanel = new CreateNewLayerPanelImpl(fileNameManagement);
+		}
+		return newLayerPanel;
+	}
+	
+	public InterpolationPanel getInterpolationPanel() {
+		if(interpolationPanel == null) {
+			interpolationPanel = new InterpolationPanel();
+		}
+		return interpolationPanel;
+	}
+	
+	public OutputLayerOptionsPanel getLayerOptionsPanel() {
+		if(layerOptions == null) {
+			layerOptions = new OutputLayerOptionsPanel();
+			layerOptions.getTextFieldCellSize().addKeyListener(this);
+		}
+		return layerOptions;
+	}
+
+	/**
+	 * Obtiene el bot�n que lanza el panel de selecci�n de proyecciones.
+	 * @return
+	 * @throws RasterDriverException 
+	 */
+	private CRSSelectPanel getProjectionSrcSelector() {
+		if (projectionSrcSelector == null) {
+			projectionSrcSelector = CRSSelectPanelFactory.getPanel(dataModel.getSrcProjection());
+			projectionSrcSelector.setTransPanelActive(true);
+			projectionSrcSelector.setPreferredSize(null);
+			projectionSrcSelector.addActionListener(new ActionListener() {
+				public void actionPerformed(ActionEvent e) {
+					if (projectionSrcSelector.isOkPressed()) {
+						dataModel.setSrcProjection(projectionSrcSelector.getCurProj());
+						try {
+							updateSize();
+							getLayerOptionsPanel().getTextFieldCellSize().setText(dataModel.getCellSize() + "");
+						} catch (Exception exc) {
+						}
+					}
+				}
+			});
+			projectionSrcSelector.setBorder(BorderFactory.createTitledBorder(Messages.getText("src_proj")));
+		}
+		return projectionSrcSelector;
+	}
+	
+	/**
+	 * Obtiene el bot�n que lanza el panel de selecci�n de proyecciones.
+	 * @return
+	 */
+	private CRSSelectPanel getProjectionDstSelector() {
+		if (projectionDstSelector == null) {
+			projectionDstSelector = CRSSelectPanel.getPanel(dataModel.getDstProjection());
+			projectionDstSelector.setTransPanelActive(true);
+			projectionDstSelector.setPreferredSize(null);
+			projectionDstSelector.addActionListener(new ActionListener() {
+				public void actionPerformed(ActionEvent e) {
+					if (projectionDstSelector.isOkPressed()) {
+						dataModel.setDstProjection(projectionDstSelector.getCurProj());
+						try {
+							updateSize();
+							getLayerOptionsPanel().getTextFieldCellSize().setText(dataModel.getCellSize() + "");
+						} catch (Exception exc) {
+						}
+					}
+				}
+			});
+			projectionDstSelector.setBorder(BorderFactory.createTitledBorder(Messages.getText("dest_proj")));
+		}
+		return projectionDstSelector;
+	}
+
+	public void keyPressed(KeyEvent e) {
+		
+	}
+
+	public void keyReleased(KeyEvent e) {
+		try {
+			Double d = new Double(getLayerOptionsPanel().getTextFieldCellSize().getText());
+			dataModel.setCellSize(d.doubleValue());
+			updateSize();
+		} catch (Exception exc) {
+		}
+	}
+
+	private void updateSize() {
+		getLayerOptionsPanel().getTextFieldSizeX().setText(dataModel.getSize()[0] + "");
+		getLayerOptionsPanel().getTextFieldSizeY().setText(dataModel.getSize()[1] + "");
+	}
+	
+	public void keyTyped(KeyEvent e) {
+		
+	}
+
+	public void addButtonsListener(ActionListener listener) {
+		getButtonsPanel().getButton(ButtonsPanel.BUTTON_ACCEPT).addActionListener(listener);
+		getButtonsPanel().getButton(ButtonsPanel.BUTTON_CANCEL).addActionListener(listener);
+	}
+	
+	public int getObjectSelected(Object obj) {
+		if(obj == getButtonsPanel().getButton(ButtonsPanel.BUTTON_ACCEPT))
+			return BUTTON_ACCEPT;
+		if(obj == getButtonsPanel().getButton(ButtonsPanel.BUTTON_CANCEL))
+			return BUTTON_CANCEL;
+		return -1;
+	}
+	
+	public JComponent getComponent() {
+		return this;
+	}
+
+	public String getFileSelected() {
+		return getCreateNewLayerPanel().getFileSelected();
+	}
+	
+	public String getDirectorySelected() {
+		return getCreateNewLayerPanel().getDirectorySelected();
+	}
+
+	public void actionPerformed(ActionEvent e) {
+		if(e.getSource() == getInterpolationPanel().getComboInterpolationMethod()) {
+			dataModel.setInterpolationMethodSelected(getInterpolationPanel().getComboInterpolationMethod().getSelectedIndex());
+		}
+		
+		if(e.getSource() == getInterpolationPanel().getRadioYes()) {
+			dataModel.setInterpolationMethodSelected(getInterpolationPanel().getComboInterpolationMethod().getSelectedIndex());
+		}
+		
+		if(e.getSource() == getInterpolationPanel().getRadioNo()) {
+			dataModel.setInterpolationMethodSelected(-1);
+		}
+	}
+}
\ No newline at end of file

Property changes on: org.gvsig.raster.reproject/tags/org.gvsig.raster.reproject-2.2.77/org.gvsig.raster.reproject.algorithm/src/main/java/org/gvsig/raster/reproject/algorithm/swing/impl/RasterReprojectionPanelImpl.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.raster.reproject/tags/org.gvsig.raster.reproject-2.2.77/org.gvsig.raster.reproject.algorithm/src/main/java/org/gvsig/raster/reproject/algorithm/swing/impl/InterpolationPanel.java
===================================================================
--- org.gvsig.raster.reproject/tags/org.gvsig.raster.reproject-2.2.77/org.gvsig.raster.reproject.algorithm/src/main/java/org/gvsig/raster/reproject/algorithm/swing/impl/InterpolationPanel.java	(revision 0)
+++ org.gvsig.raster.reproject/tags/org.gvsig.raster.reproject-2.2.77/org.gvsig.raster.reproject.algorithm/src/main/java/org/gvsig/raster/reproject/algorithm/swing/impl/InterpolationPanel.java	(revision 9578)
@@ -0,0 +1,124 @@
+/* gvSIG. Geographic Information System of the Valencian Government
+*
+* Copyright (C) 2007-2008 Infrastructures and Transports Department
+* of the Valencian Government (CIT)
+* 
+* This program is free software; you can redistribute it and/or
+* modify it under the terms of the GNU General Public License
+* as published by the Free Software Foundation; either version 2
+* of the License, or (at your option) any later version.
+* 
+* This program is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+* GNU General Public License for more details.
+* 
+* You should have received a copy of the GNU General Public License
+* along with this program; if not, write to the Free Software
+* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, 
+* MA  02110-1301, USA.
+* 
+*/
+package org.gvsig.raster.reproject.algorithm.swing.impl;
+
+import java.awt.GridBagConstraints;
+import java.awt.GridBagLayout;
+import java.awt.Insets;
+import java.awt.event.ActionEvent;
+import java.awt.event.ActionListener;
+
+import javax.swing.BorderFactory;
+import javax.swing.ButtonGroup;
+import javax.swing.JComboBox;
+import javax.swing.JPanel;
+import javax.swing.JRadioButton;
+
+import org.cresques.Messages;
+import org.gvsig.fmap.dal.coverage.exception.RasterDriverException;
+
+/**
+ * Panel para la reproyecci�n de capas cargadas.
+ * 
+ * @author Nacho Brodin (nachobrodin@gmail.com)
+ */
+public class InterpolationPanel extends JPanel implements ActionListener {
+	private static final long      serialVersionUID      = 1;
+	private ButtonGroup            group                 = null;
+	private JRadioButton           radioNo               = null;
+	private JRadioButton           radioYes              = null;
+	private JComboBox              comboInterpMethods    = null;
+	
+	/**
+	 * Constructor
+	 * @throws RasterDriverException 
+	 */
+	public InterpolationPanel() {
+		init();
+	}
+	
+	/**
+	 * Inicializaci�n de los componentes gr�ficos.
+	 * @throws RasterDriverException 
+	 */
+	private void init() {
+		group = new ButtonGroup();
+		group.add(getRadioYes());
+		group.add(getRadioNo());
+		
+		setBorder(BorderFactory.createTitledBorder(Messages.getText("interpolation")));
+		
+		GridBagConstraints gridBagConstraints;
+		setLayout(new GridBagLayout());
+		gridBagConstraints = new GridBagConstraints();
+		gridBagConstraints.fill = GridBagConstraints.BOTH;
+		gridBagConstraints.gridx = 0;
+		gridBagConstraints.gridy = 0;
+		gridBagConstraints.weightx = 1.0;
+		gridBagConstraints.insets = new Insets(0, 5, 0, 5);
+		
+		add(getRadioNo(), gridBagConstraints);
+		
+		gridBagConstraints.gridy = 1;
+		add(getRadioYes(), gridBagConstraints);
+		
+		gridBagConstraints.gridy = 2;
+		gridBagConstraints.insets = new Insets(0, 25, 0, 5);
+		add(getComboInterpolationMethod(), gridBagConstraints);
+	}
+
+	public JRadioButton getRadioYes() {
+		if(radioYes == null) {
+			radioYes = new JRadioButton(Messages.getText("yes"));
+			radioYes.setSelected(false);
+			radioYes.addActionListener(this);
+		}
+		return radioYes;
+	}
+	
+	public JRadioButton getRadioNo() {
+		if(radioNo == null) {
+			radioNo = new JRadioButton(Messages.getText("no"));
+			radioNo.setSelected(true);
+			radioNo.addActionListener(this);
+		}
+		return radioNo;
+	}
+	
+	public JComboBox getComboInterpolationMethod() {
+		if(comboInterpMethods == null) {
+			comboInterpMethods = new JComboBox();
+			comboInterpMethods.setEnabled(false);
+		}
+		return comboInterpMethods;
+	}
+
+	public void actionPerformed(ActionEvent e) {
+		if(e.getSource() == getRadioNo()) {
+			getComboInterpolationMethod().setEnabled(false);
+		}
+		if(e.getSource() == getRadioYes()) {
+			getComboInterpolationMethod().setEnabled(true);
+		}
+	}
+
+}
\ No newline at end of file

Property changes on: org.gvsig.raster.reproject/tags/org.gvsig.raster.reproject-2.2.77/org.gvsig.raster.reproject.algorithm/src/main/java/org/gvsig/raster/reproject/algorithm/swing/impl/InterpolationPanel.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.raster.reproject/tags/org.gvsig.raster.reproject-2.2.77/org.gvsig.raster.reproject.algorithm/src/main/java/org/gvsig/raster/reproject/algorithm/swing/impl/OutputLayerOptionsPanel.java
===================================================================
--- org.gvsig.raster.reproject/tags/org.gvsig.raster.reproject-2.2.77/org.gvsig.raster.reproject.algorithm/src/main/java/org/gvsig/raster/reproject/algorithm/swing/impl/OutputLayerOptionsPanel.java	(revision 0)
+++ org.gvsig.raster.reproject/tags/org.gvsig.raster.reproject-2.2.77/org.gvsig.raster.reproject.algorithm/src/main/java/org/gvsig/raster/reproject/algorithm/swing/impl/OutputLayerOptionsPanel.java	(revision 9578)
@@ -0,0 +1,153 @@
+/* gvSIG. Geographic Information System of the Valencian Government
+*
+* Copyright (C) 2007-2008 Infrastructures and Transports Department
+* of the Valencian Government (CIT)
+* 
+* This program is free software; you can redistribute it and/or
+* modify it under the terms of the GNU General Public License
+* as published by the Free Software Foundation; either version 2
+* of the License, or (at your option) any later version.
+* 
+* This program is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+* GNU General Public License for more details.
+* 
+* You should have received a copy of the GNU General Public License
+* along with this program; if not, write to the Free Software
+* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, 
+* MA  02110-1301, USA.
+* 
+*/
+package org.gvsig.raster.reproject.algorithm.swing.impl;
+
+import java.awt.GridBagConstraints;
+import java.awt.GridBagLayout;
+import java.awt.Insets;
+
+import javax.swing.BorderFactory;
+import javax.swing.JLabel;
+import javax.swing.JPanel;
+import javax.swing.JTextField;
+
+import org.cresques.Messages;
+import org.gvsig.fmap.dal.coverage.exception.RasterDriverException;
+
+/**
+ * Panel para la reproyecci�n de capas cargadas.
+ * 
+ * @author Nacho Brodin (nachobrodin@gmail.com)
+ */
+public class OutputLayerOptionsPanel extends JPanel {
+	private static final long      serialVersionUID     = 1;
+	private JTextField             textFieldCellSize    = null;
+	private JTextField             textFieldSizeX       = null;
+	private JTextField             textFieldSizeY       = null;
+	private JLabel                 labelSizeX           = null;
+	private JLabel                 labelSizeY           = null;
+	private JLabel                 labelCellSize        = null;
+	
+	/**
+	 * Constructor
+	 * @throws RasterDriverException 
+	 */
+	public OutputLayerOptionsPanel() {
+		init();
+	}
+	
+	/**
+	 * Inicializaci�n de los componentes gr�ficos.
+	 * @throws RasterDriverException 
+	 */
+	private void init() {
+		setBorder(BorderFactory.createTitledBorder(Messages.getText("output_options")));
+		
+		GridBagConstraints gridBagConstraints;
+		setLayout(new GridBagLayout());
+		gridBagConstraints = new GridBagConstraints();
+		gridBagConstraints.fill = GridBagConstraints.BOTH;
+		gridBagConstraints.weightx = 1.0;
+		gridBagConstraints.insets = new Insets(0, 5, 2, 5);
+		
+		//FILA 0
+		gridBagConstraints.fill = GridBagConstraints.NONE;
+		gridBagConstraints.weightx = 0;
+		gridBagConstraints.gridx = 0;
+		gridBagConstraints.gridy = 0;
+		add(getLabelCellSize(), gridBagConstraints);
+		
+		gridBagConstraints.fill = GridBagConstraints.BOTH;
+		gridBagConstraints.weightx = 1.0;
+		gridBagConstraints.gridx = 1;
+		gridBagConstraints.gridy = 0;
+		gridBagConstraints.gridwidth = 3;
+		add(getTextFieldCellSize(), gridBagConstraints);
+		gridBagConstraints.gridwidth = 1;
+		
+		//FILA 1
+		gridBagConstraints.fill = GridBagConstraints.NONE;
+		gridBagConstraints.weightx = 0;
+		gridBagConstraints.gridx = 0;
+		gridBagConstraints.gridy = 1;
+		add(getLabelSizeX(), gridBagConstraints);
+		
+		gridBagConstraints.fill = GridBagConstraints.BOTH;
+		gridBagConstraints.weightx = 1.0;
+		gridBagConstraints.gridx = 1;
+		gridBagConstraints.gridy = 1;
+		add(getTextFieldSizeX(), gridBagConstraints);
+		
+		gridBagConstraints.fill = GridBagConstraints.NONE;
+		gridBagConstraints.weightx = 0;
+		gridBagConstraints.gridx = 2;
+		gridBagConstraints.gridy = 1;
+		add(getLabelSizeY(), gridBagConstraints);
+		
+		gridBagConstraints.fill = GridBagConstraints.BOTH;
+		gridBagConstraints.weightx = 1.0;
+		gridBagConstraints.gridx = 3;
+		gridBagConstraints.gridy = 1;
+		add(getTextFieldSizeY(), gridBagConstraints);
+	}
+	
+	public JTextField getTextFieldCellSize() {
+		if(textFieldCellSize == null)
+			textFieldCellSize = new JTextField();
+		return textFieldCellSize;
+	}
+
+	public JTextField getTextFieldSizeX() {
+		if(textFieldSizeX == null) {
+			textFieldSizeX = new JTextField();
+			textFieldSizeX.setEditable(false);
+		}
+		return textFieldSizeX;
+	}
+
+	public JTextField getTextFieldSizeY() {
+		if(textFieldSizeY == null) {
+			textFieldSizeY = new JTextField();
+			textFieldSizeY.setEditable(false);
+		}
+		return textFieldSizeY;
+	}
+
+	public JLabel getLabelSizeX() {
+		if(labelSizeX == null)
+			labelSizeX = new JLabel(Messages.getText("sizex"));
+		return labelSizeX;
+	}
+
+	public JLabel getLabelSizeY() {
+		if(labelSizeY == null)
+			labelSizeY = new JLabel(Messages.getText("sizey"));
+		return labelSizeY;
+	}
+
+	public JLabel getLabelCellSize() {
+		if(labelCellSize == null)
+			labelCellSize = new JLabel(Messages.getText("cellsize"));
+		return labelCellSize;
+	}
+
+}
\ No newline at end of file

Property changes on: org.gvsig.raster.reproject/tags/org.gvsig.raster.reproject-2.2.77/org.gvsig.raster.reproject.algorithm/src/main/java/org/gvsig/raster/reproject/algorithm/swing/impl/OutputLayerOptionsPanel.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.raster.reproject/tags/org.gvsig.raster.reproject-2.2.77/org.gvsig.raster.reproject.algorithm/src/main/java/org/gvsig/raster/reproject/algorithm/swing/api/RasterReprojectionPanel.java
===================================================================
--- org.gvsig.raster.reproject/tags/org.gvsig.raster.reproject-2.2.77/org.gvsig.raster.reproject.algorithm/src/main/java/org/gvsig/raster/reproject/algorithm/swing/api/RasterReprojectionPanel.java	(revision 0)
+++ org.gvsig.raster.reproject/tags/org.gvsig.raster.reproject-2.2.77/org.gvsig.raster.reproject.algorithm/src/main/java/org/gvsig/raster/reproject/algorithm/swing/api/RasterReprojectionPanel.java	(revision 9578)
@@ -0,0 +1,58 @@
+/* gvSIG. Geographic Information System of the Valencian Government
+*
+* Copyright (C) 2007-2008 Infrastructures and Transports Department
+* of the Valencian Government (CIT)
+* 
+* This program is free software; you can redistribute it and/or
+* modify it under the terms of the GNU General Public License
+* as published by the Free Software Foundation; either version 2
+* of the License, or (at your option) any later version.
+* 
+* This program is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+* GNU General Public License for more details.
+* 
+* You should have received a copy of the GNU General Public License
+* along with this program; if not, write to the Free Software
+* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, 
+* MA  02110-1301, USA.
+* 
+*/
+package org.gvsig.raster.reproject.algorithm.swing.api;
+
+import java.awt.event.ActionListener;
+
+import javax.swing.JComponent;
+
+import org.gvsig.gui.beans.buttonspanel.ButtonsPanel;
+
+/**
+ * Panel to reproject raster layers.
+ * 
+ * @author Nacho Brodin (nachobrodin@gmail.com)
+ */
+public interface RasterReprojectionPanel {
+	public static final int           BUTTON_ACCEPT   = ButtonsPanel.BUTTON_ACCEPT;
+	public static final int           BUTTON_CANCEL   = ButtonsPanel.BUTTON_CANCEL;
+	
+	/**
+	 * Adds listener to buttons
+	 * @param listener
+	 */
+	public void addButtonsListener(ActionListener listener);
+	
+	/**
+	 * Returns the ID of the object selected. The IDs are defined as constants
+	 * in this interface
+	 * @param obj
+	 * @return
+	 */
+	public int getObjectSelected(Object obj);
+	
+	public String getFileSelected();
+	
+	public String getDirectorySelected();
+	
+	public JComponent getComponent();
+}
\ No newline at end of file

Property changes on: org.gvsig.raster.reproject/tags/org.gvsig.raster.reproject-2.2.77/org.gvsig.raster.reproject.algorithm/src/main/java/org/gvsig/raster/reproject/algorithm/swing/api/RasterReprojectionPanel.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.raster.reproject/tags/org.gvsig.raster.reproject-2.2.77/org.gvsig.raster.reproject.algorithm/src/main/java/org/gvsig/raster/reproject/algorithm/swing/api/RasterReprojectionSwingManager.java
===================================================================
--- org.gvsig.raster.reproject/tags/org.gvsig.raster.reproject-2.2.77/org.gvsig.raster.reproject.algorithm/src/main/java/org/gvsig/raster/reproject/algorithm/swing/api/RasterReprojectionSwingManager.java	(revision 0)
+++ org.gvsig.raster.reproject/tags/org.gvsig.raster.reproject-2.2.77/org.gvsig.raster.reproject.algorithm/src/main/java/org/gvsig/raster/reproject/algorithm/swing/api/RasterReprojectionSwingManager.java	(revision 9578)
@@ -0,0 +1,44 @@
+/* gvSIG. Geographic Information System of the Valencian Government
+ *
+ * Copyright (C) 2007-2008 Infrastructures and Transports Department
+ * of the Valencian Government (CIT)
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
+ * MA  02110-1301, USA.
+ *
+ */
+package org.gvsig.raster.reproject.algorithm.swing.api;
+
+
+
+/**
+ * This class is responsible of the management of the library's swing user
+ * interface. It is the swing library's main entry point, and provides all the
+ * services to manage library swing components.
+ * 
+ * @see JValidationServicePanel
+ * @author gvSIG team
+ * @version $Id$
+ */
+public interface RasterReprojectionSwingManager {
+	/**
+	 * Creates a new panel to reproject a raster layer
+	 * @param fileNameManagement
+	 * @param dataModel
+	 * @return
+	 */
+	public RasterReprojectionPanel createRasterReprojectPanel(
+			ReprojectionPanelDataModel dataModel);
+}

Property changes on: org.gvsig.raster.reproject/tags/org.gvsig.raster.reproject-2.2.77/org.gvsig.raster.reproject.algorithm/src/main/java/org/gvsig/raster/reproject/algorithm/swing/api/RasterReprojectionSwingManager.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.raster.reproject/tags/org.gvsig.raster.reproject-2.2.77/org.gvsig.raster.reproject.algorithm/src/main/java/org/gvsig/raster/reproject/algorithm/swing/api/ReprojectionPanelDataModel.java
===================================================================
--- org.gvsig.raster.reproject/tags/org.gvsig.raster.reproject-2.2.77/org.gvsig.raster.reproject.algorithm/src/main/java/org/gvsig/raster/reproject/algorithm/swing/api/ReprojectionPanelDataModel.java	(revision 0)
+++ org.gvsig.raster.reproject/tags/org.gvsig.raster.reproject-2.2.77/org.gvsig.raster.reproject.algorithm/src/main/java/org/gvsig/raster/reproject/algorithm/swing/api/ReprojectionPanelDataModel.java	(revision 9578)
@@ -0,0 +1,60 @@
+/* gvSIG. Geographic Information System of the Valencian Government
+*
+* Copyright (C) 2007-2008 Infrastructures and Transports Department
+* of the Valencian Government (CIT)
+* 
+* This program is free software; you can redistribute it and/or
+* modify it under the terms of the GNU General Public License
+* as published by the Free Software Foundation; either version 2
+* of the License, or (at your option) any later version.
+* 
+* This program is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+* GNU General Public License for more details.
+* 
+* You should have received a copy of the GNU General Public License
+* along with this program; if not, write to the Free Software
+* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, 
+* MA  02110-1301, USA.
+* 
+*/
+package org.gvsig.raster.reproject.algorithm.swing.api;
+
+import java.util.List;
+
+import org.cresques.cts.IProjection;
+
+/**
+ * Data model for the reprojection panel
+ * @author Nacho Brodin (nachobrodin@gmail.com)
+ */
+public interface ReprojectionPanelDataModel {
+	public IProjection getSrcProjection();
+	
+	public IProjection getDstProjection();
+	
+	public void setSrcProjection(IProjection src);
+	
+	public void setDstProjection(IProjection dst);
+	
+	public double getCellSize();
+	
+	public void setCellSize(double cellSize);
+	
+	public void setSize(int w, int h);
+	
+	public int[] getSize();
+	
+	public List<String> getInterpolationMethodList();
+	
+	public void setInterpolationMethodList(List<String> list);
+	
+	public int getInterpolationMethodSelected();
+	
+	public void setInterpolationMethodSelected(int method);
+	
+	public String getLayerName();
+	
+	public void setLayerName(String layerName);
+}

Property changes on: org.gvsig.raster.reproject/tags/org.gvsig.raster.reproject-2.2.77/org.gvsig.raster.reproject.algorithm/src/main/java/org/gvsig/raster/reproject/algorithm/swing/api/ReprojectionPanelDataModel.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.raster.reproject/tags/org.gvsig.raster.reproject-2.2.77/org.gvsig.raster.reproject.algorithm/src/main/java/org/gvsig/raster/reproject/algorithm/ReprojectException.java
===================================================================
--- org.gvsig.raster.reproject/tags/org.gvsig.raster.reproject-2.2.77/org.gvsig.raster.reproject.algorithm/src/main/java/org/gvsig/raster/reproject/algorithm/ReprojectException.java	(revision 0)
+++ org.gvsig.raster.reproject/tags/org.gvsig.raster.reproject-2.2.77/org.gvsig.raster.reproject.algorithm/src/main/java/org/gvsig/raster/reproject/algorithm/ReprojectException.java	(revision 9578)
@@ -0,0 +1,41 @@
+/* gvSIG. Geographic Information System of the Valencian Government
+*
+* Copyright (C) 2007-2008 Infrastructures and Transports Department
+* of the Valencian Government (CIT)
+* 
+* This program is free software; you can redistribute it and/or
+* modify it under the terms of the GNU General Public License
+* as published by the Free Software Foundation; either version 2
+* of the License, or (at your option) any later version.
+* 
+* This program is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+* GNU General Public License for more details.
+* 
+* You should have received a copy of the GNU General Public License
+* along with this program; if not, write to the Free Software
+* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, 
+* MA  02110-1301, USA.
+* 
+*/
+package org.gvsig.raster.reproject.algorithm;
+
+
+/**
+ * This exception is thrown if happen problems processing data with this algorithm.
+ * 
+ * @author Nacho Brodin (nachobrodin@gmail.com)
+ *
+ */
+public class ReprojectException extends Exception {
+	private static final long serialVersionUID = -3022090543908771484L;
+	
+	public ReprojectException(String msg){
+		super(msg);
+	}
+	
+	public ReprojectException(String msg, Throwable e){
+		super(msg, e);
+	}
+}
\ No newline at end of file

Property changes on: org.gvsig.raster.reproject/tags/org.gvsig.raster.reproject-2.2.77/org.gvsig.raster.reproject.algorithm/src/main/java/org/gvsig/raster/reproject/algorithm/ReprojectException.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.raster.reproject/tags/org.gvsig.raster.reproject-2.2.77/org.gvsig.raster.reproject.algorithm/src/main/java/org/gvsig/raster/reproject/algorithm/ReprojectProcess.java
===================================================================
--- org.gvsig.raster.reproject/tags/org.gvsig.raster.reproject-2.2.77/org.gvsig.raster.reproject.algorithm/src/main/java/org/gvsig/raster/reproject/algorithm/ReprojectProcess.java	(revision 0)
+++ org.gvsig.raster.reproject/tags/org.gvsig.raster.reproject-2.2.77/org.gvsig.raster.reproject.algorithm/src/main/java/org/gvsig/raster/reproject/algorithm/ReprojectProcess.java	(revision 9578)
@@ -0,0 +1,116 @@
+/* gvSIG. Geographic Information System of the Valencian Government
+*
+* Copyright (C) 2007-2008 Infrastructures and Transports Department
+* of the Valencian Government (CIT)
+* 
+* This program is free software; you can redistribute it and/or
+* modify it under the terms of the GNU General Public License
+* as published by the Free Software Foundation; either version 2
+* of the License, or (at your option) any later version.
+* 
+* This program is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+* GNU General Public License for more details.
+* 
+* You should have received a copy of the GNU General Public License
+* along with this program; if not, write to the Free Software
+* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, 
+* MA  02110-1301, USA.
+* 
+*/
+package org.gvsig.raster.reproject.algorithm;
+
+import org.cresques.cts.IProjection;
+import org.gvsig.fmap.dal.coverage.exception.ProcessInterruptedException;
+import org.gvsig.fmap.dal.coverage.store.RasterDataStore;
+import org.gvsig.i18n.Messages;
+import org.gvsig.raster.algorithm.process.DataProcess;
+
+/**
+ * Process to reproject layers. The size of the new image and the pixel size can
+ * be passed by parameter. If some of these values are zero everyone are calculated
+ * automatically
+ *
+ * 10/12/2007
+ * @author Nacho Brodin nachobrodin@gmail.com
+ */
+public class ReprojectProcess extends DataProcess {
+	public static String[]    INTERP_METHODS  = new String[]{"Nearest", "Bilinear", "InverseDistance"};
+	
+	public static String      RASTER_STORE    = "RasterStore";
+	public static String      PATH            = "Path";
+	public static String      DST_PROJECTION  = "DST_Projection";
+	public static String      SRC_PROJECTION  = "SRC_Projection";
+	public static String      SIZEX           = "SizeX";
+	public static String      SIZEY           = "SizeY";
+	public static String      CELLSIZE        = "CellSize";
+	public static String      FILENAME        = "FileName";
+	public static String      INTERPOLATION   = "Interpolation";
+	
+	private RasterDataStore   store          = null;
+	private String            filename       = null;
+	private IProjection       projdst        = null;
+	private IProjection       projsrc        = null;
+	private Reproject         reproject      = null;
+	private int               w              = 0;
+	private int               h              = 0;
+	private double            cellSize       = 0;
+	private int               interpolation  = 0;
+	
+	public static void registerParameters() {
+		registerInputParameter(RASTER_STORE, RasterDataStore.class, RasterReprojectionAlgorithmLibrary.PROCESS_LABEL);
+		registerInputParameter(PATH, String.class, RasterReprojectionAlgorithmLibrary.PROCESS_LABEL);
+		registerInputParameter(DST_PROJECTION, IProjection.class, RasterReprojectionAlgorithmLibrary.PROCESS_LABEL);
+		registerInputParameter(SRC_PROJECTION, IProjection.class, RasterReprojectionAlgorithmLibrary.PROCESS_LABEL);
+		registerInputParameter(SIZEX, Integer.class, RasterReprojectionAlgorithmLibrary.PROCESS_LABEL);
+		registerInputParameter(SIZEY, Integer.class, RasterReprojectionAlgorithmLibrary.PROCESS_LABEL);
+		registerInputParameter(CELLSIZE, Double.class, RasterReprojectionAlgorithmLibrary.PROCESS_LABEL);
+		registerInputParameter(INTERPOLATION, Integer.class, RasterReprojectionAlgorithmLibrary.PROCESS_LABEL); 
+		
+		registerOutputParameter(FILENAME, String.class, RasterReprojectionAlgorithmLibrary.PROCESS_LABEL);
+	}
+	
+	public void init() {
+		store = getParam(RASTER_STORE) != null ? (RasterDataStore)getParam(RASTER_STORE) : null;
+		filename = getStringParam(PATH);
+		projdst = getParam(DST_PROJECTION) != null ? (IProjection) getParam(DST_PROJECTION) : null;
+		projsrc = getParam(SRC_PROJECTION) != null ? (IProjection) getParam(SRC_PROJECTION) : null; 
+		w = getIntParam(SIZEX);
+		h = getIntParam(SIZEY);
+		cellSize = getDoubleParam(CELLSIZE);
+		interpolation = getIntParam(INTERPOLATION);
+	}
+	
+	/**
+	 * M�todo donde se ejecutar� el Thread, aqu� se reproyecta el raster.
+	 */
+	public void process() throws ProcessInterruptedException {
+		insertLineLog(Messages.getText("reprojecting"));
+		
+		store = store.newNotTiledDataStore();
+		
+		reproject = new Reproject(store, filename, interpolation, this);
+		try {
+			int result = reproject.warp(projdst, projsrc, w, h, cellSize);
+			if(result != 0) {
+				if (incrementableTask != null) {
+					incrementableTask.processFinalize();
+					setProgressActive(false);
+				}
+				messageBoxError("transformation_not_possible", this);
+				return;
+			}
+
+			addOutputValue(FILENAME, filename);
+		} catch (ReprojectException e) {
+			if (incrementableTask != null)
+				incrementableTask.processFinalize();
+			messageBoxError("error_reprojecting", this, e);
+		}
+	}
+	
+	public String getTitle() {
+		return Messages.getText("reprojecting");
+	}
+}
\ No newline at end of file

Property changes on: org.gvsig.raster.reproject/tags/org.gvsig.raster.reproject-2.2.77/org.gvsig.raster.reproject.algorithm/src/main/java/org/gvsig/raster/reproject/algorithm/ReprojectProcess.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.raster.reproject/tags/org.gvsig.raster.reproject-2.2.77/org.gvsig.raster.reproject.algorithm/src/main/java/org/gvsig/raster/reproject/algorithm/Reproject.java
===================================================================
--- org.gvsig.raster.reproject/tags/org.gvsig.raster.reproject-2.2.77/org.gvsig.raster.reproject.algorithm/src/main/java/org/gvsig/raster/reproject/algorithm/Reproject.java	(revision 0)
+++ org.gvsig.raster.reproject/tags/org.gvsig.raster.reproject-2.2.77/org.gvsig.raster.reproject.algorithm/src/main/java/org/gvsig/raster/reproject/algorithm/Reproject.java	(revision 9578)
@@ -0,0 +1,312 @@
+/* gvSIG. Geographic Information System of the Valencian Government
+*
+* Copyright (C) 2007-2008 Infrastructures and Transports Department
+* of the Valencian Government (CIT)
+*
+* This program is free software; you can redistribute it and/or
+* modify it under the terms of the GNU General Public License
+* as published by the Free Software Foundation; either version 2
+* of the License, or (at your option) any later version.
+*
+* This program is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+* GNU General Public License for more details.
+*
+* You should have received a copy of the GNU General Public License
+* along with this program; if not, write to the Free Software
+* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
+* MA  02110-1301, USA.
+*
+*/
+package org.gvsig.raster.reproject.algorithm;
+
+import java.awt.geom.Point2D;
+import java.io.File;
+
+import org.apache.commons.io.FileUtils;
+import org.apache.commons.io.FilenameUtils;
+import org.cresques.cts.ICRSFactory;
+import org.cresques.cts.ICoordTrans;
+import org.cresques.cts.IProjection;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+import org.gvsig.fmap.dal.coverage.RasterLocator;
+import org.gvsig.fmap.dal.coverage.dataset.Buffer;
+import org.gvsig.fmap.dal.coverage.dataset.BufferParam;
+import org.gvsig.fmap.dal.coverage.datastruct.Extent;
+import org.gvsig.fmap.dal.coverage.datastruct.NoData;
+import org.gvsig.fmap.dal.coverage.exception.ProcessInterruptedException;
+import org.gvsig.fmap.dal.coverage.exception.QueryException;
+import org.gvsig.fmap.dal.coverage.store.RasterDataStore;
+import org.gvsig.fmap.dal.coverage.store.RasterQuery;
+import org.gvsig.raster.algorithm.process.DataProcess;
+import org.gvsig.raster.algorithm.util.Interpolation;
+
+
+/**
+ * Reprojects a RasterDataStore.
+ *
+ * @version 30/04/2008
+ * @author Nacho Brodin nachobrodin@gmail.com
+ */
+public class Reproject {
+	private RasterDataStore   store                 = null;
+	private String            pathDest              = null;
+	private int               interpolationMethod   = 0;
+	private Interpolation     interpolation         = null;
+	private DataProcess     process               = null;
+
+    private static final Logger logger = LoggerFactory.getLogger(Reproject.class);
+
+	/**
+	 * Constructor de la clase.
+	 * @param store
+	 * @param lyr
+	 * @param pathDest Ruta de destino
+	 * @param inter
+	 * @param process
+	 */
+	public Reproject(RasterDataStore store, String pathDest, int inter, DataProcess process) {
+		this.store = store;
+		this.pathDest = pathDest;
+		this.interpolationMethod = inter;
+		this.process = process;
+	}
+
+	/**
+	 * M�todo para la transformaci�n del raster.
+	 * @param destinationSrs Proyecci�n destino
+	 * @param sourceSrs
+	 * @param w
+	 * @param h
+	 * @param cellSize
+	 * @return
+	 * @throws ReprojectException
+	 */
+	public int warp(IProjection destinationSrs, IProjection sourceSrs, int w, int h, double cellSize) throws ReprojectException {
+		if (store == null)
+			throw new ReprojectException("Capa no valida.");
+		if (!store.isReproyectable())
+			throw new ReprojectException("Esta capa no se puede reproyectar.");
+		if (destinationSrs == null || destinationSrs.getAbrev() == null)
+			throw new ReprojectException("Proyecci�n de destino no valida.");
+
+
+		File file = new File(pathDest);
+		if (!file.getParentFile().canWrite())
+			throw new ReprojectException("Ruta de destino no valida.");
+
+		ICoordTrans transf = sourceSrs.getCT(destinationSrs);
+		Extent bbox = store.getExtent();
+		Point2D ul = new Point2D.Double(bbox.getULX(), bbox.getULY());
+		Point2D lr = new Point2D.Double(bbox.getLRX(), bbox.getLRY());
+		//Point2D p = new Point2D.Double(lyr.getFullRasterExtent().getULX(), lyr.getFullRasterExtent().getULY());
+		ul = transf.convert(ul, ul);
+		lr = transf.convert(lr, lr);
+		Extent newBbox = RasterLocator.getManager().getDataStructFactory().createExtent(ul, lr);
+
+		if(w <= 0 || h <= 0 ) {
+			double[] size = getSize(bbox, newBbox);
+			w = (int)size[0];
+			h = (int)size[1];
+			cellSize = size[2];
+		}
+		int dataType = store.getDataType()[0];
+		BufferParam params = RasterLocator.getManager().getBufferFactory().createBufferParams(
+				w, h, store.getBandCount(), store.getDataType()[0], true);
+		Buffer buf = null;
+		try {
+			buf = RasterLocator.getManager().getBufferFactory().createBuffer(params);
+		} catch (Exception e1) {
+			throw new ReprojectException("Error creating the output buffer", e1);
+		}
+
+		NoData nd = RasterLocator.getManager().getDataStructFactory().createDefaultNoData(
+				store.getBandCount(), dataType);
+
+		RasterQuery query = RasterLocator.getManager().createQuery();
+		query.setAllDrawableBands();
+		query.setAreaOfInterest();
+		query.setReadOnly(true);
+		try {
+			ICoordTrans t = destinationSrs.getCT(sourceSrs);
+			Buffer sourceBuffer = store.query(query);
+			if(interpolationMethod < 0) {
+				for (int row = 0; row < buf.getHeight(); row++) {
+					for (int col = 0; col < buf.getWidth(); col++) {
+						Point2D p = transformPoint(newBbox, col, row, cellSize, t);
+						writePixel(dataType, sourceBuffer, buf, p, col, row, nd);
+					}
+					process.updatePercent(row, buf.getHeight());
+				}
+			} else {
+				interpolation = new Interpolation(sourceBuffer);
+				for (int row = 0; row < buf.getHeight(); row++) {
+					for (int col = 0; col < buf.getWidth(); col++) {
+						Point2D p = transformPoint(newBbox, col, row, cellSize, t);
+						writePixelInterpolated(dataType, sourceBuffer, buf, p, col, row, nd, interpolationMethod);
+					}
+					process.updatePercent(row, buf.getHeight());
+				}
+			}
+
+			boolean exported = process.exportRaster(pathDest, buf, cellSize, newBbox.getULX(), newBbox.getULY());
+			if(exported){
+			    savePrjFile(file, destinationSrs);
+			}
+		} catch (ProcessInterruptedException e) {
+		} catch (QueryException e) {
+			new ReprojectException("", e);
+		}
+
+		return 0;
+	}
+
+    private void savePrjFile(File dataFile, IProjection proj){
+        File file = new File(FilenameUtils.removeExtension(dataFile.getAbsolutePath())+".prj");
+        try {
+            String export = proj.export(ICRSFactory.FORMAT_WKT_ESRI);
+            if(export!=null){
+                FileUtils.writeStringToFile(file, export);
+            }
+        } catch (Exception e) {
+            logger.info("Can't write prj file '" + file.getAbsolutePath() + "'.");
+        }
+    }
+
+	/**
+	 * Writes one pixel in the destination buffer
+	 * @param type
+	 * @param sourceBuffer
+	 * @param buf
+	 * @param p
+	 * @param col
+	 * @param row
+	 */
+	private void writePixel(int type, Buffer sourceBuffer, Buffer buf, Point2D p, int col, int row, NoData nd) {
+		if(type == Buffer.TYPE_BYTE) {
+			if(p.getX() > 0 && p.getX() < sourceBuffer.getWidth() && p.getY() > 0 && p.getY() < sourceBuffer.getHeight())
+				for (int iBand = 0; iBand < store.getBandCount(); iBand++) {
+					//if(iBand == 0)
+						//System.out.println("Row:" + row + " Col:" + col + "  Y:" + (int)p.getY() + " X:" + (int)p.getX());
+					buf.setElem(row, col, iBand, sourceBuffer.getElemByte((int)p.getY(), (int)p.getX(), iBand));
+				}
+			else
+				for (int iBand = 0; iBand < store.getBandCount(); iBand++)
+					buf.setElem(row, col, iBand, nd.getValue().byteValue());
+		} else if(type == Buffer.TYPE_DOUBLE) {
+			if(p.getX() > 0 && p.getX() < sourceBuffer.getWidth() && p.getY() > 0 && p.getY() < sourceBuffer.getHeight())
+				for (int iBand = 0; iBand < store.getBandCount(); iBand++)
+					buf.setElem(row, col, iBand, sourceBuffer.getElemDouble((int)p.getY(), (int)p.getX(), iBand));
+			else
+				for (int iBand = 0; iBand < store.getBandCount(); iBand++)
+					buf.setElem(row, col, iBand, nd.getValue().doubleValue());
+		} else if(type == Buffer.TYPE_FLOAT) {
+			if(p.getX() > 0 && p.getX() < sourceBuffer.getWidth() && p.getY() > 0 && p.getY() < sourceBuffer.getHeight())
+				for (int iBand = 0; iBand < store.getBandCount(); iBand++)
+					buf.setElem(row, col, iBand, sourceBuffer.getElemFloat((int)p.getY(), (int)p.getX(), iBand));
+			else
+				for (int iBand = 0; iBand < store.getBandCount(); iBand++)
+					buf.setElem(row, col, iBand, nd.getValue().floatValue());
+		} else if(type == Buffer.TYPE_SHORT) {
+			if(p.getX() > 0 && p.getX() < sourceBuffer.getWidth() && p.getY() > 0 && p.getY() < sourceBuffer.getHeight())
+				for (int iBand = 0; iBand < store.getBandCount(); iBand++)
+					buf.setElem(row, col, iBand, sourceBuffer.getElemShort((int)p.getY(), (int)p.getX(), iBand));
+			else
+				for (int iBand = 0; iBand < store.getBandCount(); iBand++)
+					buf.setElem(row, col, iBand, nd.getValue().shortValue());
+		} else if(type == Buffer.TYPE_INT) {
+			if(p.getX() > 0 && p.getX() < sourceBuffer.getWidth() && p.getY() > 0 && p.getY() < sourceBuffer.getHeight())
+				for (int iBand = 0; iBand < store.getBandCount(); iBand++)
+					buf.setElem(row, col, iBand, sourceBuffer.getElemInt((int)p.getY(), (int)p.getX(), iBand));
+			else
+				for (int iBand = 0; iBand < store.getBandCount(); iBand++)
+					buf.setElem(row, col, iBand, nd.getValue().intValue());
+		}
+	}
+
+	/**
+	 * Writes one pixel in the destination buffer
+	 * @param type
+	 * @param sourceBuffer
+	 * @param buf
+	 * @param p
+	 * @param col
+	 * @param row
+	 */
+	private void writePixelInterpolated(int type, Buffer sourceBuffer, Buffer buf, Point2D p, int col, int row, NoData nd, int interpMethod) {
+		double value = 0;
+		if(p.getX() > 0 && p.getX() < sourceBuffer.getWidth() && p.getY() > 0 && p.getY() < sourceBuffer.getHeight())
+			for (int iBand = 0; iBand < store.getBandCount(); iBand++) {
+				if(interpMethod == 0) //Nearest neighbor
+					value = interpolation.getNearestNeighbour(p.getX(), p.getY(), iBand);
+				if(interpMethod == 1) //Bilinear
+					value = interpolation.getBilinearValue(p.getX(), p.getY(), iBand);
+				if(interpMethod == 2) //Inverse distance
+					value = interpolation.getInverseDistance(p.getX(), p.getY(), iBand);
+				if(type == Buffer.TYPE_BYTE)
+					buf.setElem(row, col, iBand, (byte)value);
+				else if(type == Buffer.TYPE_DOUBLE)
+					buf.setElem(row, col, iBand, (double)value);
+				else if(type == Buffer.TYPE_FLOAT)
+					buf.setElem(row, col, iBand, (float)value);
+				else if(type == Buffer.TYPE_SHORT)
+					buf.setElem(row, col, iBand, (short)value);
+				else if(type == Buffer.TYPE_INT)
+					buf.setElem(row, col, iBand, (int)value);
+			}
+		else
+			for (int iBand = 0; iBand < store.getBandCount(); iBand++) {
+				if(type == Buffer.TYPE_BYTE)
+					buf.setElem(row, col, iBand, nd.getValue().byteValue());
+				else if(type == Buffer.TYPE_DOUBLE)
+					buf.setElem(row, col, iBand, nd.getValue().doubleValue());
+				else if(type == Buffer.TYPE_FLOAT)
+					buf.setElem(row, col, iBand, nd.getValue().floatValue());
+				else if(type == Buffer.TYPE_SHORT)
+					buf.setElem(row, col, iBand, nd.getValue().shortValue());
+				else if(type == Buffer.TYPE_INT)
+					buf.setElem(row, col, iBand, nd.getValue().intValue());
+			}
+	}
+
+	/**
+	 * Transforms the upper left coordinate of a pixel using the transformation
+	 * which is passed by parameter
+	 * @param p
+	 * @param newBbox
+	 * @param col
+	 * @param row
+	 * @param cellSize
+	 * @param t
+	 */
+	private Point2D transformPoint(Extent newBbox, int col, int row, double cellSize, ICoordTrans t) {
+		Point2D p = new Point2D.Double(
+				newBbox.getULX() + (col * cellSize),
+				newBbox.getULY() - (row * cellSize));
+		p = t.convert(p, p);
+		p = store.worldToRaster(p);
+		return p;
+	}
+
+	/**
+	 * Gets the size of the new image
+	 * @param bbox
+	 * @param newBbox
+	 * @return
+	 */
+	private double[] getSize(Extent bbox, Extent newBbox) {
+		double sumSideOldBBox = bbox.width() + bbox.height();
+		double sumSideNewBBox = newBbox.width() + newBbox.height();
+		double d1x = (bbox.width() * 100) / sumSideOldBBox;
+		double d1y = (bbox.height() * 100) / sumSideOldBBox;
+		double d2x = (newBbox.width() * 100) / sumSideNewBBox;
+		double d2y = (newBbox.height() * 100) / sumSideNewBBox;
+		double p2y = (store.getHeight() * d2y) / d1y;
+		double p2x = (store.getWidth() * d2x) / d1x;
+		double newCellSize = newBbox.width() / p2x;
+		return new double[]{Math.round(p2x), Math.round(p2y), newCellSize};
+	}
+}
\ No newline at end of file

Property changes on: org.gvsig.raster.reproject/tags/org.gvsig.raster.reproject-2.2.77/org.gvsig.raster.reproject.algorithm/src/main/java/org/gvsig/raster/reproject/algorithm/Reproject.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.raster.reproject/tags/org.gvsig.raster.reproject-2.2.77/org.gvsig.raster.reproject.algorithm/src/test/org/gvsig/raster/algorithm/reproject/TestReprojectPanel.java
===================================================================
--- org.gvsig.raster.reproject/tags/org.gvsig.raster.reproject-2.2.77/org.gvsig.raster.reproject.algorithm/src/test/org/gvsig/raster/algorithm/reproject/TestReprojectPanel.java	(revision 0)
+++ org.gvsig.raster.reproject/tags/org.gvsig.raster.reproject-2.2.77/org.gvsig.raster.reproject.algorithm/src/test/org/gvsig/raster/algorithm/reproject/TestReprojectPanel.java	(revision 9578)
@@ -0,0 +1,120 @@
+package org.gvsig.raster.algorithm.reproject;
+
+
+import java.util.ArrayList;
+import java.util.List;
+
+import javax.swing.JFrame;
+
+import org.cresques.cts.IProjection;
+import org.gvsig.raster.swing.newlayer.FileNameManagement;
+import org.gvsig.raster.reproject.algorithm.swing.impl.reproject.RasterReprojectPanelImpl;
+import org.gvsig.raster.reproject.algorithm.swing.reproject.ReprojectPanelDataModel;
+import org.gvsig.tools.library.impl.DefaultLibrariesInitializer;
+
+public class TestReprojectPanel implements FileNameManagement, ReprojectPanelDataModel {
+		private int                              w        = 360;
+		private int                              h        = 600;
+		private JFrame                           frame    = new JFrame();
+		private RasterReprojectPanelImpl         ui       = null;
+		private int[]                            size     = new int[]{1000, 1500};
+
+		public TestReprojectPanel() {
+			new DefaultLibrariesInitializer().fullInitialize(true);
+			ui = new RasterReprojectPanelImpl(this, this);
+			frame.getContentPane().add(ui);
+			frame.setSize(w, h);
+			frame.setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);
+			frame.setVisible(true);
+		}
+
+		public static void main(String[] args) {
+			new TestReprojectPanel();
+		}
+
+		public ArrayList<String> getPrefixSupported() {
+			ArrayList<String> s = new ArrayList<String>();
+			s.add("tif");
+			s.add("ecw");
+			return s;
+		}
+
+		public String getUniqueLayerName() {
+			return "capa uno";
+		}
+
+		public void usesUniqueLayerName() {
+			// TODO Auto-generated method stub
+			
+		}
+
+		public String getDefaultFilePath() {
+			return "/tmp/prueba.tif";
+		}
+
+		public double getCellSize() {
+			return 0.5;
+		}
+
+		public IProjection getDstProjection() {
+			// TODO Auto-generated method stub
+			return null;
+		}
+
+		public List<String> getInterpolationMethodList() {
+			ArrayList<String> s = new ArrayList<String>();
+			s.add("interp1");
+			s.add("interp2");
+			return s;
+		}
+
+		public int getInterpolationMethodSelected() {
+			return 1;
+		}
+
+		public String getLayerName() {
+			return "My Layer";
+		}
+
+		public int[] getSize() {
+			return size;
+		}
+
+		public IProjection getSrcProjection() {
+			return null;
+		}
+
+		public void setCellSize(double cellSize) {
+			setSize((int)(cellSize * 100), (int)(cellSize * 200));
+		}
+
+		public void setDstProjection(IProjection dst) {
+			// TODO Auto-generated method stub
+			
+		}
+
+		public void setInterpolationMethodList(List<String> list) {
+			// TODO Auto-generated method stub
+			
+		}
+
+		public void setInterpolationMethodSelected(int method) {
+			// TODO Auto-generated method stub
+			
+		}
+
+		public void setLayerName(String s) {
+			// TODO Auto-generated method stub
+			
+		}
+
+		public void setSize(int w, int h) {
+			size[0] = w;
+			size[1] = h;
+		}
+
+		public void setSrcProjection(IProjection src) {
+			// TODO Auto-generated method stub
+			
+		}
+	}

Property changes on: org.gvsig.raster.reproject/tags/org.gvsig.raster.reproject-2.2.77/org.gvsig.raster.reproject.algorithm/src/test/org/gvsig/raster/algorithm/reproject/TestReprojectPanel.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain


Property changes on: org.gvsig.raster.reproject/tags/org.gvsig.raster.reproject-2.2.77/org.gvsig.raster.reproject.algorithm
___________________________________________________________________
Added: svn:ignore
   + target

.classpath

.project

.settings


Index: org.gvsig.raster.reproject/tags/org.gvsig.raster.reproject-2.2.77/org.gvsig.raster.reproject.app.reprojectclient/buildNumber.properties
===================================================================
--- org.gvsig.raster.reproject/tags/org.gvsig.raster.reproject-2.2.77/org.gvsig.raster.reproject.app.reprojectclient/buildNumber.properties	(revision 0)
+++ org.gvsig.raster.reproject/tags/org.gvsig.raster.reproject-2.2.77/org.gvsig.raster.reproject.app.reprojectclient/buildNumber.properties	(revision 9578)
@@ -0,0 +1,2 @@
+#Sun Mar 31 05:28:36 CEST 2019
+buildNumber=129

Property changes on: org.gvsig.raster.reproject/tags/org.gvsig.raster.reproject-2.2.77/org.gvsig.raster.reproject.app.reprojectclient/buildNumber.properties
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.raster.reproject/tags/org.gvsig.raster.reproject-2.2.77/org.gvsig.raster.reproject.app.reprojectclient/package.info
===================================================================
--- org.gvsig.raster.reproject/tags/org.gvsig.raster.reproject-2.2.77/org.gvsig.raster.reproject.app.reprojectclient/package.info	(revision 0)
+++ org.gvsig.raster.reproject/tags/org.gvsig.raster.reproject-2.2.77/org.gvsig.raster.reproject.app.reprojectclient/package.info	(revision 9578)
@@ -0,0 +1,20 @@
+#
+#Mon Jun 10 11:57:18 CEST 2013
+owner=gvSIG Association
+code=org.gvsig.raster.reproject.app.reprojectclient
+java-version=j1_5
+official=true
+type=plugin
+version=2.0.1-SNAPSHOT-12
+state=testing
+operating-system=all
+dependencies=required\: org.gvsig.raster.tilecache.app -ge 2.0.0-0, required\: org.gvsig.raster.tools.app.basic -ge 2.0.0-0
+sources-url=https\://devel.gvsig.org/redmine/projects/gvsig-raster/repository/show/org.gvsig.raster.reproject/trunk/org.gvsig.raster.reproject/org.gvsig.raster.reproject.app.reprojectclient
+web-url=http\://www.gvsig.com
+architecture=all
+model-version=1.0.1
+categories=Raster
+description=Reprojection support
+buildNumber=12
+gvSIG-version=2.0.0
+name=Reprojection support
Index: org.gvsig.raster.reproject/tags/org.gvsig.raster.reproject-2.2.77/org.gvsig.raster.reproject.app.reprojectclient/src/main/assembly/gvsig-plugin-package.xml
===================================================================
--- org.gvsig.raster.reproject/tags/org.gvsig.raster.reproject-2.2.77/org.gvsig.raster.reproject.app.reprojectclient/src/main/assembly/gvsig-plugin-package.xml	(revision 0)
+++ org.gvsig.raster.reproject/tags/org.gvsig.raster.reproject-2.2.77/org.gvsig.raster.reproject.app.reprojectclient/src/main/assembly/gvsig-plugin-package.xml	(revision 9578)
@@ -0,0 +1,37 @@
+<assembly>
+  <id>gvsig-plugin-package</id>
+  <formats>
+    <format>zip</format>
+  </formats>
+  <baseDirectory>${project.artifactId}</baseDirectory>
+  <includeBaseDirectory>true</includeBaseDirectory>
+  <files>
+    <file>
+      <source>target/${project.artifactId}-${project.version}.jar</source>
+      <outputDirectory>lib</outputDirectory>
+    </file>
+    <file>
+      <source>target/package.info</source>
+    </file>
+  </files>
+
+  <fileSets>
+    <fileSet>
+      <directory>src/main/resources-plugin</directory>
+      <outputDirectory>.</outputDirectory>
+    </fileSet>
+  </fileSets>
+
+
+  <dependencySets>
+    <dependencySet>
+      <useProjectArtifact>false</useProjectArtifact>
+	  <useTransitiveDependencies>false</useTransitiveDependencies>
+      <outputDirectory>lib</outputDirectory>
+      <includes> 
+				<include>org.gvsig:org.gvsig.raster.reproject.app.reprojectclient:jar</include>
+				<include>org.gvsig:org.gvsig.raster.reproject.algorithm:jar</include>
+	  </includes>
+	</dependencySet>
+  </dependencySets>
+</assembly>

Property changes on: org.gvsig.raster.reproject/tags/org.gvsig.raster.reproject-2.2.77/org.gvsig.raster.reproject.app.reprojectclient/src/main/assembly/gvsig-plugin-package.xml
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.raster.reproject/tags/org.gvsig.raster.reproject-2.2.77/org.gvsig.raster.reproject.app.reprojectclient/src/main/java/org/gvsig/raster/reproject/app/FileNameManagementImpl.java
===================================================================
--- org.gvsig.raster.reproject/tags/org.gvsig.raster.reproject-2.2.77/org.gvsig.raster.reproject.app.reprojectclient/src/main/java/org/gvsig/raster/reproject/app/FileNameManagementImpl.java	(revision 0)
+++ org.gvsig.raster.reproject/tags/org.gvsig.raster.reproject-2.2.77/org.gvsig.raster.reproject.app.reprojectclient/src/main/java/org/gvsig/raster/reproject/app/FileNameManagementImpl.java	(revision 9578)
@@ -0,0 +1,71 @@
+/* gvSIG. Geographic Information System of the Valencian Government
+*
+* Copyright (C) 2007-2008 Infrastructures and Transports Department
+* of the Valencian Government (CIT)
+* 
+* This program is free software; you can redistribute it and/or
+* modify it under the terms of the GNU General Public License
+* as published by the Free Software Foundation; either version 2
+* of the License, or (at your option) any later version.
+* 
+* This program is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+* GNU General Public License for more details.
+* 
+* You should have received a copy of the GNU General Public License
+* along with this program; if not, write to the Free Software
+* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, 
+* MA  02110-1301, USA.
+* 
+*/
+package org.gvsig.raster.reproject.app;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import org.gvsig.fmap.dal.coverage.RasterLocator;
+import org.gvsig.fmap.dal.coverage.util.FileUtils;
+import org.gvsig.raster.swing.newlayer.FileNameManagement;
+
+/**
+ * @author Nacho Brodin (nachobrodin@gmail.com)
+ */
+public class FileNameManagementImpl implements FileNameManagement {
+	private FileUtils fileUtils = RasterLocator.getManager().getFileUtils();
+	
+	/*
+	 * (non-Javadoc)
+	 * @see org.gvsig.raster.swing.newlayer.FileNameManagement#getDefaultFilePath()
+	 */
+	public String getDefaultFilePath() {
+		return System.getProperty("user.home");
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * @see org.gvsig.raster.swing.newlayer.FileNameManagement#getPrefixSupported()
+	 */
+	public List<String> getPrefixSupported() {
+		List<String> list = new ArrayList<String>();
+		list.add("tif");
+		return list;
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * @see org.gvsig.raster.swing.newlayer.FileNameManagement#getUniqueLayerName()
+	 */
+	public String getUniqueLayerName() {
+		return fileUtils.getOnlyLayerName();
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * @see org.gvsig.raster.swing.newlayer.FileNameManagement#usesUniqueLayerName()
+	 */
+	public void usesUniqueLayerName() {
+		fileUtils.usesOnlyLayerName();
+	}
+
+}

Property changes on: org.gvsig.raster.reproject/tags/org.gvsig.raster.reproject-2.2.77/org.gvsig.raster.reproject.app.reprojectclient/src/main/java/org/gvsig/raster/reproject/app/FileNameManagementImpl.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.raster.reproject/tags/org.gvsig.raster.reproject-2.2.77/org.gvsig.raster.reproject.app.reprojectclient/src/main/java/org/gvsig/raster/reproject/app/ReprojectionPanelDataModelImpl.java
===================================================================
--- org.gvsig.raster.reproject/tags/org.gvsig.raster.reproject-2.2.77/org.gvsig.raster.reproject.app.reprojectclient/src/main/java/org/gvsig/raster/reproject/app/ReprojectionPanelDataModelImpl.java	(revision 0)
+++ org.gvsig.raster.reproject/tags/org.gvsig.raster.reproject-2.2.77/org.gvsig.raster.reproject.app.reprojectclient/src/main/java/org/gvsig/raster/reproject/app/ReprojectionPanelDataModelImpl.java	(revision 9578)
@@ -0,0 +1,215 @@
+/* gvSIG. Geographic Information System of the Valencian Government
+*
+* Copyright (C) 2007-2008 Infrastructures and Transports Department
+* of the Valencian Government (CIT)
+* 
+* This program is free software; you can redistribute it and/or
+* modify it under the terms of the GNU General Public License
+* as published by the Free Software Foundation; either version 2
+* of the License, or (at your option) any later version.
+* 
+* This program is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+* GNU General Public License for more details.
+* 
+* You should have received a copy of the GNU General Public License
+* along with this program; if not, write to the Free Software
+* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, 
+* MA  02110-1301, USA.
+* 
+*/
+package org.gvsig.raster.reproject.app;
+
+import java.awt.geom.Point2D;
+import java.util.ArrayList;
+import java.util.List;
+
+import org.cresques.cts.ICoordTrans;
+import org.cresques.cts.IProjection;
+import org.gvsig.andami.PluginServices;
+import org.gvsig.andami.ui.mdiManager.IWindow;
+import org.gvsig.app.project.documents.view.gui.AbstractViewPanel;
+import org.gvsig.fmap.crs.CRSFactory;
+import org.gvsig.fmap.dal.coverage.RasterLocator;
+import org.gvsig.fmap.dal.coverage.datastruct.Extent;
+import org.gvsig.fmap.dal.coverage.exception.RasterDriverException;
+import org.gvsig.fmap.dal.coverage.store.RasterDataStore;
+import org.gvsig.fmap.mapcontext.MapContext;
+import org.gvsig.fmap.mapcontext.layers.FLayers;
+import org.gvsig.raster.fmap.layers.FLyrRaster;
+import org.gvsig.raster.reproject.algorithm.ReprojectProcess;
+import org.gvsig.raster.reproject.algorithm.swing.api.ReprojectionPanelDataModel;
+
+/**
+ * Data model for the panel of reprojection
+ * @author Nacho Brodin (nachobrodin@gmail.com)
+ */
+public class ReprojectionPanelDataModelImpl implements ReprojectionPanelDataModel {
+	private double               cellSize                 = 0;
+	private IProjection          dstProjection            = null;
+	private IProjection          srcProjection            = null;
+	private List<String>         interpolationMethodList  = null;
+	private int                  interpolationMethod      = 0;
+	private String               layerName                = null;
+	private int[]                size                     = new int[]{0, 0};
+	private FLyrRaster           lyr                      = null;
+	private Extent               newBbox                  = null;
+	
+	public ReprojectionPanelDataModelImpl(FLyrRaster lyr) {
+		this.lyr = lyr;
+		cellSize = lyr.getDataStore().getCellSize();
+		try {
+			srcProjection = lyr.readProjection();
+		} catch (RasterDriverException e) {
+			srcProjection = getViewProjection(lyr);
+		}
+		if (srcProjection == null) 
+			srcProjection = getViewProjection(lyr);
+		if (srcProjection == null)
+			srcProjection = CRSFactory.getCRS("EPSG:23030");
+
+		dstProjection = srcProjection;
+		
+		layerName = lyr.getName();
+		size = new int[]{(int)lyr.getDataStore().getWidth(), 
+						 (int)lyr.getDataStore().getHeight()};
+		
+		interpolationMethod = -1;
+		interpolationMethodList = new ArrayList<String>();
+		for (int i = 0; i < ReprojectProcess.INTERP_METHODS.length; i++) {
+			interpolationMethodList.add(ReprojectProcess.INTERP_METHODS[i]);
+		}
+		//updateValues(lyr.getDataStore());
+	}
+	
+	/**
+	 * Gets the projection of the view
+	 * @param lyr
+	 * @return
+	 */
+	private IProjection getViewProjection(FLyrRaster lyr) {
+		IWindow[] w = PluginServices.getMDIManager().getAllWindows();
+		for (int i = 0; i < w.length; i++) {
+			if(w[i] instanceof AbstractViewPanel) {
+				MapContext mapContext = ((AbstractViewPanel)w[i]).getMapControl().getMapContext();
+				FLayers lyrs = mapContext.getLayers();
+				for (int j = 0; j < lyrs.getLayersCount(); j++) {
+					if(lyrs.getLayer(j) == lyr) {
+						return ((AbstractViewPanel)w[i]).getProjection();
+					}
+				}
+			}
+		}
+		return null;
+	}
+	
+	private void updateValues(RasterDataStore store) {
+		//      d1x                 d2x
+		//   ---------           ---------
+		//   |  p1x  |           |  p2x  |
+		//d1y|p1y    |        d2y|p2y    |
+		//   |       |           |       |
+		//   ---------           ---------
+		
+		ICoordTrans transf = srcProjection.getCT(dstProjection);
+		Extent bbox = store.getExtent();
+		Point2D ul = new Point2D.Double(bbox.getULX(), bbox.getULY());
+		Point2D lr = new Point2D.Double(bbox.getLRX(), bbox.getLRY());
+		if(transf == null)
+			return;
+		ul = transf.convert(ul, ul);
+		lr = transf.convert(lr, lr);
+		newBbox = RasterLocator.getManager().getDataStructFactory().createExtent(ul, lr);
+		
+		//System.out.println("Old BBox: " + bbox.toString());
+		//System.out.println("New BBox: " + newBbox.toString());
+		//System.out.println("Old Pixel Size: " + store.getCellSize());
+		
+		//double p1x = store.getWidth();
+		//double p1y = store.getHeight();
+		//System.out.println("Old WxH: " + p1x + " " + p1y + " --- " + (p1x / p1y) + "  " + (p1y / p1x));
+		
+		//long nPixels = (long)(store.getWidth() * store.getHeight());
+		double sumSideOldBBox = bbox.width() + bbox.height();
+		double sumSideNewBBox = newBbox.width() + newBbox.height();
+		double d1x = (bbox.width() * 100) / sumSideOldBBox; 
+		double d1y = (bbox.height() * 100) / sumSideOldBBox;
+		double d2x = (newBbox.width() * 100) / sumSideNewBBox;
+		double d2y = (newBbox.height() * 100) / sumSideNewBBox;
+		//System.out.println("Old nPixels: " + nPixels);
+		//System.out.println("d1x: " + d1x + " d1y: " + d1y + " d2x: " + d2x + " d2y: " + d2y);
+		double p2y = (store.getHeight() * d2y) / d1y;
+		double p2x = (store.getWidth() * d2x) / d1x;
+		//long newNPixels = (long)(p2x * p2y);
+		//System.out.println("New nPixels: " + newNPixels);
+		//System.out.println("New WxH: " + p2x + " " + p2y + " --- " + (p2x / p2y) + "  " + (p2y / p2x));
+		double newCellSize = newBbox.width() / p2x;
+		
+		size[0] = (int)Math.round(p2x);
+		size[1] = (int)Math.round(p2y);
+		cellSize = newCellSize;
+		//double newCellSizeY = newBbox.height() / p2y;
+		//System.out.println("New Pixel Size: " + newCellSize + " " + newCellSizeY);
+	}
+	
+	public double getCellSize() {
+		return cellSize;
+	}
+
+	public IProjection getDstProjection() {
+		return dstProjection;
+	}
+
+	public List<String> getInterpolationMethodList() {
+		return interpolationMethodList;
+	}
+
+	public int getInterpolationMethodSelected() {
+		return interpolationMethod;
+	}
+
+	public String getLayerName() {
+		return layerName;
+	}
+
+	public int[] getSize() {
+		return size;
+	}
+
+	public IProjection getSrcProjection() {
+		return srcProjection;
+	}
+
+	public void setCellSize(double cellSize) {
+		this.cellSize = cellSize;
+		size[0] = (int)(newBbox.width() / cellSize);
+		size[1] = (int)(newBbox.height() / cellSize);
+	}
+
+	public void setDstProjection(IProjection dst) {
+		this.dstProjection = dst;
+		updateValues(lyr.getDataStore());
+	}
+	
+	public void setSrcProjection(IProjection src) {
+		this.srcProjection = src;
+		updateValues(lyr.getDataStore());
+	}
+
+	public void setInterpolationMethodList(List<String> list) {
+		this.interpolationMethodList = list;
+	}
+
+	public void setInterpolationMethodSelected(int method) {
+		this.interpolationMethod = method;
+	}
+
+	public void setLayerName(String layerName) {
+		this.layerName = layerName;
+	}
+
+	public void setSize(int w, int h) {
+		this.size = new int[]{w, h};
+	}
+}

Property changes on: org.gvsig.raster.reproject/tags/org.gvsig.raster.reproject-2.2.77/org.gvsig.raster.reproject.app.reprojectclient/src/main/java/org/gvsig/raster/reproject/app/ReprojectionPanelDataModelImpl.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.raster.reproject/tags/org.gvsig.raster.reproject-2.2.77/org.gvsig.raster.reproject.app.reprojectclient/src/main/java/org/gvsig/raster/reproject/app/ReprojectListener.java
===================================================================
--- org.gvsig.raster.reproject/tags/org.gvsig.raster.reproject-2.2.77/org.gvsig.raster.reproject.app.reprojectclient/src/main/java/org/gvsig/raster/reproject/app/ReprojectListener.java	(revision 0)
+++ org.gvsig.raster.reproject/tags/org.gvsig.raster.reproject-2.2.77/org.gvsig.raster.reproject.app.reprojectclient/src/main/java/org/gvsig/raster/reproject/app/ReprojectListener.java	(revision 9578)
@@ -0,0 +1,235 @@
+/* gvSIG. Geographic Information System of the Valencian Government
+*
+* Copyright (C) 2007-2008 Infrastructures and Transports Department
+* of the Valencian Government (CIT)
+* 
+* This program is free software; you can redistribute it and/or
+* modify it under the terms of the GNU General Public License
+* as published by the Free Software Foundation; either version 2
+* of the License, or (at your option) any later version.
+* 
+* This program is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+* GNU General Public License for more details.
+* 
+* You should have received a copy of the GNU General Public License
+* along with this program; if not, write to the Free Software
+* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, 
+* MA  02110-1301, USA.
+* 
+*/
+package org.gvsig.raster.reproject.app;
+
+import java.awt.Component;
+import java.awt.event.ActionEvent;
+import java.awt.event.ActionListener;
+import java.io.File;
+import java.util.HashMap;
+
+import javax.swing.JOptionPane;
+
+import org.cresques.cts.IProjection;
+import org.gvsig.andami.PluginServices;
+import org.gvsig.andami.ui.mdiManager.IWindow;
+import org.gvsig.app.project.documents.view.gui.AbstractViewPanel;
+import org.gvsig.fmap.mapcontext.layers.FLayer;
+import org.gvsig.fmap.mapcontext.layers.FLayers;
+import org.gvsig.i18n.Messages;
+import org.gvsig.raster.algorithm.RasterBaseAlgorithmLibrary;
+import org.gvsig.raster.algorithm.process.DataProcess;
+import org.gvsig.raster.algorithm.process.IProcessActions;
+import org.gvsig.raster.algorithm.process.ProcessException;
+import org.gvsig.raster.fmap.layers.FLyrRaster;
+import org.gvsig.raster.mainplugin.RasterMainPluginUtils;
+import org.gvsig.raster.reproject.algorithm.ReprojectProcess;
+import org.gvsig.raster.reproject.algorithm.swing.api.RasterReprojectionPanel;
+import org.gvsig.raster.reproject.algorithm.swing.api.ReprojectionPanelDataModel;
+import org.gvsig.raster.swing.RasterSwingLibrary;
+import org.gvsig.raster.swing.RasterSwingLocator;
+import org.gvsig.raster.util.RasterNotLoadException;
+
+
+/**
+ * Actions for the reprojection panel
+ * 
+ * @author Nacho Brodin (nachobrodin@gmail.com)
+ */
+public class ReprojectListener implements ActionListener, IProcessActions {
+	private RasterReprojectionPanel            reprojectPanel   = null;
+	private FLayer                             lyr              = null;
+	private ReprojectionPanelDataModel         dataModel        = null;
+	private ReprojectWindow                    window           = null;
+
+	public ReprojectListener(FLayer lyr, ReprojectionPanelDataModel dataModel, ReprojectWindow window, RasterReprojectionPanel reprojectPanel) {
+		this.lyr = lyr;
+		this.dataModel = dataModel;
+		this.window = window;
+		this.reprojectPanel = reprojectPanel;
+	}
+
+	public void actionPerformed(ActionEvent e) {
+		if(reprojectPanel.getObjectSelected(e.getSource()) == RasterReprojectionPanel.BUTTON_ACCEPT) {
+			double cellsize = dataModel.getCellSize();
+			int w = dataModel.getSize()[0];
+			int h = dataModel.getSize()[1];
+			IProjection srcPrj = dataModel.getSrcProjection();
+			IProjection dstPrj = dataModel.getDstProjection();
+			
+			if(cellsize <= 0 || w <= 0 || h <= 0) {
+				messageBoxError("wrong_size");
+				return;
+			}
+			
+			if(srcPrj == null || dstPrj == null) {
+				messageBoxError("wrong_projection");
+				return;
+			}
+			
+			DataProcess process;
+			try {
+				process = RasterBaseAlgorithmLibrary.getManager().createRasterTask("RasterReprojectionProcess");
+			} catch (ProcessException e1) {
+				messageBoxError("error_creating_algorithm");
+				return;
+			}
+			
+			String path = getPath();
+			if(path == null)
+				return;
+			
+			process.setActions(this);
+			process.addParam(ReprojectProcess.RASTER_STORE, ((FLyrRaster)lyr).getDataStore());
+			process.addParam(ReprojectProcess.SIZEX, w);
+			process.addParam(ReprojectProcess.SIZEY, h);
+			process.addParam(ReprojectProcess.PATH, path);
+			process.addParam(ReprojectProcess.SRC_PROJECTION, dataModel.getSrcProjection());
+			process.addParam(ReprojectProcess.DST_PROJECTION, dataModel.getDstProjection());
+			process.addParam(ReprojectProcess.CELLSIZE, dataModel.getCellSize());
+			process.addParam(ReprojectProcess.INTERPOLATION, dataModel.getInterpolationMethodSelected());
+			process.start();
+			
+		}
+		if(reprojectPanel.getObjectSelected(e.getSource()) == RasterReprojectionPanel.BUTTON_CANCEL) {
+			if(window != null) {
+				PluginServices.getMDIManager().closeWindow(window);
+				window = null;
+			}
+		}
+	}
+	
+	/**
+	 * Gets the path to the file
+	 * @return
+	 */
+	private String getPath() {
+		String file = reprojectPanel.getFileSelected();
+		if(file == null || file.equals("") || !file.matches("[a-zA-Z0-9_]*")) {
+			messageBoxError(
+					Messages.getText("file_name_not_valid") + 
+					"\n" + file + "\n " + 
+					Messages.getText("valid_characters") + 
+					" a-zA-Z0-9_");
+			return null;
+		}
+		
+		if(!file.endsWith(".tif"))
+			file += ".tif";
+		String dir = reprojectPanel.getDirectorySelected();
+		if(!new File(dir).exists()) {
+			messageBoxError("directory_does_not_exists");
+			return null;
+		}
+		
+		if(new File(dir + File.separator + file).exists()) {
+			if(!RasterSwingLibrary.messageBoxYesOrNot(
+					Messages.getText("file_exists") + 
+					"\n " + (dir + File.separator + file) + "\n " + 
+					Messages.getText("overwrite"), null))
+			return null;
+		}
+		return (dir + File.separator + file);
+	}
+	
+	/**
+	 * Shows an error dialog with a text and a accept button 
+	 * @param msg Message to show in the dialog
+	 * @param parentWindow Parent window
+	 */
+	public static void messageBoxError(String msg) {
+		String string = Messages.getText("accept");
+		Object[] options = {string};
+		JOptionPane.showOptionDialog((Component)PluginServices.getMainFrame(),
+					"<html>" + Messages.getText(msg).replaceAll("\n", "<br>") + "</html>",
+					Messages.getText("confirmacion"),
+					JOptionPane.OK_OPTION,
+					JOptionPane.ERROR_MESSAGE,
+					null,
+					options,
+					string);
+	}
+
+	@SuppressWarnings("unchecked")
+	public void end(Object params) {
+		if(window != null) {
+			PluginServices.getMDIManager().closeWindow(window);
+			window = null;
+		}
+		if(params instanceof HashMap<?, ?>) {
+			HashMap<String, Object>  map = (HashMap<String, Object>) params;
+			String fName = (String)map.get(ReprojectProcess.FILENAME);
+			long milis = (Long)map.get(ReprojectProcess.TIME);
+			processFinalize(fName, milis);
+			RasterSwingLocator.getSwingManager().showSummaryProcessDialog(fName, milis);
+		}
+
+	}
+	
+	/**
+	 * Acciones que se realizan al finalizar de crear los recortes de imagen.
+	 * Este m�todo es llamado por el thread TailRasterProcess al finalizar.
+	 */
+	private void processFinalize(String fileName, long milis) {
+		if (!new File(fileName).exists())
+			return;
+
+		String viewName = getViewName();
+		if(viewName != null) {
+			if (RasterSwingLibrary.messageBoxYesOrNot("cargar_toc", null)) {
+				try {
+					RasterMainPluginUtils.loadLayer(viewName, fileName, null);
+				} catch (RasterNotLoadException e) {
+					messageBoxError("error_load_layer");
+				}
+			}
+		}
+	}
+	
+	/**
+	 * Gets the view 
+	 * @return
+	 */
+	private String getViewName() {
+		IWindow[] w = PluginServices.getMDIManager().getAllWindows();
+		for (int i = 0; i < w.length; i++) {
+			if(w[i] instanceof AbstractViewPanel) {
+				FLayers lyrs = ((AbstractViewPanel)w[i]).getMapControl().getMapContext().getLayers();
+				for (int j = 0; j < lyrs.getLayersCount(); j++) {
+					FLayer lyr = lyrs.getLayer(j);
+					if(this.lyr == lyr) {
+						return PluginServices.getMDIManager().getWindowInfo((AbstractViewPanel) w[i]).getTitle();
+					}
+				}
+			}
+		}
+		return null;
+	}
+
+	public void interrupted() {
+		
+	}
+	
+	public void updateProgress(int current, int total) {
+		
+	}
+}
\ No newline at end of file

Property changes on: org.gvsig.raster.reproject/tags/org.gvsig.raster.reproject-2.2.77/org.gvsig.raster.reproject.app.reprojectclient/src/main/java/org/gvsig/raster/reproject/app/ReprojectListener.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.raster.reproject/tags/org.gvsig.raster.reproject-2.2.77/org.gvsig.raster.reproject.app.reprojectclient/src/main/java/org/gvsig/raster/reproject/app/ReprojectWindow.java
===================================================================
--- org.gvsig.raster.reproject/tags/org.gvsig.raster.reproject-2.2.77/org.gvsig.raster.reproject.app.reprojectclient/src/main/java/org/gvsig/raster/reproject/app/ReprojectWindow.java	(revision 0)
+++ org.gvsig.raster.reproject/tags/org.gvsig.raster.reproject-2.2.77/org.gvsig.raster.reproject.app.reprojectclient/src/main/java/org/gvsig/raster/reproject/app/ReprojectWindow.java	(revision 9578)
@@ -0,0 +1,60 @@
+/* gvSIG. Geographic Information System of the Valencian Government
+ *
+ * Copyright (C) 2011-2012 Prodevelop S.L
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
+ * MA  02110-1301, USA.
+ *
+ */
+package org.gvsig.raster.reproject.app;
+
+import java.awt.BorderLayout;
+
+import javax.swing.JComponent;
+import javax.swing.JPanel;
+
+import org.gvsig.andami.ui.mdiManager.IWindow;
+import org.gvsig.andami.ui.mdiManager.WindowInfo;
+
+
+/**
+ * @author Nacho Brodin (nachobrodin@gmail.com)
+ */
+public class ReprojectWindow extends JPanel implements IWindow {
+    
+    private static final long serialVersionUID = -4401123724140025094L;
+
+    private WindowInfo info;
+
+    private Object profile = WindowInfo.EDITOR_PROFILE;
+
+    public ReprojectWindow(JComponent panel, String title, int w, int h) {
+        this.setLayout(new BorderLayout());
+        add(panel, BorderLayout.CENTER);
+
+        info = new WindowInfo(WindowInfo.PALETTE | WindowInfo.RESIZABLE);
+        info.setTitle(title);
+        info.setWidth(w);
+        info.setHeight(h);
+    }
+
+    public WindowInfo getWindowInfo() {
+        return info;
+    }
+
+    public Object getWindowProfile() {
+        return profile;
+    }
+}

Property changes on: org.gvsig.raster.reproject/tags/org.gvsig.raster.reproject-2.2.77/org.gvsig.raster.reproject.app.reprojectclient/src/main/java/org/gvsig/raster/reproject/app/ReprojectWindow.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.raster.reproject/tags/org.gvsig.raster.reproject-2.2.77/org.gvsig.raster.reproject.app.reprojectclient/src/main/java/org/gvsig/raster/reproject/app/toolbox/ToolboxReprojectLoader.java
===================================================================
--- org.gvsig.raster.reproject/tags/org.gvsig.raster.reproject-2.2.77/org.gvsig.raster.reproject.app.reprojectclient/src/main/java/org/gvsig/raster/reproject/app/toolbox/ToolboxReprojectLoader.java	(revision 0)
+++ org.gvsig.raster.reproject/tags/org.gvsig.raster.reproject-2.2.77/org.gvsig.raster.reproject.app.reprojectclient/src/main/java/org/gvsig/raster/reproject/app/toolbox/ToolboxReprojectLoader.java	(revision 9578)
@@ -0,0 +1,42 @@
+package org.gvsig.raster.reproject.app.toolbox;
+
+import java.lang.reflect.Constructor;
+import java.lang.reflect.InvocationTargetException;
+
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+/**
+ * Loader for this tool in the toolbox dialog
+ * 
+ * @author <a href="mailto:nachobrodin@gmail.com">Nacho Brodin</a>
+ */
+public class ToolboxReprojectLoader {
+	private Logger log      = LoggerFactory.getLogger(ToolboxReprojectLoader.class); 
+	private String errorMsg = "The reprojection tool are not been added in the toolbox";
+
+	public void registerTool() {
+		try {
+			Class<?> c = Class.forName("org.gvsig.raster.reproject.app.toolbox.ReprojectToolboxAction");
+			Constructor<?> constructor = c.getConstructor();
+			constructor.newInstance();
+		} catch (ClassNotFoundException e) {
+			log.info(errorMsg, e);
+		} catch (SecurityException e) {
+			log.info(errorMsg, e);
+		} catch (NoSuchMethodException e) {
+			log.info(errorMsg, e);
+		} catch (IllegalArgumentException e) {
+			log.info(errorMsg, e);
+		} catch (InstantiationException e) {
+			log.info(errorMsg, e);
+		} catch (IllegalAccessException e) {
+			log.info(errorMsg, e);
+		} catch (InvocationTargetException e) {
+			log.info(errorMsg, e);
+		} catch (NoClassDefFoundError e) {
+			log.info("Geoprocess are not installed." + errorMsg, e);
+		}
+	}
+
+}

Property changes on: org.gvsig.raster.reproject/tags/org.gvsig.raster.reproject-2.2.77/org.gvsig.raster.reproject.app.reprojectclient/src/main/java/org/gvsig/raster/reproject/app/toolbox/ToolboxReprojectLoader.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.raster.reproject/tags/org.gvsig.raster.reproject-2.2.77/org.gvsig.raster.reproject.app.reprojectclient/src/main/java/org/gvsig/raster/reproject/app/toolbox/ReprojectToolboxAction.java
===================================================================
--- org.gvsig.raster.reproject/tags/org.gvsig.raster.reproject-2.2.77/org.gvsig.raster.reproject.app.reprojectclient/src/main/java/org/gvsig/raster/reproject/app/toolbox/ReprojectToolboxAction.java	(revision 0)
+++ org.gvsig.raster.reproject/tags/org.gvsig.raster.reproject-2.2.77/org.gvsig.raster.reproject.app.reprojectclient/src/main/java/org/gvsig/raster/reproject/app/toolbox/ReprojectToolboxAction.java	(revision 9578)
@@ -0,0 +1,74 @@
+/**
+ * gvSIG. Desktop Geographic Information System.
+ *
+ * Copyright (C) 2007-2012 gvSIG Association.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
+ * MA  02110-1301, USA.
+ *
+ * For any additional information, do not hesitate to contact us
+ * at info AT gvsig.com, or visit our website www.gvsig.com.
+ */
+
+
+package org.gvsig.raster.reproject.app.toolbox;
+
+import javax.swing.ImageIcon;
+
+import org.gvsig.andami.IconThemeHelper;
+import org.gvsig.fmap.mapcontext.layers.FLayer;
+import org.gvsig.geoprocess.sextante.gui.core.GUIFactory;
+import org.gvsig.i18n.Messages;
+import org.gvsig.raster.reproject.app.ReprojectTocMenuEntry;
+
+/**
+ * Input in Sextante framework for Principal Components tool
+ * 
+ * @author <a href="mailto:nachobrodin@gmail.com">Nacho Brodin</a>
+ */
+public class ReprojectToolboxAction extends AbstractToolboxAction {
+	
+	public ReprojectToolboxAction() {
+		ImageIcon ico = IconThemeHelper.getImageIcon("gvsig-icon16x16");
+		GUIFactory.registerExternalTool(Messages.getText("gv_tools"), ico, this);
+	}
+	
+	@Override
+	public void execute() {
+		if(!super.loadLayer())
+			return;
+		ReprojectTocMenuEntry.getSingleton().execute(null, new FLayer[]{lyr}); 
+	}
+
+	@Override
+	public String getName() {
+		return Messages.getText("reproject_layer");
+	}
+
+	public ImageIcon getIcon() {
+		return (ImageIcon)ReprojectTocMenuEntry.getSingleton().getIcon();
+	}
+	
+	public boolean isPluginInstalled() {
+		try {
+			ReprojectTocMenuEntry.getSingleton();
+		} catch(Exception e) {
+			return false;
+		} catch(Error e) {
+			return false;
+		}
+		return true;
+	}
+}

Property changes on: org.gvsig.raster.reproject/tags/org.gvsig.raster.reproject-2.2.77/org.gvsig.raster.reproject.app.reprojectclient/src/main/java/org/gvsig/raster/reproject/app/toolbox/ReprojectToolboxAction.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.raster.reproject/tags/org.gvsig.raster.reproject-2.2.77/org.gvsig.raster.reproject.app.reprojectclient/src/main/java/org/gvsig/raster/reproject/app/toolbox/AbstractToolboxAction.java
===================================================================
--- org.gvsig.raster.reproject/tags/org.gvsig.raster.reproject-2.2.77/org.gvsig.raster.reproject.app.reprojectclient/src/main/java/org/gvsig/raster/reproject/app/toolbox/AbstractToolboxAction.java	(revision 0)
+++ org.gvsig.raster.reproject/tags/org.gvsig.raster.reproject-2.2.77/org.gvsig.raster.reproject.app.reprojectclient/src/main/java/org/gvsig/raster/reproject/app/toolbox/AbstractToolboxAction.java	(revision 9578)
@@ -0,0 +1,121 @@
+/**
+ * gvSIG. Desktop Geographic Information System.
+ *
+ * Copyright (C) 2007-2012 gvSIG Association.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
+ * MA  02110-1301, USA.
+ *
+ * For any additional information, do not hesitate to contact us
+ * at info AT gvsig.com, or visit our website www.gvsig.com.
+ */
+
+package org.gvsig.raster.reproject.app.toolbox;
+
+import org.gvsig.andami.PluginServices;
+import org.gvsig.andami.ui.mdiManager.IWindow;
+import org.gvsig.app.project.documents.view.gui.AbstractViewPanel;
+import org.gvsig.fmap.mapcontext.MapContext;
+import org.gvsig.fmap.mapcontext.layers.FLayers;
+import org.gvsig.geoprocess.lib.sextante.dataObjects.FLyrRasterIRasterLayer;
+import org.gvsig.i18n.Messages;
+import org.gvsig.raster.fmap.layers.FLyrRaster;
+import org.gvsig.raster.swing.RasterSwingLibrary;
+
+import es.unex.sextante.dataObjects.IRasterLayer;
+import es.unex.sextante.gui.core.SextanteGUI;
+import es.unex.sextante.gui.core.ToolboxAction;
+
+/**
+ * Base class for toolBox actions
+ *
+ * @author <a href="mailto:nachobrodin@gmail.com">Nacho Brodin</a>
+ */
+public abstract class AbstractToolboxAction extends ToolboxAction {
+	protected FLyrRaster             lyr = null;
+
+	@Override
+	public String getGroup() {
+		return Messages.getText("group_tools");
+	}
+
+
+	@Override
+	public boolean isActive() {
+		IWindow[] windows = PluginServices.getMDIManager().getAllWindows();
+		for (int i = 0; i < windows.length; i++) {
+			if(windows[i] instanceof AbstractViewPanel) {
+				FLayers lyrs = ((AbstractViewPanel)windows[i]).getMapControl().getMapContext().getLayers();
+				for (int j = 0; j < lyrs.getLayersCount(); j++) {
+					if(lyrs.getLayer(j) instanceof FLyrRaster)
+						return true;
+				}
+			}
+		}
+		return false;
+	}
+
+	/**
+	 * @return Returns true if the plugin which gives the functionality is installed
+     * in gvSIG
+	 */
+	public abstract boolean isPluginInstalled();
+
+	/**
+	 * Loads the raster layer for the tool
+	 * @return true if layer load is successfully, otherwise fasle
+	 */
+	public boolean loadLayer() {
+		if(!isPluginInstalled()) {
+			RasterSwingLibrary.messageBoxError(Messages.getText("plugin_not_installed"), null);
+			return false;
+		}
+
+		if(!isActive()) {
+			RasterSwingLibrary.messageBoxError(Messages.getText("layer_not_valid"), null);
+			return false;
+		}
+
+		boolean existsRasterButNotActive = false;
+		lyr = null;
+		IWindow[] windows = PluginServices.getMDIManager().getOrderedWindows();
+		MapContext mapCtx = null;
+		for (int i = 0; i < windows.length; i++) {
+			if(windows[i] instanceof AbstractViewPanel) {
+				mapCtx = ((AbstractViewPanel)windows[i]).getMapControl().getMapContext();
+				break;
+			}
+		}
+
+		IRasterLayer[] layers = SextanteGUI.getInputFactory().getRasterLayers();
+		for (int i = 0; i < layers.length; i++) {
+			FLyrRaster l = (FLyrRaster)((FLyrRasterIRasterLayer)layers[i]).getBaseDataObject();
+			existsRasterButNotActive = true;
+			if(l.isActive() && mapCtx == l.getMapContext()) {
+				existsRasterButNotActive = false;
+				lyr = l;
+				break;
+			}
+		}
+
+		if(existsRasterButNotActive) {
+			RasterSwingLibrary.messageBoxError(Messages.getText("raster_layer_not_active"), null);
+			return false;
+		}
+
+		return true;
+	}
+
+}

Property changes on: org.gvsig.raster.reproject/tags/org.gvsig.raster.reproject-2.2.77/org.gvsig.raster.reproject.app.reprojectclient/src/main/java/org/gvsig/raster/reproject/app/toolbox/AbstractToolboxAction.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.raster.reproject/tags/org.gvsig.raster.reproject-2.2.77/org.gvsig.raster.reproject.app.reprojectclient/src/main/java/org/gvsig/raster/reproject/app/PrepareLayerAskProjection.java
===================================================================
--- org.gvsig.raster.reproject/tags/org.gvsig.raster.reproject-2.2.77/org.gvsig.raster.reproject.app.reprojectclient/src/main/java/org/gvsig/raster/reproject/app/PrepareLayerAskProjection.java	(revision 0)
+++ org.gvsig.raster.reproject/tags/org.gvsig.raster.reproject-2.2.77/org.gvsig.raster.reproject.app.reprojectclient/src/main/java/org/gvsig/raster/reproject/app/PrepareLayerAskProjection.java	(revision 9578)
@@ -0,0 +1,103 @@
+/* gvSIG. Geographic Information System of the Valencian Government
+*
+* Copyright (C) 2007-2008 Infrastructures and Transports Department
+* of the Valencian Government (CIT)
+*
+* This program is free software; you can redistribute it and/or
+* modify it under the terms of the GNU General Public License
+* as published by the Free Software Foundation; either version 2
+* of the License, or (at your option) any later version.
+*
+* This program is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+* GNU General Public License for more details.
+*
+* You should have received a copy of the GNU General Public License
+* along with this program; if not, write to the Free Software
+* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
+* MA  02110-1301, USA.
+*
+*/
+package org.gvsig.raster.reproject.app;
+
+import java.util.Map;
+
+import org.cresques.cts.IProjection;
+import org.gvsig.app.prepareAction.PrepareContext;
+import org.gvsig.app.prepareAction.PrepareContextView;
+import org.gvsig.app.prepareAction.PrepareDataStoreParameters;
+import org.gvsig.app.prepareAction.PrepareLayer;
+import org.gvsig.fmap.dal.DALLocator;
+import org.gvsig.fmap.dal.DataManager;
+import org.gvsig.fmap.dal.DataStoreParameters;
+import org.gvsig.fmap.dal.coverage.RasterException;
+import org.gvsig.fmap.dal.coverage.exception.RmfSerializerException;
+import org.gvsig.fmap.dal.coverage.store.RasterDataStore;
+import org.gvsig.fmap.dal.coverage.store.parameter.RasterDataParameters;
+import org.gvsig.fmap.mapcontext.layers.FLayer;
+import org.gvsig.fmap.mapcontext.layers.operations.SingleLayer;
+import org.gvsig.geoprocess.lib.sextante.dataObjects.FLyrRasterIRasterLayer;
+import org.gvsig.raster.fmap.layers.DefaultFLyrRaster;
+import org.gvsig.raster.fmap.layers.FLyrRaster;
+import org.gvsig.tools.exception.BaseException;
+
+import es.unex.sextante.gui.cmd.bshcommands.data;
+
+/**
+ * Entity to configure data store parameters when raster is projected on the fly
+ * before open store.
+ * 
+ * @author <a href="mailto:lmarques@disid.com">Lluis Marques</a>
+ *
+ */
+public class PrepareLayerAskProjection implements PrepareDataStoreParameters {
+
+    public DataStoreParameters prepare(DataStoreParameters storeParameters, PrepareContext context)
+        throws BaseException {
+
+        if (storeParameters instanceof RasterDataParameters) {
+            RasterDataParameters rasterParameters = (RasterDataParameters) storeParameters;
+            
+            DataManager dataManager = DALLocator.getDataManager();
+            RasterDataStore store =
+                (RasterDataStore) dataManager.openStore(rasterParameters.getDataStoreName(),
+                    rasterParameters);
+            IProjection projection = store.getProjection();
+            store.dispose();
+            
+            if(projection != null){
+                rasterParameters.setSRS(projection);
+            }
+        }
+
+        return storeParameters;
+    }
+    
+    public void pre(DataStoreParameters storeParameters, PrepareContext context) {
+    }
+
+    public void post(DataStoreParameters storeParameters, PrepareContext context) {
+    }
+
+    public String getDescription() {
+        return "Prepare projection for Raster Layer";
+    }
+
+    public String getName() {
+        return "PrepareRasterLayerProjection";
+    }
+
+    public Object create() {
+        return this;
+    }
+
+    public Object create(Object[] args) {
+        return this;
+    }
+
+    @SuppressWarnings("rawtypes")
+    public Object create(Map args) {
+        return this;
+    }
+}

Property changes on: org.gvsig.raster.reproject/tags/org.gvsig.raster.reproject-2.2.77/org.gvsig.raster.reproject.app.reprojectclient/src/main/java/org/gvsig/raster/reproject/app/PrepareLayerAskProjection.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.raster.reproject/tags/org.gvsig.raster.reproject-2.2.77/org.gvsig.raster.reproject.app.reprojectclient/src/main/java/org/gvsig/raster/reproject/app/ReprojectExtension.java
===================================================================
--- org.gvsig.raster.reproject/tags/org.gvsig.raster.reproject-2.2.77/org.gvsig.raster.reproject.app.reprojectclient/src/main/java/org/gvsig/raster/reproject/app/ReprojectExtension.java	(revision 0)
+++ org.gvsig.raster.reproject/tags/org.gvsig.raster.reproject-2.2.77/org.gvsig.raster.reproject.app.reprojectclient/src/main/java/org/gvsig/raster/reproject/app/ReprojectExtension.java	(revision 9578)
@@ -0,0 +1,121 @@
+/* gvSIG. Geographic Information System of the Valencian Government
+*
+* Copyright (C) 2007-2008 Infrastructures and Transports Department
+* of the Valencian Government (CIT)
+* 
+* This program is free software; you can redistribute it and/or
+* modify it under the terms of the GNU General Public License
+* as published by the Free Software Foundation; either version 2
+* of the License, or (at your option) any later version.
+* 
+* This program is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+* GNU General Public License for more details.
+* 
+* You should have received a copy of the GNU General Public License
+* along with this program; if not, write to the Free Software
+* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, 
+* MA  02110-1301, USA.
+* 
+*/
+package org.gvsig.raster.reproject.app;
+
+import org.gvsig.andami.IconThemeHelper;
+import org.gvsig.andami.PluginServices;
+import org.gvsig.andami.plugins.Extension;
+import org.gvsig.andami.ui.mdiManager.IWindow;
+import org.gvsig.app.ApplicationLocator;
+import org.gvsig.app.ApplicationManager;
+import org.gvsig.app.project.documents.view.gui.AbstractViewPanel;
+import org.gvsig.app.project.documents.view.toc.AbstractTocContextMenuAction;
+import org.gvsig.fmap.mapcontext.layers.FLayer;
+import org.gvsig.fmap.mapcontext.layers.FLayers;
+import org.gvsig.raster.fmap.layers.FLyrRaster;
+import org.gvsig.raster.fmap.layers.ILayerState;
+import org.gvsig.raster.fmap.layers.IRasterLayerActions;
+import org.gvsig.raster.reproject.app.toolbox.ToolboxReprojectLoader;
+import org.gvsig.tools.ToolsLocator;
+import org.gvsig.tools.extensionpoint.ExtensionBuilder;
+import org.gvsig.tools.extensionpoint.ExtensionPoint;
+import org.gvsig.tools.extensionpoint.ExtensionPointManager;
+
+/**
+ * Extension for adding grid netcdf support to gvSIG.
+ * @author Nacho Brodin (nachobrodin@gmail.com)
+ */
+public class ReprojectExtension extends Extension {
+	private ExtensionPoint      genericToolBarMenuExtensionPoint  = null;
+	private static String       action                            = "Reproject";
+
+	public void initialize() {
+		IconThemeHelper.registerIcon("action", "tools-raster-reproject", this);
+		
+		ExtensionPointManager extensionPoints = ToolsLocator.getExtensionPointManager();
+		ExtensionPoint point = extensionPoints.add("GenericToolBarMenu");
+		point.append(action, "", ReprojectTocMenuEntry.getSingleton());
+		
+		ApplicationManager appGvSigMan = ApplicationLocator.getManager();
+		appGvSigMan.registerPrepareOpenDataStoreParameters(new PrepareLayerAskProjection());
+	}
+	
+	public void postInitialize() {
+		new ToolboxReprojectLoader().registerTool();
+	}
+
+	public void execute(String actionCommand) {
+		//Las entradas en GenericToolBarModule est�n registradas con la misma etiqueta que la del actionCommand
+		//De esta forma pueden recuperarse los TocMenuEntry del punto de extensi�n y ejecutar la acci�n a
+		//trav�s de este.
+		ExtensionBuilder ext = getGenericToolBarMenuExtensionPoint().get(actionCommand).getBuilder();
+		if(ext != null && ext instanceof AbstractTocContextMenuAction) {
+			IWindow w = PluginServices.getMDIManager().getActiveWindow();
+			if(w instanceof AbstractViewPanel) {
+				FLayers lyrs = ((AbstractViewPanel)w).getMapControl().getMapContext().getLayers();
+				FLayer[] actives = lyrs.getActives();
+				((AbstractTocContextMenuAction)ext).execute(null, actives);
+			}
+		}
+	}
+
+	public boolean isEnabled() {
+		IWindow w = PluginServices.getMDIManager().getActiveWindow();
+		if(w instanceof AbstractViewPanel) {
+			FLayers lyrs = ((AbstractViewPanel)w).getMapControl().getMapContext().getLayers();
+			FLayer[] actives = lyrs.getActives();
+			if(actives != null && actives.length > 0) {
+				for (int i = 0; i < actives.length; i++) {
+					if(actives[i] instanceof FLyrRaster && ((ILayerState)actives[i]).isOpen()) {
+						return true;
+					}
+				}
+			}
+		}
+		return false;
+	}
+
+	public boolean isVisible() {
+		IWindow w = PluginServices.getMDIManager().getActiveWindow();
+		if(w instanceof AbstractViewPanel) {
+			FLayers lyrs = ((AbstractViewPanel)w).getMapControl().getMapContext().getLayers();
+			FLayer[] actives = lyrs.getActives();
+			if(actives != null && actives.length > 0) {
+				for (int i = 0; i < actives.length; i++) {
+					if(actives[i] instanceof FLyrRaster && 
+						((IRasterLayerActions)actives[i]).isActionEnabled(IRasterLayerActions.REPROJECT)) {
+						return true;
+					}
+				}
+			}
+		}
+		return false;
+	}
+	
+	public ExtensionPoint getGenericToolBarMenuExtensionPoint() {
+		if(genericToolBarMenuExtensionPoint == null) {
+			ExtensionPointManager extensionPoints = ToolsLocator.getExtensionPointManager();
+			genericToolBarMenuExtensionPoint = extensionPoints.get("GenericToolBarMenu");
+		}
+		return genericToolBarMenuExtensionPoint;
+	}
+}

Property changes on: org.gvsig.raster.reproject/tags/org.gvsig.raster.reproject-2.2.77/org.gvsig.raster.reproject.app.reprojectclient/src/main/java/org/gvsig/raster/reproject/app/ReprojectExtension.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.raster.reproject/tags/org.gvsig.raster.reproject-2.2.77/org.gvsig.raster.reproject.app.reprojectclient/src/main/java/org/gvsig/raster/reproject/app/ReprojectTocMenuEntry.java
===================================================================
--- org.gvsig.raster.reproject/tags/org.gvsig.raster.reproject-2.2.77/org.gvsig.raster.reproject.app.reprojectclient/src/main/java/org/gvsig/raster/reproject/app/ReprojectTocMenuEntry.java	(revision 0)
+++ org.gvsig.raster.reproject/tags/org.gvsig.raster.reproject-2.2.77/org.gvsig.raster.reproject.app.reprojectclient/src/main/java/org/gvsig/raster/reproject/app/ReprojectTocMenuEntry.java	(revision 9578)
@@ -0,0 +1,113 @@
+/* gvSIG. Geographic Information System of the Valencian Government
+*
+* Copyright (C) 2007-2008 Infrastructures and Transports Department
+* of the Valencian Government (CIT)
+* 
+* This program is free software; you can redistribute it and/or
+* modify it under the terms of the GNU General Public License
+* as published by the Free Software Foundation; either version 2
+* of the License, or (at your option) any later version.
+* 
+* This program is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+* GNU General Public License for more details.
+* 
+* You should have received a copy of the GNU General Public License
+* along with this program; if not, write to the Free Software
+* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, 
+* MA  02110-1301, USA.
+* 
+*/
+package org.gvsig.raster.reproject.app;
+
+import javax.swing.Icon;
+
+import java.awt.Dimension;
+
+import org.gvsig.andami.IconThemeHelper;
+import org.gvsig.andami.PluginServices;
+import org.gvsig.app.project.documents.view.toc.AbstractTocContextMenuAction;
+import org.gvsig.app.project.documents.view.toc.ITocItem;
+import org.gvsig.fmap.mapcontext.layers.FLayer;
+import org.gvsig.i18n.Messages;
+import org.gvsig.raster.fmap.layers.FLyrRaster;
+import org.gvsig.raster.fmap.layers.IRasterLayerActions;
+import org.gvsig.raster.mainplugin.toolbar.IGenericToolBarMenuItem;
+import org.gvsig.raster.reproject.algorithm.RasterReprojectionSwingLocator;
+import org.gvsig.raster.reproject.algorithm.swing.api.RasterReprojectionPanel;
+import org.gvsig.raster.reproject.algorithm.swing.api.ReprojectionPanelDataModel;
+
+
+/**
+ * @author Nacho Brodin (nachobrodin@gmail.com)
+ */
+public class ReprojectTocMenuEntry extends AbstractTocContextMenuAction 
+	implements IGenericToolBarMenuItem {
+	static private ReprojectTocMenuEntry    singleton        = null;
+	private ReprojectListener               listener         = null;
+
+	public String getGroup() {
+		return "GeoRaster";
+	}
+
+	public int getGroupOrder() {
+		return 10;
+	}
+
+	public int getOrder() {
+		return 10;
+	}
+
+	public String getText() {
+		return Messages.getText("toc_reproject");
+	}
+	
+	/**
+	 * @return Return singleton instance
+	 */
+	static public ReprojectTocMenuEntry getSingleton() {
+		if (singleton == null)
+			singleton = new ReprojectTocMenuEntry();
+		return singleton;
+	}
+
+	public boolean isEnabled(ITocItem item, FLayer[] selectedItems) {
+		return true;
+	}
+
+	public boolean isVisible(ITocItem item, FLayer[] selectedItems) {
+		if ((selectedItems == null) || (selectedItems.length != 1))
+			return false;
+
+		if (!(selectedItems[0] instanceof IRasterLayerActions))
+			return false;
+
+		return ((IRasterLayerActions) selectedItems[0]).isActionEnabled(IRasterLayerActions.REPROJECT);
+	}
+
+	/**
+	 * M�todo que se ejecuta cuando se pulsa la entrada en el men� contextual del TOC 
+	 * correspondiente a "Zoom a la resoluci�n del raster". Aqu� se crear� el mapTool si 
+	 * no se ha hecho antes y se cargar�.
+	 */
+	public void execute(ITocItem item, FLayer[] selectedItems) {
+		if (selectedItems.length == 1) {
+			FLayer lyr = selectedItems[0];
+			if (lyr instanceof FLyrRaster) {
+				ReprojectionPanelDataModel dataModel = new ReprojectionPanelDataModelImpl((FLyrRaster)lyr);
+				RasterReprojectionPanel reprojectPanel = RasterReprojectionSwingLocator.getSwingManager().createRasterReprojectPanel(dataModel);
+				Dimension dimension = reprojectPanel.getComponent().getPreferredSize();
+				
+				ReprojectWindow window = new ReprojectWindow(reprojectPanel.getComponent(), Messages.getText("reprojection"), dimension.width, dimension.height);
+				listener = new ReprojectListener(lyr, dataModel, window, reprojectPanel);
+				reprojectPanel.addButtonsListener(listener);
+				PluginServices.getMDIManager().addCentredWindow(window);
+			}
+		}
+	}
+	
+	public Icon getIcon() {
+		return IconThemeHelper.getImageIcon("tools-raster-reproject");
+	}
+}
\ No newline at end of file

Property changes on: org.gvsig.raster.reproject/tags/org.gvsig.raster.reproject-2.2.77/org.gvsig.raster.reproject.app.reprojectclient/src/main/java/org/gvsig/raster/reproject/app/ReprojectTocMenuEntry.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.raster.reproject/tags/org.gvsig.raster.reproject-2.2.77/org.gvsig.raster.reproject.app.reprojectclient/src/main/java/org/gvsig/raster/reproject/app/preparelayer/RasterProjectionActionsDialog.java
===================================================================
--- org.gvsig.raster.reproject/tags/org.gvsig.raster.reproject-2.2.77/org.gvsig.raster.reproject.app.reprojectclient/src/main/java/org/gvsig/raster/reproject/app/preparelayer/RasterProjectionActionsDialog.java	(revision 0)
+++ org.gvsig.raster.reproject/tags/org.gvsig.raster.reproject-2.2.77/org.gvsig.raster.reproject.app.reprojectclient/src/main/java/org/gvsig/raster/reproject/app/preparelayer/RasterProjectionActionsDialog.java	(revision 9578)
@@ -0,0 +1,140 @@
+/* gvSIG. Geographic Information System of the Valencian Government
+*
+* Copyright (C) 2007-2008 Infrastructures and Transports Department
+* of the Valencian Government (CIT)
+*
+* This program is free software; you can redistribute it and/or
+* modify it under the terms of the GNU General Public License
+* as published by the Free Software Foundation; either version 2
+* of the License, or (at your option) any later version.
+*
+* This program is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+* GNU General Public License for more details.
+*
+* You should have received a copy of the GNU General Public License
+* along with this program; if not, write to the Free Software
+* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
+* MA  02110-1301, USA.
+*
+*/
+package org.gvsig.raster.reproject.app.preparelayer;
+
+import java.awt.BorderLayout;
+import java.awt.Point;
+import java.awt.event.ActionEvent;
+import java.awt.event.ActionListener;
+
+import javax.swing.JPanel;
+
+import org.cresques.cts.IProjection;
+
+import org.gvsig.andami.PluginServices;
+import org.gvsig.andami.ui.mdiManager.IWindow;
+import org.gvsig.andami.ui.mdiManager.IWindowListener;
+import org.gvsig.andami.ui.mdiManager.WindowInfo;
+import org.gvsig.fmap.dal.coverage.store.parameter.RasterDataParameters;
+import org.gvsig.gui.beans.buttonspanel.ButtonsPanel;
+import org.gvsig.raster.mainplugin.RasterMainPluginUtils;
+
+/**
+ * Dialogo de opciones de sobre la proyecci�n de la capa raster y la vista.
+ *
+ * @author Nacho Brodin nachobrodin@gmail.com
+ */
+public class RasterProjectionActionsDialog extends JPanel implements IWindow, IWindowListener, ActionListener {
+	private static final long            serialVersionUID       = 6954391896451933337L;
+	private RasterProjectionActionsPanel panel                  = null;
+	private Point                        posWindow              = null;
+	private int                          widthWindow            = 390;
+	private int                          heightWindow           = 260;
+	private boolean                      layerIsReprojectable   = true;
+	private String                       layerName              = null;
+	private int                          defaultAction          = RasterDataParameters.NEW_PROJETION_TO_THE_LAYER;
+    private IProjection viewProj = null;
+    private IProjection layerProj = null;
+
+	   /**
+     * Constructor.
+     */
+    public RasterProjectionActionsDialog(boolean layerIsReprojectable, String layerName, int defaultAction) {
+        this(layerIsReprojectable, layerName, defaultAction, null, null);
+    }
+	/**
+	 * Constructor.
+	 */
+	public RasterProjectionActionsDialog(boolean layerIsReprojectable, String layerName, int defaultAction, IProjection viewProj, IProjection layerProj) {
+	    this.viewProj = viewProj;
+	    this.layerProj = layerProj;
+		this.layerIsReprojectable = layerIsReprojectable;
+		this.layerName = layerName;
+		this.defaultAction = defaultAction;
+		BorderLayout bl = new BorderLayout();
+		bl.setHgap(2);
+		bl.setVgap(2);
+		setLayout(bl);
+		add(getRasterProjectionActionsPanel(), BorderLayout.CENTER);
+		getRasterProjectionActionsPanel().getButtonsPanel().getButton(ButtonsPanel.BUTTON_ACCEPT).addActionListener(this);
+		getRasterProjectionActionsPanel().getButtonsPanel().getButton(ButtonsPanel.BUTTON_CANCEL).addActionListener(this);
+		getRasterProjectionActionsPanel().getCheckOption().addActionListener(this);
+		posWindow = RasterMainPluginUtils.iwindowPosition(widthWindow, heightWindow);
+		PluginServices.getMDIManager().addWindow(this);
+	}
+
+	public WindowInfo getWindowInfo() {
+		WindowInfo m_viewinfo = new WindowInfo(WindowInfo.MODALDIALOG | WindowInfo.RESIZABLE | WindowInfo.MAXIMIZABLE);
+		m_viewinfo.setTitle(PluginServices.getText(this, "options"));
+		m_viewinfo.setHeight(heightWindow);
+		m_viewinfo.setWidth(widthWindow);
+		if (posWindow != null) {
+			m_viewinfo.setX((int) posWindow.getX());
+			m_viewinfo.setY((int) posWindow.getY());
+		}
+		return m_viewinfo;
+	}
+
+	/**
+	 * Obtiene el panel con las opciones de proyecci�n
+	 * @return RasterProjectionActionsPanel
+	 */
+	public RasterProjectionActionsPanel getRasterProjectionActionsPanel() {
+		if (panel == null) {
+			panel = new RasterProjectionActionsPanel(layerIsReprojectable, layerName, defaultAction, viewProj, layerProj);
+		}
+		return panel;
+	}
+
+	/**
+	 * Obtiene la selecci�n del panel
+	 * @return entero con la selecci�n. Esta representada por las constantes de la
+	 *         clase RasterReprojectionPanel.
+	 */
+	public int getSelection() {
+		return getRasterProjectionActionsPanel().getSelection();
+	}
+
+	/**
+	 * Obtiene la selecci�n del panel
+	 * @return entero con la selecci�n. Esta representada por las constantes de la
+	 *         clase RasterReprojectionPanel.
+	 */
+	public boolean getChangeProjectionOption() {
+		return getRasterProjectionActionsPanel().getCheckOption().isSelected();
+	}
+
+	public void actionPerformed(ActionEvent e) {
+		if (e.getSource() == getRasterProjectionActionsPanel().getCheckOption()) {
+			return;
+		}
+		PluginServices.getMDIManager().closeWindow(this);
+	}
+
+	public void windowClosed() {}
+
+	public void windowActivated() {}
+
+	public Object getWindowProfile() {
+		return WindowInfo.DIALOG_PROFILE;
+	}
+}
\ No newline at end of file

Property changes on: org.gvsig.raster.reproject/tags/org.gvsig.raster.reproject-2.2.77/org.gvsig.raster.reproject.app.reprojectclient/src/main/java/org/gvsig/raster/reproject/app/preparelayer/RasterProjectionActionsDialog.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.raster.reproject/tags/org.gvsig.raster.reproject-2.2.77/org.gvsig.raster.reproject.app.reprojectclient/src/main/java/org/gvsig/raster/reproject/app/preparelayer/RasterProjectionActionsPanel.java
===================================================================
--- org.gvsig.raster.reproject/tags/org.gvsig.raster.reproject-2.2.77/org.gvsig.raster.reproject.app.reprojectclient/src/main/java/org/gvsig/raster/reproject/app/preparelayer/RasterProjectionActionsPanel.java	(revision 0)
+++ org.gvsig.raster.reproject/tags/org.gvsig.raster.reproject-2.2.77/org.gvsig.raster.reproject.app.reprojectclient/src/main/java/org/gvsig/raster/reproject/app/preparelayer/RasterProjectionActionsPanel.java	(revision 9578)
@@ -0,0 +1,260 @@
+/* gvSIG. Geographic Information System of the Valencian Government
+*
+* Copyright (C) 2007-2008 Infrastructures and Transports Department
+* of the Valencian Government (CIT)
+*
+* This program is free software; you can redistribute it and/or
+* modify it under the terms of the GNU General Public License
+* as published by the Free Software Foundation; either version 2
+* of the License, or (at your option) any later version.
+*
+* This program is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+* GNU General Public License for more details.
+*
+* You should have received a copy of the GNU General Public License
+* along with this program; if not, write to the Free Software
+* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
+* MA  02110-1301, USA.
+*
+*/
+package org.gvsig.raster.reproject.app.preparelayer;
+
+import java.awt.BorderLayout;
+import java.awt.GridBagConstraints;
+import java.awt.GridBagLayout;
+
+import javax.swing.ButtonGroup;
+import javax.swing.JCheckBox;
+import javax.swing.JLabel;
+import javax.swing.JPanel;
+import javax.swing.JRadioButton;
+
+import org.cresques.cts.IProjection;
+
+import org.gvsig.andami.PluginServices;
+import org.gvsig.fmap.dal.coverage.store.parameter.RasterDataParameters;
+import org.gvsig.i18n.Messages;
+import org.gvsig.raster.swing.basepanel.AbstractButtonsPanel;
+import org.gvsig.raster.swing.basepanel.IButtonsPanel;
+
+/**
+ * Obtiene el panel con las opciones a realizar con la proyecci�n. Nos ofrece
+ * las siguientes posibilidades:
+ * <UL>
+ * <LI>Cambiar la proyecci�n de la vista</LI>
+ * <LI>Reproyectar el raster</LI>
+ * <LI>Ignorar la proyecci�n del raster y cargar</LI>
+ * <LI>No cargar</LI>
+ * </UL>
+ *
+ * @author Nacho Brodin nachobrodin@gmail.com
+ */
+public class RasterProjectionActionsPanel extends AbstractButtonsPanel {
+	private static final long serialVersionUID = -3868504818382448187L;
+
+	private JPanel        buttonsPanel           = null;
+	private ButtonGroup   group                  = new ButtonGroup();
+	private JRadioButton  changeViewProjection   = null;
+	private JRadioButton  reproject              = null;
+	private JRadioButton  ignoreRasterProjection = null;
+	private JRadioButton  notLoad                = null;
+	private JRadioButton  onTheFly               = null;
+	private JCheckBox     allfiles               = null;
+	private boolean       layerIsReprojectable   = true;
+
+    private IProjection viewProj = null;
+
+    private IProjection layerProj = null;
+
+
+	/**
+	 * Constructor. Llama al inicializador de componentes gr�ficos.
+	 */
+	public RasterProjectionActionsPanel(boolean layerIsReprojectable, String layerName, int defaultAction) {
+	    this(layerIsReprojectable, layerName, defaultAction, null, null);
+	}
+
+	   /**
+     * Constructor. Llama al inicializador de componentes gr�ficos.
+     */
+    public RasterProjectionActionsPanel(boolean layerIsReprojectable, String layerName, int defaultAction, IProjection viewProj, IProjection layerProj) {
+        super(IButtonsPanel.BUTTONS_ACCEPTCANCEL);
+        this.layerIsReprojectable = layerIsReprojectable;
+        this.viewProj = viewProj;
+        this.layerProj = layerProj;
+        init(layerName);
+        setSelection(defaultAction);
+    }
+
+	/**
+	 * Inicializaci�n de componentes gr�ficos.
+	 */
+	public void init(String lyrName) {
+		BorderLayout bl = new BorderLayout();
+		bl.setVgap(5);
+		setLayout(bl);
+		String msg = "";
+		if(this.viewProj!=null && this.layerProj!=null){
+            msg =
+                "<html><b>" + lyrName + "</b><BR><BR>" + Messages.getText("dif_proj_with_projections") + "<BR>"
+                    + Messages.getText("view_proj") + ": " + viewProj.getAbrev() + "<BR>"
+                    + Messages.getText("layer_proj") + ": " + layerProj.getAbrev() + "</html>";
+		} else {
+		    msg = "<html><b>" + lyrName + "</b><BR><BR>" + Messages.getText("dif_proj") + "</html>";
+		}
+        add(new JLabel(msg), BorderLayout.NORTH);
+		add(getButtonsActionPanel(), BorderLayout.CENTER);
+		add(getCheckOption(), BorderLayout.SOUTH);
+	}
+
+	/**
+	 * Obtiene el panel con los botones se selecci�n de opci�n.
+	 * @return JPanel
+	 */
+	private JPanel getButtonsActionPanel() {
+		if (buttonsPanel == null) {
+			buttonsPanel = new JPanel();
+			buttonsPanel.setBorder(javax.swing.BorderFactory.createTitledBorder(null, Messages.getText("proj_options"), javax.swing.border.TitledBorder.DEFAULT_JUSTIFICATION, javax.swing.border.TitledBorder.DEFAULT_POSITION, null, null));
+
+			group.add(getIgnoreRasterProjectionButton());
+			group.add(getChangeViewProjectionButton());
+			group.add(getReprojectButton());
+			group.add(getNotLoadButton());
+			group.add(getOnTheFlyButton());
+
+			buttonsPanel.setLayout(new GridBagLayout());
+			GridBagConstraints gbc = new GridBagConstraints();
+			gbc.insets = new java.awt.Insets(0, 5, 5, 0);
+
+			gbc.gridx = 0;
+			gbc.gridy = 0;
+			gbc.weightx = 1;
+			gbc.anchor = GridBagConstraints.WEST;
+			buttonsPanel.add(getIgnoreRasterProjectionButton(), gbc);
+
+			gbc.gridy = 1;
+			buttonsPanel.add(getReprojectButton(), gbc);
+
+			gbc.gridy = 2;
+			buttonsPanel.add(getChangeViewProjectionButton(), gbc);
+
+			gbc.gridy = 3;
+			buttonsPanel.add(getNotLoadButton(), gbc);
+
+			gbc.gridy = 4;
+			buttonsPanel.add(getOnTheFlyButton(), gbc);
+		}
+		return buttonsPanel;
+	}
+
+	/**
+	 * Obtiene el bot�n de cambio de projecci�n de la vista
+	 * @return
+	 */
+	private JRadioButton getChangeViewProjectionButton() {
+		if(changeViewProjection == null) {
+			changeViewProjection = new JRadioButton(Messages.getText("change_view_proj"));
+
+			/*IWindow activeWindow = PluginServices.getMDIManager().getActiveWindow();
+			if (activeWindow instanceof AbstractViewPanel) {
+				AbstractViewPanel activeView = (org.gvsig.app.project.documents.view.gui.AbstractViewPanel) activeWindow;
+				if (activeView.getMapControl().getMapContext().getLayers().getLayersCount() >= 1)
+					changeViewProjection.setEnabled(false);
+			}*/
+		}
+		return changeViewProjection;
+	}
+
+	/**
+	 * Obtiene el bot�n de cambio de reproyecci�n
+	 * @return
+	 */
+	private JRadioButton getReprojectButton() {
+		if(reproject == null) {
+			reproject = new JRadioButton(Messages.getText("reproject"));
+			reproject.setEnabled(layerIsReprojectable);
+		}
+		return reproject;
+	}
+
+	/**
+	 * Obtiene el bot�n de ignorar la proyecci�n del raster
+	 * @return
+	 */
+	private JRadioButton getIgnoreRasterProjectionButton() {
+		if(ignoreRasterProjection == null) {
+			ignoreRasterProjection = new JRadioButton(Messages.getText("ignore_raster_proj"));
+		}
+		return ignoreRasterProjection;
+	}
+
+	/**
+	 * Obtiene el bot�n de no cargar el raster.
+	 * @return
+	 */
+	private JRadioButton getNotLoadButton() {
+		if(notLoad == null) {
+			notLoad = new JRadioButton(Messages.getText("not_load"));
+		}
+		return notLoad;
+	}
+
+	/**
+	 * Gets the button to reproject on the fly
+	 * @return
+	 */
+	private JRadioButton getOnTheFlyButton() {
+		if(onTheFly == null) {
+			onTheFly = new JRadioButton(Messages.getText("reproject_on_the_fly") + " (Not implemented yet)");
+			onTheFly.setEnabled(false);
+		}
+		return onTheFly;
+	}
+
+	/**
+	 * Obtiene la selecci�n del panel
+	 * @return entero con la selecci�n. Esta representada por las constantes de FileOpenRaster.
+	 */
+	public int getSelection() {
+		if (getChangeViewProjectionButton().isSelected())
+			return RasterDataParameters.REPROJECT_VIEW;
+		if (getReprojectButton().isSelected())
+			return RasterDataParameters.REPROJECT_DATA;
+		if (getIgnoreRasterProjectionButton().isSelected())
+			return RasterDataParameters.NEW_PROJETION_TO_THE_LAYER;
+		if (getNotLoadButton().isSelected())
+			return RasterDataParameters.NOT_LOAD;
+		if (getOnTheFlyButton().isSelected())
+			return RasterDataParameters.ON_THE_FLY;
+		return RasterDataParameters.NEW_PROJETION_TO_THE_LAYER;
+	}
+
+	/**
+	 * Asigna una selecci�n de opci�n
+	 * @param entero con la selecci�n. Esta representada por las constantes de FileOpenRaster.
+	 */
+	public void setSelection(int value) {
+		if (value == RasterDataParameters.NEW_PROJETION_TO_THE_LAYER)
+			getIgnoreRasterProjectionButton().setSelected(true);
+		if (value == RasterDataParameters.REPROJECT_DATA)
+			getReprojectButton().setSelected(true);
+		if (value == RasterDataParameters.REPROJECT_VIEW)
+			getChangeViewProjectionButton().setSelected(true);
+		if (value == RasterDataParameters.NOT_LOAD)
+			getNotLoadButton().setSelected(true);
+		if (value == RasterDataParameters.ON_THE_FLY)
+			getOnTheFlyButton().setSelected(true);
+	}
+
+	/**
+	 * Obtiene el check con la opci�n de aplicar a todos los ficheros
+	 * @return
+	 */
+	public JCheckBox getCheckOption() {
+		if (allfiles == null)
+			allfiles = new JCheckBox(PluginServices.getText(this, "apply_all"));
+		return allfiles;
+	}
+}

Property changes on: org.gvsig.raster.reproject/tags/org.gvsig.raster.reproject-2.2.77/org.gvsig.raster.reproject.app.reprojectclient/src/main/java/org/gvsig/raster/reproject/app/preparelayer/RasterProjectionActionsPanel.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.raster.reproject/tags/org.gvsig.raster.reproject-2.2.77/org.gvsig.raster.reproject.app.reprojectclient/src/main/java/org/gvsig/raster/reproject/app/preparelayer/ReprojectionQueue.java
===================================================================
--- org.gvsig.raster.reproject/tags/org.gvsig.raster.reproject-2.2.77/org.gvsig.raster.reproject.app.reprojectclient/src/main/java/org/gvsig/raster/reproject/app/preparelayer/ReprojectionQueue.java	(revision 0)
+++ org.gvsig.raster.reproject/tags/org.gvsig.raster.reproject-2.2.77/org.gvsig.raster.reproject.app.reprojectclient/src/main/java/org/gvsig/raster/reproject/app/preparelayer/ReprojectionQueue.java	(revision 9578)
@@ -0,0 +1,114 @@
+/* gvSIG. Geographic Information System of the Valencian Government
+*
+* Copyright (C) 2007-2008 Infrastructures and Transports Department
+* of the Valencian Government (CIT)
+* 
+* This program is free software; you can redistribute it and/or
+* modify it under the terms of the GNU General Public License
+* as published by the Free Software Foundation; either version 2
+* of the License, or (at your option) any later version.
+* 
+* This program is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+* GNU General Public License for more details.
+* 
+* You should have received a copy of the GNU General Public License
+* along with this program; if not, write to the Free Software
+* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, 
+* MA  02110-1301, USA.
+* 
+*/
+package org.gvsig.raster.reproject.app.preparelayer;
+
+import org.gvsig.fmap.dal.coverage.RasterLocator;
+import org.gvsig.fmap.dal.coverage.exception.ProcessInterruptedException;
+import org.gvsig.raster.algorithm.process.IProcessActions;
+import org.gvsig.raster.algorithm.process.ProcessException;
+import org.gvsig.raster.algorithm.process.DataProcess;
+import org.gvsig.raster.util.Queue;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+/**
+ * Cola de procesos de ejecuci�n exclusiva. Los procesos de esta lista se ir�n ejecutando
+ * por orden de llegada impidiendo que se ejecuten dos al mismo tiempo.
+ * 
+ * 16/05/2008
+ * @author Nacho Brodin nachobrodin@gmail.com
+ */
+public class ReprojectionQueue extends Thread {
+	private Queue                     queue                       = new Queue();
+	private DataProcess             executionProcess            = null;
+	static private ReprojectionQueue  singleton                   = null;
+	private Logger                    logger                      = LoggerFactory.getLogger(ReprojectionQueue.class.toString());
+	
+	/**
+	 * Devuelve una instancia al unico objeto de UniqueProcessQueue que puede existir.
+	 * @return
+	 */
+	static public ReprojectionQueue getSingleton() {
+		if(singleton == null) {
+			singleton = new ReprojectionQueue();
+			synchronized (singleton) {
+				singleton.start();
+			}
+		}
+		return singleton;
+	}
+	
+	public void run() {
+		//Cuando arranca el thread se duerme porque la cola est� vacia
+		synchronized (this) {
+			try {
+				wait();
+			} catch (InterruptedException e) {
+			}
+		}
+		
+		while(true) {
+			if(queue.size() >= 1) {
+				Object[] obj = (Object[])queue.get();
+				executionProcess = ((DataProcess) obj[0]);
+				if (executionProcess != null) {
+					executionProcess.showIncrementableWindow();
+					try {
+						executionProcess.execute();
+					} catch (ProcessInterruptedException e) {
+					} catch (ProcessException e) {
+						logger.debug(RasterLocator.getManager().getRasterUtils().getTrace(e));
+					}
+					executionProcess.getIncrementableTask().processFinalize();
+					
+					//Despierta el objeto que llam� cuando termina el calculo
+					//para que pueda recoger los resultados
+					synchronized (obj[1]) {
+						obj[1].notify();	
+					}
+					
+					//Cuando la cola est� vacia se suspende el hilo.
+					if(queue.size() <= 0) {
+						synchronized (this) {
+							try {
+								this.wait();
+							} catch (InterruptedException e) {
+							}
+						}
+					}
+						
+				}
+			}
+		}
+	}	
+	
+	/**
+	 * A�ade un proceso a la cola.
+	 * @param id Identificador del proceso
+	 * @param process Proceso
+	 * @throws InterruptedException 
+	 */
+	public synchronized void add(DataProcess process, IProcessActions obj) {
+		queue.put(new Object[]{process, obj});
+	}
+
+}
\ No newline at end of file

Property changes on: org.gvsig.raster.reproject/tags/org.gvsig.raster.reproject-2.2.77/org.gvsig.raster.reproject.app.reprojectclient/src/main/java/org/gvsig/raster/reproject/app/preparelayer/ReprojectionQueue.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.raster.reproject/tags/org.gvsig.raster.reproject-2.2.77/org.gvsig.raster.reproject.app.reprojectclient/src/main/resources-plugin/text_en.properties
===================================================================
--- org.gvsig.raster.reproject/tags/org.gvsig.raster.reproject-2.2.77/org.gvsig.raster.reproject.app.reprojectclient/src/main/resources-plugin/text_en.properties	(revision 0)
+++ org.gvsig.raster.reproject/tags/org.gvsig.raster.reproject-2.2.77/org.gvsig.raster.reproject.app.reprojectclient/src/main/resources-plugin/text_en.properties	(revision 9578)
@@ -0,0 +1,14 @@
+reproject_layer=Reproject
+reprojection=Reprojection
+wrong_size=Wrong size in output image
+wrong_projection=Wrong projection
+error_creating_algorithm=Error building the algorithm object
+directory_does_not_exists=The destination directory does not exists
+file_name_not_valid=File name not valid
+file_exists=The output file exists
+overwrite=Do you want overwrite it?
+valid_characters=Valid characters
+toc_reproject=Reproject layer
+dif_proj_with_projections=Projection of selected raster is diferent<br>that view projection.
+view_proj=View projection
+layer_proj=View projection

Property changes on: org.gvsig.raster.reproject/tags/org.gvsig.raster.reproject-2.2.77/org.gvsig.raster.reproject.app.reprojectclient/src/main/resources-plugin/text_en.properties
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.raster.reproject/tags/org.gvsig.raster.reproject-2.2.77/org.gvsig.raster.reproject.app.reprojectclient/src/main/resources-plugin/config.xml
===================================================================
--- org.gvsig.raster.reproject/tags/org.gvsig.raster.reproject-2.2.77/org.gvsig.raster.reproject.app.reprojectclient/src/main/resources-plugin/config.xml	(revision 0)
+++ org.gvsig.raster.reproject/tags/org.gvsig.raster.reproject-2.2.77/org.gvsig.raster.reproject.app.reprojectclient/src/main/resources-plugin/config.xml	(revision 9578)
@@ -0,0 +1,31 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<plugin-config>
+	<depends plugin-name="org.gvsig.raster.mainplugin" />
+	
+	<depends plugin-name="org.gvsig.geoprocess.app.mainplugin" optional="true" />
+	<depends plugin-name="org.gvsig.geoprocess.app.algorithm" optional="true" />
+	
+	<resourceBundle name="text"/>
+	<libraries library-dir="lib"/>
+	<extensions>
+		<extension class-name="org.gvsig.raster.reproject.app.ReprojectExtension"
+			description="Reproject plugin for raster" 
+			active="true" 
+			priority="1">
+			
+			<menu text="Layer/transformaciones_geograficas/reproject_layer"
+				name="raster-tools-reproject-layer"/>
+				
+			<action 
+        		name="raster-tools-reproject-layer"
+        		label="reproject_layer"
+        		tooltip="reproject_layer"
+        		action-command="Reproject" 
+        		icon="tools-raster-reproject"
+        		position="000601800"
+        		accelerator="Ctrl+Alt+R"
+        	/>
+				
+		</extension>	
+	</extensions>
+</plugin-config>

Property changes on: org.gvsig.raster.reproject/tags/org.gvsig.raster.reproject-2.2.77/org.gvsig.raster.reproject.app.reprojectclient/src/main/resources-plugin/config.xml
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.raster.reproject/tags/org.gvsig.raster.reproject-2.2.77/org.gvsig.raster.reproject.app.reprojectclient/src/main/resources-plugin/images/action/tools-raster-reproject.png
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream

Property changes on: org.gvsig.raster.reproject/tags/org.gvsig.raster.reproject-2.2.77/org.gvsig.raster.reproject.app.reprojectclient/src/main/resources-plugin/images/action/tools-raster-reproject.png
___________________________________________________________________
Added: svn:mime-type
   + application/octet-stream

Index: org.gvsig.raster.reproject/tags/org.gvsig.raster.reproject-2.2.77/org.gvsig.raster.reproject.app.reprojectclient/src/main/resources-plugin/text.properties
===================================================================
--- org.gvsig.raster.reproject/tags/org.gvsig.raster.reproject-2.2.77/org.gvsig.raster.reproject.app.reprojectclient/src/main/resources-plugin/text.properties	(revision 0)
+++ org.gvsig.raster.reproject/tags/org.gvsig.raster.reproject-2.2.77/org.gvsig.raster.reproject.app.reprojectclient/src/main/resources-plugin/text.properties	(revision 9578)
@@ -0,0 +1,14 @@
+reproject_layer=Reproyectar
+reprojection=Reproyecci�n
+wrong_size=Tama�o incorrecto en la imagen de salida
+wrong_projection=Proyecci�n incorrecta
+error_creating_algorithm=Error construyendo el objeto algoritmo
+directory_does_not_exists=El directorio de destino no existe
+file_name_not_valid=Nombre de fichero no v�lido
+file_exists=El fichero de salida existe
+overwrite=Quieres sobreescribirlo?
+valid_characters=Caracteres validos
+toc_reproject=Reproyectar capa
+dif_proj_with_projections=La proyecci\u00f3n del raster seleccionado no coincide con la de la vista.
+view_proj=Proyecci\u00f3n de la vista
+layer_proj=Proyecci\u00f3n de la capa

Property changes on: org.gvsig.raster.reproject/tags/org.gvsig.raster.reproject-2.2.77/org.gvsig.raster.reproject.app.reprojectclient/src/main/resources-plugin/text.properties
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.raster.reproject/tags/org.gvsig.raster.reproject-2.2.77/org.gvsig.raster.reproject.app.reprojectclient/pom.xml
===================================================================
--- org.gvsig.raster.reproject/tags/org.gvsig.raster.reproject-2.2.77/org.gvsig.raster.reproject.app.reprojectclient/pom.xml	(revision 0)
+++ org.gvsig.raster.reproject/tags/org.gvsig.raster.reproject-2.2.77/org.gvsig.raster.reproject.app.reprojectclient/pom.xml	(revision 9578)
@@ -0,0 +1,156 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+	<modelVersion>4.0.0</modelVersion>
+	<artifactId>org.gvsig.raster.reproject.app.reprojectclient</artifactId>
+	<packaging>jar</packaging>
+	<name>Reprojection support</name>
+	<description>Reprojection support</description>
+	
+    <parent>
+        <groupId>org.gvsig</groupId>
+        <artifactId>org.gvsig.raster.reproject</artifactId>
+        <version>2.2.77</version>
+    </parent>
+    
+    <dependencies>
+    	<dependency>
+            <groupId>org.gvsig</groupId>
+            <artifactId>org.gvsig.raster.app.common</artifactId>
+            <scope>compile</scope>
+        </dependency>
+	    <dependency>
+            <groupId>org.gvsig</groupId>
+            <artifactId>org.gvsig.raster.lib.api</artifactId>
+            <scope>compile</scope>
+        </dependency>
+		 <dependency>
+            <groupId>org.gvsig</groupId>
+            <artifactId>org.gvsig.ui</artifactId>
+            <scope>compile</scope>
+        </dependency>
+		<dependency>
+            <groupId>org.gvsig</groupId>
+            <artifactId>org.gvsig.raster.algorithm</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>org.gvsig</groupId>
+            <artifactId>org.gvsig.raster.reproject.algorithm</artifactId>
+        </dependency>
+        <dependency>
+			<groupId>org.gvsig</groupId>
+			<artifactId>org.gvsig.raster.fmap</artifactId>
+            <scope>compile</scope>
+		</dependency>
+		<dependency>
+			<groupId>org.gvsig</groupId>
+			<artifactId>org.gvsig.app.mainplugin</artifactId>
+            <scope>compile</scope>
+		</dependency>
+         <dependency>
+            <groupId>org.gvsig</groupId>
+            <artifactId>org.gvsig.fmap.control</artifactId>
+            <scope>compile</scope>
+        </dependency>
+         <dependency>
+            <groupId>org.gvsig</groupId>
+            <artifactId>org.gvsig.metadata.lib.basic.api</artifactId>
+            <scope>compile</scope>
+        </dependency>
+        <dependency>
+            <groupId>org.gvsig</groupId>
+            <artifactId>org.gvsig.andami</artifactId>
+            <scope>compile</scope>
+        </dependency>
+        <dependency>
+            <groupId>org.gvsig</groupId>
+            <artifactId>org.gvsig.i18n</artifactId>
+            <scope>compile</scope>
+        </dependency>
+        <dependency>
+            <groupId>org.gvsig</groupId>
+            <artifactId>org.gvsig.tools.lib</artifactId>
+            <scope>compile</scope>
+        </dependency>
+        
+        
+        <dependency>
+            <groupId>org.gvsig</groupId>
+            <artifactId>org.gvsig.fmap.dal.api</artifactId>
+            <scope>compile</scope>
+        </dependency>
+        <dependency>
+            <groupId>org.gvsig</groupId>
+            <artifactId>org.gvsig.fmap.dal.impl</artifactId>
+            <scope>compile</scope>
+        </dependency>
+        <dependency>
+            <groupId>org.gvsig</groupId>
+            <artifactId>org.gvsig.fmap.dal.spi</artifactId>
+            <scope>compile</scope>
+        </dependency>
+        <dependency>
+            <groupId>org.gvsig</groupId>
+            <artifactId>org.gvsig.fmap.mapcontext.api</artifactId>
+            <scope>compile</scope>
+        </dependency>
+        <dependency>
+            <groupId>org.gvsig</groupId>
+            <artifactId>org.gvsig.fmap.mapcontext.impl</artifactId>
+            <scope>runtime</scope>
+        </dependency>
+        <dependency>
+          <groupId>org.gvsig</groupId>
+          <artifactId>org.gvsig.proj.lib.api</artifactId>
+          <scope>runtime</scope>
+      	</dependency>
+      	<dependency>
+        	<groupId>org.gvsig</groupId>
+        	<artifactId>org.gvsig.proj.lib.proj4j</artifactId>
+        	<scope>runtime</scope>
+      	</dependency>
+      	<dependency>
+	        <groupId>org.osgeo</groupId>
+    	    <artifactId>proj4j</artifactId>
+        	<scope>runtime</scope>
+      	</dependency>
+        <dependency>
+            <groupId>org.gvsig</groupId>
+            <artifactId>org.gvsig.projection.api</artifactId>
+            <scope>compile</scope>
+        </dependency>
+        <dependency>
+            <groupId>org.gvsig</groupId>
+            <artifactId>org.gvsig.projection.cresques.ui</artifactId>
+            <scope>compile</scope>
+        </dependency>
+        <dependency>
+            <groupId>org.gvsig</groupId>
+            <artifactId>org.gvsig.projection.cresques.impl</artifactId>
+            <scope>runtime</scope>
+        </dependency>
+        <dependency>
+            <groupId>org.gvsig</groupId>
+            <artifactId>org.gvsig.app.mainplugin</artifactId>
+            <scope>compile</scope>
+        </dependency>
+		<dependency>
+			<groupId>org.gvsig</groupId>
+			<artifactId>org.gvsig.geoprocess.lib.sextante</artifactId>
+			<scope>compile</scope>
+		</dependency>
+		<dependency>
+			<groupId>org.gvsig</groupId>
+			<artifactId>org.gvsig.geoprocess.app.mainplugin</artifactId>
+			<scope>compile</scope>
+		</dependency>
+	</dependencies>
+	
+	<properties>
+    	<gvsig.package.info.state>final</gvsig.package.info.state>
+    	<gvsig.package.info.poolURL>https://devel.gvsig.org/download/projects/Raster/pool</gvsig.package.info.poolURL>
+        <gvsig.package.info.dependencies>required: org.gvsig.raster.tilecache.app -ge 2, required: org.gvsig.raster.mainplugin -ge 2</gvsig.package.info.dependencies>
+        <gvsig.package.info.categories>Raster</gvsig.package.info.categories>
+        <gvsig.package.info.official>true</gvsig.package.info.official>
+    </properties>
+</project>

Property changes on: org.gvsig.raster.reproject/tags/org.gvsig.raster.reproject-2.2.77/org.gvsig.raster.reproject.app.reprojectclient/pom.xml
___________________________________________________________________
Added: svn:mime-type
   + text/plain


Property changes on: org.gvsig.raster.reproject/tags/org.gvsig.raster.reproject-2.2.77/org.gvsig.raster.reproject.app.reprojectclient
___________________________________________________________________
Added: svn:ignore
   + target

.project

.classpath

.settings


Index: org.gvsig.raster.reproject/tags/org.gvsig.raster.reproject-2.2.77/pom.xml
===================================================================
--- org.gvsig.raster.reproject/tags/org.gvsig.raster.reproject-2.2.77/pom.xml	(revision 0)
+++ org.gvsig.raster.reproject/tags/org.gvsig.raster.reproject-2.2.77/pom.xml	(revision 9578)
@@ -0,0 +1,105 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+	<modelVersion>4.0.0</modelVersion>
+	<artifactId>org.gvsig.raster.reproject</artifactId>
+	<packaging>pom</packaging>
+	<version>2.2.77</version>
+	<name>Raster reprojection support for gvSIG</name>
+	<description>Raster reprojection support for gvSIG</description>
+	<inceptionYear>2013</inceptionYear>
+	<parent>
+      <groupId>org.gvsig</groupId>
+      <artifactId>org.gvsig.desktop</artifactId>
+      <version>2.0.242</version>
+  </parent>
+
+        <properties>
+            <!-- El plugin versions:use-latest-versions falla con scope import -->
+            <!-- asi que toca usar el versions:update-properties que si que funciona -->
+            <org.gvsig.raster.version>2.2.93</org.gvsig.raster.version>
+            <org.gvsig.geoprocess.version>2.2.104</org.gvsig.geoprocess.version>
+        </properties>
+
+    <repositories>
+      <repository>
+        <id>gvsig-public-http-repository</id>
+        <name>gvSIG maven public HTTP repository</name>
+        <url>http://devel.gvsig.org/m2repo/j2se</url>
+        <releases>
+          <enabled>true</enabled>
+          <updatePolicy>daily</updatePolicy>
+          <checksumPolicy>warn</checksumPolicy>
+        </releases>
+        <snapshots>
+          <enabled>true</enabled>
+          <updatePolicy>daily</updatePolicy>
+          <checksumPolicy>warn</checksumPolicy>
+        </snapshots>
+      </repository>
+    </repositories>
+
+    <scm>
+        <connection>scm:svn:https://devel.gvsig.org/svn/gvsig-raster/org.gvsig.raster.reproject/tags/org.gvsig.raster.reproject-2.2.77</connection>
+        <developerConnection>scm:svn:https://devel.gvsig.org/svn/gvsig-raster/org.gvsig.raster.reproject/tags/org.gvsig.raster.reproject-2.2.77</developerConnection>
+        <url>https://devel.gvsig.org/redmine/projects/gvsig-raster/repository/show/org.gvsig.raster.reproject/tags/org.gvsig.raster.reproject-2.2.77</url>
+    </scm>
+	<developers>
+		<developer>
+			<id>nbrodin</id>
+			<name>Nacho Brodin</name>
+			<email>nachobrodin@gmail.com</email>
+			<roles>
+				<role>Architect</role>
+				<role>Developer</role>
+			</roles>
+		</developer>
+	</developers>
+	
+	<dependencyManagement>
+  	<dependencies>
+                        <dependency>
+                                <groupId>org.gvsig</groupId>
+                                <artifactId>org.gvsig.raster</artifactId>
+                                <version>${org.gvsig.raster.version}</version>
+                                <type>pom</type>
+                                <scope>import</scope>
+                        </dependency>
+
+                        <dependency>
+                                <groupId>org.gvsig</groupId>
+                                <artifactId>org.gvsig.geoprocess</artifactId>
+                                <version>${org.gvsig.geoprocess.version}</version>
+                                <type>pom</type>
+                                <scope>import</scope>
+                        </dependency>
+
+
+
+	                <dependency>
+				<groupId>org.gvsig</groupId>
+				<artifactId>org.gvsig.raster.reproject.algorithm</artifactId>
+				<version>2.2.77</version>
+			</dependency>
+
+    	</dependencies>
+    </dependencyManagement>
+
+	<build>
+        <plugins>
+            <plugin>
+                <groupId>org.apache.maven.plugins</groupId>
+                <artifactId>maven-release-plugin</artifactId>
+                <configuration>
+                    <tagBase>https://devel.gvsig.org/svn/gvsig-raster/org.gvsig.raster.reproject/tags/</tagBase>
+                    <goals>deploy</goals>
+                </configuration>
+            </plugin>
+        </plugins>
+    </build>
+    
+	<modules>
+		<module>org.gvsig.raster.reproject.algorithm</module>
+		<module>org.gvsig.raster.reproject.app.reprojectclient</module>
+	</modules>
+	
+</project>

Property changes on: org.gvsig.raster.reproject/tags/org.gvsig.raster.reproject-2.2.77/pom.xml
___________________________________________________________________
Added: svn:mime-type
   + text/plain


Property changes on: org.gvsig.raster.reproject/tags/org.gvsig.raster.reproject-2.2.77
___________________________________________________________________
Added: svn:mergeinfo
   Merged /org.gvsig.raster.reproject/branches/org.gvsig.raster.reproject_proyeccion_al_vuelo:r5467-5468
Added: svn:ignore
   + .project
.settings
.classpath
.mvn.swp
.pom.xml.swp


