Index: tags/Root_F2/binaries/linux/crs/libcrsjniproj.so
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream

Property changes on: tags/Root_F2/binaries/linux/crs/libcrsjniproj.so
___________________________________________________________________
Added: svn:executable
   + *
Added: svn:mime-type
   + application/octet-stream

Index: tags/Root_F2/binaries/linux/crs/install.sh
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream

Property changes on: tags/Root_F2/binaries/linux/crs/install.sh
___________________________________________________________________
Added: svn:mime-type
   + application/octet-stream
Added: svn:executable
   + *

Index: tags/Root_F2/binaries/linux/crs/libproj.so.0.5.0
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream

Property changes on: tags/Root_F2/binaries/linux/crs/libproj.so.0.5.0
___________________________________________________________________
Added: svn:mime-type
   + application/octet-stream
Added: svn:executable
   + *

Index: tags/Root_F2/binaries/w32/crs/CrsJniProj.dll
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream

Property changes on: tags/Root_F2/binaries/w32/crs/CrsJniProj.dll
___________________________________________________________________
Added: svn:executable
   + *
Added: svn:mime-type
   + application/octet-stream

Index: tags/Root_F2/binaries/w32/crs/proj.dll
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream

Property changes on: tags/Root_F2/binaries/w32/crs/proj.dll
___________________________________________________________________
Added: svn:executable
   + *
Added: svn:mime-type
   + application/octet-stream

Index: tags/Root_F2/libraries/libJCRS/.cvsignore
===================================================================
--- tags/Root_F2/libraries/libJCRS/.cvsignore	(revision 0)
+++ tags/Root_F2/libraries/libJCRS/.cvsignore	(revision 10155)
@@ -0,0 +1 @@
+bin

Property changes on: tags/Root_F2/libraries/libJCRS/.cvsignore
___________________________________________________________________
Added: svn:keywords
   + Author Date Id Revision
Added: svn:eol-style
   + native

Index: tags/Root_F2/libraries/libJCRS/.settings/org.eclipse.core.resources.prefs
===================================================================
--- tags/Root_F2/libraries/libJCRS/.settings/org.eclipse.core.resources.prefs	(revision 0)
+++ tags/Root_F2/libraries/libJCRS/.settings/org.eclipse.core.resources.prefs	(revision 10155)
@@ -0,0 +1,3 @@
+#Tue Jul 25 14:11:17 CEST 2006
+eclipse.preferences.version=1
+encoding/<project>=ISO-8859-1

Property changes on: tags/Root_F2/libraries/libJCRS/.settings/org.eclipse.core.resources.prefs
___________________________________________________________________
Added: svn:keywords
   + Author Date Id Revision
Added: svn:eol-style
   + native

Index: tags/Root_F2/libraries/libJCRS/build.xml
===================================================================
--- tags/Root_F2/libraries/libJCRS/build.xml	(revision 0)
+++ tags/Root_F2/libraries/libJCRS/build.xml	(revision 10155)
@@ -0,0 +1,48 @@
+<project name="Generar extension en Andami" default="generate-without-source" basedir=".">
+    <description>
+        Instala el plugin de JCrs en Andami.
+    </description>
+  <!-- set global properties for this build -->
+  <property name="src" location="src"/>
+  <property name="build" location="bin"/>
+  <property name="dist"  location="dist"/>
+  <property name="plugin" value="jcrs"/>
+  <property name="extension-dir" location="../_fwAndami/gvSIG/extensiones"/>
+  <property name="targetDir" location="../libFMap/lib" />
+
+  <target name="init">
+    <!-- Create the time stamp -->
+    <tstamp/>
+    <!-- Create the build directory structure used by compile -->
+    <mkdir dir="${build}"/>
+    <mkdir dir="${dist}"/>
+  	<!-- Creamos un fichero con el timeStamp para que lo lea el FPanelAbout -->
+  	<buildnumber/> 
+  	
+  </target>
+
+  <target name="compile"
+          description="compile the source" >
+      <!-- Compile the Java code from ${src} to ${bin} -->
+      <javac      srcdir="${src}"
+                  destdir="${build}"
+	   			  classpath="${extension-dir}/com.iver.cit.gvsig/lib/fmap.jar:${extension-dir}/com.iver.cit.gvsig/lib/com.iver.cit.gvsig.jar:../FMap/lib/cms.jar:../Andami/lib/iver-utiles.jar:../FMap/lib/gdbms-0.8-SNAPSHOT.jar:../Andami/andami.jar"/>
+    </target>
+						
+  <target name="generate-without-source" description="generate the distribution without the source file" >
+    <!-- Create the distribution directory -->
+    <mkdir dir="${dist}"/>
+
+    <!-- Put everything in ${build} into the MyProject-${DSTAMP}.jar file -->
+    <jar jarfile="${dist}/${plugin}.jar" basedir="${build}"/>
+  	
+  	<!-- copy file="${dist}/${plugin}.jar" todir="lib/"/> -->
+  	<copy file="${dist}/${plugin}.jar" todir="${targetDir}"/>
+  	<copy todir="${targetDir}">
+  				<fileset dir="./lib" includes="*.jar" />
+	</copy>
+  	<!-- <copy file="${dist}/${plugin}.jar" todir="../extJCRS/lib/"/> -->
+  </target>
+</project>
+
+

Property changes on: tags/Root_F2/libraries/libJCRS/build.xml
___________________________________________________________________
Added: svn:keywords
   + Author Date Id Revision
Added: svn:eol-style
   + native

Index: tags/Root_F2/libraries/libJCRS/.cdtproject
===================================================================
--- tags/Root_F2/libraries/libJCRS/.cdtproject	(revision 0)
+++ tags/Root_F2/libraries/libJCRS/.cdtproject	(revision 10155)
@@ -0,0 +1,4 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<?eclipse-cdt version="2.0"?>
+
+<cdtproject/>

Property changes on: tags/Root_F2/libraries/libJCRS/.cdtproject
___________________________________________________________________
Added: svn:eol-style
   + native
Added: svn:keywords
   + Author Date Id Revision

Index: tags/Root_F2/libraries/libJCRS/jgdal031.dll
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream

Property changes on: tags/Root_F2/libraries/libJCRS/jgdal031.dll
___________________________________________________________________
Added: svn:mime-type
   + application/octet-stream

Index: tags/Root_F2/libraries/libJCRS/.classpath
===================================================================
--- tags/Root_F2/libraries/libJCRS/.classpath	(revision 0)
+++ tags/Root_F2/libraries/libJCRS/.classpath	(revision 10155)
@@ -0,0 +1,16 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<classpath>
+	<classpathentry kind="src" path="src"/>
+	<classpathentry kind="src" path="src-test"/>
+	<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
+	<classpathentry combineaccessrules="false" kind="src" path="/libCq CMS for java"/>
+	<classpathentry combineaccessrules="false" kind="src" path="/_fwAndami"/>
+	<classpathentry combineaccessrules="false" kind="src" path="/appgvSIG"/>
+	<classpathentry kind="lib" path="lib/jGridShiftApi.jar"/>
+	<classpathentry combineaccessrules="false" kind="src" path="/libFMap"/>
+	<classpathentry kind="lib" path="/libCq CMS for java/lib/jogr.jar"/>
+	<classpathentry kind="lib" path="/_fwAndami/lib/iver-utiles.jar" sourcepath="/Utiles/src"/>
+	<classpathentry kind="lib" path="/_fwAndami/lib/beans.jar" sourcepath="/libUI/src"/>
+	<classpathentry kind="lib" path="/_fwAndami/lib/gvsig-i18n.jar" sourcepath="/libInternationalization/src"/>
+	<classpathentry kind="output" path="bin"/>
+</classpath>

Property changes on: tags/Root_F2/libraries/libJCRS/.classpath
___________________________________________________________________
Added: svn:keywords
   + Author Date Id Revision
Added: svn:eol-style
   + native

Index: tags/Root_F2/libraries/libJCRS/dist/jcrs.jar
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream

Property changes on: tags/Root_F2/libraries/libJCRS/dist/jcrs.jar
___________________________________________________________________
Added: svn:mime-type
   + application/octet-stream

Index: tags/Root_F2/libraries/libJCRS/.project
===================================================================
--- tags/Root_F2/libraries/libJCRS/.project	(revision 0)
+++ tags/Root_F2/libraries/libJCRS/.project	(revision 10155)
@@ -0,0 +1,27 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+	<name>crsgdal</name>
+	<comment></comment>
+	<projects>
+	</projects>
+	<buildSpec>
+		<buildCommand>
+			<name>org.eclipse.jdt.core.javabuilder</name>
+			<arguments>
+			</arguments>
+		</buildCommand>
+		<buildCommand>
+			<name>org.eclipse.ui.externaltools.ExternalToolBuilder</name>
+			<triggers>full,incremental,</triggers>
+			<arguments>
+				<dictionary>
+					<key>LaunchConfigHandle</key>
+					<value>&lt;project&gt;/.externalToolBuilders/crsgdal build.xml [Builder].launch</value>
+				</dictionary>
+			</arguments>
+		</buildCommand>
+	</buildSpec>
+	<natures>
+		<nature>org.eclipse.jdt.core.javanature</nature>
+	</natures>
+</projectDescription>

Property changes on: tags/Root_F2/libraries/libJCRS/.project
___________________________________________________________________
Added: svn:eol-style
   + native
Added: svn:keywords
   + Author Date Id Revision

Index: tags/Root_F2/libraries/libJCRS/src-test/org/gvsig/crs/repository/RepositoryTest.java
===================================================================
--- tags/Root_F2/libraries/libJCRS/src-test/org/gvsig/crs/repository/RepositoryTest.java	(revision 0)
+++ tags/Root_F2/libraries/libJCRS/src-test/org/gvsig/crs/repository/RepositoryTest.java	(revision 10155)
@@ -0,0 +1,13 @@
+package org.gvsig.crs.repository;
+
+import org.gvsig.crs.Crs;
+
+
+public class RepositoryTest {
+	public static void main(String[] args){
+		EpsgRepository epsgRep= new EpsgRepository();
+		Crs crs = (Crs)epsgRep.getCrs("23030");
+		String abrev = crs.getAbrev();
+		System.out.println(abrev);
+	}
+}

Property changes on: tags/Root_F2/libraries/libJCRS/src-test/org/gvsig/crs/repository/RepositoryTest.java
___________________________________________________________________
Added: svn:keywords
   + Author Date Id Revision
Added: svn:eol-style
   + native

Index: tags/Root_F2/libraries/libJCRS/src-test/org/gvsig/crs/gui/TransformationNadgridsPanelTest.java
===================================================================
--- tags/Root_F2/libraries/libJCRS/src-test/org/gvsig/crs/gui/TransformationNadgridsPanelTest.java	(revision 0)
+++ tags/Root_F2/libraries/libJCRS/src-test/org/gvsig/crs/gui/TransformationNadgridsPanelTest.java	(revision 10155)
@@ -0,0 +1,17 @@
+package org.gvsig.crs.gui;
+
+import javax.swing.JFrame;
+
+import org.gvsig.crs.gui.panels.TransformationNadgridsPanel;
+
+public class TransformationNadgridsPanelTest {
+	
+	public static void main(String[] args){
+		TransformationNadgridsPanel trPanel = new TransformationNadgridsPanel();
+		JFrame jFrame = new JFrame();
+		jFrame.getContentPane().add(trPanel);	
+		jFrame.setSize(500, 700);
+		jFrame.setVisible(true);	
+	}
+
+}

Property changes on: tags/Root_F2/libraries/libJCRS/src-test/org/gvsig/crs/gui/TransformationNadgridsPanelTest.java
___________________________________________________________________
Added: svn:eol-style
   + native
Added: svn:keywords
   + Author Date Id Revision

Index: tags/Root_F2/libraries/libJCRS/src-test/org/gvsig/crs/jscrollpanel/ScrollPanelTest.java
===================================================================
--- tags/Root_F2/libraries/libJCRS/src-test/org/gvsig/crs/jscrollpanel/ScrollPanelTest.java	(revision 0)
+++ tags/Root_F2/libraries/libJCRS/src-test/org/gvsig/crs/jscrollpanel/ScrollPanelTest.java	(revision 10155)
@@ -0,0 +1,76 @@
+package org.gvsig.crs.jscrollpanel;
+
+import java.awt.Dimension;
+import java.awt.Frame;
+
+import javax.swing.BorderFactory;
+import javax.swing.JFrame;
+import javax.swing.JScrollPane;
+import javax.swing.JTable;
+import javax.swing.ListSelectionModel;
+import javax.swing.table.DefaultTableModel;
+import javax.swing.table.TableColumn;
+
+import com.iver.andami.PluginServices;
+import com.iver.cit.gvsig.gui.TableSorter;
+
+public class ScrollPanelTest {
+	
+	JTable jTable = null;
+	JScrollPane jScrollPane = null;
+
+	public ScrollPanelTest() {
+		super();
+		JFrame jFrame = new JFrame();
+		jFrame.getContentPane().add(getJScrollPane());	
+		jFrame.setSize(500, 150);
+		jFrame.setVisible(true);
+		// TODO Auto-generated constructor stub
+	}
+	
+	public JTable getJTable() {
+		if (jTable == null) {
+			String[] columnNames= {"UNA COLUMNA", "DOS COLUMNAS"};
+			Object[][]data = {};			
+			DefaultTableModel dtm = new DefaultTableModel(data, columnNames);
+			jTable = new JTable(dtm);
+			jTable.setAutoResizeMode(JTable.AUTO_RESIZE_OFF);
+			TableColumn column = null;
+			   for (int i = 0; i < 2; i++) {
+			       column = jTable.getColumnModel().getColumn(i);
+			       if (i == 0) {
+			           column.setPreferredWidth(600);
+			       }
+			   }
+			//jTable.setPreferredSize(new Dimension(800, 100));			
+						
+		}
+		
+		return jTable;
+		
+	}
+	
+	
+	private JScrollPane getJScrollPane() {
+		if (jScrollPane == null) {
+			jScrollPane = new JScrollPane(getJTable(),JScrollPane.VERTICAL_SCROLLBAR_AS_NEEDED, JScrollPane.HORIZONTAL_SCROLLBAR_ALWAYS);
+			jScrollPane.setPreferredSize(new Dimension(500,150));
+			jScrollPane.setBorder(
+				    BorderFactory.createCompoundBorder(
+					BorderFactory.createCompoundBorder(
+							BorderFactory.createTitledBorder("TABLA GEN�RICA DE 2 CAMPOS"),
+							BorderFactory.createEmptyBorder(5,5,5,5)),
+							jScrollPane.getBorder()));
+			jScrollPane.setViewportView(getJTable());
+		}
+		return jScrollPane;
+	}
+
+	
+	public static void main(String[] args){
+		ScrollPanelTest al = new ScrollPanelTest();
+	}
+		
+		
+
+}

Property changes on: tags/Root_F2/libraries/libJCRS/src-test/org/gvsig/crs/jscrollpanel/ScrollPanelTest.java
___________________________________________________________________
Added: svn:eol-style
   + native
Added: svn:keywords
   + Author Date Id Revision

Index: tags/Root_F2/libraries/libJCRS/src-test/org/gvsig/crs/jgridshift/JGridShiftTest.java
===================================================================
--- tags/Root_F2/libraries/libJCRS/src-test/org/gvsig/crs/jgridshift/JGridShiftTest.java	(revision 0)
+++ tags/Root_F2/libraries/libJCRS/src-test/org/gvsig/crs/jgridshift/JGridShiftTest.java	(revision 10155)
@@ -0,0 +1,40 @@
+package org.gvsig.crs.jgridshift;
+
+import java.io.FileNotFoundException;
+import java.io.IOException;
+import java.io.RandomAccessFile;
+
+import au.com.objectix.jgridshift.GridShift;
+import au.com.objectix.jgridshift.GridShiftFile;
+import au.com.objectix.jgridshift.SubGrid;
+
+public class JGridShiftTest {
+	
+	public static void main(String[] args){
+		//InputStream fis = null;
+		RandomAccessFile raf = null;
+		try {
+			raf = new RandomAccessFile("/home/dguerrero/Desarrollo-gvSIG/crs/workspace/extJCRS/data/sped2et.gsb","r");
+			//fis = new FileInputStream("/home/dguerrero/Desarrollo-gvSIG/crs/workspace/extJCRS/data/sped2et.gsb");
+		} catch (FileNotFoundException e) {
+			// TODO Auto-generated catch block
+			e.printStackTrace();
+		}
+		GridShiftFile gsf = new GridShiftFile();
+		try {
+			gsf.loadGridShiftFile(raf);
+		} catch (IOException e) {
+			// TODO Auto-generated catch block
+			e.printStackTrace();
+		}
+		
+		SubGrid subGrid[] = gsf.getSubGridTree(); 
+		System.out.println(subGrid.length);
+		System.out.println(subGrid[0].getMaxLat());
+		System.out.println(subGrid[0].getMinLat());
+		System.out.println(subGrid[0].getMaxLon());
+		System.out.println(subGrid[0].getMinLon());
+		GridShift gridShift = new GridShift();
+	}
+
+}

Property changes on: tags/Root_F2/libraries/libJCRS/src-test/org/gvsig/crs/jgridshift/JGridShiftTest.java
___________________________________________________________________
Added: svn:eol-style
   + native
Added: svn:keywords
   + Author Date Id Revision

Index: tags/Root_F2/libraries/libJCRS/lib/jGridShiftApi.jar
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream

Property changes on: tags/Root_F2/libraries/libJCRS/lib/jGridShiftApi.jar
___________________________________________________________________
Added: svn:mime-type
   + application/octet-stream

Index: tags/Root_F2/libraries/libJCRS/manifest
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream

Property changes on: tags/Root_F2/libraries/libJCRS/manifest
___________________________________________________________________
Added: svn:mime-type
   + application/octet-stream

Index: tags/Root_F2/libraries/libJCRS/src/org/gvsig/crs/Crs.java
===================================================================
--- tags/Root_F2/libraries/libJCRS/src/org/gvsig/crs/Crs.java	(revision 0)
+++ tags/Root_F2/libraries/libJCRS/src/org/gvsig/crs/Crs.java	(revision 10155)
@@ -0,0 +1,695 @@
+/* gvSIG. Sistema de Informaci�n Geogr�fica de la Generalitat Valenciana
+ *
+ * Copyright (C) 2006 Instituto de Desarrollo Regional and Generalitat Valenciana.
+ *
+ * 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., 59 Temple Place - Suite 330, Boston, MA  02111-1307,USA.
+ *
+ * For more information, contact:
+ *
+ *  Generalitat Valenciana
+ *   Conselleria d'Infraestructures i Transport
+ *   Av. Blasco Ib��ez, 50
+ *   46010 VALENCIA
+ *   SPAIN
+ *
+ *      +34 963862235
+ *   gvsig@gva.es
+ *      www.gvsig.gva.es
+ *
+ *    or
+ *
+ *   Instituto de Desarrollo Regional (Universidad de Castilla La-Mancha)
+ *   Campus Universitario s/n
+ *   02071 Alabacete
+ *   Spain
+ *
+ *   +34 967 599 200
+ */
+
+package org.gvsig.crs;
+
+import java.awt.Color;
+import java.awt.Graphics2D;
+import java.awt.geom.Point2D;
+import java.awt.geom.Rectangle2D;
+
+import org.cresques.cts.ICoordTrans;
+import org.cresques.cts.IDatum;
+import org.cresques.cts.IProjection;
+import org.cresques.geo.ViewPortData;
+import org.gvsig.crs.ogr.CrsOgr;
+import org.gvsig.crs.ogr.CrsOgrException;
+import org.gvsig.crs.ogr.OGRException;
+import org.gvsig.crs.ogr.OGRSpatialReference;
+import org.gvsig.crs.ogr.crsgdalException;
+import org.gvsig.crs.proj.CrsProj;
+import org.gvsig.crs.proj.CrsProjException;
+import org.gvsig.crs.proj.JNIBaseCrs;
+import org.gvsig.crs.proj.OperationCrsException;
+
+/**
+ * Clase que construye el CRS a partir de la cadena WKT
+ * @author Jos� Luis G�mez Mart�nez (jolugomar@gmail.com)
+ * @author Diego Guerrero Sevilla (diego.guerrero@uclm.es)
+ * @author Miguel Garc�a Jim�nez (garciajimenez.miguel@gmail.com)
+ *
+ */
+public class Crs implements ICrs {
+	private static final Color basicGridColor = new Color(64, 64, 64, 128);
+	private String proj4;
+	private String trans;
+	//private String transOrigin = "";
+	private String abrev;
+	private String name = "";
+	private CrsProj crsProj4;
+	private CrsProj crsBase = null;
+	private CrsWkt crsWkt;
+	private int epsg_code = 23030;
+	boolean targetNad = false;
+	String nad = "";
+	String wkt = null;
+	Color gridColor = basicGridColor;
+	CRSDatum datum = null;
+
+	/**
+	 * Construye un CRS a partir del c�digo EPSG o de la cadena WKT.
+	 * 
+	 * @param code
+	 * @throws CrsException
+	 */
+	public Crs(String code) throws CrsException {
+		String fullCode;
+		setWKT(code);
+		if(code.charAt(0) == 'E' || code.charAt(0) == 'G' || code.charAt(0) == 'P')
+			fullCode = code;
+		else fullCode = "EPSG:"+code;
+		String cod = "";
+		if(code.length() < 15 ) {
+			code = code.substring(code.indexOf(":")+1);
+			try {
+				//Creamos el objeto que tendra los diferentes parametros de la cadena Wkt
+				crsWkt = new CrsWkt(fullCode);
+				OGRSpatialReference oSRSSource = new OGRSpatialReference();
+				CrsOgr.importFromEPSG(oSRSSource, 
+						Integer.parseInt(code));
+				//Guardamos la cadena Proj4 devuelva por la OGRSpatialReference
+				proj4 = CrsOgr.exportToProj4(oSRSSource);
+				crsProj4 = new CrsProj(proj4);
+				setName(fullCode);
+				setAbrev(fullCode);
+				
+			} catch (OGRException e) {
+				throw new CrsException(e);
+			} catch (crsgdalException e) {
+				throw new CrsException(e);
+			} catch (CrsOgrException e) {
+				throw new CrsException(e);
+			}
+		}else {
+			String aux;
+			String code2 = "";
+			for(int i = 0; i < code.length(); i++) {
+				aux = ""+code.charAt(i);
+				if(!aux.equals(" ")) {
+					code2+=aux;
+				}else {
+					code2 += "";
+				}
+			}
+			crsWkt = new CrsWkt(code2);
+	    	try {
+	    		OGRSpatialReference oSRSSource = new OGRSpatialReference();
+	    		CrsOgr.importFromWkt(oSRSSource,code2);
+	    		proj4 =CrsOgr.exportToProj4(oSRSSource);
+				crsProj4 = new CrsProj(proj4);
+	    		setName(fullCode);
+	    		//setAbrev(crsWkt.getName());
+	    		setAbrev(crsWkt.getAuthority()[0]+":"+crsWkt.getAuthority()[1]);
+	    	} catch (OGRException e) {
+				throw new CrsException(e);
+			} catch (crsgdalException e) {
+				throw new CrsException(e);
+			} catch (CrsOgrException e) {
+				throw new CrsException(e);
+			}
+		}
+		//	Asignar el datum y el crs base (en el caso de ser projectado):
+		if (!(crsWkt.getSpheroid()[1].equals("")||crsWkt.getSpheroid()[2].equals(""))){
+			double eSemiMajorAxis = Double.valueOf(crsWkt.getSpheroid()[1]).doubleValue();
+			double eIFlattening = Double.valueOf(crsWkt.getSpheroid()[2]).doubleValue();
+			datum = new CRSDatum(eSemiMajorAxis,eIFlattening);
+			
+			//crs base (en el caso de ser projectado):
+			if(this.isProjected()){
+				String proj4Base = "+proj=latlong +a=" + crsWkt.getSpheroid()[1] + " +rf=" + crsWkt.getSpheroid()[2] ;
+				crsBase = new CrsProj(proj4Base);
+			}
+		}
+	}	
+	
+	/**
+	 *Construye un CRS a partir del c�digo EPSG o de la cadena WKT.
+	 * 
+	 * @param epsg_cod
+	 * @param code
+	 * @throws CrsException
+	 */
+	public Crs(int epsg_cod, String code) throws CrsException {
+		String fullCode;
+		setWKT(code);
+		setCode(epsg_cod);
+		if(code != null || code.charAt(0) == 'E' || code.charAt(0) == 'G' || code.charAt(0) == 'P')
+			fullCode = code;
+		else fullCode = "EPSG:"+code;
+		String cod = "";
+		if(code.length() < 15 ) {
+			code = code.substring(code.indexOf(":")+1);
+			try {
+				//Creamos el objeto que tendra los diferentes parametros de la cadena Wkt
+				crsWkt = new CrsWkt(fullCode);
+				OGRSpatialReference oSRSSource = new OGRSpatialReference();
+				CrsOgr.importFromEPSG(oSRSSource, 
+						Integer.parseInt(code));
+				//Guardamos la cadena Proj4 devuelva por la OGRSpatialReference
+				proj4 = CrsOgr.exportToProj4(oSRSSource);
+				crsProj4 = new CrsProj(proj4);
+				setName(fullCode);
+				setAbrev(fullCode);
+				
+			} catch (OGRException e) {
+				throw new CrsException(e);
+			} catch (crsgdalException e) {
+				throw new CrsException(e);
+			} catch (CrsOgrException e) {
+				throw new CrsException(e);
+			}
+		}else {
+			String aux;
+			String code2 = "";
+			for(int i = 0; i < code.length(); i++) {
+				aux = ""+code.charAt(i);
+				if(!aux.equals(" ")) {
+					code2+=aux;
+				}else {
+					code2 += "";
+				}
+			}
+			crsWkt = new CrsWkt(code2);
+			/*
+			 * Arreglo temporal para ver si funcionan de la iau2000 las proyecciones
+			 * cilindrica equidistante y oblicua cilindrica equidistante
+			 * que no estan en gdal, por lo que asignaremos directamente su cadena
+			 * en proj4 para trabajar con ellas
+			 */
+			if (!crsWkt.getProjection().equals("Equidistant_Cylindrical") && !crsWkt.getProjection().equals("Oblique_Cylindrical_Equal_Area")){
+		    	try {
+		    		OGRSpatialReference oSRSSource = new OGRSpatialReference();
+		    		CrsOgr.importFromWkt(oSRSSource,code2);
+		    		proj4 = CrsOgr.exportToProj4(oSRSSource);
+					crsProj4 = new CrsProj(proj4);
+		    		setName(fullCode);
+		    		//setAbrev(crsWkt.getName());
+		    		setAbrev(crsWkt.getAuthority()[0]+":"+crsWkt.getAuthority()[1]);
+		    	} catch (OGRException e) {
+					throw new CrsException(e);
+				} catch (crsgdalException e) {
+					throw new CrsException(e);
+				} catch (CrsOgrException e) {
+					throw new CrsException(e);
+				}
+			}
+			else if (crsWkt.getProjection().equals("Equidistant_Cylindrical")){
+				String spheroid1 = crsWkt.getSpheroid()[1];
+				String spheroid2 = crsWkt.getSpheroid()[2];
+				String centralMeridian = "";
+				String falseNorthing = "";
+				String falseEasting = "";
+				String standardParallel1 = "0.0";
+				for (int i=0; i<crsWkt.getParam_name().length;i++){
+					if (crsWkt.getParam_name()[i].equals("Central_Meridian"))
+						centralMeridian = crsWkt.getParam_value()[i];	
+					if (crsWkt.getParam_name()[i].equals("False_Easting"))
+						falseEasting = crsWkt.getParam_value()[i];					
+					if(crsWkt.getParam_name()[i].equals("False_Northing"))
+						falseNorthing = crsWkt.getParam_value()[i];					
+					if (crsWkt.getParam_name()[i].equals("Standard_Parallel_1"))
+						standardParallel1 = crsWkt.getParam_value()[i];					
+				}
+				if (spheroid2.equals("0.0")){
+					proj4 = "+proj=eqc +a=" + spheroid1 +
+					" +lon_0="+ centralMeridian + " +x_0="+falseEasting+" +y_0="+falseNorthing +
+					" +lat_ts="+standardParallel1;
+				} else {
+					proj4 = "+proj=eqc +a="+ spheroid1 +" +rf=" + spheroid2 +
+					" +lon_0="+ centralMeridian + " +x_0="+falseEasting+" +y_0="+falseNorthing +
+					" +lat_ts="+standardParallel1;
+				}
+				
+				crsProj4 = new CrsProj(proj4);
+	    		setName(fullCode);
+	    		//setAbrev(crsWkt.getName());
+	    		setAbrev(crsWkt.getAuthority()[0]+":"+crsWkt.getAuthority()[1]);
+				
+			}
+			else if (crsWkt.getProjection().equals("Oblique_Cylindrical_Equal_Area")){
+				String spheroid1 = crsWkt.getSpheroid()[1];
+				String spheroid2 = crsWkt.getSpheroid()[2];
+				String centralMeridian = "";
+				String falseNorthing = "";
+				String falseEasting = "";
+				String standardParallel1 = "";
+				String standardParallel2 = "0.0";
+				for (int i=0; i<crsWkt.getParam_name().length;i++){					
+					if (crsWkt.getParam_name()[i].equals("Central_Meridian"))
+						centralMeridian = crsWkt.getParam_value()[i];	
+					if (crsWkt.getParam_name()[i].equals("False_Easting"))
+						falseEasting = crsWkt.getParam_value()[i];					
+					if(crsWkt.getParam_name()[i].equals("False_Northing"))
+						falseNorthing = crsWkt.getParam_value()[i];					
+					if (crsWkt.getParam_name()[i].equals("Standard_Parallel_1"))
+						standardParallel1 = crsWkt.getParam_value()[i];
+					if (crsWkt.getParam_name()[i].equals("Standard_Parallel_2"))
+						standardParallel2 = crsWkt.getParam_value()[i];		
+				}
+				if (spheroid2.equals("0.0")){
+					proj4 = "+proj=ocea +a="+ spheroid1  +
+					" +lon_0="+ centralMeridian + " +x_0="+falseEasting+" +y_0="+falseNorthing +
+					" +lat_1="+standardParallel1+" +lat_2="+standardParallel2+" +lon_1=long_1" +
+					" +lon_2=long_2 +no_defs";
+				} else {
+					proj4 = "+proj=ocea +a="+ spheroid1 + " +rf=" + spheroid2 +
+					" +lon_0="+ centralMeridian + " +x_0="+falseEasting+" +y_0="+falseNorthing +
+					" +lat_1="+standardParallel1+" +lat_2="+standardParallel2+" +lon_1=long_1" +
+					" +lon_2=long_2 +no_defs";
+				}
+				
+				crsProj4 = new CrsProj(proj4);
+	    		setName(fullCode);
+	    		//setAbrev(crsWkt.getName());
+	    		setAbrev(crsWkt.getAuthority()[0]+":"+crsWkt.getAuthority()[1]);
+			}
+		}
+		//	Asignar el datum:
+		if (!(crsWkt.getSpheroid()[1].equals("")||crsWkt.getSpheroid()[2].equals(""))){
+			double eSemiMajorAxis = Double.valueOf(crsWkt.getSpheroid()[1]).doubleValue();
+			double eIFlattening = Double.valueOf(crsWkt.getSpheroid()[2]).doubleValue();
+			datum = new CRSDatum(eSemiMajorAxis,eIFlattening);
+			
+			// Crs base (en el caso de ser projectado):
+			if(this.isProjected()){
+				String proj4Base = "+proj=latlong +a=" + crsWkt.getSpheroid()[1] + " +rf=" + crsWkt.getSpheroid()[2] ;
+				crsBase = new CrsProj(proj4Base);
+			}
+		}
+	}
+	
+	/**
+	 * Construye un CRS a partir del c�digo EPSG o de la cadena WKT.
+	 * En el caso de WKT le a�ade a la cadena proj4 el string params.
+	 * 
+	 * @param epsg_cod
+	 * @param code
+	 * @param params
+	 * @throws CrsException
+	 */
+	public Crs(int epsg_cod, String code,String params) throws CrsException {
+		String fullCode;
+		setCode(epsg_cod);
+		setWKT(code);
+		if(code.charAt(0) == 'E' || code.charAt(0) == 'G' || code.charAt(0) == 'P')
+			fullCode = code;
+		else fullCode = "EPSG:"+code;
+		String cod = "";
+		if(code.length() < 15 ) {
+			code = code.substring(code.indexOf(":")+1);
+			try {
+				//Creamos el objeto que tendra los diferentes parametros de la cadena Wkt
+				crsWkt = new CrsWkt(fullCode);
+				OGRSpatialReference oSRSSource = new OGRSpatialReference();
+				CrsOgr.importFromEPSG(oSRSSource, 
+						Integer.parseInt(code));
+				//Guardamos la cadena Proj4 devuelva por la OGRSpatialReference
+				proj4 = CrsOgr.exportToProj4(oSRSSource);
+				crsProj4 = new CrsProj(proj4);
+				setName(fullCode);
+				setAbrev(fullCode);
+				
+			} catch (OGRException e) {
+				throw new CrsException(e);
+			} catch (crsgdalException e) {
+				throw new CrsException(e);
+			} catch (CrsOgrException e) {
+				throw new CrsException(e);
+			}
+		}else {
+			String aux;
+			String code2 = "";
+			for(int i = 0; i < code.length(); i++) {
+				aux = ""+code.charAt(i);
+				if(!aux.equals(" ")) {
+					code2+=aux;
+				}else {
+					code2 += "";
+				}
+			}
+			crsWkt = new CrsWkt(code2);
+	    	try {
+	    		OGRSpatialReference oSRSSource = new OGRSpatialReference();
+	    		CrsOgr.importFromWkt(oSRSSource,code2);
+	    		proj4 =CrsOgr.exportToProj4(oSRSSource)+params+" ";
+				crsProj4 = new CrsProj(proj4);
+	    		setName(fullCode);
+	    		//setAbrev(crsWkt.getName());
+	    		setAbrev(crsWkt.getAuthority()[0]+":"+crsWkt.getAuthority()[1]);
+	    	} catch (OGRException e) {
+				throw new CrsException(e);
+			} catch (crsgdalException e) {
+				throw new CrsException(e);
+			} catch (CrsOgrException e) {
+				throw new CrsException(e);
+			}
+		}
+		//	Asignar el datum:
+		if (!(crsWkt.getSpheroid()[1].equals("")||crsWkt.getSpheroid()[2].equals(""))){
+			double eSemiMajorAxis = Double.valueOf(crsWkt.getSpheroid()[1]).doubleValue();
+			double eIFlattening = Double.valueOf(crsWkt.getSpheroid()[2]).doubleValue();
+			datum = new CRSDatum(eSemiMajorAxis,eIFlattening);
+			
+			// Crs base (en el caso de ser projectado):
+			if(this.isProjected()){
+				String proj4Base = "+proj=latlong +a=" + crsWkt.getSpheroid()[1] + " +rf=" + crsWkt.getSpheroid()[2] ;
+				crsBase = new CrsProj(proj4Base);
+			}
+		}
+	}
+		
+/*	public Crs(CrsEpsg source) throws CrsException {
+		crsProj4 = source;
+	}*/
+	
+	/**
+	 * @param code 
+	 */
+	public void setTrans(String code) {
+		trans = code;
+		changeTrans(trans);
+	}
+	
+	/**
+	 * 
+	 * @param code
+	 */
+	public void changeTrans(String code) {
+		crsProj4.changeStrCrs(code);
+	}
+	
+	/**
+	 * 
+	 */
+	public String getAbrev() {
+		return abrev;
+	}
+	
+	/**
+	 * 
+	 * @param code
+	 */
+	protected void setAbrev(String code) {
+		abrev = code;
+	}
+	
+	/**
+	 * 
+	 * @param nom
+	 */
+	public void setName(String nom) {
+		name = nom;
+	}
+	
+	/**
+	 * @return
+	 */
+	public IDatum getDatum() {
+		/*CSDatum datum = new CSDatum();
+		try {
+			datum.fromWKT(getWKT());
+		} catch (FactoryException e) {
+			// TODO Auto-generated catch block
+			e.printStackTrace();
+		}*/
+		return datum;
+	}
+	
+	/**
+	 * @return
+	 */
+	public CrsWkt getCrsWkt() {
+		return crsWkt;
+	}
+	
+	/**
+	 * 
+	 * @param wkt
+	 */
+	public void setWKT(String wkt){
+		this.wkt = wkt;
+	}
+	
+	/**
+	 * @return
+	 */
+	public String getWKT(){
+		return this.wkt;
+	}
+	
+	/**
+	 * 
+	 * @param nad
+	 */
+	public void setNadGrid(String nad){
+		this.nad = nad;
+	}
+	
+	/**
+	 * @return
+	 */
+	public String getNadGrid(){
+		return this.nad;
+	}
+	
+	/**
+	 * @param target
+	 * @return
+	 */
+	public ICOperation getCOp(ICrs target) throws CrsException {		
+		if (!this.getNadGrid().equals("")) {			
+			ICrs crs = new Crs(target.getCode(), target.getWKT(), this.getNadGrid());
+			return new COperation(this, crs);
+		}
+		else return new COperation(this, target);
+	}
+	
+	/**
+	 * 
+	 * @return
+	 */
+	protected CrsProj getCrsProj() {
+		return crsProj4;
+	}
+
+	/**
+	 * @param x
+	 * @param y
+	 * @return
+	 */
+	public Point2D createPoint(double x, double y) {
+		return new Point2D.Double(x,y);
+	}
+
+	/**
+	 * @param g
+	 * @param vp
+	 */
+	public void drawGrid(Graphics2D g, ViewPortData vp) {
+		// TODO Auto-generated method stub
+		
+	}
+
+	/**
+	 * @param c
+	 */
+	public void setGridColor(Color c) {
+		gridColor = c;
+	}
+
+	/**
+	 * @return
+	 */
+	public Color getGridColor() {
+		return gridColor;
+	}
+
+	/**
+	 * @param dest
+	 * @return
+	 */
+	public ICoordTrans getCT(IProjection dest) {
+		COperation operation = null;
+		Crs crsDest = (Crs)dest;
+		try {
+			operation = new COperation(this, (ICrs)dest);
+		} catch (CrsException e) {
+			// TODO Auto-generated catch block
+			e.printStackTrace();
+		}
+		
+		if (!getNadGrid().equals("")){
+			if (isTargetNad())
+				operation.setNadCrsProj(new CrsProj(crsDest.getProj4()+getNadGrid()), true);
+			else
+				operation.setNadCrsProj(new CrsProj(getProj4()+getNadGrid()), false);
+			
+			return operation;
+		}
+		
+		return operation;
+		
+		/*ICrs crs = (ICrs) dest;		
+		try {
+			if (!this.getNadGrid().equals("")) {
+				crs = new Crs(crs.getCode(), crs.getWKT(), this.getNadGrid());
+				return new COperation(this, crs);
+			}
+			else return new COperation(this, crs);
+		} catch (CrsException e) {
+			// TODO Auto-generated catch block
+			e.printStackTrace();
+		}
+		return null;*/
+	}
+	
+	/**
+	 * @param pt
+	 * @return
+	 */
+	public Point2D toGeo(Point2D pt) {
+		if (isProjected()){
+			double x[] = {pt.getX()};
+			double y[] = {pt.getY()};
+			double z[] = {0D};
+			try {
+				JNIBaseCrs.operate( x , y, z,
+						crsProj4,crsBase);
+			} catch (OperationCrsException e) {
+				// TODO Auto-generated catch block
+				e.printStackTrace();
+			} catch (CrsProjException e) {
+				// TODO Auto-generated catch block
+				e.printStackTrace();
+			}
+			return new Point2D.Double(x[0],y[0]);
+		}
+		else
+			return pt;
+	}
+
+	/**
+	 * @param gPt
+	 * @param mPt
+	 * @return
+	 */
+	public Point2D fromGeo(Point2D gPt, Point2D mPt) {
+		// TODO Auto-generated method stub
+		return null;
+	}
+
+	/**
+	 * @return
+	 */
+	public boolean isProjected() {
+		return !crsProj4.isLatlong();		
+	}
+
+	/**
+	 * @param minX
+	 * @param maxX
+	 * @param width
+	 * @param dpi
+	 * @return
+	 */
+	public double getScale(double minX, double maxX, double width, double dpi) {
+		double scale = 0D;
+        if (!isProjected()) { // Es geogr�fico; calcula la escala.
+            scale = ((maxX - minX) * // grados
+
+            // 1852.0 metros x minuto de meridiano
+            (dpi / 2.54 * 100.0 * 1852.0 * 60.0)) / // px / metro
+                    width; // pixels
+        }
+        else{
+        	 scale = ((maxX - minX) * // metros
+                    (dpi / 2.54 * 100.0)) / // px / metro
+                    width; // pixels
+        }
+        return scale;
+	}
+	
+	/**
+	 * 
+	 * @param epsg_cod
+	 */
+	public void setCode(int epsg_cod){
+		epsg_code = epsg_cod;
+	}
+
+	/**
+	 * @return
+	 */
+	public int getCode() {
+		// TODO Auto-generated method stub
+		return epsg_code;
+	}
+
+	/**
+	 * 
+	 */
+	public Rectangle2D getExtent(Rectangle2D extent, double scale, double wImage, double hImage, double changeUnits, double dpi) {
+		// TODO Auto-generated method stub
+		return null;
+	}
+
+	/**
+	 * @return
+	 */
+	public boolean isTargetNad() {
+		return targetNad;
+	}
+
+	/**
+	 * @param targetNad
+	 */
+	public void setNadInTarget(boolean targetNad) {
+		this.targetNad = targetNad;
+	}
+
+	/**
+	 * 
+	 * @return
+	 */
+	public String getProj4() {
+		return proj4;
+	}
+	
+}

Property changes on: tags/Root_F2/libraries/libJCRS/src/org/gvsig/crs/Crs.java
___________________________________________________________________
Added: svn:keywords
   + Author Date Id Revision
Added: svn:eol-style
   + native

Index: tags/Root_F2/libraries/libJCRS/src/org/gvsig/crs/proj/OperationCrsException.java
===================================================================
--- tags/Root_F2/libraries/libJCRS/src/org/gvsig/crs/proj/OperationCrsException.java	(revision 0)
+++ tags/Root_F2/libraries/libJCRS/src/org/gvsig/crs/proj/OperationCrsException.java	(revision 10155)
@@ -0,0 +1,64 @@
+/* gvSIG. Sistema de Informaci�n Geogr�fica de la Generalitat Valenciana
+ *
+ * Copyright (C) 2006 Instituto de Desarrollo Regional and Generalitat Valenciana.
+ *
+ * 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., 59 Temple Place - Suite 330, Boston, MA  02111-1307,USA.
+ *
+ * For more information, contact:
+ *
+ *  Generalitat Valenciana
+ *   Conselleria d'Infraestructures i Transport
+ *   Av. Blasco Ib��ez, 50
+ *   46010 VALENCIA
+ *   SPAIN
+ *
+ *      +34 963862235
+ *   gvsig@gva.es
+ *      www.gvsig.gva.es
+ *
+ *    or
+ *
+ *   Instituto de Desarrollo Regional (Universidad de Castilla La-Mancha)
+ *   Campus Universitario s/n
+ *   02071 Alabacete
+ *   Spain
+ *
+ *   +34 967 599 200
+ */
+
+package org.gvsig.crs.proj;
+
+/**
+ * 
+ * @author Miguel Garc�a Jim�nez (garciajimenez.miguel@gmail.com)
+ *
+ */
+public class OperationCrsException extends Exception {
+	/**
+	 * 
+	 */
+	private static final long serialVersionUID = 1L;
+	private String _strSrcCrs,_strDestCrs;
+
+	public OperationCrsException(CrsProj srcCrs, CrsProj destCrs, String message) {
+		super("Error in CRS operation: "+ message);
+		_strSrcCrs=srcCrs.getStr();
+		_strDestCrs=destCrs.getStr();
+	}
+	
+	public String getStrError() {
+		return ("Error en operacion del CRS "+_strSrcCrs+" al CRS "+_strDestCrs);
+	}
+}

Property changes on: tags/Root_F2/libraries/libJCRS/src/org/gvsig/crs/proj/OperationCrsException.java
___________________________________________________________________
Added: svn:eol-style
   + native
Added: svn:keywords
   + Author Date Id Revision

Index: tags/Root_F2/libraries/libJCRS/src/org/gvsig/crs/proj/JNIBaseOperation.java
===================================================================
--- tags/Root_F2/libraries/libJCRS/src/org/gvsig/crs/proj/JNIBaseOperation.java	(revision 0)
+++ tags/Root_F2/libraries/libJCRS/src/org/gvsig/crs/proj/JNIBaseOperation.java	(revision 10155)
@@ -0,0 +1,70 @@
+/* gvSIG. Sistema de Informaci�n Geogr�fica de la Generalitat Valenciana
+ *
+ * Copyright (C) 2006 Instituto de Desarrollo Regional and Generalitat Valenciana.
+ *
+ * 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., 59 Temple Place - Suite 330, Boston, MA  02111-1307,USA.
+ *
+ * For more information, contact:
+ *
+ *  Generalitat Valenciana
+ *   Conselleria d'Infraestructures i Transport
+ *   Av. Blasco Ib��ez, 50
+ *   46010 VALENCIA
+ *   SPAIN
+ *
+ *      +34 963862235
+ *   gvsig@gva.es
+ *      www.gvsig.gva.es
+ *
+ *    or
+ *
+ *   Instituto de Desarrollo Regional (Universidad de Castilla La-Mancha)
+ *   Campus Universitario s/n
+ *   02071 Alabacete
+ *   Spain
+ *
+ *   +34 967 599 200
+ */
+
+package org.gvsig.crs.proj;
+
+/**
+ * 
+ * @author Miguel Garc�a Jim�nez (garciajimenez.miguel@gmail.com)
+ *
+ */
+public class JNIBaseOperation
+{
+	protected static native int operation(double[] firstCoord,
+								    double[] secondCoord,
+								    double[] values,
+								    long srcCodeString,
+								    long destCodeString);
+	
+	protected static native int operationSimple(double firstcoord,
+												double secondcoord,
+												double values,
+												long srcCodeString,
+												long destCodeString);
+	
+	protected static native int operationArraySimple(double[] Coord,
+													 long srcCodeString,
+													 long destCodeString);
+	protected static native int compareDatums(long datum1, long datum2);
+	static
+	{
+		System.loadLibrary("crsjniproj");
+	}
+}

Property changes on: tags/Root_F2/libraries/libJCRS/src/org/gvsig/crs/proj/JNIBaseOperation.java
___________________________________________________________________
Added: svn:keywords
   + Author Date Id Revision
Added: svn:eol-style
   + native

Index: tags/Root_F2/libraries/libJCRS/src/org/gvsig/crs/proj/package.html
===================================================================
--- tags/Root_F2/libraries/libJCRS/src/org/gvsig/crs/proj/package.html	(revision 0)
+++ tags/Root_F2/libraries/libJCRS/src/org/gvsig/crs/proj/package.html	(revision 10155)
@@ -0,0 +1,4 @@
+<html>
+	<body>Clases relacionadas con el wrapper de proj4 de la extensi�n CRS.
+</body>
+</html>

Property changes on: tags/Root_F2/libraries/libJCRS/src/org/gvsig/crs/proj/package.html
___________________________________________________________________
Added: svn:keywords
   + Author Date Id Revision
Added: svn:eol-style
   + native

Index: tags/Root_F2/libraries/libJCRS/src/org/gvsig/crs/proj/CrsProjException.java
===================================================================
--- tags/Root_F2/libraries/libJCRS/src/org/gvsig/crs/proj/CrsProjException.java	(revision 0)
+++ tags/Root_F2/libraries/libJCRS/src/org/gvsig/crs/proj/CrsProjException.java	(revision 10155)
@@ -0,0 +1,61 @@
+/* gvSIG. Sistema de Informaci�n Geogr�fica de la Generalitat Valenciana
+ *
+ * Copyright (C) 2006 Instituto de Desarrollo Regional and Generalitat Valenciana.
+ *
+ * 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., 59 Temple Place - Suite 330, Boston, MA  02111-1307,USA.
+ *
+ * For more information, contact:
+ *
+ *  Generalitat Valenciana
+ *   Conselleria d'Infraestructures i Transport
+ *   Av. Blasco Ib��ez, 50
+ *   46010 VALENCIA
+ *   SPAIN
+ *
+ *      +34 963862235
+ *   gvsig@gva.es
+ *      www.gvsig.gva.es
+ *
+ *    or
+ *
+ *   Instituto de Desarrollo Regional (Universidad de Castilla La-Mancha)
+ *   Campus Universitario s/n
+ *   02071 Alabacete
+ *   Spain
+ *
+ *   +34 967 599 200
+ */
+
+package org.gvsig.crs.proj;
+
+/**
+ * Clase que gestiona las excepciones en la creaci�n del CRS
+ * mediante una cadena proj4
+ * 
+ * @author Miguel Garc�a Jim�nez (garciajimenez.miguel@gmail.com)
+ *
+ */
+public class CrsProjException extends Exception {
+	/**
+	 * 
+	 */
+	
+	private static final long serialVersionUID = 1L;
+	
+	public CrsProjException(String message)
+	{
+		super(message);
+	}	
+}

Property changes on: tags/Root_F2/libraries/libJCRS/src/org/gvsig/crs/proj/CrsProjException.java
___________________________________________________________________
Added: svn:keywords
   + Author Date Id Revision
Added: svn:eol-style
   + native

Index: tags/Root_F2/libraries/libJCRS/src/org/gvsig/crs/proj/CrsProj.java
===================================================================
--- tags/Root_F2/libraries/libJCRS/src/org/gvsig/crs/proj/CrsProj.java	(revision 0)
+++ tags/Root_F2/libraries/libJCRS/src/org/gvsig/crs/proj/CrsProj.java	(revision 10155)
@@ -0,0 +1,69 @@
+/* gvSIG. Sistema de Informaci�n Geogr�fica de la Generalitat Valenciana
+ *
+ * Copyright (C) 2006 Instituto de Desarrollo Regional and Generalitat Valenciana.
+ *
+ * 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., 59 Temple Place - Suite 330, Boston, MA  02111-1307,USA.
+ *
+ * For more information, contact:
+ *
+ *  Generalitat Valenciana
+ *   Conselleria d'Infraestructures i Transport
+ *   Av. Blasco Ib��ez, 50
+ *   46010 VALENCIA
+ *   SPAIN
+ *
+ *      +34 963862235
+ *   gvsig@gva.es
+ *      www.gvsig.gva.es
+ *
+ *    or
+ *
+ *   Instituto de Desarrollo Regional (Universidad de Castilla La-Mancha)
+ *   Campus Universitario s/n
+ *   02071 Alabacete
+ *   Spain
+ *
+ *   +34 967 599 200
+ */
+
+package org.gvsig.crs.proj;
+
+import com.iver.andami.messages.NotificationManager;
+
+/**
+ * Clase que crea el CRS a partir de una cadena proj4
+ * 
+ * @author Miguel Garc�a Jim�nez (garciajimenez.miguel@gmail.com)
+ *
+ */
+public class CrsProj extends JNIBaseCrs {
+	/**
+	 * 
+	 * 
+	 * @param strCrs Cadena proj4.
+	 */
+	public CrsProj(String strCrs) {
+		try {
+			createCrs(strCrs);
+		} catch(CrsProjException e) {
+			NotificationManager.addError(e);
+		}
+		
+	}
+		
+	protected void finalize() {
+		deleteCrs();
+	}
+}

Property changes on: tags/Root_F2/libraries/libJCRS/src/org/gvsig/crs/proj/CrsProj.java
___________________________________________________________________
Added: svn:eol-style
   + native
Added: svn:keywords
   + Author Date Id Revision

Index: tags/Root_F2/libraries/libJCRS/src/org/gvsig/crs/proj/JNIBaseCrs.java
===================================================================
--- tags/Root_F2/libraries/libJCRS/src/org/gvsig/crs/proj/JNIBaseCrs.java	(revision 0)
+++ tags/Root_F2/libraries/libJCRS/src/org/gvsig/crs/proj/JNIBaseCrs.java	(revision 10155)
@@ -0,0 +1,167 @@
+/* gvSIG. Sistema de Informaci�n Geogr�fica de la Generalitat Valenciana
+ *
+ * Copyright (C) 2006 Instituto de Desarrollo Regional and Generalitat Valenciana.
+ *
+ * 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., 59 Temple Place - Suite 330, Boston, MA  02111-1307,USA.
+ *
+ * For more information, contact:
+ *
+ *  Generalitat Valenciana
+ *   Conselleria d'Infraestructures i Transport
+ *   Av. Blasco Ib��ez, 50
+ *   46010 VALENCIA
+ *   SPAIN
+ *
+ *      +34 963862235
+ *   gvsig@gva.es
+ *      www.gvsig.gva.es
+ *
+ *    or
+ *
+ *   Instituto de Desarrollo Regional (Universidad de Castilla La-Mancha)
+ *   Campus Universitario s/n
+ *   02071 Alabacete
+ *   Spain
+ *
+ *   +34 967 599 200
+ */
+
+package org.gvsig.crs.proj;
+
+/**
+ * 
+ * @author Miguel Garc�a Jim�nez (garciajimenez.miguel@gmail.com)
+ *
+ */
+public class JNIBaseCrs
+{
+	protected long cPtr;
+	protected int latLong;
+	protected String _strCrs;
+	protected native long loadCrs(String crs);
+	protected native void freeCrs(long crs);
+	protected native int isLatlong(long crs);
+	protected static native int compareDatums(long datum1, long datum2);
+	protected native int getErrno();
+	protected static native String strErrno(int errno);
+	
+	
+	protected static native int operation(double[] firstCoord,
+		    double[] secondCoord,
+		    double[] values,
+		    long srcCodeString,
+		    long destCodeString);
+
+	protected static native int operationSimple(double firstcoord,
+			double secondcoord,
+			double values,
+			long srcCodeString,
+			long destCodeString);
+
+	protected static native int operationArraySimple(double[] Coord,
+			 long srcCodeString,
+			 long destCodeString);
+	
+	static {
+		System.loadLibrary("crsjniproj");
+	}
+	
+	protected void createCrs(String strCrs) throws CrsProjException {
+		cPtr=loadCrs(strCrs);
+		
+		int errNo = getErrNo(); 
+		if (errNo<0 && errNo!=-10) throw new CrsProjException("Error creating CRS: "+strErrNo(errNo));
+		_strCrs=strCrs;
+	}
+	
+	protected void deleteCrs() {
+		if(cPtr>0) freeCrs(cPtr); 
+	}
+	
+	public boolean isLatlong() {
+		latLong = isLatlong(cPtr);
+		if(latLong == 0)
+			return false;
+		return true;
+	}
+	
+	protected long getPtr() throws CrsProjException {
+		if (cPtr>0)	return cPtr;
+		else throw new CrsProjException(_strCrs);
+	}
+	
+	public String getStr() {
+		return _strCrs;
+	}
+	
+	public void changeStrCrs(String code) {
+		_strCrs += code;
+	}
+	
+	protected int getErrNo(){
+		return getErrno();
+	}
+	
+	protected static String strErrNo(int errno){
+		return strErrno(errno);
+	}
+	
+	//OPERATIONS
+	
+	public static int operate(double[] firstCoord,
+		     double[] secondCoord,
+		     double[] thirdCoord,
+		     CrsProj srcCrs,
+		     CrsProj destCrs)
+			 throws OperationCrsException,
+					CrsProjException {
+		
+		int error=operation(firstCoord,secondCoord,thirdCoord,srcCrs.getPtr(),destCrs.getPtr());
+		
+		// error -38: el punto transformar est� fuera del �mbito del nadgrid
+		if(error!=0 && error !=-38) throw new OperationCrsException(srcCrs,destCrs, strErrNo(error));
+		return error;
+	}
+
+	public static void operateSimple(double firstCoord,
+				 double secondCoord,
+				 double thirdCoord,
+				 CrsProj srcCrs,
+				 CrsProj destCrs) throws OperationCrsException, CrsProjException {
+
+		int error = operationSimple(firstCoord, secondCoord, thirdCoord,srcCrs.getPtr(),destCrs.getPtr());
+		if(error!=1) throw new OperationCrsException(srcCrs,destCrs, strErrNo(error));
+	}
+
+	public static void operateArraySimple(double[] Coord,
+					  CrsProj srcCrs,
+					  CrsProj destCrs)throws OperationCrsException,
+	      				 CrsProjException {
+
+		int error = operationArraySimple(Coord,srcCrs.getPtr(),destCrs.getPtr());
+		if(error!=1) throw new OperationCrsException(srcCrs,destCrs, strErrNo(error));
+	}
+	
+	public static int compareDatums(CrsProj crs1, CrsProj crs2){
+		int compare = 0;
+		try {
+			compare = compareDatums(crs1.getPtr(),crs2.getPtr());
+		} catch (CrsProjException e) {
+			// TODO Auto-generated catch block
+			e.printStackTrace();
+		}	
+		return compare;
+	}
+}

Property changes on: tags/Root_F2/libraries/libJCRS/src/org/gvsig/crs/proj/JNIBaseCrs.java
___________________________________________________________________
Added: svn:keywords
   + Author Date Id Revision
Added: svn:eol-style
   + native

Index: tags/Root_F2/libraries/libJCRS/src/org/gvsig/crs/repository/EpsgRepository.java
===================================================================
--- tags/Root_F2/libraries/libJCRS/src/org/gvsig/crs/repository/EpsgRepository.java	(revision 0)
+++ tags/Root_F2/libraries/libJCRS/src/org/gvsig/crs/repository/EpsgRepository.java	(revision 10155)
@@ -0,0 +1,147 @@
+/* gvSIG. Sistema de Informaci�n Geogr�fica de la Generalitat Valenciana
+ *
+ * Copyright (C) 2006 Instituto de Desarrollo Regional and Generalitat Valenciana.
+ *
+ * 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., 59 Temple Place - Suite 330, Boston, MA  02111-1307,USA.
+ *
+ * For more information, contact:
+ *
+ *  Generalitat Valenciana
+ *   Conselleria d'Infraestructures i Transport
+ *   Av. Blasco Ib��ez, 50
+ *   46010 VALENCIA
+ *   SPAIN
+ *
+ *      +34 963862235
+ *   gvsig@gva.es
+ *      www.gvsig.gva.es
+ *
+ *    or
+ *
+ *   Instituto de Desarrollo Regional (Universidad de Castilla La-Mancha
+ *   Campus Universitario s/n
+ *   02071 Alabacete
+ *   Spain
+ *
+ *   +34 967 599 200
+ */
+
+package org.gvsig.crs.repository;
+
+import java.sql.ResultSet;
+import java.sql.SQLException;
+
+import org.gvsig.crs.Crs;
+import org.gvsig.crs.CrsException;
+import org.gvsig.crs.EpsgConnection;
+import org.gvsig.crs.ICrs;
+import org.gvsig.crs.Query;
+import org.gvsig.crs.ogr.Epsg2wkt;
+import org.gvsig.crs.ogr.GetCRSepsg;
+
+/**
+ * Repositorio de CRSs de EPSG
+ * 
+ * @author Diego Guerrero Sevilla (diego.guerrero@uclm.es)
+ *
+ */
+public class EpsgRepository implements ICrsRepository {
+	
+	public EpsgConnection connection = null;
+	
+	public EpsgRepository() {
+		connection = new EpsgConnection();
+	}
+
+	/**
+	 * Obtiene un CRS a partir de su c�digo EPSG.
+	 * 
+	 * @param code Codigo EPSG del CRS. 
+	 * @return ICrs 
+	 */
+	public ICrs getCrs(String code) {
+		int epsg_code  = Integer.parseInt(code);
+		boolean source_yn = false;
+		int source_cod = 0;
+		int datum_code = 0;
+		int projection_conv_code = 0;
+		String crs_kind = null;
+		
+		Epsg2wkt wkt = null;
+		
+		Crs crs = null;
+		
+		ResultSet result = null;
+		String sentence = "SELECT source_geogcrs_code, projection_conv_code, "
+			+ "coord_ref_sys_kind, datum_code "
+			+ "FROM epsg_coordinatereferencesystem "
+			+ "WHERE coord_ref_sys_code = " + code;
+						
+		connection.setConnectionEPSG();
+		result = Query.select(sentence,connection.getConnection());	
+		
+		/*try {
+			connection.shutdown();
+		} catch (SQLException e) {
+			// TODO Auto-generated catch block
+			e.printStackTrace();
+		}*/
+		
+		try {
+			result.next();
+			source_cod = result.getInt("source_geogcrs_code");
+			projection_conv_code = result.getInt("projection_conv_code");
+			crs_kind = result.getString("coord_ref_sys_kind");
+			datum_code = result.getInt("datum_code");
+		} catch (SQLException e1) {
+			e1.printStackTrace();
+		}
+		
+		if (datum_code != 0){
+			source_yn = true;
+			GetCRSepsg ep = new GetCRSepsg(epsg_code, source_yn, source_cod, projection_conv_code, connection);
+			ep.Getepsgdata();
+		}
+		else if (source_cod != 0){
+			source_yn = false;
+		}
+		else source_yn = true;
+		
+		GetCRSepsg ep = new GetCRSepsg(epsg_code, source_yn, source_cod, projection_conv_code, connection);
+		ep.Getepsgdata();
+		
+		if (crs_kind.equals("geographic 2D") || crs_kind.equals("geographic 3D")){
+			wkt = new Epsg2wkt(ep , "geog");			
+		}
+		else if (crs_kind.equals("projected")){
+			wkt = new Epsg2wkt(ep, "proj");
+		}
+		else if (crs_kind.equals("compound")){
+			wkt = new Epsg2wkt(ep,"comp");
+		}
+		else if (crs_kind.equals("geocentric")){
+			wkt = new Epsg2wkt(ep,"geoc");
+		}
+		
+		try {
+			crs = new Crs(Integer.parseInt(code),wkt.getWKT());
+		} catch (CrsException e) {
+			// TODO Auto-generated catch block
+			e.printStackTrace();
+		}
+		return crs;
+	}
+
+}

Property changes on: tags/Root_F2/libraries/libJCRS/src/org/gvsig/crs/repository/EpsgRepository.java
___________________________________________________________________
Added: svn:eol-style
   + native
Added: svn:keywords
   + Author Date Id Revision

Index: tags/Root_F2/libraries/libJCRS/src/org/gvsig/crs/repository/package.html
===================================================================
--- tags/Root_F2/libraries/libJCRS/src/org/gvsig/crs/repository/package.html	(revision 0)
+++ tags/Root_F2/libraries/libJCRS/src/org/gvsig/crs/repository/package.html	(revision 10155)
@@ -0,0 +1,4 @@
+<html>
+	<body>Clases relacionadas con los repositorios de la extensi�n CRS.
+</body>
+</html>

Property changes on: tags/Root_F2/libraries/libJCRS/src/org/gvsig/crs/repository/package.html
___________________________________________________________________
Added: svn:eol-style
   + native
Added: svn:keywords
   + Author Date Id Revision

Index: tags/Root_F2/libraries/libJCRS/src/org/gvsig/crs/repository/ICrsRepository.java
===================================================================
--- tags/Root_F2/libraries/libJCRS/src/org/gvsig/crs/repository/ICrsRepository.java	(revision 0)
+++ tags/Root_F2/libraries/libJCRS/src/org/gvsig/crs/repository/ICrsRepository.java	(revision 10155)
@@ -0,0 +1,61 @@
+/* gvSIG. Sistema de Informaci�n Geogr�fica de la Generalitat Valenciana
+ *
+ * Copyright (C) 2006 Instituto de Desarrollo Regional and Generalitat Valenciana.
+ *
+ * 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., 59 Temple Place - Suite 330, Boston, MA  02111-1307,USA.
+ *
+ * For more information, contact:
+ *
+ *  Generalitat Valenciana
+ *   Conselleria d'Infraestructures i Transport
+ *   Av. Blasco Ib��ez, 50
+ *   46010 VALENCIA
+ *   SPAIN
+ *
+ *      +34 963862235
+ *   gvsig@gva.es
+ *      www.gvsig.gva.es
+ *
+ *    or
+ *
+ *   Instituto de Desarrollo Regional (Universidad de Castilla La-Mancha
+ *   Campus Universitario s/n
+ *   02071 Alabacete
+ *   Spain
+ *
+ *   +34 967 599 200
+ */
+
+package org.gvsig.crs.repository;
+
+import org.gvsig.crs.ICrs;
+
+/**
+ * Interfaz para un repositorio de Sistemas de Referencia Coordenados (CRS)
+ * 
+ * @author Diego Guerrero Sevilla (diego.guerrero@uclm.es)
+ *
+ */
+public interface ICrsRepository {
+	
+	/**
+	 * Obtiene un CRS a partir del c�digo que lo identifica en el repositorio.
+	 * 
+	 * @param code Codigo de CRS en el repositorio. 
+	 * @return ICrs 
+	 */
+	public ICrs getCrs(String code);
+
+}

Property changes on: tags/Root_F2/libraries/libJCRS/src/org/gvsig/crs/repository/ICrsRepository.java
___________________________________________________________________
Added: svn:keywords
   + Author Date Id Revision
Added: svn:eol-style
   + native

Index: tags/Root_F2/libraries/libJCRS/src/org/gvsig/crs/repository/Iau2000Repository.java
===================================================================
--- tags/Root_F2/libraries/libJCRS/src/org/gvsig/crs/repository/Iau2000Repository.java	(revision 0)
+++ tags/Root_F2/libraries/libJCRS/src/org/gvsig/crs/repository/Iau2000Repository.java	(revision 10155)
@@ -0,0 +1,110 @@
+/* gvSIG. Sistema de Informaci�n Geogr�fica de la Generalitat Valenciana
+ *
+ * Copyright (C) 2006 Instituto de Desarrollo Regional and Generalitat Valenciana.
+ *
+ * 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., 59 Temple Place - Suite 330, Boston, MA  02111-1307,USA.
+ *
+ * For more information, contact:
+ *
+ *  Generalitat Valenciana
+ *   Conselleria d'Infraestructures i Transport
+ *   Av. Blasco Ib��ez, 50
+ *   46010 VALENCIA
+ *   SPAIN
+ *
+ *      +34 963862235
+ *   gvsig@gva.es
+ *      www.gvsig.gva.es
+ *
+ *    or
+ *
+ *   Instituto de Desarrollo Regional (Universidad de Castilla La-Mancha
+ *   Campus Universitario s/n
+ *   02071 Alabacete
+ *   Spain
+ *
+ *   +34 967 599 200
+ */
+
+package org.gvsig.crs.repository;
+
+import java.sql.ResultSet;
+import java.sql.SQLException;
+
+import org.gvsig.crs.Crs;
+import org.gvsig.crs.CrsException;
+import org.gvsig.crs.EpsgConnection;
+import org.gvsig.crs.ICrs;
+import org.gvsig.crs.Query;
+import org.gvsig.crs.ogr.Iau2wkt;
+
+/**
+ * Repositorio de CRSs de IAU2000
+ * 
+ * @author Diego Guerrero Sevilla (diego.guerrero@uclm.es)
+ *
+ */
+public class Iau2000Repository implements ICrsRepository {
+
+	EpsgConnection connection = null;
+	
+	public Iau2000Repository() {
+		connection = new EpsgConnection();	
+	}
+
+	/**
+	 * Obtiene un CRS a partir de su c�digo IAU2000.
+	 * 
+	 * @param code Codigo IAU2000 del CRS. 
+	 * @return ICrs 
+	 */
+	public ICrs getCrs(String code) {
+		String cadWKT = "";
+		Crs crs = null;
+		
+		String sentence = "SELECT iau_code, iau_wkt, iau_proj, iau_geog, iau_datum " +							 
+						  "FROM IAU2000 " +	                              
+                          "WHERE iau_code = " + code;
+		
+		connection.setConnectionIAU2000();
+		ResultSet result = Query.select(sentence,connection.getConnection());	
+		try {
+			connection.shutdown();
+		} catch (SQLException e) {
+			// TODO Auto-generated catch block
+			e.printStackTrace();
+		}
+		try {
+			result.next();			
+			cadWKT = result.getString("iau_wkt");			
+		} catch (SQLException e1) {
+			e1.printStackTrace();
+		}		
+		cadWKT = cadWKT.substring(0, cadWKT.length()-1) + ", AUTHORITY[\"IAU2000\","+ Integer.parseInt(code)+"]]";
+		if (cadWKT.charAt(0) == 'P'){
+			Iau2wkt wk = new Iau2wkt(cadWKT);
+			cadWKT = wk.getWkt();
+		}
+		
+		try {
+			crs = new Crs(Integer.parseInt(code),cadWKT);
+		} catch (CrsException e) {
+			// TODO Auto-generated catch block
+			e.printStackTrace();
+		}
+		
+		return crs;
+	}
+}

Property changes on: tags/Root_F2/libraries/libJCRS/src/org/gvsig/crs/repository/Iau2000Repository.java
___________________________________________________________________
Added: svn:keywords
   + Author Date Id Revision
Added: svn:eol-style
   + native

Index: tags/Root_F2/libraries/libJCRS/src/org/gvsig/crs/repository/EsriRepository.java
===================================================================
--- tags/Root_F2/libraries/libJCRS/src/org/gvsig/crs/repository/EsriRepository.java	(revision 0)
+++ tags/Root_F2/libraries/libJCRS/src/org/gvsig/crs/repository/EsriRepository.java	(revision 10155)
@@ -0,0 +1,102 @@
+/* gvSIG. Sistema de Informaci�n Geogr�fica de la Generalitat Valenciana
+ *
+ * Copyright (C) 2006 Instituto de Desarrollo Regional and Generalitat Valenciana.
+ *
+ * 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., 59 Temple Place - Suite 330, Boston, MA  02111-1307,USA.
+ *
+ * For more information, contact:
+ *
+ *  Generalitat Valenciana
+ *   Conselleria d'Infraestructures i Transport
+ *   Av. Blasco Ib��ez, 50
+ *   46010 VALENCIA
+ *   SPAIN
+ *
+ *      +34 963862235
+ *   gvsig@gva.es
+ *      www.gvsig.gva.es
+ *
+ *    or
+ *
+ *   Instituto de Desarrollo Regional (Universidad de Castilla La-Mancha
+ *   Campus Universitario s/n
+ *   02071 Alabacete
+ *   Spain
+ *
+ *   +34 967 599 200
+ */
+package org.gvsig.crs.repository;
+
+import java.sql.ResultSet;
+import java.sql.SQLException;
+
+import org.gvsig.crs.Crs;
+import org.gvsig.crs.CrsException;
+import org.gvsig.crs.EpsgConnection;
+import org.gvsig.crs.ICrs;
+import org.gvsig.crs.Query;
+import org.gvsig.crs.ogr.Iau2wkt;
+
+/**
+ * Repositorio de CRSs de EPSG
+ * 
+ * @author Jos� Luis G�mez Mart�nez (jolugomar@gmail.com)
+ *
+ */
+
+public class EsriRepository implements ICrsRepository {
+
+	EpsgConnection connection = null;
+	
+	public EsriRepository() {
+		connection = new EpsgConnection();
+	}
+
+	public ICrs getCrs(String code) {
+		String cadWKT = "";
+		Crs crs = null;
+		
+		String sentence = "SELECT esri_code, esri_wkt, esri_proj, esri_geog, esri_datum " +							 
+						  "FROM ESRI " +	                              
+                          "WHERE esri_code = " + code;
+		
+		connection.setConnectionEsri();
+		ResultSet result = Query.select(sentence,connection.getConnection());	
+		try {
+			connection.shutdown();
+		} catch (SQLException e) {
+			// TODO Auto-generated catch block
+			e.printStackTrace();
+		}
+		try {
+			result.next();			
+			cadWKT = result.getString("esri_wkt");			
+		} catch (SQLException e1) {
+			e1.printStackTrace();
+		}		
+		cadWKT = cadWKT.substring(0, cadWKT.length()-1) + ", AUTHORITY[\"ESRI\","+ Integer.parseInt(code)+"]]";
+				
+		try {
+			crs = new Crs(Integer.parseInt(code),cadWKT);
+		} catch (CrsException e) {
+			// TODO Auto-generated catch block
+			e.printStackTrace();
+		}
+		
+		return crs;
+
+	}
+
+}

Property changes on: tags/Root_F2/libraries/libJCRS/src/org/gvsig/crs/repository/EsriRepository.java
___________________________________________________________________
Added: svn:keywords
   + Author Date Id Revision
Added: svn:eol-style
   + native

Index: tags/Root_F2/libraries/libJCRS/src/org/gvsig/crs/ICrs.java
===================================================================
--- tags/Root_F2/libraries/libJCRS/src/org/gvsig/crs/ICrs.java	(revision 0)
+++ tags/Root_F2/libraries/libJCRS/src/org/gvsig/crs/ICrs.java	(revision 10155)
@@ -0,0 +1,120 @@
+/* gvSIG. Sistema de Informaci�n Geogr�fica de la Generalitat Valenciana
+ *
+ * Copyright (C) 2006 Instituto de Desarrollo Regional and Generalitat Valenciana.
+ *
+ * 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., 59 Temple Place - Suite 330, Boston, MA  02111-1307,USA.
+ *
+ * For more information, contact:
+ *
+ *  Generalitat Valenciana
+ *   Conselleria d'Infraestructures i Transport
+ *   Av. Blasco Ib��ez, 50
+ *   46010 VALENCIA
+ *   SPAIN
+ *
+ *      +34 963862235
+ *   gvsig@gva.es
+ *      www.gvsig.gva.es
+ *
+ *    or
+ *
+ *   Instituto de Desarrollo Regional (Universidad de Castilla La-Mancha)
+ *   Campus Universitario s/n
+ *   02071 Alabacete
+ *   Spain
+ *
+ *   +34 967 599 200
+ */
+
+package org.gvsig.crs;
+
+import org.cresques.cts.IProjection;
+
+
+/**
+ * Interface para un Sistema de Referencuia Coordenado:
+ *  CRS (Coordinate Reference Sysytem).
+ * @author Jos� Luis G�mez Mart�nez (jolugomar@gmail.com)
+ * @author Diego Guerrero Sevilla (diego.guerrero@uclm.es)
+ *
+ */
+public interface ICrs extends IProjection {
+	/**
+	 * Abreviatura del CRS
+	 * @return
+	 */
+	String getAbrev();
+	
+	/**
+	 * C�digo del CRS
+	 * @return
+	 */
+	int getCode();
+	//public boolean eq(ICrs other);
+	
+	/**
+	 * Cadena WKT del CRS utilizado
+	 * @return
+	 */
+	String getWKT();
+	
+	/**
+	 * M�todo para la aplicaci�n de la propiedad de nadgrids
+	 * sobre el CRS destino o fuente 
+	 * @param nad
+	 */
+	void setNadGrid(String nad);
+	
+	/**
+	 * Cadena nadgrids a utilizar en el crs fuente o destino en una transformacion
+	 * @return
+	 */
+	String getNadGrid();
+	
+	/**
+	 * true si el nadgrid se asocia al crs destino
+	 * @return
+	 */
+	boolean isTargetNad();
+
+	/**
+	 * Le indicamos al crs si el nadgrid est� asociado al crs destion al fuente
+	 * en una transformaci�n.
+	 * @param targetNad true si el nadgrid se asocia al crs destino
+	 * @return
+	 */
+	void setNadInTarget(boolean targetNad);
+	
+	
+	/**
+	 * Obtiene una operaci�n de cambio de CRS.
+	 * @param target
+	 * @return
+	 */
+	ICOperation getCOp(ICrs target) throws CrsException ;
+	
+	/**
+	 * Nombre de la transformacion a realizar con el CRS
+	 * @return
+	 */	
+	void setTrans(String code);
+	
+	/**
+	 * Campos de la cadena wkt
+	 * @return
+	 */
+	CrsWkt getCrsWkt();
+	
+}

Property changes on: tags/Root_F2/libraries/libJCRS/src/org/gvsig/crs/ICrs.java
___________________________________________________________________
Added: svn:eol-style
   + native
Added: svn:keywords
   + Author Date Id Revision

Index: tags/Root_F2/libraries/libJCRS/src/org/gvsig/crs/COperation.java
===================================================================
--- tags/Root_F2/libraries/libJCRS/src/org/gvsig/crs/COperation.java	(revision 0)
+++ tags/Root_F2/libraries/libJCRS/src/org/gvsig/crs/COperation.java	(revision 10155)
@@ -0,0 +1,192 @@
+/* gvSIG. Sistema de Informaci�n Geogr�fica de la Generalitat Valenciana
+ *
+ * Copyright (C) 2006 Instituto de Desarrollo Regional and Generalitat Valenciana.
+ *
+ * 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., 59 Temple Place - Suite 330, Boston, MA  02111-1307,USA.
+ *
+ * For more information, contact:
+ *
+ *  Generalitat Valenciana
+ *   Conselleria d'Infraestructures i Transport
+ *   Av. Blasco Ib��ez, 50
+ *   46010 VALENCIA
+ *   SPAIN
+ *
+ *      +34 963862235
+ *   gvsig@gva.es
+ *      www.gvsig.gva.es
+ *
+ *    or
+ *
+ *   Instituto de Desarrollo Regional (Universidad de Castilla La-Mancha)
+ *   Campus Universitario s/n
+ *   02071 Alabacete
+ *   Spain
+ *
+ *   +34 967 599 200
+ */
+
+package org.gvsig.crs;
+
+import java.awt.geom.Point2D;
+import java.awt.geom.Rectangle2D;
+
+import org.cresques.cts.ICoordTrans;
+import org.cresques.cts.IProjection;
+import org.gvsig.crs.proj.CrsProj;
+import org.gvsig.crs.proj.CrsProjException;
+import org.gvsig.crs.proj.JNIBaseCrs;
+import org.gvsig.crs.proj.OperationCrsException;
+
+import com.iver.andami.messages.NotificationManager;
+
+/**
+ * Esta clase sirve para realizar la operaci�n que corresponda una vez
+ * tenemos dos CRS y tenemos que realizar alguna operaci�n entre ellos
+ * 
+ * @author Miguel Garc�a Jim�nez (garciajimenez.miguel@gmail.com)
+ * @author Diego Guerrero Sevilla (diego.guerrero@uclm.es)
+ *
+ */
+
+public class COperation implements ICOperation {
+	private Crs sourceCrs;
+	private Crs targetCrs;
+	private CrsProj nadCrsProj = null;
+	private boolean nadInTarget;
+	public COperation(ICrs from, ICrs to) throws CrsException {
+		sourceCrs = (Crs) from;
+		targetCrs = (Crs) to;
+	}
+
+	public ICrs getSource() {
+		return sourceCrs;
+	}
+
+	public ICrs getTarget() {
+		return targetCrs;
+	}
+
+	public Point2D operate(Point2D pt) throws CrsException {
+		double x[] = {pt.getX()};
+		double y[] = {pt.getY()};
+		double z[] = {0D};
+		int errno = 0;
+		try {
+			if (nadCrsProj != null){
+				if (nadInTarget)
+					errno = JNIBaseCrs.operate( x , y, z,sourceCrs.getCrsProj(), nadCrsProj);
+				else
+					errno = JNIBaseCrs.operate( x , y, z,nadCrsProj,targetCrs.getCrsProj());
+				if (errno != -38)
+					return new Point2D.Double(x[0],y[0]);
+			}
+			
+			// Si el punto estaba fuera del �mbito del nadgrid operamos sin nadgrid (convertimos)
+			x[0] = pt.getX();
+			y[0] = pt.getY();
+			z[0] = 0D;
+			JNIBaseCrs.operate( x , y, z,sourceCrs.getCrsProj(), targetCrs.getCrsProj());
+			return new Point2D.Double(x[0],y[0]);
+			
+		} catch (OperationCrsException e) {
+			throw new CrsException(e);
+		} catch (CrsProjException e) {
+			throw new CrsException(e);
+		}
+	//	System.out.println("x="+x[0]+"y="+y[0]);
+	//	if(!targetCrs.isProjected())
+	//		return new Point2D.Double(x[0]*((180)/Math.PI),y[0]*((180)/Math.PI));
+	//	else
+	}
+
+	public double [] operate(double []ptOrig) throws CrsException {
+		double x[] = {ptOrig[0]};
+		double y[] = {ptOrig[1]};
+		double z[] = {ptOrig[2]};
+		int errno = 0;
+		try {
+			if (nadCrsProj != null){
+				if (nadInTarget)
+					errno = JNIBaseCrs.operate( x , y, z,sourceCrs.getCrsProj(), nadCrsProj);
+				else
+					errno = JNIBaseCrs.operate( x , y, z,nadCrsProj,targetCrs.getCrsProj());
+				if (errno != -38){
+					double ptDest[] = {x[0], y[0], z[0]};
+					return ptDest;
+				}
+			}
+			
+			// Si el punto estaba fuera del �mbito del nadgrid operamos sin nadgrid (convertimos)
+			 x[0] = ptOrig[0];
+			 y[0] = ptOrig[1];
+			 z[0] = ptOrig[2];
+			 JNIBaseCrs.operate(x, y, z,sourceCrs.getCrsProj(), targetCrs.getCrsProj());
+			 double ptDest[] = {x[0], y[0], z[0]};
+			 return ptDest;
+		} catch (OperationCrsException e) {
+			throw new CrsException(e);
+		} catch (CrsProjException e) {
+			throw new CrsException(e);
+		}
+	}
+
+	public IProjection getPOrig() {
+		return null;
+	}
+
+	public IProjection getPDest() {
+		return null;
+	}
+
+	public Point2D convert(Point2D ptOrig, Point2D ptDest) {
+		try {
+			ptDest = operate(ptOrig);
+		} catch (CrsException e) {
+			// TODO LWS implementar una gesti�n completa de los errores.
+			NotificationManager.addError(e);
+		}
+		return ptDest;
+	}
+
+	public Rectangle2D convert(Rectangle2D rect) {
+		Point2D pt1 = new Point2D.Double(rect.getMinX(), rect.getMinY());
+		Point2D pt2 = new Point2D.Double(rect.getMaxX(), rect.getMaxY());
+		try {
+			pt1 = operate(pt1);
+			pt2 = operate(pt2);
+		} catch (CrsException e) {
+			// TODO LWS implementar una gesti�n completa de los errores.
+			e.printStackTrace();
+		}
+		rect = new Rectangle2D.Double();
+		rect.setFrameFromDiagonal(pt1, pt2);
+		return rect;
+	}
+
+	public ICoordTrans getInverted() {
+		try {
+			return new COperation(targetCrs, sourceCrs);
+		} catch (CrsException e) {
+			e.printStackTrace();
+		}
+		return null;
+	}
+	
+	public void setNadCrsProj(CrsProj nadCrs, boolean inTarget){
+		this.nadInTarget = inTarget;
+		this.nadCrsProj = nadCrs;
+	}
+}

Property changes on: tags/Root_F2/libraries/libJCRS/src/org/gvsig/crs/COperation.java
___________________________________________________________________
Added: svn:keywords
   + Author Date Id Revision
Added: svn:eol-style
   + native

Index: tags/Root_F2/libraries/libJCRS/src/org/gvsig/crs/gui/CRSSelectionTrDialog.java
===================================================================
--- tags/Root_F2/libraries/libJCRS/src/org/gvsig/crs/gui/CRSSelectionTrDialog.java	(revision 0)
+++ tags/Root_F2/libraries/libJCRS/src/org/gvsig/crs/gui/CRSSelectionTrDialog.java	(revision 10155)
@@ -0,0 +1,94 @@
+/* gvSIG. Sistema de Informaci�n Geogr�fica de la Generalitat Valenciana
+ *
+ * Copyright (C) 2006 Instituto de Desarrollo Regional and Generalitat Valenciana.
+ *
+ * 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., 59 Temple Place - Suite 330, Boston, MA  02111-1307,USA.
+ *
+ * For more information, contact:
+ *
+ *  Generalitat Valenciana
+ *   Conselleria d'Infraestructures i Transport
+ *   Av. Blasco Ib��ez, 50
+ *   46010 VALENCIA
+ *   SPAIN
+ *
+ *      +34 963862235
+ *   gvsig@gva.es
+ *      www.gvsig.gva.es
+ *
+ *    or
+ *
+ *   Instituto de Desarrollo Regional (Universidad de Castilla La-Mancha)
+ *   Campus Universitario s/n
+ *   02071 Alabacete
+ *   Spain
+ *
+ *   +34 967 599 200
+ */
+
+package org.gvsig.crs.gui;
+
+import javax.swing.JPanel;
+
+import org.gvsig.crs.CrsWkt;
+import org.gvsig.crs.ICrs;
+
+import com.iver.andami.PluginServices;
+import com.iver.andami.ui.mdiManager.IWindow;
+import com.iver.cit.gvsig.project.documents.view.gui.View;
+
+/**
+ * Di�logo contenedor del panel de la selecci�n de CRS y transformaci�n
+ * de la capa a a�adir
+ * 
+ * @author Jos� Luis G�mez Mart�nez
+ *
+ */
+
+public class CRSSelectionTrDialog extends JPanel {
+	
+	private static final long serialVersionUID = 1L;
+	
+	JPanel contentPane = null;
+	ICrs curProj = null;
+
+	public CRSSelectionTrDialog(ICrs proj) {
+		super(false);
+		curProj = proj;
+		inicializate();
+	}
+	public void inicializate(){
+		this.add(getContentPanel(), null);        
+	}
+			
+    public CRSMainTrPanel getProjPanel() {
+        return (CRSMainTrPanel) getContentPanel();
+    }
+
+	public JPanel getContentPanel() {
+	    if (contentPane == null) {	    	
+	    	IWindow activeWindow = PluginServices.getMDIManager().getActiveWindow();
+	    	View activeView = (com.iver.cit.gvsig.project.documents.view.gui.View) activeWindow;
+	    	int target = ((ICrs) activeView.getMapControl().getProjection()).getCode();
+	    	CrsWkt crsWktTarget = ((ICrs) activeView.getMapControl().getProjection()).getCrsWkt();
+	    	if (crsWktTarget.getDatumName().equals("")){	    		
+	    	}
+        	contentPane = new CRSMainTrPanel(target, crsWktTarget, curProj);        	
+	    	      	
+       }
+	   return contentPane;
+    }
+	
+}

Property changes on: tags/Root_F2/libraries/libJCRS/src/org/gvsig/crs/gui/CRSSelectionTrDialog.java
___________________________________________________________________
Added: svn:eol-style
   + native
Added: svn:keywords
   + Author Date Id Revision

Index: tags/Root_F2/libraries/libJCRS/src/org/gvsig/crs/gui/listeners/CRSSelectionDialogListener.java
===================================================================
--- tags/Root_F2/libraries/libJCRS/src/org/gvsig/crs/gui/listeners/CRSSelectionDialogListener.java	(revision 0)
+++ tags/Root_F2/libraries/libJCRS/src/org/gvsig/crs/gui/listeners/CRSSelectionDialogListener.java	(revision 10155)
@@ -0,0 +1,408 @@
+/* gvSIG. Sistema de Informaci�n Geogr�fica de la Generalitat Valenciana
+ *
+ * Copyright (C) 2006 Instituto de Desarrollo Regional and Generalitat Valenciana.
+ *
+ * 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., 59 Temple Place - Suite 330, Boston, MA  02111-1307,USA.
+ *
+ * For more information, contact:
+ *
+ *  Generalitat Valenciana
+ *   Conselleria d'Infraestructures i Transport
+ *   Av. Blasco Ib��ez, 50
+ *   46010 VALENCIA
+ *   SPAIN
+ *
+ *      +34 963862235
+ *   gvsig@gva.es
+ *      www.gvsig.gva.es
+ *
+ *    or
+ *
+ *   Instituto de Desarrollo Regional (Universidad de Castilla La-Mancha)
+ *   Campus Universitario s/n
+ *   02071 Alabacete
+ *   Spain
+ *
+ *   +34 967 599 200
+ */
+
+
+package org.gvsig.crs.gui.listeners;
+
+import java.awt.CardLayout;
+import java.awt.event.ActionEvent;
+import java.awt.event.ActionListener;
+import java.awt.event.ItemEvent;
+import java.awt.event.ItemListener;
+import java.awt.event.MouseEvent;
+import java.awt.event.MouseListener;
+
+import javax.swing.JOptionPane;
+import javax.swing.ListSelectionModel;
+import javax.swing.event.DocumentEvent;
+import javax.swing.event.DocumentListener;
+import javax.swing.event.ListSelectionEvent;
+import javax.swing.event.ListSelectionListener;
+
+import org.gvsig.crs.CrsWkt;
+import org.gvsig.crs.ICrs;
+import org.gvsig.crs.gui.CRSSelectionDialog;
+import org.gvsig.crs.persistence.CrsData;
+import org.gvsig.crs.persistence.RecentCRSsPersistence;
+
+import com.iver.andami.PluginServices;
+
+/**
+ * Esta clase contiene los listeners necesarios para el manejo 
+ * de los eventos del panel de elecci�n de CRS de la vista principal.
+ * 
+ * @author Diego Guerrero Sevilla (diego.guerrero@uclm.es)
+ * @author Jos� Luis G�mez Mart�nez (jolugomar@gmail.com)
+ *
+ */
+
+public class CRSSelectionDialogListener implements ActionListener,
+		 ListSelectionListener, ItemListener, MouseListener {
+	
+	CRSSelectionDialog dialog = null;
+
+	public CRSSelectionDialogListener(CRSSelectionDialog d) {
+		dialog = d;
+	}
+	
+	/**
+	 * Manejador de los eventos relacionados con los botones del panel
+	 * de selecci�n de CRS.
+	 */
+	public void actionPerformed(ActionEvent e) {
+		if (e.getSource() == dialog.getCrsMainPanel().getJButtonAccept()){
+			dialog.setLastProj(dialog.getProjection());
+			dialog.setDataSource(dialog.getCrsMainPanel().getDataSource());
+        	if (dialog.getLastProj() != null){
+        		/*
+        		 * Actualizar recientes...
+        		 */
+        		String authority = ((ICrs)dialog.getLastProj()).getCrsWkt().getAuthority()[0];
+        		String name = ((ICrs)dialog.getLastProj()).getCrsWkt().getName();
+        		int code = ((ICrs)dialog.getLastProj()).getCode();
+        		CrsData crsData = new CrsData(authority,code,name);
+        		RecentCRSsPersistence persistence = new RecentCRSsPersistence(RecentCRSsPersistence.pluginClassInstance);
+        		persistence.addCrsData(crsData);
+        		
+        		
+        		PluginServices.getMDIManager().closeWindow(dialog);
+        		dialog.setOkPressed(true);
+			}
+        	else {
+        		dialog.setOkPressed(false);
+        	}	
+		}
+		
+		if (e.getSource() == dialog.getCrsMainPanel().getJButtonCancel()){
+			dialog.setProjection(dialog.getLastProj());
+            PluginServices.getMDIManager().closeWindow(dialog);
+            dialog.setOkPressed(false);
+		}
+
+	}
+
+
+	/**
+	 * Maneja los eventos del combobox de elecci�n de repositorio para
+	 * la selecci�n del CRS de la vista
+	 */
+	public void itemStateChanged(ItemEvent e) {
+		CardLayout cl = (CardLayout)(dialog.getCrsMainPanel().getJPanelMain().getLayout());
+		String op = (String)e.getItem();		
+		if (op.equals("EPSG")){
+			dialog.getCrsMainPanel().getEpsgPanel().connection();	
+			if(dialog.getCrsMainPanel().getEpsgPanel().getJTable().getSelectedRowCount()>0)
+				dialog.getCrsMainPanel().getJButtonAccept().setEnabled(true);
+			else
+				dialog.getCrsMainPanel().getJButtonAccept().setEnabled(false);
+				
+		} else if (op.equals("IAU2000")) {
+			dialog.getCrsMainPanel().getIauPanel().connection();
+			if(dialog.getCrsMainPanel().getIauPanel().getJTable().getSelectedRowCount()>0)
+				dialog.getCrsMainPanel().getJButtonAccept().setEnabled(true);
+			else
+				dialog.getCrsMainPanel().getJButtonAccept().setEnabled(false);
+		}else if (op.equals("Recientes")) {
+			if(dialog.getCrsMainPanel().getRecentsPanel().getJTable().getSelectedRowCount()>0)
+				dialog.getCrsMainPanel().getJButtonAccept().setEnabled(true);
+			else
+				dialog.getCrsMainPanel().getJButtonAccept().setEnabled(false);
+		}
+		else if (op.equals("ESRI")) {
+			dialog.getCrsMainPanel().getEsriPanel().connection();
+		if(dialog.getCrsMainPanel().getEsriPanel().getJTable().getSelectedRowCount()>0)
+			dialog.getCrsMainPanel().getJButtonAccept().setEnabled(true);
+		else
+			dialog.getCrsMainPanel().getJButtonAccept().setEnabled(false);
+		}
+	    cl.show(dialog.getCrsMainPanel().getJPanelMain(), (String)e.getItem());
+	    dialog.getCrsMainPanel().setDataSource((String)e.getItem());
+	}
+
+	/**
+	 * Maneja el evento de cambio de valor de las tablas existentes
+	 * en cada uno de los distintos repositorios para la selecci�n
+	 * del CRS de la vista.
+	 */
+	public void valueChanged(ListSelectionEvent e) {
+		if (e.getSource() == dialog.getCrsMainPanel().getRecentsPanel().getJTable().getSelectionModel()){
+			ListSelectionModel lsm = (ListSelectionModel)e.getSource();
+			
+	        if (lsm.isSelectionEmpty()) {
+	        	dialog.getCrsMainPanel().getRecentsPanel().selectedRowTable = -1;
+	        	dialog.getCrsMainPanel().getRecentsPanel().setCodeCRS(-1);
+	        	dialog.getCrsMainPanel().getJButtonAccept().setEnabled(false);		        	
+	        	dialog.setCode(0);	        	
+	        } 
+	        else {        	
+	        	dialog.getCrsMainPanel().getRecentsPanel().initCrs();	        			        	
+        		dialog.setCode(dialog.getCrsMainPanel().getRecentsPanel().getCodeCRS());
+            	dialog.getCrsMainPanel().getJButtonAccept().setEnabled(true);
+	        }
+		}
+		
+		if (e.getSource() == dialog.getCrsMainPanel().getIauPanel().getJTable().getSelectionModel()){
+			ListSelectionModel lsm = (ListSelectionModel)e.getSource();
+			String[] not_soported = {"Oblique_Cylindrical_Equal_Area"};
+			boolean soported = true;
+			 if (lsm.isSelectionEmpty()) {
+		        	dialog.getCrsMainPanel().getIauPanel().selectedRowTable = -1;
+		        	dialog.getCrsMainPanel().getIauPanel().setCodeCRS(-1);
+		        	dialog.getCrsMainPanel().getJButtonAccept().setEnabled(false);		        	
+		        	dialog.setCode(0);        	
+		        	
+			 } 
+			 else {  
+				 
+				 dialog.getCrsMainPanel().getIauPanel().selectedRowTable = lsm.getMinSelectionIndex();
+				 dialog.getCrsMainPanel().getIauPanel().setCodeCRS(Integer.parseInt((String)dialog.getCrsMainPanel().getIauPanel().sorter.getValueAt(dialog.getCrsMainPanel().getIauPanel().selectedRowTable,0)));
+				 dialog.getCrsMainPanel().getIauPanel().setWKT();
+				 CrsWkt crs = new CrsWkt(dialog.getCrsMainPanel().getIauPanel().getWKT());
+				 String crs_kind = crs.getProjection();
+				 for (int i = 0; i < not_soported.length; i++) {
+					 if (crs_kind.equals(not_soported[i]))
+		        		soported = false;					 
+		        }
+		        if (soported){
+		        	dialog.setCode(dialog.getCrsMainPanel().getIauPanel().getCodeCRS());
+		        	dialog.getCrsMainPanel().getJButtonAccept().setEnabled(true);	
+		        }
+		        else {
+		        	JOptionPane.showMessageDialog(dialog, PluginServices.getText(this,"crs_not_soported"), "Warning...",
+							JOptionPane.WARNING_MESSAGE);
+		        	dialog.getCrsMainPanel().getIauPanel().setCodeCRS(-1);
+		        	dialog.getCrsMainPanel().getIauPanel().setCodeCRS(0);
+		        	dialog.getCrsMainPanel().getJButtonAccept().setEnabled(false);	        		
+		        }	        		            	
+		     }
+		}
+		
+		if (e.getSource() == dialog.getCrsMainPanel().getEpsgPanel().getJTable().getSelectionModel()){
+			String[] not_soported = {"engineering", "vertical", "compound", "geocentric"};
+			boolean soported = true;
+			ListSelectionModel lsm = (ListSelectionModel)e.getSource();
+								
+	        if (lsm.isSelectionEmpty()) {
+	        	dialog.getCrsMainPanel().getEpsgPanel().selectedRowTable = -1;
+	        	dialog.getCrsMainPanel().getEpsgPanel().setCodeCRS(-1);
+	        	dialog.getCrsMainPanel().getJButtonAccept().setEnabled(false);        	
+	        	dialog.getCrsMainPanel().getEpsgPanel().getInfoCrs().setEnabled(false);
+	        	dialog.setCode(0);     	        	
+	        } 
+	        else {	        	
+	        	dialog.getCrsMainPanel().getEpsgPanel().selectedRowTable = lsm.getMinSelectionIndex();
+	        	String crs_kind = (String)dialog.getCrsMainPanel().getEpsgPanel().sorter.getValueAt(dialog.getCrsMainPanel().getEpsgPanel().selectedRowTable,2);	        	
+	        	for (int i = 0; i < not_soported.length; i++) {
+	        		if (crs_kind.equals(not_soported[i]))
+	        			soported = false;	        		
+	        	}
+	        	if (soported){
+	        		dialog.getCrsMainPanel().getEpsgPanel().setCodeCRS(Integer.parseInt((String)dialog.getCrsMainPanel().getEpsgPanel().sorter.getValueAt(dialog.getCrsMainPanel().getEpsgPanel().selectedRowTable,0)));
+	            	dialog.getCrsMainPanel().getEpsgPanel().setWKT();
+	            	dialog.setCode(dialog.getCrsMainPanel().getEpsgPanel().epsg_code);
+	            	dialog.getCrsMainPanel().getJButtonAccept().setEnabled(true);
+	            	dialog.getCrsMainPanel().getEpsgPanel().getInfoCrs().setEnabled(true);
+	            	
+	        	}
+	        	else {
+	        		JOptionPane.showMessageDialog(dialog, PluginServices.getText(this,"crs_not_soported"), "Warning...",
+							JOptionPane.WARNING_MESSAGE);
+	        		dialog.getCrsMainPanel().getEpsgPanel().setCodeCRS(-1);
+	        		dialog.setCode(0);
+	        		dialog.getCrsMainPanel().getJButtonAccept().setEnabled(false);
+	        		dialog.getCrsMainPanel().getEpsgPanel().getInfoCrs().setEnabled(false);
+	        	}	        	
+	        }
+		}
+		
+		if (e.getSource() == dialog.getCrsMainPanel().getEsriPanel().getJTable().getSelectionModel()){
+			ListSelectionModel lsm = (ListSelectionModel)e.getSource();
+			String[] not_soported = {"Oblique_Cylindrical_Equal_Area"};
+			boolean soported = true;
+			 if (lsm.isSelectionEmpty()) {
+		        	dialog.getCrsMainPanel().getEsriPanel().selectedRowTable = -1;
+		        	dialog.getCrsMainPanel().getEsriPanel().setCodeCRS(-1);
+		        	dialog.getCrsMainPanel().getJButtonAccept().setEnabled(false);		        	
+		        	dialog.setCode(0);        	
+		        	
+			 } 
+			 else {  
+				 
+				 dialog.getCrsMainPanel().getEsriPanel().selectedRowTable = lsm.getMinSelectionIndex();
+				 dialog.getCrsMainPanel().getEsriPanel().setCodeCRS(Integer.parseInt((String)dialog.getCrsMainPanel().getEsriPanel().sorter.getValueAt(dialog.getCrsMainPanel().getEsriPanel().selectedRowTable,0)));
+				 dialog.getCrsMainPanel().getEsriPanel().setWKT();
+				 CrsWkt crs = new CrsWkt(dialog.getCrsMainPanel().getEsriPanel().getWKT());
+				 String crs_kind = crs.getProjection();
+				 for (int i = 0; i < not_soported.length; i++) {
+					 if (crs_kind.equals(not_soported[i]))
+		        		soported = false;					 
+		        }
+		        if (soported){
+		        	dialog.setCode(dialog.getCrsMainPanel().getEsriPanel().getCodeCRS());
+		        	dialog.getCrsMainPanel().getJButtonAccept().setEnabled(true);	
+		        }
+		        else {
+		        	JOptionPane.showMessageDialog(dialog, PluginServices.getText(this,"crs_not_soported"), "Warning...",
+							JOptionPane.WARNING_MESSAGE);
+		        	dialog.getCrsMainPanel().getEsriPanel().setCodeCRS(-1);
+		        	dialog.getCrsMainPanel().getEsriPanel().setCodeCRS(0);
+		        	dialog.getCrsMainPanel().getJButtonAccept().setEnabled(false);	        		
+		        }	        		            	
+		     }
+		}
+	}
+		
+	/**
+	 * Controla los eventos relacionados con el doble click para
+	 * la selecci�n del CRS de la vista de las tablas del panel de
+	 * selecci�n de CRS
+	 */	
+	public void mouseClicked(MouseEvent e) {
+		// TODO Auto-generated method stub
+		if (e.getSource() == dialog.getCrsMainPanel().getRecentsPanel().getJTable()){
+			if (e.getClickCount() == 2){
+				dialog.setLastProj(dialog.getProjection());
+				dialog.setDataSource(dialog.getCrsMainPanel().getDataSource());
+	        	if (dialog.getLastProj() != null){
+	        		/*
+	        		 * Actualizar recientes...
+	        		 */
+	        		String authority = ((ICrs)dialog.getLastProj()).getCrsWkt().getAuthority()[0];	        		
+	        		String name = ((ICrs)dialog.getLastProj()).getCrsWkt().getName();
+	        		int code = ((ICrs)dialog.getLastProj()).getCode();
+	        		CrsData crsData = new CrsData(authority,code,name);
+	        		RecentCRSsPersistence persistence = new RecentCRSsPersistence(RecentCRSsPersistence.pluginClassInstance);
+	        		persistence.addCrsData(crsData);
+	        		
+	        		PluginServices.getMDIManager().closeWindow(dialog);
+	        		dialog.setOkPressed(true);
+				}
+	        	else dialog.setOkPressed(false);	        	
+		    }
+		}
+		
+		if (e.getSource() == dialog.getCrsMainPanel().getEpsgPanel().getJTable()){
+			if (e.getClickCount() == 2){
+				dialog.setLastProj(dialog.getProjection());
+				dialog.setDataSource(dialog.getCrsMainPanel().getDataSource());
+	        	if (dialog.getLastProj() != null){
+	        		/*
+	        		 * Actualizar recientes...
+	        		 */
+	        		String authority = ((ICrs)dialog.getLastProj()).getCrsWkt().getAuthority()[0];	        		
+	        		String name = ((ICrs)dialog.getLastProj()).getCrsWkt().getName();
+	        		int code = ((ICrs)dialog.getLastProj()).getCode();
+	        		CrsData crsData = new CrsData(authority,code,name);
+	        		RecentCRSsPersistence persistence = new RecentCRSsPersistence(RecentCRSsPersistence.pluginClassInstance);
+	        		persistence.addCrsData(crsData);
+	        		
+	        		PluginServices.getMDIManager().closeWindow(dialog);
+	        		dialog.setOkPressed(true);
+				}
+	        	else dialog.setOkPressed(false);	        		
+		    }
+		}
+		
+		if (e.getSource() == dialog.getCrsMainPanel().getIauPanel().getJTable()){
+			if (e.getClickCount() == 2){
+				dialog.setLastProj(dialog.getProjection());
+				dialog.setDataSource(dialog.getCrsMainPanel().getDataSource());
+	        	if (dialog.getLastProj() != null){
+	        		/*
+	        		 * Actualizar recientes...
+	        		 */
+	        		String authority = ((ICrs)dialog.getLastProj()).getCrsWkt().getAuthority()[0];	        		
+	        		String name = ((ICrs)dialog.getLastProj()).getCrsWkt().getName();
+	        		int code = ((ICrs)dialog.getLastProj()).getCode();
+	        		CrsData crsData = new CrsData(authority,code,name);
+	        		RecentCRSsPersistence persistence = new RecentCRSsPersistence(RecentCRSsPersistence.pluginClassInstance);
+	        		persistence.addCrsData(crsData);	        		
+	        		
+	        		PluginServices.getMDIManager().closeWindow(dialog);
+	        		dialog.setOkPressed(true);
+				}
+	        	else dialog.setOkPressed(false);	        		
+		    }
+		}
+		
+		if (e.getSource() == dialog.getCrsMainPanel().getEsriPanel().getJTable()){
+			if (e.getClickCount() == 2){
+				dialog.setLastProj(dialog.getProjection());
+				dialog.setDataSource(dialog.getCrsMainPanel().getDataSource());
+	        	if (dialog.getLastProj() != null){
+	        		/*
+	        		 * Actualizar recientes...
+	        		 */
+	        		String authority = ((ICrs)dialog.getLastProj()).getCrsWkt().getAuthority()[0];	        		
+	        		String name = ((ICrs)dialog.getLastProj()).getCrsWkt().getName();
+	        		int code = ((ICrs)dialog.getLastProj()).getCode();
+	        		CrsData crsData = new CrsData(authority,code,name);
+	        		RecentCRSsPersistence persistence = new RecentCRSsPersistence(RecentCRSsPersistence.pluginClassInstance);
+	        		persistence.addCrsData(crsData);	        		
+	        		
+	        		PluginServices.getMDIManager().closeWindow(dialog);
+	        		dialog.setOkPressed(true);
+				}
+	        	else dialog.setOkPressed(false);	        		
+		    }
+		}
+	}
+
+	public void mouseEntered(MouseEvent e) {
+		// TODO Auto-generated method stub
+		
+	}
+
+	public void mouseExited(MouseEvent e) {
+		// TODO Auto-generated method stub
+		
+	}
+
+	public void mousePressed(MouseEvent e) {
+		// TODO Auto-generated method stub
+		
+	}
+
+	public void mouseReleased(MouseEvent e) {
+		// TODO Auto-generated method stub
+		
+	}
+
+}

Property changes on: tags/Root_F2/libraries/libJCRS/src/org/gvsig/crs/gui/listeners/CRSSelectionDialogListener.java
___________________________________________________________________
Added: svn:eol-style
   + native
Added: svn:keywords
   + Author Date Id Revision

Index: tags/Root_F2/libraries/libJCRS/src/org/gvsig/crs/gui/listeners/CRSMainTrPanelListener.java
===================================================================
--- tags/Root_F2/libraries/libJCRS/src/org/gvsig/crs/gui/listeners/CRSMainTrPanelListener.java	(revision 0)
+++ tags/Root_F2/libraries/libJCRS/src/org/gvsig/crs/gui/listeners/CRSMainTrPanelListener.java	(revision 10155)
@@ -0,0 +1,984 @@
+/* gvSIG. Sistema de Informaci�n Geogr�fica de la Generalitat Valenciana
+ *
+ * Copyright (C) 2006 Instituto de Desarrollo Regional and Generalitat Valenciana.
+ *
+ * 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., 59 Temple Place - Suite 330, Boston, MA  02111-1307,USA.
+ *
+ * For more information, contact:
+ *
+ *  Generalitat Valenciana
+ *   Conselleria d'Infraestructures i Transport
+ *   Av. Blasco Ib��ez, 50
+ *   46010 VALENCIA
+ *   SPAIN
+ *
+ *      +34 963862235
+ *   gvsig@gva.es
+ *      www.gvsig.gva.es
+ *
+ *    or
+ *
+ *   Instituto de Desarrollo Regional (Universidad de Castilla La-Mancha)
+ *   Campus Universitario s/n
+ *   02071 Alabacete
+ *   Spain
+ *
+ *   +34 967 599 200
+ */
+
+
+package org.gvsig.crs.gui.listeners;
+
+import java.awt.CardLayout;
+import java.awt.Dimension;
+import java.awt.FlowLayout;
+import java.awt.GridLayout;
+import java.awt.event.ActionEvent;
+import java.awt.event.ActionListener;
+import java.awt.event.ItemEvent;
+import java.awt.event.ItemListener;
+import java.awt.event.KeyEvent;
+import java.awt.event.KeyListener;
+import java.awt.event.MouseEvent;
+import java.awt.event.MouseListener;
+import java.sql.ResultSet;
+import java.sql.SQLException;
+
+import javax.swing.JComboBox;
+import javax.swing.JOptionPane;
+import javax.swing.ListSelectionModel;
+import javax.swing.event.ListSelectionEvent;
+import javax.swing.event.ListSelectionListener;
+
+import org.gvsig.crs.CrsWkt;
+import org.gvsig.crs.ICrs;
+import org.gvsig.crs.Query;
+import org.gvsig.crs.gui.CRSMainTrPanel;
+import org.gvsig.crs.gui.panels.InfoTransformationsRecentsPanel;
+import org.gvsig.crs.ogr.GetTransepsg;
+import org.gvsig.crs.persistence.CrsData;
+import org.gvsig.crs.persistence.RecentCRSsPersistence;
+import org.gvsig.crs.persistence.RecentTrsPersistence;
+import org.gvsig.crs.persistence.TrData;
+
+import com.iver.andami.PluginServices;
+import com.iver.andami.ui.mdiManager.IWindow;
+import com.iver.cit.gvsig.project.documents.view.gui.View;
+
+/**
+ * Esta clase contiene todos los listeners necesarios para el manejo 
+ * de los eventos del panel de elecci�n de CRS de la capa y de su
+ * tranformaci�n. 
+ * 
+ * @author Diego Guerrero Sevilla (diego.guerrero@uclm.es) 
+ * @author Jos� Luis G�mez Mart�nez (jolugomar@gmail.com)
+ *
+ */
+
+public class CRSMainTrPanelListener implements ActionListener, 
+			ListSelectionListener, ItemListener, MouseListener, KeyListener{
+
+	private CRSMainTrPanel panel = null;	
+	
+	public CRSMainTrPanelListener(CRSMainTrPanel p) {
+		panel=p;	
+	}
+	
+	/**
+	 * Manejador de los eventos relacionados con los botones del panel
+	 * de transformaci�n y al combobox de las transformaciones
+	 */
+	public void actionPerformed(ActionEvent e) {
+		if(	e.getSource() == panel.getJButtonAccept()){
+			if (panel.isEpsg_tr()) {			
+				GetTransepsg epsgParams = new GetTransepsg(panel.getEpsgTrPanel().getTransformation_code(),panel.getEpsgTrPanel().connect, panel.getEpsgTrPanel().inverseTranformation);
+				panel.getEpsgTrPanel().setValues(epsgParams.getParamValue());	
+				panel.setProjection(panel.getEpsgTrPanel().getProjection());
+				panel.setEpsg_tr(false);
+				
+				/*
+				 * Actualizar Transformaciones recientes
+				 */
+				String authority = "EPSG";
+	    		String name = (String)panel.getEpsgTrPanel().sorter.getValueAt(panel.getEpsgTrPanel().selectedRowTable,1);
+	    		int code = panel.getEpsgTrPanel().getTransformation_code();
+	    		String crsSource = "EPSG:"+String.valueOf(panel.getEpsgTrPanel().getSource()); 	    			
+	    		String crsTarget = "EPSG:"+String.valueOf(panel.getEpsgTrPanel().getTarget()); 	    			
+	    		String details = (String)panel.getEpsgTrPanel().sorter.getValueAt(panel.getEpsgTrPanel().selectedRowTable,5);
+	    		TrData trData = new TrData(authority,code,name,crsSource,crsTarget,details);
+	    		RecentTrsPersistence trPersistence = new RecentTrsPersistence(RecentCRSsPersistence.pluginClassInstance);
+	    		trPersistence.addTrData(trData);
+				
+	    		
+			}
+			else if (panel.isManual_tr()) {
+				boolean domain = panel.getManualTrPanel().correctJTextField();
+				if (domain && panel.getManualTrPanel().correctDomain()){
+					panel.setProjection(panel.getManualTrPanel().getProjection());
+					panel.setManual_tr(false);
+				}
+				else if (!domain) {
+					JOptionPane.showMessageDialog(panel, 
+							PluginServices.getText(this,"numeric_format"), 
+							"Warning...", JOptionPane.WARNING_MESSAGE);					
+					return;
+				}				
+				else {
+					JOptionPane.showMessageDialog(panel, 
+							PluginServices.getText(this,"incorrect_domain"), 
+							"Warning...", JOptionPane.WARNING_MESSAGE);					
+					return;
+				}
+				
+				/*
+				 * Actualizar Transformaciones recientes
+				 */
+				String authority = "USR";
+	    		String name = PluginServices.getText(this,"manual");
+	    		int code = 0;
+	    		String crsSource = panel.getManualTrPanel().getSourceAbrev();
+	    		String crsTarget = panel.getManualTrPanel().getTargetAbrev();
+	    		String details = panel.getManualTrPanel().getValues();
+	    		 
+	    		TrData trData = new TrData(authority,code,name,crsSource,crsTarget,details);
+	    		RecentTrsPersistence trPersistence = new RecentTrsPersistence(RecentCRSsPersistence.pluginClassInstance);
+	    		trPersistence.addTrData(trData);
+				
+			}
+			else if (panel.isNads_tr()) {
+				panel.setProjection(panel.getNadsTrPanel().getProjection());
+				panel.setTargetNad(panel.getNadsTrPanel().getNad());
+				panel.setNads_tr(false);
+				
+				/*
+				 * Actualizar Transformaciones recientes
+				 */
+				String authority = "NADGR";
+	    		String name = "----";
+	    		int code = 0;
+	    		String crsSource = panel.getNadsTrPanel().getSourceAbrev();
+	    		String crsTarget = panel.getNadsTrPanel().getTargetAbrev();
+	    		String details = "";
+	    		if (panel.getNadsTrPanel().getNad())
+	    			details = panel.getNadsTrPanel().getNadFile()+ " ("+panel.getNadsTrPanel().getTargetAbrev() +")";
+	    		else
+	    			details = panel.getNadsTrPanel().getNadFile()+ "("+panel.getNadsTrPanel().getSourceAbrev() +")"; 
+	    		TrData trData = new TrData(authority,code,name,crsSource,crsTarget,details);
+	    		RecentTrsPersistence trPersistence = new RecentTrsPersistence(RecentCRSsPersistence.pluginClassInstance);
+	    		trPersistence.addTrData(trData);
+			}
+			/*
+			 * Ver que es necesario cuando aceptas en el panel de transformaciones
+			 * recientes.
+			 */
+			else if (panel.isRecents_tr()) {
+				String[] transformation = ((String)panel.getRecentsTrPanel().sorter.getValueAt(panel.getRecentsTrPanel().selectedRowTable,0)).split(":");
+				if (transformation[0].equals("USR")){
+	        		panel.getRecentsTrPanel().setParamsManual((String)panel.getRecentsTrPanel().sorter.getValueAt(panel.getRecentsTrPanel().selectedRowTable,4));
+	        		panel.setProjection(panel.getRecentsTrPanel().getProjection());
+	        	}
+				if (transformation[0].equals("EPSG")){
+					GetTransepsg epsgParams = new GetTransepsg(panel.getRecentsTrPanel().getTrCode(),panel.getEpsgTrPanel().connect, panel.getRecentsTrPanel().getInverseTransformation());
+					panel.getRecentsTrPanel().setParamsEPGS(epsgParams.getParamValue());
+					panel.setProjection(panel.getRecentsTrPanel().getProjection());
+	        	}
+				if (transformation[0].equals("NADGR")){
+					panel.setProjection(panel.getRecentsTrPanel().getProjectionNad((String)panel.getRecentsTrPanel().sorter.getValueAt(panel.getRecentsTrPanel().selectedRowTable,4)));
+				}
+				//panel.setProjection(panel.getRecentsTrPanel().getProjection());
+				panel.setRecents_tr(false);
+				
+				/*
+				 * Actualizar Transformaciones recientes
+				 */
+				String authCode = (String)panel.getRecentsTrPanel().sorter.getValueAt(panel.getRecentsTrPanel().selectedRowTable,0);
+				String authority = authCode.split(":")[0];
+	    		String name = (String)panel.getRecentsTrPanel().sorter.getValueAt(panel.getRecentsTrPanel().selectedRowTable,1);
+	    		int code = Integer.parseInt(authCode.split(":")[1]);
+	    		String crsSource = (String)panel.getRecentsTrPanel().sorter.getValueAt(panel.getRecentsTrPanel().selectedRowTable,2);
+	    		String crsTarget = (String)panel.getRecentsTrPanel().sorter.getValueAt(panel.getRecentsTrPanel().selectedRowTable,3);
+	    		String details = (String)panel.getRecentsTrPanel().sorter.getValueAt(panel.getRecentsTrPanel().selectedRowTable,4);	    		
+	    		TrData trData = new TrData(authority,code,name,crsSource,crsTarget,details);
+	    		RecentTrsPersistence trPersistence = new RecentTrsPersistence(RecentCRSsPersistence.pluginClassInstance);
+	    		trPersistence.addTrData(trData);
+			}
+			else{
+				panel.setSin_tr(true);
+				panel.setProjection(panel.getProjection());							
+			}
+			
+			/*
+    		 * Actualizar recientes...
+    		 */
+    		String authority = ((ICrs)panel.getProjection()).getCrsWkt().getAuthority()[0];
+    		String name = ((ICrs)panel.getProjection()).getCrsWkt().getName();
+    		int code = ((ICrs)panel.getProjection()).getCode();
+    		CrsData crsData = new CrsData(authority,code,name);
+    		RecentCRSsPersistence persistence = new RecentCRSsPersistence(RecentCRSsPersistence.pluginClassInstance);
+    		persistence.addCrsData(crsData);
+			
+			PluginServices.getMDIManager().closeWindow(panel);
+		}
+		
+		if(	e.getSource() == panel.getJButtonBefore()){
+			CardLayout cl = (CardLayout)(panel.getJPanelMain().getLayout());
+		    cl.show(panel.getJPanelMain(), "primero");
+		    panel.setEpsg_tr(false);
+        	panel.setNads_tr(false);
+        	panel.setManual_tr(false);
+        	panel.setRecents_tr(false);
+        	panel.getJButtonNext().setVisible(true);
+		    panel.getJButtonAccept().setVisible(false);
+		    panel.getJButtonBefore().setEnabled(false);
+		}
+		
+		if(	e.getSource() == panel.getJButtonCancel()){
+			panel.setCancelYes(true);
+			panel.setProjection(panel.getCrsfirst());
+			PluginServices.getMDIManager().closeWindow(panel);
+		}
+
+		if(	e.getSource() == panel.getJButtonNext()){
+			panel.getJButtonNext().setVisible(false);
+			panel.getJButtonAccept().setVisible(true);
+			panel.getJButtonBefore().setEnabled(true);
+			if (panel.getNewSelection().equals(PluginServices.getText(this,"transformacion_manual"))) {
+				CardLayout cl = (CardLayout)(panel.getJPanelMain().getLayout());
+				if (panel.getDataSource().equals(PluginServices.getText(this,"EPSG"))){
+					panel.getManualTrPanel().setWKT(panel.getCrsMainPanel().getEpsgPanel().getWKT());
+					panel.getManualTrPanel().setCode(panel.getCrsMainPanel().getEpsgPanel().epsg_code);
+					panel.getManualTrPanel().setTargetAuthority(panel.getCrsWkt_target().getAuthority());
+				}
+				else if (panel.getDataSource().equals(PluginServices.getText(this,"recientes"))) {
+					panel.getManualTrPanel().setWKT(panel.getCrsMainPanel().getRecentsPanel().getCrs().getWKT());
+					panel.getManualTrPanel().setCode(panel.getCrsMainPanel().getRecentsPanel().getCodeCRS());
+					panel.getManualTrPanel().setTargetAuthority(panel.getCrsWkt_target().getAuthority());
+				}
+				if(!panel.getManualTrPanel().getStatus()) {
+					panel.getJButtonAccept().setEnabled(false);
+				}
+				panel.setManual_tr(true);
+			    cl.show(panel.getJPanelMain(), "manual");		    
+			}		
+			else if(panel.getNewSelection().equals(PluginServices.getText(this,"nadgrids"))){
+				CardLayout cl = (CardLayout)(panel.getJPanelMain().getLayout());
+				if (panel.getDataSource().equals(PluginServices.getText(this,"EPSG"))){
+					panel.getNadsTrPanel().setWKT(panel.getCrsMainPanel().getEpsgPanel().getWKT());
+					panel.getNadsTrPanel().setCode(panel.getCrsMainPanel().getEpsgPanel().epsg_code);
+					panel.getNadsTrPanel().setTargetAuthority(panel.getCrsWkt_target().getAuthority());
+				}
+				else if (panel.getDataSource().equals(PluginServices.getText(this,"recientes"))) {
+					panel.getNadsTrPanel().setWKT(panel.getCrsMainPanel().getRecentsPanel().getCrs().getWKT());
+					panel.getNadsTrPanel().setCode(panel.getCrsMainPanel().getRecentsPanel().getCodeCRS());
+					panel.getNadsTrPanel().setTargetAuthority(panel.getCrsWkt_target().getAuthority());
+				}
+				if (panel.getNadsTrPanel().getJComboNadFile().getSelectedIndex() == 0)
+					panel.getJButtonAccept().setEnabled(false);
+				else panel.getJButtonAccept().setEnabled(true);
+				panel.setNads_tr(true);
+			    cl.show(panel.getJPanelMain(), "nad");		    
+			}
+			else if(panel.getNewSelection().equals(PluginServices.getText(this,"transformacion_epsg"))){
+				CardLayout cl = (CardLayout)(panel.getJPanelMain().getLayout());
+				if (panel.getDataSource().equals(PluginServices.getText(this,"EPSG"))){
+					panel.getEpsgTrPanel().setWKT(panel.getCrsMainPanel().getEpsgPanel().getWKT());
+					panel.getEpsgTrPanel().setSource(panel.getCrsMainPanel().getEpsgPanel().epsg_code);
+				}
+				else if (panel.getDataSource().equals(PluginServices.getText(this,"recientes"))) {
+					panel.getEpsgTrPanel().setWKT(panel.getCrsMainPanel().getRecentsPanel().getCrs().getWKT());
+					panel.getEpsgTrPanel().setSource(panel.getCrsMainPanel().getRecentsPanel().getCodeCRS());
+				}
+				int numr = panel.getEpsgTrPanel().dtm.getRowCount();
+				if (numr == 0 )
+					panel.getJButtonAccept().setEnabled(false);
+				panel.setEpsg_tr(true);				
+			    cl.show(panel.getJPanelMain(), "epsg");		    			
+			}
+			/*
+			 * Parte necesaria para la transformacion reciente, cuando se vaya a cargar
+			 * el panel, tendremos que ver que hay que pasarle.
+			 */
+			else if(panel.getNewSelection().equals(PluginServices.getText(this, "recents_transformation"))) {
+				CardLayout cl = (CardLayout)(panel.getJPanelMain().getLayout());
+				if (panel.getDataSource().equals(PluginServices.getText(this,"EPSG"))){
+					panel.getRecentsTrPanel().setWKT(panel.getCrsMainPanel().getEpsgPanel().getWKT());
+					panel.getRecentsTrPanel().loadRecents(panel.getCrsMainPanel().getEpsgPanel().getCodeCRS(),Integer.parseInt(panel.getCrsWkt_target().getAuthority()[1]));
+					//panel.getRecentsTrPanel().setTargetAuthority(panel.getCrsWkt_target().getAuthority());
+				}
+				else if (panel.getDataSource().equals(PluginServices.getText(this,"recientes"))) {
+					panel.getRecentsTrPanel().setWKT(panel.getCrsMainPanel().getRecentsPanel().getCrs().getWKT());
+					panel.getRecentsTrPanel().loadRecents(panel.getCrsMainPanel().getRecentsPanel().getCodeCRS(),Integer.parseInt(panel.getCrsWkt_target().getAuthority()[1]));
+					//panel.getRecentsTrPanel().setTargetAuthority(panel.getCrsWkt_target().getAuthority());
+				}
+				
+				int numr = panel.getRecentsTrPanel().dtm.getRowCount();
+				if (numr == 0 )
+					panel.getJButtonAccept().setEnabled(false);
+				panel.setRecents_tr(true);				
+			    cl.show(panel.getJPanelMain(), "recents");
+			}
+		}	
+		if(	e.getSource() == panel.getJComboOptions()){
+			JComboBox cb = (JComboBox)e.getSource();
+			panel.setNewSelection((String)cb.getSelectedItem());
+		    if (panel.getNewSelection().equals(PluginServices.getText(this,"sin_transformacion"))){
+				panel.getJButtonAccept().setVisible(true);
+				panel.getJButtonNext().setVisible(false);					
+			}	
+		    else {
+		    	panel.getJButtonAccept().setVisible(false);
+		    	panel.getJButtonNext().setVisible(true);
+		    }
+		}
+		if(	e.getSource() == panel.getRecentsTrPanel().getJButtonInfo()){
+			String[] data = new String[5];
+			data[0] = (String)panel.getRecentsTrPanel().sorter.getValueAt(panel.getRecentsTrPanel().selectedRowTable,0);
+			data[1] = (String)panel.getRecentsTrPanel().sorter.getValueAt(panel.getRecentsTrPanel().selectedRowTable,1);
+			data[2] = (String)panel.getRecentsTrPanel().sorter.getValueAt(panel.getRecentsTrPanel().selectedRowTable,2);
+			data[3] = (String)panel.getRecentsTrPanel().sorter.getValueAt(panel.getRecentsTrPanel().selectedRowTable,3);
+			data[4] = (String)panel.getRecentsTrPanel().sorter.getValueAt(panel.getRecentsTrPanel().selectedRowTable,4);
+			
+			InfoTransformationsRecentsPanel info = new InfoTransformationsRecentsPanel(data);
+			info.setSize(new Dimension(450,200));
+			info.setLayout(new GridLayout(0,1));
+			info.setLayout(new FlowLayout(FlowLayout.LEFT,10,5));
+			PluginServices.getMDIManager().addWindow(info);
+		}
+	}
+
+	/**
+	 * Manejador de los eventos relacionados al cambio de valor
+	 * dentro de las tablas del panel de tranformaciones.
+	 */
+	public void valueChanged(ListSelectionEvent e) {
+		if (e.getSource() == panel.getCrsMainPanel().getRecentsPanel().getJTable().getSelectionModel()){
+			ListSelectionModel lsm = (ListSelectionModel)e.getSource();
+	        if (lsm.isSelectionEmpty()) {
+	        	panel.getCrsMainPanel().getRecentsPanel().selectedRowTable = -1;
+	        	panel.getCrsMainPanel().getRecentsPanel().setCodeCRS(-1);
+	        	panel.getJButtonAccept().setEnabled(false);		        	
+	        	panel.getJComboOptions().setEnabled(false); 
+	        	panel.getJButtonNext().setVisible(false);
+	        	panel.getJComboOptions().setSelectedIndex(0);	        	
+	        } 
+	        else {        	
+	        	panel.getCrsMainPanel().getRecentsPanel().initCrs();		        			        	
+	        	String sour = (String)panel.getCrsMainPanel().getRecentsPanel().sorter.getValueAt(panel.getCrsMainPanel().getRecentsPanel().selectedRowTable,0);
+	        	IWindow activeWindow = PluginServices.getMDIManager().getActiveWindow();
+		    	View activeView = (com.iver.cit.gvsig.project.documents.view.gui.View) activeWindow;
+		    	String authority = ((ICrs) activeView.getMapControl().getProjection()).getCrsWkt().getAuthority()[0];
+	        	if (sour.equals("EPSG") && authority.equals("EPSG")){
+	        		//panel.compareDatum(panel.getCrsMainPanel().getRecentsPanel().getCrs().getWKT());
+	        		panel.getJComboOptions().setEnabled(true);
+	        		panel.getJButtonAccept().setEnabled(true);
+	        	}
+	        	else {
+	        		panel.getJComboOptions().setSelectedIndex(0);	        		
+	        		panel.getJComboOptions().setEnabled(false);
+	        		panel.getJButtonAccept().setEnabled(true);
+	        		panel.getJButtonAccept().setVisible(true);	        			        		
+	        		panel.getJButtonNext().setVisible(false);
+	        	}
+	        }
+		}
+		
+		if (e.getSource() == panel.getCrsMainPanel().getEpsgPanel().getJTable().getSelectionModel()){
+			String[] not_soported = {"engineering", "vertical", "compound", "geocentric"};
+			boolean soported = true;
+			ListSelectionModel lsm = (ListSelectionModel)e.getSource();
+			if (lsm.isSelectionEmpty()) {
+				panel.getCrsMainPanel().getEpsgPanel().selectedRowTable = -1;
+				panel.getCrsMainPanel().getEpsgPanel().setCodeCRS(-1);
+	        	panel.getJButtonAccept().setEnabled(false);
+	        	panel.getCrsMainPanel().getEpsgPanel().getInfoCrs().setEnabled(false);
+	        	panel.getJComboOptions().setEnabled(false);
+	        	panel.getJButtonNext().setVisible(false);
+	        	panel.getJComboOptions().setSelectedIndex(0);	        
+			}
+			else {
+				panel.getCrsMainPanel().getEpsgPanel().selectedRowTable = lsm.getMinSelectionIndex();	        	
+	        	String crs_kind = (String)panel.getCrsMainPanel().getEpsgPanel().sorter.getValueAt(panel.getCrsMainPanel().getEpsgPanel().selectedRowTable,2);
+	        	for (int i = 0; i < not_soported.length; i++) {
+	        		if (crs_kind.equals(not_soported[i])) 
+	        			soported = false;	        		
+	        	}
+	        	if (soported){
+	        		panel.getCrsMainPanel().getEpsgPanel().setCodeCRS(Integer.parseInt((String)panel.getCrsMainPanel().getEpsgPanel().sorter.getValueAt(panel.getCrsMainPanel().getEpsgPanel().selectedRowTable,0)));
+	        		panel.getCrsMainPanel().getEpsgPanel().setWKT();        		
+	        		panel.getJButtonAccept().setEnabled(true);
+	            	int base = panel.getCrsMainPanel().getEpsgPanel().getCodeCRS();						
+					//panel.compareDatum(panel.getCrsMainPanel().getEpsgPanel().getWKT());
+	            	IWindow activeWindow = PluginServices.getMDIManager().getActiveWindow();
+			    	View activeView = (com.iver.cit.gvsig.project.documents.view.gui.View) activeWindow;
+			    	String authority = ((ICrs) activeView.getMapControl().getProjection()).getCrsWkt().getAuthority()[0];
+	            	if (authority.equals("EPSG")){
+	            		panel.getJComboOptions().setEnabled(true);
+	            		panel.getJButtonAccept().setEnabled(true);
+	            	}
+	            	else {
+		        		panel.getJComboOptions().setSelectedIndex(0);	        		
+		        		panel.getJComboOptions().setEnabled(false);
+		        		panel.getJButtonAccept().setEnabled(true);
+		        		panel.getJButtonAccept().setVisible(true);	        			        		
+		        		panel.getJButtonNext().setVisible(false);
+		        	}	        		
+	        		panel.getCrsMainPanel().getEpsgPanel().getInfoCrs().setEnabled(true);
+	        	}
+	        	else {
+	        		JOptionPane.showMessageDialog(panel, PluginServices.getText(this,"crs_not_soported"), "Warning...",
+							JOptionPane.WARNING_MESSAGE);
+	        		panel.getCrsMainPanel().getEpsgPanel().setCodeCRS(-1);
+	        		panel.getCrsMainPanel().getEpsgPanel().setCodeCRS(0);
+	        		panel.getJButtonAccept().setEnabled(false);
+	        		panel.getCrsMainPanel().getEpsgPanel().getInfoCrs().setEnabled(false);
+	        	}	        				        	  
+		    } 
+		}
+		
+		if (e.getSource() == panel.getCrsMainPanel().getIauPanel().getJTable().getSelectionModel()){
+			ListSelectionModel lsm = (ListSelectionModel)e.getSource();				
+			String[] not_soported = {"Oblique_Cylindrical_Equal_Area"};
+			boolean soported = true;
+	        if (lsm.isSelectionEmpty()) {
+	        	panel.getCrsMainPanel().getIauPanel().selectedRowTable = -1;
+	        	panel.getCrsMainPanel().getIauPanel().setCodeCRS(-1);
+	        	panel.getJButtonAccept().setEnabled(false);		        	
+	        	panel.getJComboOptions().setEnabled(false);     
+	        	panel.getJButtonNext().setVisible(false);
+	        	panel.getJComboOptions().setSelectedIndex(0);	        	
+	        } 
+	        else {        	
+	        	panel.getCrsMainPanel().getIauPanel().selectedRowTable = lsm.getMinSelectionIndex();
+	        	panel.getCrsMainPanel().getIauPanel().setCodeCRS(Integer.parseInt((String)panel.getCrsMainPanel().getIauPanel().sorter.getValueAt(panel.getCrsMainPanel().getIauPanel().selectedRowTable,0)));
+	        	panel.getCrsMainPanel().getIauPanel().setWKT();
+	        	CrsWkt crs = new CrsWkt(panel.getCrsMainPanel().getIauPanel().getWKT());
+	        	String crs_kind = crs.getProjection();
+	        	for (int i = 0; i < not_soported.length; i++) {
+	        		if (crs_kind.equals(not_soported[i]))
+	        			soported = false;	        		
+	        	}
+	        	if (soported){
+	        		panel.getJComboOptions().setEnabled(false);
+	        		panel.getJButtonAccept().setEnabled(true);	
+	        	}
+	        	else {
+	        		JOptionPane.showMessageDialog(panel, PluginServices.getText(this,"crs_not_soported"), "Warning...",
+							JOptionPane.WARNING_MESSAGE);
+	        		panel.getCrsMainPanel().getIauPanel().setCodeCRS(-1);
+	        		panel.getCrsMainPanel().getIauPanel().setCodeCRS(0);
+	        		panel.getJButtonAccept().setEnabled(false);	        		
+	        	}	        		            	
+	        }
+		}
+		
+		if (e.getSource() == panel.getCrsMainPanel().getEsriPanel().getJTable().getSelectionModel()){
+			ListSelectionModel lsm = (ListSelectionModel)e.getSource();				
+			String[] not_soported = {"Oblique_Cylindrical_Equal_Area"};
+			boolean soported = true;
+	        if (lsm.isSelectionEmpty()) {
+	        	panel.getCrsMainPanel().getEsriPanel().selectedRowTable = -1;
+	        	panel.getCrsMainPanel().getEsriPanel().setCodeCRS(-1);
+	        	panel.getJButtonAccept().setEnabled(false);		        	
+	        	panel.getJComboOptions().setEnabled(false);     
+	        	panel.getJButtonNext().setVisible(false);
+	        	panel.getJComboOptions().setSelectedIndex(0);	        	
+	        } 
+	        else {        	
+	        	panel.getCrsMainPanel().getEsriPanel().selectedRowTable = lsm.getMinSelectionIndex();
+	        	panel.getCrsMainPanel().getEsriPanel().setCodeCRS(Integer.parseInt((String)panel.getCrsMainPanel().getEsriPanel().sorter.getValueAt(panel.getCrsMainPanel().getEsriPanel().selectedRowTable,0)));
+	        	panel.getCrsMainPanel().getEsriPanel().setWKT();
+	        	CrsWkt crs = new CrsWkt(panel.getCrsMainPanel().getEsriPanel().getWKT());
+	        	String crs_kind = crs.getProjection();
+	        	for (int i = 0; i < not_soported.length; i++) {
+	        		if (crs_kind.equals(not_soported[i]))
+	        			soported = false;	        		
+	        	}
+	        	if (soported){
+	        		panel.getJComboOptions().setEnabled(false);
+	        		panel.getJButtonAccept().setEnabled(true);	
+	        	}
+	        	else {
+	        		JOptionPane.showMessageDialog(panel, PluginServices.getText(this,"crs_not_soported"), "Warning...",
+							JOptionPane.WARNING_MESSAGE);
+	        		panel.getCrsMainPanel().getEsriPanel().setCodeCRS(-1);
+	        		panel.getCrsMainPanel().getEsriPanel().setCodeCRS(0);
+	        		panel.getJButtonAccept().setEnabled(false);	        		
+	        	}	        		            	
+	        }
+		}
+		
+		
+		if (e.getSource() == panel.getEpsgTrPanel().getJTable().getSelectionModel()){
+			ListSelectionModel lsm = (ListSelectionModel)e.getSource();
+	        if (lsm.isSelectionEmpty()) {
+	        	panel.getEpsgTrPanel().selectedRowTable = -1;	        	
+	        	panel.getJButtonAccept().setEnabled(false);
+	        } 
+	        else {
+	        	panel.getEpsgTrPanel().selectedRowTable = lsm.getMinSelectionIndex();
+	        	panel.getEpsgTrPanel().setTrasformation_code(Integer.parseInt((String)panel.getEpsgTrPanel().sorter.getValueAt(panel.getEpsgTrPanel().selectedRowTable,0)));
+	            String sentence = "SELECT target_crs_code " +
+								"FROM epsg_coordoperation " +                        
+								"WHERE coord_op_code = " + panel.getEpsgTrPanel().getTransformation_code() ;
+	            ResultSet result = Query.select(sentence,panel.getEpsgTrPanel().connect.getConnection());
+	            try {
+					result.next();
+					int tar = result.getInt("target_crs_code");
+					if (tar == panel.getEpsgTrPanel().crs_target) 
+						panel.getEpsgTrPanel().inverseTranformation = false;					
+					else panel.getEpsgTrPanel().inverseTranformation = true;
+				} catch (SQLException e1) {							
+					e1.printStackTrace();
+				}
+				panel.getJButtonAccept().setEnabled(true);
+	        }
+		}
+		
+		/*
+		 * una vez cambiamos la transformacion a elegir, habra que ver que parametros
+		 * tenemos que definir para que cuando aceptemos hayan sido definidos
+		 * anteriormente
+		 */
+		if (e.getSource() == panel.getRecentsTrPanel().getJTable().getSelectionModel()){
+			ListSelectionModel lsm = (ListSelectionModel)e.getSource();
+	        if (lsm.isSelectionEmpty()) {
+	        	panel.getRecentsTrPanel().selectedRowTable = -1;
+	        	panel.getRecentsTrPanel().setCode(0);
+	        	panel.getJButtonAccept().setEnabled(false);
+	        	panel.getRecentsTrPanel().getJButtonInfo().setEnabled(false);
+	        } 
+	        else {
+	        	panel.getRecentsTrPanel().selectedRowTable = lsm.getMinSelectionIndex();
+	        	String[] cad = ((String)panel.getRecentsTrPanel().sorter.getValueAt(panel.getRecentsTrPanel().selectedRowTable,2)).split(":");	        	
+	        	panel.getRecentsTrPanel().setCode(Integer.parseInt(cad[1]));
+	        	String[] transformation = ((String)panel.getRecentsTrPanel().sorter.getValueAt(panel.getRecentsTrPanel().selectedRowTable,0)).split(":");
+	        	if (transformation[0].equals("EPSG")){	        		
+					panel.getRecentsTrPanel().setTrCode(Integer.parseInt(transformation[1]));	
+	        	}
+	        	panel.getRecentsTrPanel().getJButtonInfo().setEnabled(true);	        	
+	        	panel.getJButtonAccept().setEnabled(true);
+	        }
+		}
+	}
+
+	/**
+	 * Manejador de los eventos relacionados con el cambio de opci�n
+	 * dentro del combobox de elecci�n de repositorio, y del combobox
+	 * de elecci�n del archivo .gsb para el panel de transformaci�n
+	 * de nadgrids.
+	 */
+	public void itemStateChanged(ItemEvent e) {
+		if (e.getSource() == panel.getCrsMainPanel().getJComboOptions()) {
+			CardLayout cl = (CardLayout)(panel.getCrsMainPanel().getJPanelMain().getLayout());
+			String op = (String)e.getItem();		
+			if (op.equals("EPSG")){
+				String[] not_soported = {"engineering", "vertical", "compound", "geocentric"};
+				boolean soported = true;
+				panel.getCrsMainPanel().getEpsgPanel().connection();
+				if(panel.getCrsMainPanel().getEpsgPanel().getJTable().getSelectedRowCount()>0) {
+					panel.getCrsMainPanel().getEpsgPanel().selectedRowTable = panel.getCrsMainPanel().getEpsgPanel().getJTable().getSelectedRow();	        	
+		        	String crs_kind = (String)panel.getCrsMainPanel().getEpsgPanel().sorter.getValueAt(panel.getCrsMainPanel().getEpsgPanel().selectedRowTable,2);
+		        	for (int i = 0; i < not_soported.length; i++) {
+		        		if (crs_kind.equals(not_soported[i]))
+		        			soported = false;		        		
+		        	}
+		        	if (soported){
+		        		panel.getCrsMainPanel().getEpsgPanel().setCodeCRS(Integer.parseInt((String)panel.getCrsMainPanel().getEpsgPanel().sorter.getValueAt(panel.getCrsMainPanel().getEpsgPanel().selectedRowTable,0)));
+		        		panel.getCrsMainPanel().getEpsgPanel().setWKT();        		
+		        		panel.getJButtonAccept().setEnabled(true);
+		            	int base = panel.getCrsMainPanel().getEpsgPanel().getCodeCRS();						
+						//panel.compareDatum(panel.getCrsMainPanel().getEpsgPanel().getWKT());
+		            	panel.getJComboOptions().setEnabled(true);
+		        		panel.getJButtonAccept().setEnabled(true);
+		        		panel.getCrsMainPanel().getEpsgPanel().getInfoCrs().setEnabled(true);
+		        	}
+		        	else {
+		        		JOptionPane.showMessageDialog(panel, PluginServices.getText(this,"crs_not_soported"), "Warning...",
+								JOptionPane.WARNING_MESSAGE);
+		        		panel.getCrsMainPanel().getEpsgPanel().setCodeCRS(-1);
+		        		panel.getCrsMainPanel().getEpsgPanel().setCodeCRS(0);
+		        		panel.getJButtonAccept().setEnabled(false);
+		        		panel.getCrsMainPanel().getEpsgPanel().getInfoCrs().setEnabled(false);
+		        	}		        	
+				}
+				else{
+					panel.getJButtonNext().setVisible(false);
+					panel.getJComboOptions().setEnabled(false);
+					panel.getJComboOptions().setSelectedIndex(0);
+					panel.getJButtonAccept().setEnabled(false);
+				}
+			} else if (op.equals("IAU2000")) {
+				panel.getCrsMainPanel().getIauPanel().connection();
+				if(panel.getCrsMainPanel().getIauPanel().getJTable().getSelectedRowCount()>0) {
+					panel.getCrsMainPanel().getIauPanel().selectedRowTable = panel.getCrsMainPanel().getIauPanel().getJTable().getSelectedRow();;
+		        	panel.getCrsMainPanel().getIauPanel().setCodeCRS(Integer.parseInt((String)panel.getCrsMainPanel().getIauPanel().sorter.getValueAt(panel.getCrsMainPanel().getIauPanel().selectedRowTable,0)));
+		        	panel.getCrsMainPanel().getIauPanel().setWKT();  
+		    		panel.getJComboOptions().setEnabled(false);
+		    		panel.getJButtonAccept().setEnabled(true);			
+					panel.getJButtonNext().setVisible(false);
+				}
+				else {
+					panel.getJButtonNext().setVisible(false);
+					panel.getJComboOptions().setEnabled(false);
+					panel.getJComboOptions().setSelectedIndex(0);
+					panel.getJButtonAccept().setEnabled(false);
+				}
+			}
+			else if (op.equals("Recientes")) {
+				if(panel.getCrsMainPanel().getRecentsPanel().getJTable().getSelectedRowCount()>0) {
+					panel.getCrsMainPanel().getRecentsPanel().initCrs();		        	
+		        	String sour =  panel.getCrsMainPanel().getRecentsPanel().getCrs().getCrsWkt().getAuthority()[0]; //(String)panel.getCrsMainPanel().getRecentsPanel().sorter.getValueAt(panel.getCrsMainPanel().getRecentsPanel().selectedRowTable,0);
+		        	IWindow activeWindow = PluginServices.getMDIManager().getActiveWindow();
+			    	View activeView = (com.iver.cit.gvsig.project.documents.view.gui.View) activeWindow;
+			    	String authority = ((ICrs) activeView.getMapControl().getProjection()).getCrsWkt().getAuthority()[0];
+		        	if (sour.equals("EPSG") && authority.equals("EPSG")){
+		        		//panel.compareDatum(panel.getCrsMainPanel().getRecentsPanel().getCrs().getWKT());
+		        		panel.getJComboOptions().setEnabled(true);
+		        		panel.getJButtonAccept().setEnabled(true);
+		        	}
+		        	else {
+		        		panel.getJComboOptions().setSelectedIndex(0);	        		
+		        		panel.getJComboOptions().setEnabled(false);
+		        		panel.getJButtonAccept().setEnabled(true);
+		        		panel.getJButtonAccept().setVisible(true);	        			        		
+		        		panel.getJButtonNext().setVisible(false);
+		        	}				
+				}			
+				else {
+					panel.getJButtonNext().setVisible(false);
+					panel.getJComboOptions().setEnabled(false);
+					panel.getJComboOptions().setSelectedIndex(0);
+					panel.getJButtonAccept().setEnabled(false);
+				}
+			}
+			else if (op.equals("ESRI")) {
+				panel.getCrsMainPanel().getEsriPanel().connection();
+				if(panel.getCrsMainPanel().getEsriPanel().getJTable().getSelectedRowCount()>0) {
+					panel.getCrsMainPanel().getEsriPanel().selectedRowTable = panel.getCrsMainPanel().getEsriPanel().getJTable().getSelectedRow();;
+		        	panel.getCrsMainPanel().getEsriPanel().setCodeCRS(Integer.parseInt((String)panel.getCrsMainPanel().getEsriPanel().sorter.getValueAt(panel.getCrsMainPanel().getEsriPanel().selectedRowTable,0)));
+		        	panel.getCrsMainPanel().getEsriPanel().setWKT();  
+		    		panel.getJComboOptions().setEnabled(false);
+		    		panel.getJButtonAccept().setEnabled(true);			
+					panel.getJButtonNext().setVisible(false);
+				}
+				else {
+					panel.getJButtonNext().setVisible(false);
+					panel.getJComboOptions().setEnabled(false);
+					panel.getJComboOptions().setSelectedIndex(0);
+					panel.getJButtonAccept().setEnabled(false);
+				}
+			}
+		    cl.show(panel.getCrsMainPanel().getJPanelMain(), (String)e.getItem());
+		    panel.getCrsMainPanel().setDataSource((String)e.getItem());
+		}
+	    	    
+	    if (e.getSource() == panel.getNadsTrPanel().getJComboNadFile()){
+			if (panel.getNadsTrPanel().getJComboNadFile().getSelectedIndex()!=0){
+				panel.getNadsTrPanel().setNadFile(panel.getNadsTrPanel().getJComboNadFile().getSelectedItem().toString());//nadFile = getJComboNadFile().getSelectedItem().toString();
+				panel.getNadsTrPanel().getTreePanel().setRoot(PluginServices.getText(this,"grids_en")+": "+panel.getNadsTrPanel().getNadFile());//nadFile);
+				panel.getNadsTrPanel().initializeTree();
+				// Guardar en persistencia nadFile:
+				panel.getNadsTrPanel().saveNadFileName(panel.getNadsTrPanel().getNadFile());//nadFile);
+				panel.getJButtonAccept().setEnabled(true);
+			}
+			else{
+				panel.getNadsTrPanel().setNadFile(null);//nadFile = null;
+				panel.getNadsTrPanel().getTreePanel().setRoot("");
+				panel.getJButtonAccept().setEnabled(false);
+			}
+			
+		}
+	}
+		
+	/**
+	 * M�todo para manejar el doble click sobre las tablas existentes en
+	 * el panel de transformaci�n. Aceptar el CRS seleccionado, as� como
+	 * la transformaci�n en el caso de que elijamos transformaci�n EPSG.
+	 */
+	public void mouseClicked(MouseEvent e) {
+		// TODO Auto-generated method stub
+		if (panel.getJButtonAccept().isVisible()) {
+			if (e.getSource() == panel.getCrsMainPanel().getRecentsPanel().getJTable()){
+				if (e.getClickCount() == 2){
+					if (panel.isEpsg_tr()) {			
+						GetTransepsg epsgParams = new GetTransepsg(panel.getEpsgTrPanel().getTransformation_code(),panel.getEpsgTrPanel().connect, panel.getEpsgTrPanel().inverseTranformation);
+						panel.getEpsgTrPanel().setValues(epsgParams.getParamValue());	
+						panel.setProjection(panel.getEpsgTrPanel().getProjection());
+						panel.setEpsg_tr(false);
+			    		
+					}
+					else if (panel.isManual_tr()) {
+						panel.setProjection(panel.getManualTrPanel().getProjection());
+						panel.setManual_tr(false);
+					}
+					else if (panel.isNads_tr()) {
+						panel.setProjection(panel.getNadsTrPanel().getProjection());
+						panel.setTargetNad(panel.getNadsTrPanel().getNad());
+						panel.setNads_tr(false);
+					}
+					else{
+						panel.setSin_tr(true);
+						panel.setProjection(panel.getProjection());
+					}
+										
+		    		// * Actualizar recientes...
+		    		 
+		    		String authority = ((ICrs)panel.getProjection()).getCrsWkt().getAuthority()[0];
+		    		String name = ((ICrs)panel.getProjection()).getCrsWkt().getName();
+		    		int code = ((ICrs)panel.getProjection()).getCode();
+		    		CrsData crsData = new CrsData(authority,code,name);
+		    		RecentCRSsPersistence persistence = new RecentCRSsPersistence(RecentCRSsPersistence.pluginClassInstance);
+		    		persistence.addCrsData(crsData);
+					
+					PluginServices.getMDIManager().closeWindow(panel);
+				}
+			}
+			if (e.getSource() == panel.getCrsMainPanel().getEpsgPanel().getJTable()){
+				if (e.getClickCount() == 2){
+					if (panel.isEpsg_tr()) {			
+						GetTransepsg epsgParams = new GetTransepsg(panel.getEpsgTrPanel().getTransformation_code(),panel.getEpsgTrPanel().connect, panel.getEpsgTrPanel().inverseTranformation);
+						panel.getEpsgTrPanel().setValues(epsgParams.getParamValue());	
+						panel.setProjection(panel.getEpsgTrPanel().getProjection());
+						panel.setEpsg_tr(false);
+						
+						/*
+						 * Actualizar Transformaciones recientes
+						 */
+						String authority = "EPSG";
+			    		String name = (String)panel.getEpsgTrPanel().sorter.getValueAt(panel.getEpsgTrPanel().selectedRowTable,1);
+			    		int code = panel.getEpsgTrPanel().getTransformation_code();
+			    		String crsSource = "EPSG:"+String.valueOf(panel.getEpsgTrPanel().getSource()); 	    			
+			    		String crsTarget = "EPSG:"+String.valueOf(panel.getEpsgTrPanel().getTarget());
+			    		String details = (String)panel.getEpsgTrPanel().sorter.getValueAt(panel.getEpsgTrPanel().selectedRowTable,5);;
+			    		TrData trData = new TrData(authority,code,name,crsSource,crsTarget,details);
+			    		RecentTrsPersistence trPersistence = new RecentTrsPersistence(RecentCRSsPersistence.pluginClassInstance);
+			    		trPersistence.addTrData(trData);
+					}
+					else if (panel.isManual_tr()) {
+						panel.setProjection(panel.getManualTrPanel().getProjection());
+						panel.setManual_tr(false);
+					}
+					else if (panel.isNads_tr()) {
+						panel.setProjection(panel.getNadsTrPanel().getProjection());
+						panel.setTargetNad(panel.getNadsTrPanel().getNad());
+						panel.setNads_tr(false);
+					}
+					else{
+						panel.setSin_tr(true);
+						panel.setProjection(panel.getProjection());
+					}
+					
+		    		 //* Actualizar recientes...
+		    		 
+		    		String authority = ((ICrs)panel.getProjection()).getCrsWkt().getAuthority()[0];
+		    		String name = ((ICrs)panel.getProjection()).getCrsWkt().getName();
+		    		int code = ((ICrs)panel.getProjection()).getCode();
+		    		CrsData crsData = new CrsData(authority,code,name);
+		    		RecentCRSsPersistence persistence = new RecentCRSsPersistence(RecentCRSsPersistence.pluginClassInstance);
+		    		persistence.addCrsData(crsData);
+					
+					PluginServices.getMDIManager().closeWindow(panel);
+				}
+			}
+			if (e.getSource() == panel.getCrsMainPanel().getIauPanel().getJTable()){
+				if (e.getClickCount() == 2){
+					if (panel.isEpsg_tr()) {			
+						GetTransepsg epsgParams = new GetTransepsg(panel.getEpsgTrPanel().getTransformation_code(),panel.getEpsgTrPanel().connect, panel.getEpsgTrPanel().inverseTranformation);
+						panel.getEpsgTrPanel().setValues(epsgParams.getParamValue());	
+						panel.setProjection(panel.getEpsgTrPanel().getProjection());
+						panel.setEpsg_tr(false);
+					}
+					else if (panel.isManual_tr()) {
+						panel.setProjection(panel.getManualTrPanel().getProjection());
+						panel.setManual_tr(false);
+					}
+					else if (panel.isNads_tr()) {
+						panel.setProjection(panel.getNadsTrPanel().getProjection());
+						panel.setTargetNad(panel.getNadsTrPanel().getNad());
+						panel.setNads_tr(false);
+					}
+					else{
+						panel.setSin_tr(true);
+						panel.setProjection(panel.getProjection());
+					}
+					
+		    		 //* Actualizar recientes...
+		    		 
+		    		String authority = ((ICrs)panel.getProjection()).getCrsWkt().getAuthority()[0];
+		    		String name = ((ICrs)panel.getProjection()).getCrsWkt().getName();
+		    		int code = ((ICrs)panel.getProjection()).getCode();
+		    		CrsData crsData = new CrsData(authority,code,name);
+		    		RecentCRSsPersistence persistence = new RecentCRSsPersistence(RecentCRSsPersistence.pluginClassInstance);
+		    		persistence.addCrsData(crsData);
+					
+					PluginServices.getMDIManager().closeWindow(panel);
+				}
+			}
+			if (e.getSource() == panel.getCrsMainPanel().getEsriPanel().getJTable()){
+				if (e.getClickCount() == 2){
+					if (panel.isEpsg_tr()) {			
+						GetTransepsg epsgParams = new GetTransepsg(panel.getEpsgTrPanel().getTransformation_code(),panel.getEpsgTrPanel().connect, panel.getEpsgTrPanel().inverseTranformation);
+						panel.getEpsgTrPanel().setValues(epsgParams.getParamValue());	
+						panel.setProjection(panel.getEpsgTrPanel().getProjection());
+						panel.setEpsg_tr(false);
+					}
+					else if (panel.isManual_tr()) {
+						panel.setProjection(panel.getManualTrPanel().getProjection());
+						panel.setManual_tr(false);
+					}
+					else if (panel.isNads_tr()) {
+						panel.setProjection(panel.getNadsTrPanel().getProjection());
+						panel.setTargetNad(panel.getNadsTrPanel().getNad());
+						panel.setNads_tr(false);
+					}
+					else{
+						panel.setSin_tr(true);
+						panel.setProjection(panel.getProjection());
+					}
+					
+		    		 //* Actualizar recientes...
+		    		 
+		    		String authority = ((ICrs)panel.getProjection()).getCrsWkt().getAuthority()[0];
+		    		String name = ((ICrs)panel.getProjection()).getCrsWkt().getName();
+		    		int code = ((ICrs)panel.getProjection()).getCode();
+		    		CrsData crsData = new CrsData(authority,code,name);
+		    		RecentCRSsPersistence persistence = new RecentCRSsPersistence(RecentCRSsPersistence.pluginClassInstance);
+		    		persistence.addCrsData(crsData);
+					
+					PluginServices.getMDIManager().closeWindow(panel);
+				}
+			}
+		}
+		if (e.getSource() == panel.getEpsgTrPanel().getJTable()){
+			if (e.getClickCount() == 2){
+				GetTransepsg epsgParams = new GetTransepsg(panel.getEpsgTrPanel().getTransformation_code(),panel.getEpsgTrPanel().connect, panel.getEpsgTrPanel().inverseTranformation);
+				panel.getEpsgTrPanel().setValues(epsgParams.getParamValue());	
+				panel.setProjection(panel.getEpsgTrPanel().getProjection());
+				panel.setEpsg_tr(false);
+				
+				/*
+				 * Actualizar Transformaciones recientes
+				 */
+				String authority = "EPSG";
+	    		String name = (String)panel.getEpsgTrPanel().sorter.getValueAt(panel.getEpsgTrPanel().selectedRowTable,1);
+	    		int code = panel.getEpsgTrPanel().getTransformation_code();
+	    		String crsSource = "EPSG:"+String.valueOf(panel.getEpsgTrPanel().getSource()); 	    			
+	    		String crsTarget = "EPSG:"+String.valueOf(panel.getEpsgTrPanel().getTarget());
+	    		String details = (String)panel.getEpsgTrPanel().sorter.getValueAt(panel.getEpsgTrPanel().selectedRowTable,5);;
+	    		TrData trData = new TrData(authority,code,name,crsSource,crsTarget,details);
+	    		RecentTrsPersistence trPersistence = new RecentTrsPersistence(RecentCRSsPersistence.pluginClassInstance);
+	    		trPersistence.addTrData(trData);
+				
+				/*
+	    		 * Actualizar Crss recientes...
+	    		 */
+	    		authority = ((ICrs)panel.getProjection()).getCrsWkt().getAuthority()[0];
+	    		name = ((ICrs)panel.getProjection()).getCrsWkt().getName();
+	    		code = ((ICrs)panel.getProjection()).getCode();
+	    		CrsData crsData = new CrsData(authority,code,name);
+	    		RecentCRSsPersistence persistence = new RecentCRSsPersistence(RecentCRSsPersistence.pluginClassInstance);
+	    		persistence.addCrsData(crsData);
+				
+				PluginServices.getMDIManager().closeWindow(panel);
+			}
+		}
+		if (e.getSource() == panel.getRecentsTrPanel().getJTable()){
+			if (e.getClickCount() == 2){
+				if (((String)panel.getRecentsTrPanel().sorter.getValueAt(panel.getRecentsTrPanel().selectedRowTable,0)).equals("USR")){
+	        		panel.getRecentsTrPanel().setParamsManual((String)panel.getRecentsTrPanel().sorter.getValueAt(panel.getRecentsTrPanel().selectedRowTable,4));
+	        		panel.setProjection(panel.getRecentsTrPanel().getProjection());
+	        	}
+				if (((String)panel.getRecentsTrPanel().sorter.getValueAt(panel.getRecentsTrPanel().selectedRowTable,0)).equals("EPSG")){
+					GetTransepsg epsgParams = new GetTransepsg(panel.getRecentsTrPanel().getTrCode(),panel.getEpsgTrPanel().connect, panel.getRecentsTrPanel().getInverseTransformation());
+					panel.getRecentsTrPanel().setParamsEPGS(epsgParams.getParamValue());
+					panel.setProjection(panel.getRecentsTrPanel().getProjection());
+	        	}
+				if (((String)panel.getRecentsTrPanel().sorter.getValueAt(panel.getRecentsTrPanel().selectedRowTable,0)).equals("NADGR")){
+					panel.setProjection(panel.getRecentsTrPanel().getProjectionNad((String)panel.getRecentsTrPanel().sorter.getValueAt(panel.getRecentsTrPanel().selectedRowTable,4)));
+				}
+				//panel.setProjection(panel.getRecentsTrPanel().getProjection());
+				panel.setRecents_tr(false);				
+				
+				/*
+				 * Actualizar Transformaciones recientes
+				 */
+				String authCode = (String)panel.getRecentsTrPanel().sorter.getValueAt(panel.getRecentsTrPanel().selectedRowTable,0);
+				String authority = authCode.split(":")[0];
+	    		String name = (String)panel.getRecentsTrPanel().sorter.getValueAt(panel.getRecentsTrPanel().selectedRowTable,1);
+	    		int code = Integer.parseInt(authCode.split(":")[1]);
+	    		String crsSource = (String)panel.getRecentsTrPanel().sorter.getValueAt(panel.getRecentsTrPanel().selectedRowTable,2);
+	    		String crsTarget = (String)panel.getRecentsTrPanel().sorter.getValueAt(panel.getRecentsTrPanel().selectedRowTable,3);
+	    		String details = (String)panel.getRecentsTrPanel().sorter.getValueAt(panel.getRecentsTrPanel().selectedRowTable,4);	    		
+	    		TrData trData = new TrData(authority,code,name,crsSource,crsTarget,details);
+	    		RecentTrsPersistence trPersistence = new RecentTrsPersistence(RecentCRSsPersistence.pluginClassInstance);
+	    		trPersistence.addTrData(trData);
+								
+				/*
+	    		 * Actualizar recientes...
+	    		 */
+	    		authority = ((ICrs)panel.getProjection()).getCrsWkt().getAuthority()[0];
+	    		name = ((ICrs)panel.getProjection()).getCrsWkt().getName();
+	    		code = ((ICrs)panel.getProjection()).getCode();
+	    		CrsData crsData = new CrsData(authority,code,name);
+	    		RecentCRSsPersistence persistence = new RecentCRSsPersistence(RecentCRSsPersistence.pluginClassInstance);
+	    		persistence.addCrsData(crsData);
+				
+				PluginServices.getMDIManager().closeWindow(panel);
+			}
+		}
+	}
+
+	public void mouseEntered(MouseEvent e) {
+		// TODO Auto-generated method stub
+		
+	}
+
+	public void mouseExited(MouseEvent e) {
+		// TODO Auto-generated method stub
+		
+	}
+
+	public void mousePressed(MouseEvent e) {
+		// TODO Auto-generated method stub
+		
+	}
+
+	public void mouseReleased(MouseEvent e) {
+		// TODO Auto-generated method stub
+		
+	}
+
+	public void keyPressed(KeyEvent arg0) {
+		// TODO Auto-generated method stub
+		
+	}
+
+	/**
+	 * M�todo para cuando en la tranformaci�n manual, no se hayan insertado
+	 * valores de transformaci�n, no se habilite el bot�n de aceptar.
+	 */
+	public void keyReleased(KeyEvent e) {
+		// TODO Auto-generated method stub
+		if(!panel.getManualTrPanel().getStatus()) 
+			panel.getJButtonAccept().setEnabled(false);		
+		else panel.getJButtonAccept().setEnabled(true);		
+	}
+
+	public void keyTyped(KeyEvent arg0) {
+		// TODO Auto-generated method stub
+		
+	}
+
+}

Property changes on: tags/Root_F2/libraries/libJCRS/src/org/gvsig/crs/gui/listeners/CRSMainTrPanelListener.java
___________________________________________________________________
Added: svn:keywords
   + Author Date Id Revision
Added: svn:eol-style
   + native

Index: tags/Root_F2/libraries/libJCRS/src/org/gvsig/crs/gui/CRSMainPanel.java
===================================================================
--- tags/Root_F2/libraries/libJCRS/src/org/gvsig/crs/gui/CRSMainPanel.java	(revision 0)
+++ tags/Root_F2/libraries/libJCRS/src/org/gvsig/crs/gui/CRSMainPanel.java	(revision 10155)
@@ -0,0 +1,313 @@
+/* gvSIG. Sistema de Informaci�n Geogr�fica de la Generalitat Valenciana
+ *
+ * Copyright (C) 2006 Instituto de Desarrollo Regional and Generalitat Valenciana.
+ *
+ * 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., 59 Temple Place - Suite 330, Boston, MA  02111-1307,USA.
+ *
+ * For more information, contact:
+ *
+ *  Generalitat Valenciana
+ *   Conselleria d'Infraestructures i Transport
+ *   Av. Blasco Ib��ez, 50
+ *   46010 VALENCIA
+ *   SPAIN
+ *
+ *      +34 963862235
+ *   gvsig@gva.es
+ *      www.gvsig.gva.es
+ *
+ *    or
+ *
+ *   Instituto de Desarrollo Regional (Universidad de Castilla La-Mancha)
+ *   Campus Universitario s/n
+ *   02071 Alabacete
+ *   Spain
+ *
+ *   +34 967 599 200
+ */
+
+package org.gvsig.crs.gui;
+
+import java.awt.BorderLayout;
+import java.awt.CardLayout;
+import java.awt.Dimension;
+import java.awt.FlowLayout;
+import java.awt.GridLayout;
+import java.awt.event.ActionEvent;
+
+import javax.swing.BorderFactory;
+import javax.swing.JButton;
+import javax.swing.JComboBox;
+import javax.swing.JLabel;
+import javax.swing.JPanel;
+
+import org.cresques.cts.IProjection;
+import org.gvsig.crs.ICrs;
+import org.gvsig.crs.gui.panels.CrsRecentsPanel;
+import org.gvsig.crs.gui.panels.EPSGpanel;
+import org.gvsig.crs.gui.panels.ESRIpanel;
+import org.gvsig.crs.gui.panels.IAU2000panel;
+
+import com.iver.andami.PluginServices;
+import com.iver.andami.ui.mdiManager.IWindow;
+import com.iver.andami.ui.mdiManager.WindowInfo;
+
+/**
+ * Clase que genera el panel principal para la selecci�n de CRS 
+ * 
+ * @author Jos� Luis G�mez Mart�nez (jolugomar@gmail.com)
+ *
+ */
+public class CRSMainPanel extends JPanel implements IWindow {
+		
+	private static final long serialVersionUID = 1L;
+	
+	private JComboBox jComboOptions = null;	
+	private JPanel Combopanel = null;	
+	private JPanel USGSpanel = null;	
+	
+	final String recientes = PluginServices.getText(this,"recientes");
+	final String epsg = PluginServices.getText(this,"EPSG"); 
+	final String usgs = PluginServices.getText(this,"USGS");
+	final String esri = PluginServices.getText(this,"ESRI");
+	final String iau2000 = PluginServices.getText(this,"IAU2000");
+	final String newCRS = PluginServices.getText(this,"nuevo_crs");
+	
+	//String[] selection = {recientes, epsg, usgs, esri, iau2000, newCRS};
+	String[] selection = {recientes, epsg, iau2000};//, esri};
+	
+	boolean inAnApplet = true;	
+	public CrsRecentsPanel crsRecentsPanel = null;
+	public EPSGpanel epsgPanel = null;
+	public ESRIpanel esriPanel = null;
+	public IAU2000panel iauPanel = null;
+	
+	private JPanel jPanelMain = null;	
+	
+	private JPanel jPanelButtons;
+	private JButton jButtonAccept;
+	private JButton jButonCancel;
+	
+	String dataSource = "";
+
+	public CRSMainPanel() {
+		crsRecentsPanel = new CrsRecentsPanel();
+		epsgPanel = new EPSGpanel();
+		esriPanel = new ESRIpanel();
+		iauPanel = new IAU2000panel();
+		
+		this.add(vista(), BorderLayout.NORTH);		
+		this.add(getJPanelButtons(), BorderLayout.SOUTH);
+		
+	    setDataSource(selection[0]);
+	}
+	
+	public CRSMainPanel(int target) {
+		crsRecentsPanel = new CrsRecentsPanel();
+		epsgPanel = new EPSGpanel();
+		esriPanel = new ESRIpanel();
+		iauPanel = new IAU2000panel();
+		
+		setDataSource(selection[0]);
+	}
+	
+	/**
+	 * Panel con los controles necesarios para visualizarlo en el panel de 
+	 * selecci�n de CRS y transformaci�n de la capa a a�adir
+	 * @return
+	 */
+	public JPanel capa(){
+		JPanel p = new JPanel();
+		p.setPreferredSize(new Dimension(550, 320));
+		p.setLayout(new GridLayout(0,1));
+		p.setLayout(new FlowLayout(FlowLayout.LEFT,10,10));	
+		p.setBorder(
+			    BorderFactory.createCompoundBorder(
+						BorderFactory.createCompoundBorder(
+								BorderFactory.createTitledBorder(PluginServices.getText(this,"seleccione_crs_capa")),
+								BorderFactory.createEmptyBorder(1,1,1,1)),
+								p.getBorder()));
+		p.add(getCombopanel());
+		p.add(getJPanelMain());
+		return p;
+	}
+	
+	/**
+	 * Panel con los controles necesarios del panel de selecci�n de CRS 
+	 * de la vista actual
+	 * @return
+	 */
+	public JPanel vista(){
+		JPanel p = new JPanel();
+		p.setPreferredSize(new Dimension(550, 320));
+		p.setLayout(new GridLayout(0,1));
+		p.setLayout(new FlowLayout(FlowLayout.LEFT,10,10));
+		p.setBorder(
+			    BorderFactory.createCompoundBorder(
+						BorderFactory.createCompoundBorder(
+								BorderFactory.createTitledBorder(PluginServices.getText(this,"seleccione_crs_vista")),
+								BorderFactory.createEmptyBorder(2,2,2,2)),
+								p.getBorder()));
+		p.add(getCombopanel());
+		p.add(getJPanelMain());
+		return p;
+	}
+	
+	public JPanel getJPanelMain(){
+		if (jPanelMain == null){
+			jPanelMain = new JPanel();
+			jPanelMain.setLayout(new CardLayout());
+			jPanelMain.setPreferredSize(new Dimension(525, 230));	
+			jPanelMain.add(recientes, crsRecentsPanel);
+			jPanelMain.add(epsg, epsgPanel);
+			jPanelMain.add(esri, esriPanel);
+			jPanelMain.add(usgs, getJPanelUSGS());
+			jPanelMain.add(iau2000, iauPanel);
+		}
+		
+		return jPanelMain;		
+	}
+	
+	public JPanel getCombopanel(){
+		if (Combopanel == null){
+			Combopanel = new JPanel();
+			Combopanel.setPreferredSize(new Dimension(525,30));
+			Combopanel.add(getJLabelTipo());
+			Combopanel.add(getJComboOptions());
+		}
+		
+		return Combopanel;
+	}
+	
+	private JLabel getJLabelTipo(){
+		JLabel jLabelTipo = new JLabel();
+		jLabelTipo.setPreferredSize(new Dimension(50,25));
+		jLabelTipo.setText(PluginServices.getText(this,"Tipo")+":");
+		return jLabelTipo;
+	}
+	
+	public JComboBox getJComboOptions(){
+		if (jComboOptions == null){
+			jComboOptions = new JComboBox(selection);
+			jComboOptions.setPreferredSize(new Dimension(100,25));			
+			jComboOptions.setEditable(false);
+			jComboOptions.setSelectedIndex(0);					
+		}
+		return jComboOptions;
+	}
+			
+	public JPanel getJPanelUSGS() {	
+		if (USGSpanel == null){
+			USGSpanel = new JPanel();
+			USGSpanel.setLayout(new GridLayout(3,4));
+			USGSpanel.setLayout(new FlowLayout(FlowLayout.LEFT,10,10));
+			USGSpanel.setPreferredSize(new Dimension(525, 400));			
+		}	
+		return USGSpanel;
+	}			
+	
+	private JPanel getJPanelButtons() {
+		if(jPanelButtons == null) {
+			jPanelButtons = new JPanel();
+			jPanelButtons.setLayout(new FlowLayout(FlowLayout.RIGHT));
+			jPanelButtons.setPreferredSize(new Dimension(525,50));
+			jPanelButtons.add(getJButtonCancel(),null);
+			jPanelButtons.add(getJButtonAccept(),null);			
+		}
+		return jPanelButtons;
+	}
+	
+	public JButton getJButtonCancel() {
+		if(jButonCancel == null) {
+			jButonCancel = new JButton();
+			jButonCancel.setText(PluginServices.getText(this,"cancel"));
+			jButonCancel.setPreferredSize(new Dimension(100,25));
+			jButonCancel.setMnemonic('C');
+			jButonCancel.setToolTipText("Cancel");			
+		}
+		return jButonCancel;
+	}
+	
+	public void cancelButton_actionPerformed(ActionEvent e) {		
+		 PluginServices.getMDIManager().closeWindow(this);
+	}
+	
+	public JButton getJButtonAccept() {
+		if(jButtonAccept == null) {
+			jButtonAccept = new JButton();
+			jButtonAccept.setText(PluginServices.getText(this,"ok"));
+			jButtonAccept.setPreferredSize(new Dimension(100,25));
+			jButtonAccept.setEnabled(false);
+			jButtonAccept.setMnemonic('A');
+			jButtonAccept.setToolTipText("Accept");			
+		}
+		return jButtonAccept;
+	}
+	
+	public ICrs getProjection() {
+		if (getDataSource().equals(PluginServices.getText(this,"EPSG"))){
+			return epsgPanel.getProjection();
+		}
+		else if (getDataSource().equals(PluginServices.getText(this,"IAU2000"))) {
+			return iauPanel.getProjection();
+		}
+		else if (getDataSource().equals(PluginServices.getText(this,"recientes"))) {
+			return crsRecentsPanel.getProjection();
+		}
+		else if (getDataSource().equals(PluginServices.getText(this,"ESRI"))) {
+			return esriPanel.getProjection();
+		}
+		return null;
+	}
+	
+	public void setProjection(IProjection crs) {
+		//setCrs((ICrs) crs);
+	}
+	
+	public void setDataSource(String sour){
+		dataSource = sour;
+	}
+	
+	public String getDataSource(){
+		return dataSource;
+	}
+
+	public WindowInfo getWindowInfo() {
+		WindowInfo m_viewinfo=new WindowInfo(WindowInfo.MODALDIALOG);
+   		m_viewinfo.setTitle(PluginServices.getText(this, "seleccionar_crs"));
+		return m_viewinfo;
+	}
+
+	public EPSGpanel getEpsgPanel() {
+		return epsgPanel;
+	}
+
+	
+
+	public ESRIpanel getEsriPanel() {
+		return esriPanel;
+	}
+
+
+
+	public IAU2000panel getIauPanel() {
+		return iauPanel;
+	}
+
+	public CrsRecentsPanel getRecentsPanel() {
+		return crsRecentsPanel;
+	}
+
+}

Property changes on: tags/Root_F2/libraries/libJCRS/src/org/gvsig/crs/gui/CRSMainPanel.java
___________________________________________________________________
Added: svn:keywords
   + Author Date Id Revision
Added: svn:eol-style
   + native

Index: tags/Root_F2/libraries/libJCRS/src/org/gvsig/crs/gui/CRSSelectionDialog.java
===================================================================
--- tags/Root_F2/libraries/libJCRS/src/org/gvsig/crs/gui/CRSSelectionDialog.java	(revision 0)
+++ tags/Root_F2/libraries/libJCRS/src/org/gvsig/crs/gui/CRSSelectionDialog.java	(revision 10155)
@@ -0,0 +1,175 @@
+/* gvSIG. Sistema de Informaci�n Geogr�fica de la Generalitat Valenciana
+ *
+ * Copyright (C) 2006 Instituto de Desarrollo Regional and Generalitat Valenciana.
+ *
+ * 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., 59 Temple Place - Suite 330, Boston, MA  02111-1307,USA.
+ *
+ * For more information, contact:
+ *
+ *  Generalitat Valenciana
+ *   Conselleria d'Infraestructures i Transport
+ *   Av. Blasco Ib��ez, 50
+ *   46010 VALENCIA
+ *   SPAIN
+ *
+ *      +34 963862235
+ *   gvsig@gva.es
+ *      www.gvsig.gva.es
+ *
+ *    or
+ *
+ *   Instituto de Desarrollo Regional (Universidad de Castilla La-Mancha)
+ *   Campus Universitario s/n
+ *   02071 Alabacete
+ *   Spain
+ *
+ *   +34 967 599 200
+ */
+
+package org.gvsig.crs.gui;
+
+import javax.swing.JPanel;
+import javax.swing.ListSelectionModel;
+import org.cresques.cts.IProjection;
+import org.gvsig.crs.gui.listeners.CRSSelectionDialogListener;
+import com.iver.andami.PluginServices;
+import com.iver.andami.ui.mdiManager.IWindow;
+import com.iver.andami.ui.mdiManager.WindowInfo;
+
+/**
+ * Di�logo contenedor del panel para la selecci�n de CRS. 
+ * (para el CRS de la vista)
+ * 
+ * @author Jos� Luis G�mez Mart�nez (jolugomar@gmail.com)
+ * @author Diego Guerrero Sevilla (diego.guerrero@uclm.es)
+ */
+public class CRSSelectionDialog extends JPanel implements  IWindow {
+	
+	private static final long serialVersionUID = 1L;	
+	
+	JPanel contentPane = null;
+	private CRSMainPanel crsMainPanel = null;
+	private IProjection lastProj = null;
+	int code = 0;
+	String dataSource = "";
+	
+	private boolean okPressed = false;
+		
+	public CRSSelectionDialog(){
+		super();		
+		initialize();
+	}
+	
+	public void initialize(){
+		crsMainPanel = new CRSMainPanel();
+		this.add(getContentPanel(), null);
+		setListeners();	
+		crsMainPanel.getRecentsPanel().loadRecents();
+	}
+	
+	public boolean isOkPressed() { return okPressed; }
+			
+    public CRSMainPanel getProjPanel() {
+        return (CRSMainPanel) getContentPanel();
+    }
+
+	public JPanel getContentPanel() {
+	    if (contentPane == null) {
+        	contentPane = crsMainPanel;
+        	
+       }
+      return contentPane;
+    }	
+	
+	public void setListeners(){
+		
+		CRSSelectionDialogListener listener = new CRSSelectionDialogListener(this); 
+		
+		ListSelectionModel rowSM = crsMainPanel.getEpsgPanel().getJTable().getSelectionModel();
+		rowSM.addListSelectionListener(listener);
+		
+		ListSelectionModel rowSMiau = crsMainPanel.getIauPanel().getJTable().getSelectionModel();
+		rowSMiau.addListSelectionListener(listener);
+		
+		ListSelectionModel rowSMrecents = crsMainPanel.getRecentsPanel().getJTable().getSelectionModel();
+		rowSMrecents.addListSelectionListener(listener);
+		
+		ListSelectionModel rowSMesri = crsMainPanel.getEsriPanel().getJTable().getSelectionModel();
+		rowSMesri.addListSelectionListener(listener);
+		
+		crsMainPanel.getJComboOptions().addItemListener(listener);
+		crsMainPanel.getJButtonAccept().addActionListener(listener);
+        crsMainPanel.getJButtonCancel().addActionListener(listener);
+        crsMainPanel.getEsriPanel().getJTable().addMouseListener(listener);
+        crsMainPanel.getEpsgPanel().getJTable().addMouseListener(listener);
+        crsMainPanel.getRecentsPanel().getJTable().addMouseListener(listener);
+        crsMainPanel.getIauPanel().getJTable().addMouseListener(listener);
+	}
+
+	public void setCode(int cod){
+		code = cod;
+	}
+	
+	public int getCode(){
+		return code;
+	}
+	
+	public IProjection getProjection() {
+		return (IProjection) getProjPanel().getProjection();
+	}
+	/**
+	 * @param proj
+	 */
+	public void setProjection(IProjection proj) {
+		lastProj = proj;
+		getProjPanel().setProjection(proj);
+	}
+	
+	public String getProjectionAbrev(){
+		return (String) getProjPanel().getProjection().getAbrev();
+	}
+
+	
+	
+	public void setDataSource(String sour){
+		dataSource = sour;
+	}
+	
+	public String getDataSource(){
+		return dataSource;
+	}
+	
+	public WindowInfo getWindowInfo() {
+		WindowInfo m_viewinfo=new WindowInfo(WindowInfo.MODALDIALOG);
+   		m_viewinfo.setTitle(PluginServices.getText(this, "nuevo_crs"));
+		return m_viewinfo;
+	}
+
+	public IProjection getLastProj() {
+		return lastProj;
+	}
+
+	public void setLastProj(IProjection lastProj) {
+		this.lastProj = lastProj;
+	}
+
+	public void setOkPressed(boolean okPressed) {
+		this.okPressed = okPressed;
+	}
+
+	public CRSMainPanel getCrsMainPanel() {
+		return crsMainPanel;
+	}
+}

Property changes on: tags/Root_F2/libraries/libJCRS/src/org/gvsig/crs/gui/CRSSelectionDialog.java
___________________________________________________________________
Added: svn:eol-style
   + native
Added: svn:keywords
   + Author Date Id Revision

Index: tags/Root_F2/libraries/libJCRS/src/org/gvsig/crs/gui/package.html
===================================================================
--- tags/Root_F2/libraries/libJCRS/src/org/gvsig/crs/gui/package.html	(revision 0)
+++ tags/Root_F2/libraries/libJCRS/src/org/gvsig/crs/gui/package.html	(revision 10155)
@@ -0,0 +1,4 @@
+<html>
+	<body>Clases relacionadas con la interfaz de usuario de la extensi�n CRS.
+</body>
+</html>

Property changes on: tags/Root_F2/libraries/libJCRS/src/org/gvsig/crs/gui/package.html
___________________________________________________________________
Added: svn:keywords
   + Author Date Id Revision
Added: svn:eol-style
   + native

Index: tags/Root_F2/libraries/libJCRS/src/org/gvsig/crs/gui/dialog/CSSelectionDialog.java
===================================================================
--- tags/Root_F2/libraries/libJCRS/src/org/gvsig/crs/gui/dialog/CSSelectionDialog.java	(revision 0)
+++ tags/Root_F2/libraries/libJCRS/src/org/gvsig/crs/gui/dialog/CSSelectionDialog.java	(revision 10155)
@@ -0,0 +1,55 @@
+/*
+ * Created on 26-ene-2005
+ */
+package org.gvsig.crs.gui.dialog;
+
+import java.awt.FlowLayout;
+import java.awt.GridLayout;
+
+import org.cresques.cts.IProjection;
+import org.gvsig.crs.gui.CRSSelectionDialog;
+
+
+/**
+ * Di�logo contenedor para la selecci�n de CRS. 
+ * Incluye los controles para las transformaciones
+ * para el CRS de la capa)
+ * 
+ * @author Luis W. Sevilla (sevilla_lui@gva.es)
+ */
+public class CSSelectionDialog extends CRSSelectionDialog{
+	
+	private static final long serialVersionUID = 1L;
+	/**
+	 * 
+	 */
+	public CSSelectionDialog() {
+		super();
+		this.init();
+	}
+	/**
+	 * This method initializes this
+	 * 
+	 * @return void
+	 */
+	private void init() {
+		this.setBounds(0, 0, 600, 400);
+		this.setLayout(new GridLayout(0,1));
+//		this.setLayout(new FlowLayout(FlowLayout.CENTER,10,10));
+		
+	}
+	
+	
+	/*public IProjection getProjection() {
+		return (IProjection) getProjPanel().getProjection();
+	}
+	
+	public void setProjection(IProjection proj) {
+		lastProj = proj;
+		getProjPanel().setProjection(proj);
+	}
+	
+	public String getProjectionAbrev(){
+		return  (String) getProjPanel().getProjection().getAbrev();
+	}*/	
+}

Property changes on: tags/Root_F2/libraries/libJCRS/src/org/gvsig/crs/gui/dialog/CSSelectionDialog.java
___________________________________________________________________
Added: svn:keywords
   + Author Date Id Revision
Added: svn:eol-style
   + native

Index: tags/Root_F2/libraries/libJCRS/src/org/gvsig/crs/gui/dialog/TRSelectionDialog.java
===================================================================
--- tags/Root_F2/libraries/libJCRS/src/org/gvsig/crs/gui/dialog/TRSelectionDialog.java	(revision 0)
+++ tags/Root_F2/libraries/libJCRS/src/org/gvsig/crs/gui/dialog/TRSelectionDialog.java	(revision 10155)
@@ -0,0 +1,82 @@
+/*
+ * Created on 26-ene-2005
+ */
+package org.gvsig.crs.gui.dialog;
+
+import java.awt.FlowLayout;
+import java.awt.GridLayout;
+
+import org.cresques.cts.IProjection;
+import org.gvsig.crs.ICrs;
+import org.gvsig.crs.gui.CRSSelectionTrDialog;
+
+import com.iver.andami.PluginServices;
+import com.iver.andami.ui.mdiManager.IWindow;
+import com.iver.andami.ui.mdiManager.WindowInfo;
+
+/**
+ * @author Luis W. Sevilla (sevilla_lui@gva.es)
+ */
+public class TRSelectionDialog
+	extends CRSSelectionTrDialog implements IWindow {
+	/**
+	 * 
+	 */
+	private static final long serialVersionUID = 1L;
+	private boolean okPressed = false;
+	private IProjection lastProj = null;
+	boolean targetNad = false;
+	
+	/**
+	 * 
+	 */
+	public TRSelectionDialog(ICrs curproj) {
+		super(curproj);
+		this.init();		
+	}
+	/**
+	 * This method initializes this
+	 * 
+	 * @return void
+	 */
+	private void init() {		
+		this.setBounds(0, 0, 600, 500);
+		this.setLayout(new GridLayout(0,1));
+		this.setLayout(new FlowLayout(FlowLayout.CENTER,10,10));
+		
+				
+	}
+	
+	public boolean isOkPressed() { return okPressed; }
+	
+	public void setTargetNad(boolean tarNad){
+		targetNad = tarNad;
+	}
+	
+	public boolean getTargetNad(){
+		return targetNad;
+	}
+	
+	/**
+	 * @return
+	 */
+	public IProjection getProjection() {
+		return (IProjection) getProjPanel().getProjection();
+	}
+	/**
+	 * @param proj
+	 */
+	public void setProjection(IProjection proj) {
+		lastProj = proj;
+		getProjPanel().setProjection(proj);
+	}
+	
+	public String getProjectionName(){
+		return (String) getProjPanel().getProjection().getCrsWkt().getName();				
+	}
+	public WindowInfo getWindowInfo() {
+		WindowInfo m_viewinfo=new WindowInfo(WindowInfo.MODALDIALOG);
+   		m_viewinfo.setTitle(PluginServices.getText(this, "selecciona_sistema_de_referencia"));
+		return m_viewinfo;
+	}
+}
\ No newline at end of file

Property changes on: tags/Root_F2/libraries/libJCRS/src/org/gvsig/crs/gui/dialog/TRSelectionDialog.java
___________________________________________________________________
Added: svn:eol-style
   + native
Added: svn:keywords
   + Author Date Id Revision

Index: tags/Root_F2/libraries/libJCRS/src/org/gvsig/crs/gui/CRSMainTrPanel.java
===================================================================
--- tags/Root_F2/libraries/libJCRS/src/org/gvsig/crs/gui/CRSMainTrPanel.java	(revision 0)
+++ tags/Root_F2/libraries/libJCRS/src/org/gvsig/crs/gui/CRSMainTrPanel.java	(revision 10155)
@@ -0,0 +1,510 @@
+/* gvSIG. Sistema de Informaci�n Geogr�fica de la Generalitat Valenciana
+ *
+ * Copyright (C) 2006 Instituto de Desarrollo Regional and Generalitat Valenciana.
+ *
+ * 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., 59 Temple Place - Suite 330, Boston, MA  02111-1307,USA.
+ *
+ * For more information, contact:
+ *
+ *  Generalitat Valenciana
+ *   Conselleria d'Infraestructures i Transport
+ *   Av. Blasco Ib��ez, 50
+ *   46010 VALENCIA
+ *   SPAIN
+ *
+ *      +34 963862235
+ *   gvsig@gva.es
+ *      www.gvsig.gva.es
+ *
+ *    or
+ *
+ *   Instituto de Desarrollo Regional (Universidad de Castilla La-Mancha)
+ *   Campus Universitario s/n
+ *   02071 Alabacete
+ *   Spain
+ *
+ *   +34 967 599 200
+ */
+
+package org.gvsig.crs.gui;
+
+import java.awt.BorderLayout;
+import java.awt.CardLayout;
+import java.awt.Dimension;
+import java.awt.FlowLayout;
+import java.awt.GridLayout;
+
+import javax.swing.JButton;
+import javax.swing.JComboBox;
+import javax.swing.JLabel;
+import javax.swing.JPanel;
+import javax.swing.ListSelectionModel;
+
+import org.cresques.cts.IProjection;
+import org.gvsig.crs.CrsException;
+import org.gvsig.crs.CrsFactory;
+import org.gvsig.crs.CrsWkt;
+import org.gvsig.crs.ICrs;
+import org.gvsig.crs.gui.listeners.CRSMainTrPanelListener;
+import org.gvsig.crs.gui.panels.TransformationEpsgPanel;
+import org.gvsig.crs.gui.panels.TransformationManualPanel;
+import org.gvsig.crs.gui.panels.TransformationNadgridsPanel;
+import org.gvsig.crs.gui.panels.TransformationRecentsPanel;
+
+import com.iver.andami.PluginServices;
+import com.iver.andami.ui.mdiManager.IWindow;
+import com.iver.andami.ui.mdiManager.WindowInfo;
+
+/**
+ * Clase que genera el panel de transformaci�n, en el que se incluye la
+ * elecci�n del CRS de la capa, as� como el de la posibilidad de poder
+ * asignarle una transformaci�n.
+ * 
+ * @author Jos� Luis G�mez Mart�nez (jolugomar@gmail.com)
+ *
+ */
+
+public class CRSMainTrPanel extends JPanel implements IWindow{
+
+	private static final long serialVersionUID = 1L;
+	
+	/*
+	 * Para mostrar los parametros si tenemos seleccionada transformacion
+	 */
+	boolean tra = false; 
+	boolean inAnApplet = true;
+	private boolean cancelYes = false;
+	private JButton jButtonCancel = null;
+	private JButton jButtonNext = null;
+	private JButton jButtonAccept = null;
+	private JButton jButtonBefore = null;
+	private JPanel jPanelButtons = null;
+	
+	boolean targetNad = false;	
+	
+	int crs_target = -1;
+	CrsWkt crsWkt_target = null;
+		
+	int transformation_code = 0;	
+	
+	private JPanel panel = null;
+	CRSMainPanel viewPan = null;
+	
+	private JPanel jPanelMain = null;
+	private TransformationManualPanel manualTrPanel = null;
+	private boolean manual_tr = false;
+	private TransformationEpsgPanel epsgTrPanel = null;
+	private boolean epsg_tr = false;
+	private TransformationNadgridsPanel nadsTrPanel = null;
+	private boolean nads_tr = false;
+	private TransformationRecentsPanel recentsTrPanel = null;
+	private boolean recents_tr = false;
+	
+	private boolean sin_tr = false;
+	private JPanel jPanelCombo = null;
+	private JComboBox jComboOptions = null;
+	
+	private IProjection crsfirst;
+	
+	private CRSMainPanel crsMainPanel;
+	private String newSelection;
+	String dataSource = "";
+	ICrs curProj = null;
+	
+	public CRSMainTrPanel(int target, CrsWkt crsWkttarget, ICrs proj) {			
+		curProj = proj;
+		crsMainPanel = new CRSMainPanel(target);		
+		viewPan = crsMainPanel;
+		
+		crs_target = target;
+		setCrsWkt_target(crsWkttarget);			
+		
+		manualTrPanel = new TransformationManualPanel();
+		epsgTrPanel = new TransformationEpsgPanel(crs_target);
+		nadsTrPanel = new TransformationNadgridsPanel();
+		recentsTrPanel = new TransformationRecentsPanel();
+		
+		/*
+		 * esta variable contendr� tanto el panel utilizado en CRSViewPanel, como los paneles
+		 * que seran necesarios para realizar las transformaciones
+		 */
+		jPanelMain = new JPanel();
+		jPanelMain.setLayout(new CardLayout());		
+		jPanelMain.add("primero", viewPanel());
+		jPanelMain.add("manual", manualTrPanel);
+		jPanelMain.add("epsg", epsgTrPanel);
+		jPanelMain.add("nad", nadsTrPanel);
+		jPanelMain.add("recents", recentsTrPanel);
+				
+		this.add(jPanelMain, BorderLayout.CENTER);
+		
+		this.add(getButtons(), BorderLayout.SOUTH);
+		
+		setListeners();
+		
+		setDataSource(crsMainPanel.getDataSource());
+		
+		crsMainPanel.getRecentsPanel().loadRecents();
+	}
+	
+	/**
+	 * Este m�todo cargar� todo el panel utilizado en dicho panel el
+	 *  CRSViewPanel y el combobox de las transformaciones
+	 */
+	private JPanel viewPanel(){
+		JPanel integro = new JPanel();
+		integro.setLayout(new GridLayout(0,1));
+		integro.setLayout(new FlowLayout(FlowLayout.LEFT,10,10));
+		integro.setPreferredSize(new Dimension(560,300));
+		
+		integro.add(viewPan.capa(), null);
+		integro.add(getJPanel(), null);
+		return integro;
+	}
+	
+	 
+	private JPanel getJPanel() {
+		if (panel == null){
+			panel = new JPanel();
+			panel.setPreferredSize(new Dimension(540,80));
+			panel.setLayout(new GridLayout(0,2));
+			panel.setLayout(new FlowLayout(FlowLayout.LEFT,10,10));			
+			panel.add(getCombopanel(), null);			
+		}
+		return panel;
+	}	
+	
+	public JPanel getCombopanel(){
+		if (jPanelCombo == null){
+			jPanelCombo = new JPanel();
+			jPanelCombo.setPreferredSize(new Dimension(400,30));			
+			jPanelCombo.add(getJLabelTrans());
+			jPanelCombo.add(getJComboOptions());
+		}
+		
+		return jPanelCombo;
+	}
+	
+	private JLabel getJLabelTrans(){
+		JLabel jLabelTrans = new JLabel();
+		jLabelTrans.setPreferredSize(new Dimension(180, 25));
+		jLabelTrans.setText(PluginServices.getText(this, "seleccione_transformacion")+":");
+		return jLabelTrans;
+	}
+	
+	public JComboBox getJComboOptions(){
+		if (jComboOptions == null){
+			String[] selection = {PluginServices.getText(this, "sin_transformacion"),
+					PluginServices.getText(this, "recents_transformation"),
+					PluginServices.getText(this, "transformacion_epsg"),
+					PluginServices.getText(this, "transformacion_manual"), 
+					PluginServices.getText(this, "nadgrids")}; 
+			jComboOptions = new JComboBox(selection);
+			jComboOptions.setPreferredSize(new Dimension(180,25));	
+			jComboOptions.setEnabled(false);
+			jComboOptions.setEditable(false);			
+			jComboOptions.setSelectedIndex(0);
+			newSelection = (String) jComboOptions.getSelectedItem();			
+		}
+//		jComboOptions.addActionListener(this);
+		return jComboOptions;
+	}
+	
+	private JPanel getButtons() {
+		if(jPanelButtons == null) {
+			jPanelButtons = new JPanel();
+			jPanelButtons.setPreferredSize(new Dimension(550,50));
+			jPanelButtons.setLayout(new GridLayout(0,1));
+			jPanelButtons.setLayout(new FlowLayout(FlowLayout.RIGHT,5,5));
+			jPanelButtons.add(getJButtonCancel(), null);
+			jPanelButtons.add(getJButtonBefore(), null);
+			jPanelButtons.add(getJButtonNext(), null);
+			jPanelButtons.add(getJButtonAccept(), null);
+		}
+		return jPanelButtons;
+	}
+	
+	public JButton getJButtonBefore(){
+		if(jButtonBefore == null) {
+			jButtonBefore = new JButton();
+			jButtonBefore.setText(PluginServices.getText(this,"anterior"));
+			jButtonBefore.setMnemonic('B');			
+			jButtonBefore.setPreferredSize(new Dimension(100,25));			
+			jButtonBefore.setEnabled(false);
+//			jButtonBefore.addActionListener(this);
+		}
+		return jButtonBefore;
+	}
+	
+	public JButton getJButtonAccept() {
+		if(jButtonAccept == null) {
+			jButtonAccept = new JButton();
+			jButtonAccept.setText(PluginServices.getText(this,"finalizar"));
+			jButtonAccept.setMnemonic('O');
+			jButtonAccept.setVisible(true);
+			jButtonAccept.setEnabled(false);
+			jButtonAccept.setPreferredSize(new Dimension(100,25));
+//			jButtonAccept.addActionListener(this);
+		}
+		return jButtonAccept;
+	}
+	
+	public JButton getJButtonNext() {
+		if(jButtonNext == null) {
+			jButtonNext = new JButton();
+			jButtonNext.setText(PluginServices.getText(this,"siguiente"));
+			jButtonNext.setMnemonic('S');
+			jButtonNext.setVisible(false);
+			jButtonNext.setPreferredSize(new Dimension(100,25));
+//			jButtonNext.addActionListener(this);
+		}
+		return jButtonNext;
+	}
+		
+	public JButton getJButtonCancel() {
+		if(jButtonCancel == null) {
+			jButtonCancel = new JButton();
+			jButtonCancel.setText(PluginServices.getText(this,"cancel"));
+			jButtonCancel.setMnemonic('C');
+			jButtonCancel.setPreferredSize(new Dimension(100,25));
+//			jButtonCancel.addActionListener(this);
+		}
+		return jButtonCancel;
+	}
+	
+	public void setTargetNad(boolean tarNad){
+		targetNad = tarNad;
+	}
+	
+	public boolean getTargetNad(){
+		return targetNad;
+	}
+	
+	/*
+	 * revisar esta solucion
+	 */
+	public ICrs getProjection() {
+		if (sin_tr) {
+			ICrs crs;
+			try {
+				if (getDataSource().equals(PluginServices.getText(this,"EPSG"))){
+					crs = new CrsFactory().getCRS(crsMainPanel.getEpsgPanel().getCodeCRS(),crsMainPanel.getEpsgPanel().getWKT());
+				}
+				else if (getDataSource().equals(PluginServices.getText(this,"IAU2000"))){
+					crs = new CrsFactory().getCRS(crsMainPanel.getIauPanel().getCodeCRS(),crsMainPanel.getIauPanel().getWKT());
+				} 
+				else if (getDataSource().equals(PluginServices.getText(this,"recientes"))){
+					crs = new CrsFactory().getCRS(crsMainPanel.getRecentsPanel().getCodeCRS(),crsMainPanel.getRecentsPanel().getCrs().getWKT());
+				} 
+				else if (getDataSource().equals(PluginServices.getText(this,"ESRI"))){
+					crs = new CrsFactory().getCRS(crsMainPanel.getEsriPanel().getCodeCRS(),crsMainPanel.getEsriPanel().getWKT());
+				} 
+				else {
+					sin_tr = false;
+					return null;
+				}
+				sin_tr = false;
+				return crs;
+			} catch (CrsException e) {
+				e.printStackTrace();
+			}
+			return null;
+		}		
+		return (ICrs) crsfirst;		
+	}
+	
+	public void setProjection(IProjection proj) {
+		crsfirst = proj;
+	}
+	
+	/**
+	 * M�todo para aplicarle los eventos necesarios en el panel actual. La
+	 * definici�n de estos listeners estar�n en la clase CRSMainTrPanelListener
+	 *
+	 */
+	private void setListeners(){
+
+		CRSMainTrPanelListener listener = new CRSMainTrPanelListener(this);
+		
+		jButtonAccept.addActionListener(listener);
+		jButtonBefore.addActionListener(listener);
+		jButtonCancel.addActionListener(listener);
+		jButtonNext.addActionListener(listener);
+		crsMainPanel.getJComboOptions().addItemListener(listener);
+		getJComboOptions().addActionListener(listener);
+		getRecentsTrPanel().getJButtonInfo().addActionListener(listener);
+		
+		ListSelectionModel rowSM = crsMainPanel.getEpsgPanel().getJTable().getSelectionModel();
+		rowSM.addListSelectionListener(listener);
+		
+		ListSelectionModel rowSMiau = crsMainPanel.getIauPanel().getJTable().getSelectionModel();
+		rowSMiau.addListSelectionListener(listener);
+		
+		ListSelectionModel rowSMrecents = crsMainPanel.getRecentsPanel().getJTable().getSelectionModel();
+		rowSMrecents.addListSelectionListener(listener);
+		
+		ListSelectionModel rowSMesri = crsMainPanel.getEsriPanel().getJTable().getSelectionModel();
+		rowSMesri.addListSelectionListener(listener);
+		
+		crsMainPanel.getEsriPanel().getJTable().addMouseListener(listener);
+		crsMainPanel.getEpsgPanel().getJTable().addMouseListener(listener);
+        crsMainPanel.getRecentsPanel().getJTable().addMouseListener(listener);
+        crsMainPanel.getIauPanel().getJTable().addMouseListener(listener);
+        getEpsgTrPanel().getJTable().addMouseListener(listener);
+        getRecentsTrPanel().getJTable().addMouseListener(listener);
+        
+        ListSelectionModel rowSMEpsgTr = getEpsgTrPanel().getJTable().getSelectionModel();
+		rowSMEpsgTr.addListSelectionListener(listener);
+		
+		ListSelectionModel rowSMRecentsTr = getRecentsTrPanel().getJTable().getSelectionModel();
+		rowSMRecentsTr.addListSelectionListener(listener);
+		
+		getNadsTrPanel().getJComboNadFile().addItemListener(listener);
+		
+		getManualTrPanel().getTx_Translation().addKeyListener(listener);
+		getManualTrPanel().getTy_Translation().addKeyListener(listener);
+		getManualTrPanel().getTz_Translation().addKeyListener(listener);
+		getManualTrPanel().getTx_Rotation().addKeyListener(listener);
+		getManualTrPanel().getTy_Rotation().addKeyListener(listener);
+		getManualTrPanel().getTz_Rotation().addKeyListener(listener);
+		getManualTrPanel().getTscale().addKeyListener(listener);
+	}
+		
+	public void setDataSource(String sour){
+		dataSource = sour;
+	}
+	
+	public String getDataSource(){
+		return crsMainPanel.getDataSource();
+	}
+	
+	public WindowInfo getWindowInfo() {
+		WindowInfo m_viewinfo=new WindowInfo(WindowInfo.MODALDIALOG);
+   		m_viewinfo.setTitle(PluginServices.getText(this,"crsview"));
+		return m_viewinfo;
+	}
+
+
+
+
+
+
+
+
+
+
+
+
+
+	public CRSMainPanel getCrsMainPanel() {
+		return crsMainPanel;
+	}
+
+	public TransformationEpsgPanel getEpsgTrPanel() {
+		return epsgTrPanel;
+	}
+
+	public TransformationManualPanel getManualTrPanel() {
+		return manualTrPanel;
+	}
+
+	public TransformationNadgridsPanel getNadsTrPanel() {
+		return nadsTrPanel;
+	}
+	
+	public TransformationRecentsPanel getRecentsTrPanel() {
+		return recentsTrPanel;
+	}
+
+	public boolean isEpsg_tr() {
+		return epsg_tr;
+	}
+
+	public boolean isManual_tr() {
+		return manual_tr;
+	}
+
+	public boolean isNads_tr() {
+		return nads_tr;
+	}
+	
+	public boolean isRecents_tr() {
+		return recents_tr;
+	}
+
+	public boolean isSin_tr() {
+		return sin_tr;
+	}
+
+	public void setEpsg_tr(boolean epsg_tr) {
+		this.epsg_tr = epsg_tr;
+	}
+
+	public void setManual_tr(boolean manual_tr) {
+		this.manual_tr = manual_tr;
+	}
+
+	public void setNads_tr(boolean nads_tr) {
+		this.nads_tr = nads_tr;
+	}
+	
+	public void setRecents_tr(boolean recents_tr) {
+		this.recents_tr = recents_tr;
+	}
+
+	public void setSin_tr(boolean sin_tr) {
+		this.sin_tr = sin_tr;
+	}
+
+	public boolean isCancelYes() {
+		return cancelYes;
+	}
+
+	public void setCancelYes(boolean cancelYes) {
+		this.cancelYes = cancelYes;
+	}
+
+	public IProjection getCrsfirst() {
+		return crsfirst;
+	}
+
+	public JPanel getJPanelMain() {
+		return jPanelMain;
+	}
+
+	public String getNewSelection() {
+		return newSelection;
+	}
+
+	public void setNewSelection(String newSelection) {
+		this.newSelection = newSelection;
+	}
+	
+	public CrsWkt getCrsWkt_target() {
+		return crsWkt_target;
+	}
+	
+	public void setCrsWkt_target(CrsWkt crsWkt_target) {
+		this.crsWkt_target = crsWkt_target;
+	}
+
+	/*public EpsgConnection getConnection() {
+		return connection;
+	}
+
+	public void setConnection(EpsgConnection connect) {
+		this.connection = connect;
+	}*/
+}

Property changes on: tags/Root_F2/libraries/libJCRS/src/org/gvsig/crs/gui/CRSMainTrPanel.java
___________________________________________________________________
Added: svn:keywords
   + Author Date Id Revision
Added: svn:eol-style
   + native

Index: tags/Root_F2/libraries/libJCRS/src/org/gvsig/crs/gui/panels/InfoTransformationsRecentsPanel.java
===================================================================
--- tags/Root_F2/libraries/libJCRS/src/org/gvsig/crs/gui/panels/InfoTransformationsRecentsPanel.java	(revision 0)
+++ tags/Root_F2/libraries/libJCRS/src/org/gvsig/crs/gui/panels/InfoTransformationsRecentsPanel.java	(revision 10155)
@@ -0,0 +1,245 @@
+/* gvSIG. Sistema de Informaci�n Geogr�fica de la Generalitat Valenciana
+ *
+ * Copyright (C) 2006 Instituto de Desarrollo Regional and Generalitat Valenciana.
+ *
+ * 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., 59 Temple Place - Suite 330, Boston, MA  02111-1307,USA.
+ *
+ * For more information, contact:
+ *
+ *  Generalitat Valenciana
+ *   Conselleria d'Infraestructures i Transport
+ *   Av. Blasco Ib��ez, 50
+ *   46010 VALENCIA
+ *   SPAIN
+ *
+ *      +34 963862235
+ *   gvsig@gva.es
+ *      www.gvsig.gva.es
+ *
+ *    or
+ *
+ *   Instituto de Desarrollo Regional (Universidad de Castilla La-Mancha)
+ *   Campus Universitario s/n
+ *   02071 Alabacete
+ *   Spain
+ *
+ *   +34 967 599 200
+ */
+
+package org.gvsig.crs.gui.panels;
+
+import java.awt.Dimension;
+import java.awt.FlowLayout;
+import java.awt.Font;
+import java.awt.GridLayout;
+import java.awt.event.ActionEvent;
+import java.awt.event.ActionListener;
+import java.sql.ResultSet;
+import java.sql.SQLException;
+
+import javax.swing.BorderFactory;
+import javax.swing.JButton;
+import javax.swing.JLabel;
+import javax.swing.JPanel;
+import javax.swing.JScrollPane;
+import javax.swing.JTable;
+import javax.swing.ListSelectionModel;
+import javax.swing.table.DefaultTableModel;
+
+import org.cresques.ui.DefaultDialogPanel;
+import org.gvsig.crs.EpsgConnection;
+import org.gvsig.crs.ICrs;
+import org.gvsig.crs.Query;
+
+import com.iver.andami.PluginServices;
+import com.iver.andami.ui.mdiManager.IWindow;
+import com.iver.andami.ui.mdiManager.WindowInfo;
+import com.iver.cit.gvsig.gui.TableSorter;
+
+/**
+ * Panel con la informaci�n de la transformaci�n seleccionada
+ * @author Jos� Luis G�mez Mart�nez (jolugomar@gmail.com)
+ *
+ */
+public class InfoTransformationsRecentsPanel extends JPanel implements IWindow, ActionListener{
+
+	private static final long serialVersionUID = 1L;
+
+	private JTable jTable;
+	public DefaultTableModel dtm = null;
+	private JScrollPane jScrollPane1 = null;
+	private JPanel jPanelbuttons;
+	private JButton jButtonOk;
+	public TableSorter sorter = null;
+	String[] data = null;
+	
+	public InfoTransformationsRecentsPanel(String[] data) {
+		super();
+		// TODO Auto-generated constructor stub
+		this.data = data;
+		inicializate();
+	}
+	
+	private void inicializate() {
+		setLayout(new GridLayout(2,1));
+		setLayout(new FlowLayout(FlowLayout.LEADING,5,10));
+		setPreferredSize(new Dimension(400, 200));
+		add(getJScrollPane1(), null);
+		add(getJPanelButtons(), null);
+		
+	}
+
+	private JPanel getJPanelButtons() {
+		if(jPanelbuttons == null) {
+			jPanelbuttons = new JPanel();
+			jPanelbuttons.setLayout(new FlowLayout(FlowLayout.RIGHT));
+			jPanelbuttons.setPreferredSize(new Dimension(400,50));
+			jPanelbuttons.add(getJButtonOk(),null);
+		}
+		return jPanelbuttons;
+	}
+	
+	private JButton getJButtonOk() {
+		if(jButtonOk == null) {
+			jButtonOk = new JButton();
+			jButtonOk.setText(PluginServices.getText(this,"ok"));
+			jButtonOk.setPreferredSize(new Dimension(100,25));
+			jButtonOk.setMnemonic('O');
+			jButtonOk.setToolTipText("Accept");
+			jButtonOk.addActionListener(this);
+		}
+		return jButtonOk;
+	}
+		
+	private JScrollPane getJScrollPane1() {
+		if(jScrollPane1 == null) {
+			jScrollPane1 = new JScrollPane();
+			jScrollPane1.setPreferredSize(new Dimension(400,150));	
+			jScrollPane1.setBorder(
+				    BorderFactory.createCompoundBorder(
+					BorderFactory.createCompoundBorder(
+							BorderFactory.createTitledBorder(PluginServices.getText(this,"info_transformations")),
+							BorderFactory.createEmptyBorder(5,5,5,5)),
+							jScrollPane1.getBorder()));
+			jScrollPane1.setViewportView(getJTable());
+		}
+		return jScrollPane1;
+	}
+	
+	private JTable getJTable() {
+		if(jTable == null) {
+			String[] columnNames = {PluginServices.getText(this,"nombre")
+					,PluginServices.getText(this,"valor")};
+			Object[][] datos = obtainData();
+			dtm = new DefaultTableModel(datos, columnNames)
+			 {
+				public boolean isCellEditable(int row, int column) {
+					return false;
+				}		
+			};
+			sorter = new TableSorter(dtm);			
+
+			jTable = new JTable(sorter);
+
+			jTable.setCellSelectionEnabled(false);
+			jTable.setRowSelectionAllowed(true);
+			jTable.setColumnSelectionAllowed(false);
+			jTable.setSelectionMode(ListSelectionModel.SINGLE_SELECTION);
+			
+		}
+		return jTable;
+	}
+	
+	/**
+	 * M�todo que recuperar� la informaci�n a mostrar en el panel
+	 * de las transformaciones recientes
+	 * @return
+	 */
+	private String[][] obtainData(){	
+		String[][] valid = null;
+		String[] transformation = data[0].split(":");
+		if (transformation[0].equals("EPSG")){
+			valid = new String[6][2];
+			valid[0][0] = PluginServices.getText(this,"source_crs");
+			valid[0][1] = data[2];
+			valid[1][0] = PluginServices.getText(this,"target_crs");
+			valid[1][1] = data[3];
+			EpsgConnection conn = new EpsgConnection();
+			conn.setConnectionEPSG();
+			String sentence = "SELECT area_of_use_code " +
+							"FROM epsg_coordoperation " +                        
+							"WHERE coord_op_code = " + transformation[1] ;
+		    ResultSet result = Query.select(sentence,conn.getConnection());		   
+			try {
+				result.next();				
+				valid[2][0] =  PluginServices.getText(this,"transformation_code");
+				valid[2][1] = transformation[1];				
+				sentence = "SELECT area_of_use FROM epsg_area " +
+								"WHERE area_code = "+ Integer.parseInt(result.getString("area_of_use_code"));
+				
+			} catch (SQLException e) {
+				// TODO Auto-generated catch block
+				e.printStackTrace();
+			}
+			valid[3][0] = PluginServices.getText(this,"transformation_name");
+			valid[3][1] = data[1];
+			valid[4][0] = PluginServices.getText(this,"details");
+			result = Query.select(sentence, conn.getConnection());
+			try {
+				result.next();
+				valid[4][1] = result.getString("area_of_use");
+			} catch (SQLException e) {
+				// TODO Auto-generated catch block
+				e.printStackTrace();
+			}
+		}
+		else if (transformation[0].equals("USR")){
+			valid = new String[3][2];
+			valid[0][0] = PluginServices.getText(this,"source_crs");
+			valid[0][1] = data[2];
+			valid[1][0] = PluginServices.getText(this,"target_crs");
+			valid[1][1] = data[3];
+			valid[2][0] = PluginServices.getText(this,"details");
+			valid[2][1] = data[4];			
+		} else {
+			valid = new String[4][2];
+			String[] partes = data[4].split("\\(");
+			String nadFile = partes[0];		
+			String codigoNad = partes[1].substring(0,partes[1].length()-1);
+			valid[0][0] = PluginServices.getText(this,"source_crs");
+			valid[0][1] = data[2];
+			valid[1][0] =PluginServices.getText(this,"target_crs");
+			valid[1][1] = data[3];
+			valid[2][0] = PluginServices.getText(this,"nadgrids_file");
+			valid[2][1] = nadFile;	
+			valid[3][0] = PluginServices.getText(this,"calculated_in");
+			valid[3][1] = codigoNad;
+		}
+		return valid;
+	}
+
+	public WindowInfo getWindowInfo() {
+		WindowInfo m_viewinfo=new WindowInfo(WindowInfo.MODALDIALOG);
+   		m_viewinfo.setTitle("Info");//PluginServices.getText(this,proj.getCrsWkt().getName()));
+		return m_viewinfo;
+	}
+
+	public void actionPerformed(ActionEvent e) {
+		if (e.getSource() == getJButtonOk()){
+			PluginServices.getMDIManager().closeWindow(this);
+		}
+	}
+
+}

Property changes on: tags/Root_F2/libraries/libJCRS/src/org/gvsig/crs/gui/panels/InfoTransformationsRecentsPanel.java
___________________________________________________________________
Added: svn:eol-style
   + native
Added: svn:keywords
   + Author Date Id Revision

Index: tags/Root_F2/libraries/libJCRS/src/org/gvsig/crs/gui/panels/TransformationRecentsPanel.java
===================================================================
--- tags/Root_F2/libraries/libJCRS/src/org/gvsig/crs/gui/panels/TransformationRecentsPanel.java	(revision 0)
+++ tags/Root_F2/libraries/libJCRS/src/org/gvsig/crs/gui/panels/TransformationRecentsPanel.java	(revision 10155)
@@ -0,0 +1,392 @@
+/* gvSIG. Sistema de Informaci�n Geogr�fica de la Generalitat Valenciana
+ *
+ * Copyright (C) 2006 Instituto de Desarrollo Regional and Generalitat Valenciana.
+ *
+ * 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., 59 Temple Place - Suite 330, Boston, MA  02111-1307,USA.
+ *
+ * For more information, contact:
+ *
+ *  Generalitat Valenciana
+ *   Conselleria d'Infraestructures i Transport
+ *   Av. Blasco Ib��ez, 50
+ *   46010 VALENCIA
+ *   SPAIN
+ *
+ *      +34 963862235
+ *   gvsig@gva.es
+ *      www.gvsig.gva.es
+ *
+ *    or
+ *
+ *   Instituto de Desarrollo Regional (Universidad de Castilla La-Mancha)
+ *   Campus Universitario s/n
+ *   02071 Alabacete
+ *   Spain
+ *
+ *   +34 967 599 200
+ */
+
+package org.gvsig.crs.gui.panels;
+
+import java.awt.Dimension;
+import java.awt.FlowLayout;
+import java.awt.GridLayout;
+import java.awt.event.ActionEvent;
+import java.awt.event.ActionListener;
+
+import javax.swing.BorderFactory;
+import javax.swing.JButton;
+import javax.swing.JPanel;
+import javax.swing.JScrollPane;
+import javax.swing.JTable;
+import javax.swing.ListSelectionModel;
+import javax.swing.table.DefaultTableModel;
+import javax.swing.table.TableColumn;
+
+import org.gvsig.crs.CrsException;
+import org.gvsig.crs.CrsFactory;
+import org.gvsig.crs.CrsWkt;
+import org.gvsig.crs.EpsgConnection;
+import org.gvsig.crs.ICrs;
+import org.gvsig.crs.persistence.RecentCRSsPersistence;
+import org.gvsig.crs.persistence.RecentTrsPersistence;
+import org.gvsig.crs.persistence.TrData;
+
+import com.iver.andami.PluginServices;
+import com.iver.cit.gvsig.gui.TableSorter;
+
+/**
+ * Panel para la gesti�n de las transformaciones recientes
+ * @author Jos� Luis G�mez Mart�nez (jolugomar@gmail.com)
+ *
+ */
+public class TransformationRecentsPanel extends JPanel {
+	
+	int code = 0;
+	private JTable transformationTable;	
+	private JScrollPane jScrollPane = null;
+	public DefaultTableModel dtm = null;
+	public TableSorter sorter = null;
+	JButton JButtonInfo = null;
+	public int selectedRowTable = -1;
+	private TrData[] trDataArray;
+	
+	private String cadWKT = "";
+	private String params ="";
+	public EpsgConnection connect = null;
+	boolean inverseTransformation = false;
+	int trCode;
+	boolean targetNad = false;
+
+	public TransformationRecentsPanel() {
+		initialize();
+	}
+	
+	/**
+	 * Genera el panel contenedor de las transformaciones recientes
+	 * @return
+	 */
+	private void initialize(){
+		connect = new EpsgConnection();
+		connect.setConnectionEPSG();
+			setLayout(new GridLayout(2,1));
+			setLayout(new FlowLayout(FlowLayout.LEADING,5,10));
+			setPreferredSize(new Dimension(525, 100));
+			setBorder(
+				    BorderFactory.createCompoundBorder(
+							BorderFactory.createCompoundBorder(
+									BorderFactory.createTitledBorder(PluginServices.getText(this,"recents_transformation")),
+									BorderFactory.createEmptyBorder(2,2,2,2)),
+									getBorder()));
+			add(getJButtonInfo());
+			add(getJScrollPane());	
+			//loadRecents();
+	}
+	
+	public JTable getJTable() {
+		if (transformationTable == null) {
+			String[] columnNames= {PluginServices.getText(this,"transformation"),
+					PluginServices.getText(this,"name"),
+					PluginServices.getText(this,"source_crs"),
+					PluginServices.getText(this,"target_crs"),
+					PluginServices.getText(this,"detalles"),};					
+			Object[][]data = {};
+			dtm = new DefaultTableModel(data, columnNames)
+			{
+				public boolean isCellEditable(int row, int column) {
+					return false;
+				}
+				/*
+				 * metodo necesario para cuando utilizamos tablas ordenadas
+				 * ya que sino al ordenar por algun campo no se queda con el orden
+				 * actual al seleccionar una fila
+				 * @see javax.swing.table.TableModel#getColumnClass(int)
+				 */
+				public Class getColumnClass(int column)
+				{
+					return getValueAt(0, column).getClass();
+				}
+			};
+			sorter = new TableSorter(dtm);			
+
+			transformationTable = new JTable(sorter);
+			sorter.setTableHeader(transformationTable.getTableHeader());	
+			transformationTable.setCellSelectionEnabled(false);
+			transformationTable.setRowSelectionAllowed(true);
+			transformationTable.setAutoResizeMode(JTable.AUTO_RESIZE_OFF);
+			transformationTable.setColumnSelectionAllowed(false);
+			transformationTable.setSelectionMode(ListSelectionModel.SINGLE_SELECTION);
+			TableColumn column = null;
+			for (int i = 0; i < columnNames.length; i++) {
+			    column = transformationTable.getColumnModel().getColumn(i);
+			    if (i == 0) {
+			    	column.setPreferredWidth(80);
+			    }
+			    else if(i == 4) {
+			    	column.setPreferredWidth(200);
+			    }
+			    else {			    
+			        column.setPreferredWidth(100);
+			    }
+			}			
+		}
+		return transformationTable;
+	}
+	
+	private JScrollPane getJScrollPane() {
+		if (jScrollPane == null) {
+			jScrollPane = new JScrollPane();
+			jScrollPane.setPreferredSize(new Dimension(525,200));
+			jScrollPane.setBorder(
+				    BorderFactory.createCompoundBorder(
+					BorderFactory.createCompoundBorder(
+							BorderFactory.createTitledBorder(PluginServices.getText(this,"transformations")),
+							BorderFactory.createEmptyBorder(5,5,5,5)),
+							jScrollPane.getBorder()));
+			jScrollPane.setViewportView(getJTable());
+		}
+		return jScrollPane;
+	}
+	
+	public JButton getJButtonInfo() {
+		if(JButtonInfo == null) {
+			JButtonInfo = new JButton();
+			JButtonInfo.setPreferredSize(new Dimension(200,20));			
+			JButtonInfo.setText(PluginServices.getText(this,"info_transformations"));			
+			JButtonInfo.setMnemonic('I');
+			JButtonInfo.setEnabled(false);			
+		}
+		return JButtonInfo;
+	}
+	
+	/**
+	 * Consigue el crs elegido de las transformaciones
+	 * recientes cuando el se utiliza transformaci�n EPSG o manual
+	 * @return
+	 */
+	public ICrs getProjection() {
+		ICrs crs = null;
+		try {
+			crs = new CrsFactory().getCRS(getCode(),
+					getWKT(),getParams());
+		} catch (CrsException e) {
+			// TODO Auto-generated catch block
+			e.printStackTrace();
+		}
+		return crs;
+	}
+	
+	/**
+	 * Consigue el crs elegido de las transformaciones
+	 * recientes cuando se utiliza transformaci�n de rejillas
+	 * @param info
+	 * @return
+	 */
+	public ICrs getProjectionNad(String info) {
+		String[] partes = info.split("\\(");
+		String nadFile = partes[0];		
+		int codigoNad = Integer.parseInt((partes[1].substring(0,partes[1].length()-1)).split(":")[1]);
+		ICrs crs;
+		
+		if (getCode() == codigoNad){
+			try {
+				setNad(false);
+				crs = new CrsFactory().getCRS(getCode(),
+						getWKT());
+				crs.setNadGrid("+nadgrids="+nadFile);//nadFile);
+				return crs;
+			} catch (org.gvsig.crs.CrsException e) {
+				e.printStackTrace();
+			}
+			return null;
+		}
+		else {	
+			setNad(true);
+			try {
+				crs = new CrsFactory().getCRS(getCode(),
+						getWKT());
+				crs.setNadGrid("+nadgrids="+nadFile);//nadFile);
+				crs.setNadInTarget(true);
+				
+				return crs;
+			} catch (CrsException e) {				
+				e.printStackTrace();
+			}
+			return null;
+		}	
+	}
+	
+	/**
+	 * 
+	 * @param nadg Define si el fichero rejillas se calcula en el crs fuente o destino
+	 */
+	public void setNad(boolean nadg){
+		targetNad = nadg;		
+	}
+	
+	/**
+	 * 
+	 * @return Devuelve si el fichero de rejillas se calcula en el crs fuente o destino
+	 */
+	public boolean getNad(){
+		return targetNad;		
+	}
+	
+	/**
+	 * 
+	 * @param cod C�digo del CRS elegido
+	 */
+	public void setCode(int cod){
+		code = cod;
+	}
+	
+	/**
+	 * 
+	 * @return Devuelve el c�digo del CRS elegido
+	 */
+	public int getCode(){
+		return code;
+	}
+	
+	/**
+	 * 
+	 * @param cad Cadena wkt del crs fuente
+	 */
+	public void setWKT(String cad){
+		cadWKT = cad;		
+	}	
+	
+	/**
+	 * 
+	 * @return Devuelve la cadena wkt del crs fuente
+	 */
+	public String getWKT(){
+		return cadWKT;
+	}
+	
+	/**
+	 * 
+	 * @param param Hacemos la cadena con los par�metros de la transformaci�n manual
+	 */
+	public void setParamsManual(String param){
+		params = "+towgs84="+param.substring(1,param.length()-1)+" ";
+	}
+	
+	/**
+	 * 
+	 * @param values Hacemos la cadena con los par�metros de la transformaci�n EPSG
+	 */
+	public void setParamsEPGS(String[] values){
+		params = "+towgs84="+values[0];
+		for(int i = 1; i < values.length; i++)
+			params +=","+values[i];
+		params += " ";
+	}
+	
+	/**
+	 * 
+	 * @param nadfile
+	 */
+	public void setParamsNads(String nadfile){
+		
+	}
+	
+	/**
+	 * 
+	 * @return Deuelve una cadena con los par�metros de la transformaci�n
+	 */
+	public String getParams(){
+		return params;
+	}
+	
+	/**
+	 * 
+	 * @param inverse Par�metro que define si la transformaci�n es directa o inversa
+	 */
+	public void setInverseTransformation(boolean inverse){
+		inverseTransformation = inverse;
+	}
+	
+	/**
+	 * 
+	 * @return Devuelve si es una transformaci�n directa o inversa
+	 */
+	public boolean getInverseTransformation(){
+		return inverseTransformation;
+	}
+	
+	/**
+	 * 
+	 * @param code C�digo de la transformaci�n EPGS elegida
+	 */
+	public void setTrCode(int code){
+		trCode = code;
+	}
+	
+	/**
+	 * 
+	 * @return Devuelve el c�digo de la transformaci�n
+	 */
+	public int getTrCode(){
+		return trCode;
+	}
+	
+	/**
+	 * Carga en la tabla los CRSs leidos del sistema de persistencia.
+	 */
+	public void loadRecents(int source, int target){
+		RecentTrsPersistence persistence = new RecentTrsPersistence(RecentCRSsPersistence.pluginClassInstance);
+		trDataArray = persistence.getArrayOfTrData();
+		
+
+		for (int iRow = trDataArray.length-1;iRow>=0;iRow--){
+			String[] crsSource = ((String)trDataArray[iRow].getCrsSource()).split(":");
+			String[] crsTarget = ((String)trDataArray[iRow].getCrsTarget()).split(":");
+			if(source == Integer.parseInt(crsSource[1]) && target == Integer.parseInt(crsTarget[1])){
+				Object row[] ={trDataArray[iRow].getAuthority()+":"+trDataArray[iRow].getCode(),trDataArray[iRow].getName(),trDataArray[iRow].getCrsSource(),
+					trDataArray[iRow].getCrsTarget(),trDataArray[iRow].getDetails()};
+				dtm.addRow(row);
+			}
+		}
+		
+		/*
+		/*Seleccionar el primer registro.
+		 */
+		int numr = dtm.getRowCount();
+		if (numr != 0 )
+			this.getJTable().setRowSelectionInterval(0,0);
+	}
+
+}

Property changes on: tags/Root_F2/libraries/libJCRS/src/org/gvsig/crs/gui/panels/TransformationRecentsPanel.java
___________________________________________________________________
Added: svn:keywords
   + Author Date Id Revision
Added: svn:eol-style
   + native

Index: tags/Root_F2/libraries/libJCRS/src/org/gvsig/crs/gui/panels/CrsRecentsPanel.java
===================================================================
--- tags/Root_F2/libraries/libJCRS/src/org/gvsig/crs/gui/panels/CrsRecentsPanel.java	(revision 0)
+++ tags/Root_F2/libraries/libJCRS/src/org/gvsig/crs/gui/panels/CrsRecentsPanel.java	(revision 10155)
@@ -0,0 +1,225 @@
+/* gvSIG. Sistema de Informaci�n Geogr�fica de la Generalitat Valenciana
+ *
+ * Copyright (C) 2006 Instituto de Desarrollo Regional and Generalitat Valenciana.
+ *
+ * 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., 59 Temple Place - Suite 330, Boston, MA  02111-1307,USA.
+ *
+ * For more information, contact:
+ *
+ *  Generalitat Valenciana
+ *   Conselleria d'Infraestructures i Transport
+ *   Av. Blasco Ib��ez, 50
+ *   46010 VALENCIA
+ *   SPAIN
+ *
+ *      +34 963862235
+ *   gvsig@gva.es
+ *      www.gvsig.gva.es
+ *
+ *    or
+ *
+ *   Instituto de Desarrollo Regional (Universidad de Castilla La-Mancha)
+ *   Campus Universitario s/n
+ *   02071 Alabacete
+ *   Spain
+ *
+ *   +34 967 599 200
+ */
+
+package org.gvsig.crs.gui.panels;
+
+import java.awt.Dimension;
+import java.awt.FlowLayout;
+import java.awt.GridLayout;
+
+import javax.swing.BorderFactory;
+import javax.swing.JLabel;
+import javax.swing.JPanel;
+import javax.swing.JScrollPane;
+import javax.swing.JTable;
+import javax.swing.ListSelectionModel;
+import javax.swing.table.DefaultTableModel;
+import javax.swing.table.TableColumn;
+
+import org.cresques.cts.IProjection;
+import org.gvsig.crs.CrsException;
+import org.gvsig.crs.CrsFactory;
+import org.gvsig.crs.ICrs;
+import org.gvsig.crs.persistence.CrsData;
+import org.gvsig.crs.persistence.RecentCRSsPersistence;
+
+import com.iver.andami.PluginServices;
+import com.iver.cit.gvsig.gui.TableSorter;
+
+/**
+ * Clase que genera el panel de recientes
+ * 
+ * @author Jos� Luis G�mez Mart�nez (jolugomar@gmail.com)
+ * @author Diego Guerrero Sevilla (diego.guerrero@uclm.es)
+ *
+ */
+public class CrsRecentsPanel extends JPanel {
+
+	/**
+	 * 
+	 */
+	private static final long serialVersionUID = 1L;
+	
+	public JTable jTable = null;
+	private JScrollPane jScrollPane = null;
+	public DefaultTableModel dtm = null;
+	public TableSorter sorter = null;
+	private CrsData crsDataArray[] = null;
+	
+	public int selectedRowTable = -1;
+	private String authority = null;
+	private int codeCRS = -1;
+	private ICrs crs = null;
+	
+	public CrsRecentsPanel() {
+		super();
+		initialize();
+	}
+	
+	private void initialize(){
+		this.setLayout(new GridLayout(1,2));
+		this.setLayout(new FlowLayout(FlowLayout.LEFT,10,10));
+		this.add(getJLabel(), null);
+		this.add(getJScrollPane(), null);
+	}
+	
+	private JLabel getJLabel(){
+		JLabel label = new JLabel();
+		label.setPreferredSize(new Dimension(500, 30));
+		label.setText(PluginServices.getText(this, "ultimos_crs_utilizados")+":");
+		return label;
+	}
+	
+	private JScrollPane getJScrollPane() {
+		if (jScrollPane == null) {
+			jScrollPane = new JScrollPane();
+			jScrollPane.setPreferredSize(new Dimension(500,150));
+			jScrollPane.setBorder(
+				    BorderFactory.createCompoundBorder(
+					BorderFactory.createCompoundBorder(
+							BorderFactory.createTitledBorder(PluginServices.getText(this,"coordinate_reference_systems")),
+							BorderFactory.createEmptyBorder(5,5,5,5)),
+							jScrollPane.getBorder()));
+			jScrollPane.setViewportView(getJTable());
+		}
+		return jScrollPane;
+	}
+	
+	public JTable getJTable() {
+		if (jTable == null) {
+			String[] columnNames= {PluginServices.getText(this,"fuente"),
+					PluginServices.getText(this,"codigo"),
+					PluginServices.getText(this,"nombre")};
+			Object[][]data = {};			
+			dtm = new DefaultTableModel(data, columnNames)
+			 {
+				public boolean isCellEditable(int row, int column) {
+					return false;
+				}
+				/*
+				 * metodo necesario para cuando utilizamos tablas ordenadas
+				 * ya que sino al ordenar por algun campo no se queda con el orden
+				 * actual al seleccionar una fila (non-Javadoc)
+				 * @see javax.swing.table.TableModel#getColumnClass(int)
+				 */
+				public Class getColumnClass(int column)
+				{
+					return getValueAt(0, column).getClass();
+				}
+				};
+			sorter = new TableSorter(dtm);			
+
+			jTable = new JTable(sorter);
+			sorter.setTableHeader(jTable.getTableHeader());
+			jTable.setCellSelectionEnabled(false);
+			jTable.setRowSelectionAllowed(true);
+			jTable.setColumnSelectionAllowed(false);
+			jTable.setSelectionMode(ListSelectionModel.SINGLE_SELECTION);
+			TableColumn column = null;
+			for (int i = 0; i < 3; i++) {
+			    column = jTable.getColumnModel().getColumn(i);
+			    if (i == 0) {
+			        column.setPreferredWidth(60); //code column is shorter			     	
+			    }else if (i == 2) {
+			    	column.setPreferredWidth(275);
+			    }
+			    else {			    
+			        column.setPreferredWidth(160);
+			    }
+			}	
+		}
+		return jTable;		
+	}
+	
+	public ICrs getProjection() {		
+		return crs;
+	}
+	
+	public void setCodeCRS(int code) {
+		codeCRS = code;
+	}
+	
+	public int getCodeCRS() {
+		return codeCRS;
+	}
+	
+	public void setProjection(IProjection crs) {
+		//setCrs((ICrs) crs);
+	}
+	
+	/**
+	 * Carga en la tabla los CRSs leidos del sistema de persistencia.
+	 */
+	public void loadRecents(){
+		RecentCRSsPersistence persistence = new RecentCRSsPersistence();
+		crsDataArray = persistence.getArrayOfCrsData();
+		
+		for (int iRow = crsDataArray.length-1;iRow>=0;iRow--){
+			Object row[] ={crsDataArray[iRow].getAuthority(),Integer.toString(crsDataArray[iRow].getCode()),crsDataArray[iRow].getName()};
+			dtm.addRow(row);
+		}
+		
+		/*
+		/*Seleccionar el primer registro.
+		 */
+		int numr = dtm.getRowCount();
+		if (numr != 0 )
+			this.getJTable().setRowSelectionInterval(0,0);
+	}
+
+	public ICrs getCrs() {
+		return crs;
+	}
+	
+	public void initCrs(){
+		
+		selectedRowTable = getJTable().getSelectedRow();		        			        	
+    	Integer.parseInt((String)sorter.getValueAt(selectedRowTable,1));
+		authority = (String)sorter.getValueAt(selectedRowTable,0);
+		codeCRS = Integer.parseInt((String)sorter.getValueAt(selectedRowTable,1));
+		try {
+			crs = new CrsFactory().getCRS(authority+":"+String.valueOf(codeCRS));
+		} catch (CrsException e) {
+			// TODO Auto-generated catch block
+			e.printStackTrace();
+		}
+	}
+
+}

Property changes on: tags/Root_F2/libraries/libJCRS/src/org/gvsig/crs/gui/panels/CrsRecentsPanel.java
___________________________________________________________________
Added: svn:eol-style
   + native
Added: svn:keywords
   + Author Date Id Revision

Index: tags/Root_F2/libraries/libJCRS/src/org/gvsig/crs/gui/panels/ProjChooserPanel.java
===================================================================
--- tags/Root_F2/libraries/libJCRS/src/org/gvsig/crs/gui/panels/ProjChooserPanel.java	(revision 0)
+++ tags/Root_F2/libraries/libJCRS/src/org/gvsig/crs/gui/panels/ProjChooserPanel.java	(revision 10155)
@@ -0,0 +1,252 @@
+/* gvSIG. Sistema de Informaci�n Geogr�fica de la Generalitat Valenciana
+ *
+ * Copyright (C) 2006 Instituto de Desarrollo Regional and Generalitat Valenciana.
+ *
+ * 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., 59 Temple Place - Suite 330, Boston, MA  02111-1307,USA.
+ *
+ * For more information, contact:
+ *
+ *  Generalitat Valenciana
+ *   Conselleria d'Infraestructures i Transport
+ *   Av. Blasco Ib��ez, 50
+ *   46010 VALENCIA
+ *   SPAIN
+ *
+ *      +34 963862235
+ *   gvsig@gva.es
+ *      www.gvsig.gva.es
+ *
+ *    or
+ *
+ *   Instituto de Desarrollo Regional (Universidad de Castilla La-Mancha)
+ *   Campus Universitario s/n
+ *   02071 Alabacete
+ *   Spain
+ *
+ *   +34 967 599 200
+ */
+package org.gvsig.crs.gui.panels;
+
+import java.awt.Dimension;
+import java.awt.FlowLayout;
+import java.awt.GridLayout;
+import java.awt.event.ActionListener;
+
+import javax.swing.JLabel;
+
+import org.cresques.cts.IProjection;
+import org.gvsig.crs.ICrs;
+import org.gvsig.crs.gui.dialog.CSSelectionDialog;
+import org.gvsig.crs.gui.dialog.TRSelectionDialog;
+import org.gvsig.gui.beans.swing.JButton;
+
+import com.iver.andami.PluginServices;
+import com.iver.andami.ui.mdiManager.IWindow;
+import com.iver.cit.gvsig.gui.panels.CRSSelectPanel;
+import com.iver.cit.gvsig.project.documents.gui.FOpenDialog;
+import com.iver.cit.gvsig.project.documents.view.gui.View;
+
+/**
+ * @author Luis W. Sevilla (sevilla_lui@gva.es)
+ */
+public class ProjChooserPanel extends CRSSelectPanel {
+    
+	private static final long serialVersionUID = 1L;
+	
+	public  ICrs curProj = null; //(IProjection) new CRSFactory().getCRS("EPSG:23030");
+	
+	private JLabel jLblProj = null;
+	private JLabel jLblProjName = null;
+	private JButton jBtnChangeProj = null;
+	private boolean okPressed = false;
+	private String abrev;
+	boolean panel = false;
+	boolean targetNad = false;
+	String dataSource = "EPSG";
+	
+	private ActionListener actionListener = null;
+	
+	public ProjChooserPanel(IProjection proj) {
+		super(proj);	
+		IProjection pr = proj;
+		IWindow activeWindow = PluginServices.getMDIManager().getActiveWindow();
+    	if (activeWindow instanceof View) {		
+    		View activeView = (com.iver.cit.gvsig.project.documents.view.gui.View) activeWindow;
+    		pr = activeView.getMapControl().getProjection();
+    	}
+    	FOpenDialog.setLastProjection(pr);	
+		setCurProj(pr);
+		initialize();		
+	}
+	
+
+	/**
+	 * This method initializes this
+	 *
+	 * @return void
+	 */
+	private void initialize() {
+		this.setLayout(new GridLayout(3,1));
+        this.setLayout(new FlowLayout(FlowLayout.LEFT, 15, 0));
+        setPreferredSize(new java.awt.Dimension(330,35));
+        this.setSize(new java.awt.Dimension(330,23));
+        this.add(getJLblProjName(), null);
+        this.add(getJLblProj(), null);
+        this.add(getJBtnChangeProj(), null);
+       
+        
+        //cambiar cuando la parte de JLuis se ensamble
+        if(!((ICrs)curProj).getAbrev().equals("EPSG:23030")){
+        	dataSource = curProj.getCrsWkt().getAuthority()[0];
+        	jLblProj.setText(dataSource+":" +String.valueOf(curProj.getCode()));
+        	//jLblProj.setText(((ICrs)curProj).getCrsWkt().getName());
+        }
+        else
+        	jLblProj.setText("EPSG:23030");        
+		initBtnChangeProj();
+	}
+
+	private void initBtnChangeProj() {
+		getJBtnChangeProj().addActionListener(new java.awt.event.ActionListener() {
+			public void actionPerformed(java.awt.event.ActionEvent e) {
+				CSSelectionDialog csSelect = null;
+				TRSelectionDialog trSelect = null;
+				if (!isTransPanelActive()){
+					okPressed = false;
+					csSelect = new CSSelectionDialog();
+					csSelect.setProjection(curProj);
+					
+					//csSelect.setLayout(new GridLayout(0,1));
+					
+			        PluginServices.getMDIManager().addWindow(csSelect);
+			        abrev = dataSource+ ":" +String.valueOf(curProj.getCode());
+			        if (csSelect.isOkPressed()) {
+			        	curProj = (ICrs) csSelect.getProjection();
+			        	dataSource = curProj.getCrsWkt().getAuthority()[0];
+			        	//dataSource = csSelect.getDataSource();
+			        	abrev = dataSource+ ":" +String.valueOf(curProj.getCode());
+			        	
+			        	jLblProj.setText(dataSource+ ":" +String.valueOf(curProj.getCode()));//.getAbrev());
+			        	FOpenDialog.setLastProjection(curProj);
+			        	okPressed = true;
+			        	if (actionListener != null) {
+			        		actionListener.actionPerformed(e);
+			        	}
+			        }else			        	
+			        	jLblProj.setText(abrev);  
+				}
+				else {
+					okPressed = false;										
+			    	trSelect = new TRSelectionDialog(curProj);
+					
+					trSelect.setProjection(curProj);
+			        
+					trSelect.setLayout(new GridLayout(0,1));
+					
+					PluginServices.getMDIManager().addWindow(trSelect);
+					setTargetNad(trSelect.getTargetNad());
+			        //abrev = curProj.getAbrev();
+					
+			        if (trSelect.getProjection() != curProj) {
+			        	curProj = (ICrs) trSelect.getProjection();
+			        	dataSource = curProj.getCrsWkt().getAuthority()[0];
+			        	//dataSource = trSelect.getProjPanel().getDataSource();
+			        	//abrev = trSelect.getProjectionName();
+			        	jLblProj.setText(dataSource+ ":" +String.valueOf(curProj.getCode()));//abrev);
+			        	FOpenDialog.setLastProjection(curProj);			        	
+			        	okPressed = true;
+			        	
+			        	if (actionListener != null) {
+			        		actionListener.actionPerformed(e);
+			        	}
+			        }else
+			        	jLblProj.setText(dataSource+ ":" +String.valueOf(curProj.getCode()));//abrev);
+					
+				}
+					        	
+			}
+		});
+	}
+
+	public JLabel getJLblProjName() {
+		if (jLblProjName == null) {
+	        jLblProjName = new JLabel("Proyeccion actual");
+			jLblProjName.setText(PluginServices.getText(this,"proyeccion_actual")); //$NON-NLS-1$
+		}
+		return jLblProjName;
+	}
+	
+	public JLabel getJLabel() {
+		return getJLblProjName();
+	}
+
+	public JLabel getJLblProj() {
+		if (jLblProj == null) {
+	        jLblProj = new JLabel();
+			jLblProj.setText(curProj.getAbrev());
+		}
+		return jLblProj;
+	}
+	public void addBtnChangeProjActionListener(java.awt.event.ActionListener al) {
+		jBtnChangeProj.addActionListener(al);
+	}
+
+	/**
+	 * This method initializes jButton
+	 *
+	 * @return javax.swing.JButton
+	 */
+	public JButton getJBtnChangeProj() {
+		if (jBtnChangeProj == null) {
+			jBtnChangeProj = new JButton();			
+			jBtnChangeProj.setText("..."); //$NON-NLS-1$
+			jBtnChangeProj.setPreferredSize(new Dimension(50, 23));
+		}
+		return jBtnChangeProj;
+	}
+	
+	public void setTargetNad(boolean tarNad){
+		targetNad = tarNad;
+	}
+	
+	public boolean getTargetNad(){
+		return targetNad;
+	}
+	
+	/**
+	 * @return Returns the curProj.
+	 */
+	public IProjection getCurProj() {
+		return curProj;
+	}
+	/**
+	 * @param curProj The curProj to set.
+	 */
+	public void setCurProj(IProjection curProj) {
+		this.curProj = (ICrs) curProj;
+	}
+	/**
+	 * @return Returns the okPressed.
+	 */
+	public boolean isOkPressed() {
+		return okPressed;
+	}
+	/**
+	 * @param actionListener The actionListener to set.
+	 */
+	public void addActionListener(ActionListener actionListener) {
+		this.actionListener = actionListener;
+	}
+}  //  @jve:decl-index=0:visual-constraint="10,10"

Property changes on: tags/Root_F2/libraries/libJCRS/src/org/gvsig/crs/gui/panels/ProjChooserPanel.java
___________________________________________________________________
Added: svn:keywords
   + Author Date Id Revision
Added: svn:eol-style
   + native

Index: tags/Root_F2/libraries/libJCRS/src/org/gvsig/crs/gui/panels/EPSGpanel.java
===================================================================
--- tags/Root_F2/libraries/libJCRS/src/org/gvsig/crs/gui/panels/EPSGpanel.java	(revision 0)
+++ tags/Root_F2/libraries/libJCRS/src/org/gvsig/crs/gui/panels/EPSGpanel.java	(revision 10155)
@@ -0,0 +1,743 @@
+/* gvSIG. Sistema de Informaci�n Geogr�fica de la Generalitat Valenciana
+ *
+ * Copyright (C) 2006 Instituto de Desarrollo Regional and Generalitat Valenciana.
+ *
+ * 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., 59 Temple Place - Suite 330, Boston, MA  02111-1307,USA.
+ *
+ * For more information, contact:
+ *
+ *  Generalitat Valenciana
+ *   Conselleria d'Infraestructures i Transport
+ *   Av. Blasco Ib��ez, 50
+ *   46010 VALENCIA
+ *   SPAIN
+ *
+ *      +34 963862235
+ *   gvsig@gva.es
+ *      www.gvsig.gva.es
+ *
+ *    or
+ *
+ *   Instituto de Desarrollo Regional (Universidad de Castilla La-Mancha)
+ *   Campus Universitario s/n
+ *   02071 Alabacete
+ *   Spain
+ *
+ *   +34 967 599 200
+ */
+
+package org.gvsig.crs.gui.panels;
+
+import java.awt.Color;
+import java.awt.Component;
+import java.awt.Dimension;
+import java.awt.FlowLayout;
+import java.awt.GridLayout;
+import java.awt.event.ActionEvent;
+import java.awt.event.ActionListener;
+import java.awt.event.KeyEvent;
+import java.awt.event.KeyListener;
+import java.awt.event.MouseAdapter;
+import java.awt.event.MouseEvent;
+import java.sql.ResultSet;
+import java.sql.SQLException;
+import java.util.ArrayList;
+
+import javax.swing.BorderFactory;
+import javax.swing.JButton;
+import javax.swing.JLabel;
+import javax.swing.JOptionPane;
+import javax.swing.JPanel;
+import javax.swing.JRadioButton;
+import javax.swing.JScrollBar;
+import javax.swing.JScrollPane;
+import javax.swing.JTable;
+import javax.swing.JTextField;
+import javax.swing.ListSelectionModel;
+import javax.swing.event.DocumentEvent;
+import javax.swing.event.DocumentListener;
+import javax.swing.table.DefaultTableModel;
+import javax.swing.table.TableColumn;
+
+import org.cresques.cts.IProjection;
+import org.gvsig.crs.CrsException;
+import org.gvsig.crs.CrsFactory;
+import org.gvsig.crs.EpsgConnection;
+import org.gvsig.crs.ICrs;
+import org.gvsig.crs.Query;
+import org.gvsig.crs.ogr.Epsg2wkt;
+import org.gvsig.crs.ogr.GetCRSepsg;
+
+import com.iver.andami.PluginServices;
+import com.iver.cit.gvsig.gui.TableSorter;
+
+/**
+ * Clase perteneciente al panel de elecci�n de CRS del repositorio de la
+ * EPSG, realiza la b�squeda y filtra los v�lidos.
+ * 
+ * @author Jos� Luis G�mez Mart�nez (jolugomar@gmail.com)
+ *
+ */
+public class EPSGpanel extends JPanel implements KeyListener, ActionListener{
+
+	/**
+	 * 
+	 */
+	private static final long serialVersionUID = 1L;
+	public JPanel EPSGpanel = null;
+		
+	String cadWKT = "";
+	
+	int iteracion = 0;
+	boolean tecla_valida = false;
+	String cad_valida = "";	
+	
+	int transf = 0;
+	public int epsg_code  = 0;
+	boolean source_yn = false;
+	int source_cod = 0;
+	int method_code = 0;
+	int datum_code = 0;
+	int projection_conv_code = 0;
+	public String crs_kind = null;
+	int[] valid_method_code = {9800, 9801, 9802, 9803, 9804, 9805, 9806, 9807, 9808, 9809, 9810, 
+			9811, 9812, 9813, 9814, 9815, 9816, 9817, 9602, 9659, 9818, 9819, 9820, 9822, 
+			9827};
+	
+	String[] soported_crs = {"projected","geographic 2D","geographic 3D", "engineering", "vertical", "compound", "geocentric"};
+	String[] not_soported_crs = {};
+	
+	private JRadioButton codeRadioButton = null;
+	private JRadioButton nameRadioButton = null;
+	private JRadioButton areaRadioButton = null;
+	private JPanel groupRadioButton = null;
+	
+	public EpsgConnection connect = null;
+	
+	private JButton infoCrs = null;
+	private JButton searchButton = null;
+	private JTextField searchTextField = null;
+	public JTable jTable = null;
+	private JScrollPane jScrollPane = null;
+	public DefaultTableModel dtm = null;	
+	public String key;
+	public int selectedRowTable = -1;
+		
+	private int codeCRS = -1;
+	public TableSorter sorter = null;
+		
+	public EPSGpanel(){
+		initialize();
+	}
+	
+	private void initialize(){
+		this.setLayout(new GridLayout(3,3));
+		this.setLayout(new FlowLayout(FlowLayout.LEFT,10,10));
+				
+		this.add(getGroupRadioButton(), null);			
+		this.add(getSearchButton(), null);
+		this.add(getSearchTextField(), null);
+		this.add(getInfoCrs(), null);
+		this.add(getJScrollPane(), null);		
+	}
+	
+	public void connection(){
+		connect = new EpsgConnection();
+		connect.setConnectionEPSG();
+	}
+	    
+	private JRadioButton getCodeRadioButton() {
+		if (codeRadioButton == null) {
+			codeRadioButton = new JRadioButton();
+			codeRadioButton.setText(PluginServices.getText(this,"por_codigo"));//setText("By Code EPSG");
+			codeRadioButton.setSelected(true);
+			codeRadioButton.addActionListener(this);
+		}
+		return codeRadioButton;
+	}
+		  
+	private JRadioButton getNameRadioButton() {
+		if (nameRadioButton == null) {
+			nameRadioButton = new JRadioButton();
+			nameRadioButton.setText(PluginServices.getText(this,"por_nombre"));
+			nameRadioButton.addActionListener(this);
+		}
+		return nameRadioButton;
+	}
+	
+	private JRadioButton getAreaRadioButton() {
+		if (areaRadioButton == null) {
+			areaRadioButton = new JRadioButton();
+			areaRadioButton.setText(PluginServices.getText(this,"por_area"));
+			areaRadioButton.addActionListener(this);
+		}
+		return areaRadioButton;
+	}
+	 
+	private JPanel getGroupRadioButton() {
+		if (groupRadioButton == null) {
+			groupRadioButton = new JPanel();
+			groupRadioButton.setLayout(new GridLayout(1,0));
+			groupRadioButton.setPreferredSize(new Dimension(500,30));
+			groupRadioButton.add(getLabel());
+			groupRadioButton.add(getCodeRadioButton());
+			groupRadioButton.add(getNameRadioButton());
+			groupRadioButton.add(getAreaRadioButton());
+		}
+		return groupRadioButton;
+	}
+	
+	private JLabel getLabel(){
+		JLabel criterio = new JLabel();
+		criterio.setPreferredSize(new Dimension(100, 20));
+		criterio.setText(PluginServices.getText(this, "criterio_busqueda")+":");
+		return criterio;
+	}
+
+	/**
+	 * M�todo que controla la b�squeda de los CRS siguiendo los criterios
+	 * de b�squeda que le hemos definido. Tambi�n gestiona los casos en que
+	 * no encuentre CRS, o que los par�metros de b�squeda sean err�neos. Si
+	 * encuentra alg�n CRS pero no es soportado por la aplicaci�n
+	 * aparecer� el mensaje de informaci�n correspondiente.
+	 *
+	 */
+	private void searchButton() {
+		boolean not_valid = false;
+		boolean not_numeric = false;
+		searchTextField.setBackground(Color.white);
+		
+		if (searchTextField.getText().equals("")) {
+			searchTextField.setBackground(new Color(255,204,204));
+			JOptionPane.showMessageDialog(this, PluginServices.getText(this,"fill_name"), "Warning...", JOptionPane.WARNING_MESSAGE);
+		}		
+		
+		else {
+            //Eliminar filas en cada nueva bsqueda
+			int numRow = dtm.getRowCount();
+			while (numRow != 0) {
+				numRow = numRow - 1;
+				dtm.removeRow(numRow);
+			}
+			
+			if (codeRadioButton.isSelected() && (searchTextField.getText().length()!=searchTextField.getText().replaceAll("[^0-9]", "").length())){
+				not_numeric = true;
+			}
+			
+			//Dependiendo de la opcion se realizada una busqueda
+			ResultSet result = null;
+			ResultSet result2 = null;
+			/*
+			 * variable que indicara si la busqueda se hace primero en epsg_coordinatereferencesystem
+			 * o en epsg_area; esto es debido a que HSQLDB no soporta la b�squeda simult�nea en ambas
+			 * tablas, por lo cual hay que separar la b�squeda
+			 */
+			int bus = 2;  			
+			if (codeRadioButton.isSelected() && !not_numeric) {
+				bus=0;
+				key = searchTextField.getText();
+				int code = Integer.parseInt(key);
+				String sentence = "SELECT coord_ref_sys_code, coord_ref_sys_name, coord_ref_sys_kind, area_of_use_code, " +
+								  "source_geogcrs_code, projection_conv_code  " +
+								  "FROM epsg_coordinatereferencesystem " +	                              
+	                              "WHERE coord_ref_sys_code = " + code;
+								
+				result = Query.select(sentence,connect.getConnection());	
+				
+			}
+			
+			else if (nameRadioButton.isSelected()) {
+				bus=0;
+				key = searchTextField.getText();
+				String key2 = key.substring(0,1);
+				String key3 = key.substring(1,key.length());
+				key2 = key2.toUpperCase();
+				
+				String sentence = "SELECT coord_ref_sys_code, coord_ref_sys_name, coord_ref_sys_kind, " +
+									"area_of_use_code, source_geogcrs_code, projection_conv_code " +
+				  					"FROM epsg_coordinatereferencesystem " +	                              
+				  					"WHERE (coord_ref_sys_name LIKE '%" + key + "%') OR (coord_ref_sys_name LIKE '%"+ 
+				  					key.toUpperCase() +"%') " +
+				  					"OR (coord_ref_sys_name LIKE '%" + key2+key3 +"%')";
+				result = Query.select(sentence,connect.getConnection());
+			}
+			
+			else if (areaRadioButton.isSelected()) {
+				bus=1;
+				key = searchTextField.getText();
+				String key2 = key.substring(0,1);
+				String key3 = key.substring(1,key.length());
+				key2 = key2.toUpperCase();				
+				
+				String sentence = "SELECT area_name, area_of_use, area_code " +
+	                              "FROM epsg_area " +
+	                              "WHERE (area_name LIKE '%" + key + "%') OR (area_of_use LIKE '%" + key + "%') "+
+	                              "OR (area_name LIKE '%" + key.toUpperCase() + "%') OR (area_of_use LIKE '%" + key.toUpperCase() + "%') "+
+	                              "OR (area_name LIKE '%" + key2+key3 + "%') OR (area_of_use LIKE '%" + key2+key3 + "%') ";
+				result = Query.select(sentence,connect.getConnection());				
+			}
+			
+			if (bus==0){
+				try {
+					while(result.next()) {
+						Object[]data = new Object[5];
+						data[0] = String.valueOf(result.getInt("coord_ref_sys_code"));
+						data[1] = result.getString("coord_ref_sys_name");
+						crs_kind = result.getString("coord_ref_sys_kind");
+						data[2] = crs_kind;
+						projection_conv_code = result.getInt("projection_conv_code");
+						
+						int area_of_use_code = Integer.parseInt(result.getString("area_of_use_code"));
+										
+						String sentence = "SELECT area_name, area_of_use FROM epsg_area " +
+										"WHERE area_code = "+ area_of_use_code ;
+						
+						result2 = Query.select(sentence,connect.getConnection());
+						while(result2.next()){
+							data[3] = result2.getString("area_name");
+							data[4] = result2.getString("area_of_use");					
+						}
+						if (data[0]!=null && validCRS(projection_conv_code) && valid(crs_kind)){
+							dtm.addRow(data);
+						}
+					}
+				}
+				
+				catch (SQLException e1) {
+					e1.printStackTrace();
+				}
+			}
+			else if (bus==1){
+				try {
+					while(result.next()) {
+						Object[]data = new Object[5];
+						data[3] = result.getString("area_name");
+						data[4] = result.getString("area_of_use");	
+											
+						int area_of_use_code = Integer.parseInt(result.getString("area_code"));
+										
+						String sentence = "SELECT coord_ref_sys_code, coord_ref_sys_name, " +
+										"coord_ref_sys_kind, source_geogcrs_code, projection_conv_code " +
+										"FROM epsg_coordinatereferencesystem " +
+										"WHERE area_of_use_code = "+ area_of_use_code ;
+						
+						result2 = Query.select(sentence,connect.getConnection());
+						while(result2.next()){
+							data[0] = String.valueOf(result2.getInt("coord_ref_sys_code"));
+							data[1] = result2.getString("coord_ref_sys_name");
+							data[2] = result2.getString("coord_ref_sys_kind");
+							crs_kind = (String)data[2];
+							projection_conv_code = result2.getInt("projection_conv_code");
+										
+						}
+						/*
+						 * Buscaremos solo aquellos CRS cuyas proyecciones esten entre las
+						 * 16 soportadas por proj4 para ello creamos un metodo para validar
+						 * si esta entre estas proyecciones
+						 */						
+						if (data[0]!=null && validCRS(projection_conv_code) && valid(crs_kind)){
+							dtm.addRow(data);
+						}	
+						if (notValid(crs_kind)){
+							not_valid = true;
+						}
+					}
+				} 
+				
+				catch (SQLException e1) {
+					e1.printStackTrace();
+				}
+			}
+			int numr = dtm.getRowCount();			
+			if (not_valid){
+				JOptionPane.showMessageDialog(this, PluginServices.getText(this,"crs_not_soported"), "Warning...",
+						JOptionPane.WARNING_MESSAGE);
+				not_valid = false;
+			}
+			else if (not_numeric) {
+				JOptionPane.showMessageDialog(EPSGpanel.this, 
+						PluginServices.getText(this,"numeric_format"), 
+						"Warning...", JOptionPane.WARNING_MESSAGE);
+				searchTextField.setText("");
+			}
+			else if (numr == 0){
+			JOptionPane.showMessageDialog(this, PluginServices.getText(this,"no_results"), "Warning...",
+					JOptionPane.WARNING_MESSAGE);
+			}
+			else{
+				this.getJTable().setRowSelectionInterval(0,0);
+			}
+		}		
+	}	
+	
+	/**
+	 * metodo auxiliar que hara la comprobacion de si el CRS buscado pertenecera
+	 * a los no soportados por proj4
+	 */
+	private boolean notValid(String kind){		
+		for (int i = 0; i< not_soported_crs.length; i++){
+			if (kind.equals(not_soported_crs[i])){
+				return true;
+			}
+		}
+		return false;
+	}
+	
+	/**
+	 * Metodo que comprueba si el CRS buscado pertenece a algun tipo 
+	 * de los que soporta la aplicacion
+	 */
+	private boolean valid(String kind){		
+		for (int i = 0; i< soported_crs.length; i++){
+			if (kind.equals(soported_crs[i])){
+				return true;
+			}
+		}
+		return false;
+	}
+	
+	/**
+	 * metodo auxiliar que nos servira para comprobar si la proyeccion del CRS seleccionado
+	 * esta entre las 16 con las que trabaja proj4
+	 */
+	private boolean validCRS(int projection_conv_code2) {
+		if (projection_conv_code2 == 0) return true;
+		String sentence = "SELECT coord_op_method_code " +
+							"FROM epsg_coordoperation " +
+							"WHERE coord_op_code = " + projection_conv_code;
+		ResultSet result = Query.select(sentence,connect.getConnection());
+		try {
+			while (result.next()){
+				method_code = result.getInt("coord_op_method_code");
+			}
+		} catch (SQLException e) {
+			e.printStackTrace();
+		}
+		
+		for (int i = 0; i< valid_method_code.length; i++){
+			if (method_code == valid_method_code[i] ){
+				return true;
+			}
+		}		
+		return false;
+	}
+
+
+	private JButton getSearchButton() {
+		if (searchButton == null) {
+			searchButton = new JButton();
+			searchButton.setPreferredSize(new Dimension(75,20));
+			searchButton.setText(PluginServices.getText(this,"buscar"));
+			searchButton.setMnemonic('S');
+			searchButton.setToolTipText("Search of a CRS by selected criterion");
+			searchButton.addActionListener(this);			
+		}
+		return searchButton;
+	}	
+	
+	private JTextField getSearchTextField() {
+		if (searchTextField == null) {
+			searchTextField = new JTextField();
+			searchTextField.setPreferredSize(new Dimension(300,20));
+			searchTextField.addKeyListener(this);			
+		}
+		
+		return searchTextField;
+	}
+	
+	public JTable getJTable() {
+		if (jTable == null) {
+			String[] columnNames= {PluginServices.getText(this,"codigo"),
+					PluginServices.getText(this,"nombre"),
+					PluginServices.getText(this,"tipo"),
+					PluginServices.getText(this,"area"),
+			PluginServices.getText(this,"descripcion")};
+			Object[][]data = {};			
+			dtm = new DefaultTableModel(data, columnNames)
+			 {
+				public boolean isCellEditable(int row, int column) {
+					return false;
+				}
+				/*
+				 * metodo necesario para cuando utilizamos tablas ordenadas
+				 * ya que sino al ordenar por algun campo no se queda con el orden
+				 * actual al seleccionar una fila (non-Javadoc)
+				 * @see javax.swing.table.TableModel#getColumnClass(int)
+				 */
+				public Class getColumnClass(int column)
+				{
+					return getValueAt(0, column).getClass();
+				}
+				};
+			sorter = new TableSorter(dtm);			
+
+			jTable = new JTable(sorter);
+			//jTable.setPreferredSize(new Dimension(800, 100));
+			sorter.setTableHeader(jTable.getTableHeader());
+			jTable.setAutoResizeMode(JTable.AUTO_RESIZE_OFF);
+			jTable.setCellSelectionEnabled(false);
+			jTable.setRowSelectionAllowed(true);
+			jTable.setColumnSelectionAllowed(false);
+			jTable.setSelectionMode(ListSelectionModel.SINGLE_SELECTION);
+			TableColumn column = null;
+			for (int i = 0; i < columnNames.length; i++) {
+			    column = jTable.getColumnModel().getColumn(i);
+			    if (i == 0) {
+			        column.setPreferredWidth(50); //code column is shorter			     	
+			    }			    	
+			    else if (i == 2) {
+			    	column.setPreferredWidth(80);
+			    }	
+			    else if (i==4){
+			    	column.setPreferredWidth(300);
+			    }
+			    else {
+			        column.setPreferredWidth(140);
+			    }
+			}			
+		}
+		
+		return jTable;
+		
+	}
+	
+	public void setCodeCRS(int code) {
+		codeCRS = code;
+	}
+	
+	public int getCodeCRS() {
+		return codeCRS;
+	}	
+	
+	private JScrollPane getJScrollPane() {
+		if (jScrollPane == null) {
+			jScrollPane = new JScrollPane(getJTable(),JScrollPane.VERTICAL_SCROLLBAR_AS_NEEDED, JScrollPane.HORIZONTAL_SCROLLBAR_ALWAYS);
+			jScrollPane.setPreferredSize(new Dimension(500,150));
+			jScrollPane.setBorder(
+				    BorderFactory.createCompoundBorder(
+					BorderFactory.createCompoundBorder(
+							BorderFactory.createTitledBorder(PluginServices.getText(this,"coordinate_reference_systems")),
+							BorderFactory.createEmptyBorder(5,5,5,5)),
+							jScrollPane.getBorder()));
+			jScrollPane.setViewportView(getJTable());
+		}
+		return jScrollPane;
+	}
+	
+	public JButton getInfoCrs() {
+		if(infoCrs == null) {
+			infoCrs = new JButton();
+			infoCrs.setPreferredSize(new Dimension(75,20));
+			infoCrs.setText(PluginServices.getText(this,"infocrs"));			
+			infoCrs.setMnemonic('I');
+			infoCrs.setEnabled(false);
+			infoCrs.setToolTipText("Mostrar la informacion del Crs selecionado");
+			infoCrs.addActionListener(this);
+		}
+		return infoCrs;
+	}
+	
+	
+	public ICrs getProjection() {
+		try {
+			String txt = getWKT();			
+			ICrs crs = new CrsFactory().getCRS(epsg_code, txt); 
+			return crs ;
+		} catch (CrsException e) {
+			e.printStackTrace();
+		}
+		return null;
+	}
+	
+	/**
+	 * Genera la cadena WKT una vez que escogemos el CRS de la tabla.
+	 * Dicha cadena la generamos con los par�metros cogidos directamente
+	 * del repositorio de la EPSG, y m�s adelante volveremos a tratarla
+	 * para pasarla a una cadena wkt legible por la proj4.
+	 *
+	 */
+	public void setWKT(){
+		Epsg2wkt wkt = null;
+						
+		epsg_code = getCodeCRS();
+		if (epsg_code != -1){		
+			/*
+			 * ahora que he escogido, recojo toda la informacion que me va a hacer falta
+			 */
+			String sentence = "SELECT source_geogcrs_code, projection_conv_code, " +
+					"coord_ref_sys_kind, datum_code " +
+							"FROM epsg_coordinatereferencesystem " +
+							"WHERE coord_ref_sys_code = "+ epsg_code ;
+			ResultSet result = Query.select(sentence,connect.getConnection());
+			
+			try {
+				result.next();
+				source_cod = result.getInt("source_geogcrs_code");
+				projection_conv_code = result.getInt("projection_conv_code");
+				crs_kind = result.getString("coord_ref_sys_kind");
+				datum_code = result.getInt("datum_code");
+			} catch (SQLException e1) {
+				e1.printStackTrace();
+			}
+			
+			if (datum_code != 0){
+				source_yn = true;
+				GetCRSepsg ep = new GetCRSepsg(epsg_code, source_yn, source_cod, projection_conv_code, connect);
+				ep.Getepsgdata();
+			}
+			else if (source_cod != 0){
+				source_yn = false;
+			}
+			else source_yn = true;
+			
+			GetCRSepsg ep = new GetCRSepsg(epsg_code, source_yn, source_cod, projection_conv_code, connect);
+			ep.Getepsgdata();
+			
+			if (crs_kind.equals("geographic 2D") || crs_kind.equals("geographic 3D")){
+				wkt = new Epsg2wkt(ep , "geog");			
+			}
+			else if (crs_kind.equals("projected")){
+				wkt = new Epsg2wkt(ep, "proj");
+			}
+			else if (crs_kind.equals("compound")){
+				wkt = new Epsg2wkt(ep,"comp");
+			}
+			else if (crs_kind.equals("geocentric")){
+				wkt = new Epsg2wkt(ep,"geoc");
+			}
+		}
+		else {
+			JOptionPane.showMessageDialog(this, 
+					PluginServices.getText(this,"crs_no_selected."), 
+					"Warning...", JOptionPane.WARNING_MESSAGE);
+			
+		}
+		cadWKT = wkt.getWKT();
+	}
+		
+	public String getWKT(){
+		return cadWKT;
+	}
+	
+	public void setProjection(IProjection crs) {
+		//setCrs((ICrs) crs);
+	}
+	
+	/**
+	 * Metodo para cargar en el CRS de la capa el CRS de la vista.
+	 * Se utilizar� a la hora de arrancar la definici�n del CRS de la nueva capa
+	 */	
+	public void loadViewCRS(int code){
+		connection();
+		String sentence = "SELECT coord_ref_sys_code, coord_ref_sys_name, coord_ref_sys_kind, area_of_use_code, " +
+						  "source_geogcrs_code, projection_conv_code  " +
+						  "FROM epsg_coordinatereferencesystem " +	                              
+				        "WHERE coord_ref_sys_code = " + code;
+		ResultSet result = Query.select(sentence,connect.getConnection());
+		
+		try {
+			result.next();
+			Object[]data = new Object[5];
+			data[0] = String.valueOf(result.getInt("coord_ref_sys_code"));
+			data[1] = result.getString("coord_ref_sys_name");
+			crs_kind = result.getString("coord_ref_sys_kind");
+			data[2] = crs_kind;
+			projection_conv_code = result.getInt("projection_conv_code");
+			
+			int area_of_use_code = Integer.parseInt(result.getString("area_of_use_code"));
+							
+			sentence = "SELECT area_name, area_of_use FROM epsg_area " +
+							"WHERE area_code = "+ area_of_use_code ;
+			
+			ResultSet result2 = Query.select(sentence,connect.getConnection());
+			result2.next();
+			data[3] = result2.getString("area_name");
+			data[4] = result2.getString("area_of_use");					
+			
+			dtm.addRow(data);					
+		}
+		
+		catch (SQLException e1) {
+			e1.printStackTrace();
+		}
+	}
+
+	public void keyPressed(KeyEvent e) {
+		// TODO Auto-generated method stub		
+		if (e.getSource() == this.getSearchTextField()) {
+			if (e.getKeyCode() == 10) {
+				searchButton();
+			}			
+		}		
+	}
+
+	public void keyReleased(KeyEvent e) {
+		// TODO Auto-generated method stub		
+	}
+
+	public void keyTyped(KeyEvent e) {
+		// TODO Auto-generated method stub
+		
+	}
+
+	/**
+	 * Maneja los eventos de los botones y los radioButtons del panel
+	 * de la EPSG.
+	 */
+	public void actionPerformed(ActionEvent e) {
+		// TODO Auto-generated method stub
+		if (e.getSource() == this.getCodeRadioButton()) {
+			searchTextField.setText("");
+			codeRadioButton.setSelected(true);
+			nameRadioButton.setSelected(false);
+			areaRadioButton.setSelected(false);
+		}
+		
+		if (e.getSource() == this.getNameRadioButton()) {
+			searchTextField.setText("");
+			nameRadioButton.setSelected(true);
+			codeRadioButton.setSelected(false);
+			areaRadioButton.setSelected(false);
+		}
+
+		if (e.getSource() == this.getAreaRadioButton()) {
+			searchTextField.setText("");
+			areaRadioButton.setSelected(true);
+			codeRadioButton.setSelected(false);
+			nameRadioButton.setSelected(false);
+		}
+		
+		if (e.getSource() == this.getSearchButton()) {
+			searchTextField.setBackground(Color.white);
+			if (searchTextField.getText().equals("")) {
+				searchTextField.setBackground(new Color(255,204,204));
+				JOptionPane.showMessageDialog(EPSGpanel.this, 
+						PluginServices.getText(this,"fill_name"), 
+						"Warning...", JOptionPane.WARNING_MESSAGE);
+			}
+			else {
+				searchButton();
+			}
+		}
+		
+		if (e.getSource() == this.getInfoCrs()) {
+			InfoCRSPanel info = new InfoCRSPanel(getProjection());
+			info.setSize(new Dimension(550,350));
+			info.setLayout(new GridLayout(0,1));
+			info.setLayout(new FlowLayout(FlowLayout.LEFT,10,5));
+			PluginServices.getMDIManager().addWindow(info);
+		}
+	}
+}
\ No newline at end of file

Property changes on: tags/Root_F2/libraries/libJCRS/src/org/gvsig/crs/gui/panels/EPSGpanel.java
___________________________________________________________________
Added: svn:eol-style
   + native
Added: svn:keywords
   + Author Date Id Revision

Index: tags/Root_F2/libraries/libJCRS/src/org/gvsig/crs/gui/panels/TreePanel.java
===================================================================
--- tags/Root_F2/libraries/libJCRS/src/org/gvsig/crs/gui/panels/TreePanel.java	(revision 0)
+++ tags/Root_F2/libraries/libJCRS/src/org/gvsig/crs/gui/panels/TreePanel.java	(revision 10155)
@@ -0,0 +1,213 @@
+/* gvSIG. Sistema de Informaci�n Geogr�fica de la Generalitat Valenciana
+ *
+ * Copyright (C) 2006 Instituto de Desarrollo Regional and Generalitat Valenciana.
+ *
+ * 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., 59 Temple Place - Suite 330, Boston, MA  02111-1307,USA.
+ *
+ * For more information, contact:
+ *
+ *  Generalitat Valenciana
+ *   Conselleria d'Infraestructures i Transport
+ *   Av. Blasco Ib��ez, 50
+ *   46010 VALENCIA
+ *   SPAIN
+ *
+ *      +34 963862235
+ *   gvsig@gva.es
+ *      www.gvsig.gva.es
+ *
+ *    or
+ *
+ *   Instituto de Desarrollo Regional (Universidad de Castilla La-Mancha)
+ *   Campus Universitario s/n
+ *   02071 Alabacete
+ *   Spain
+ *
+ *   +34 967 599 200
+ */
+
+package org.gvsig.crs.gui.panels;
+
+import java.awt.FlowLayout;
+import java.awt.GridBagConstraints;
+import java.awt.GridBagLayout;
+import java.util.Hashtable;
+
+import javax.swing.JPanel;
+import javax.swing.JScrollPane;
+import javax.swing.JTextArea;
+import javax.swing.JTree;
+import javax.swing.tree.DefaultMutableTreeNode;
+import javax.swing.tree.DefaultTreeModel;
+
+/**
+ * 
+ * @author Diego Guerrero (diego.guerrero@uclm.es)
+ *
+ */
+public class TreePanel extends JPanel {
+	
+	private int 		wComp = 190;
+	private int 		hComp = 360;
+	private int 		hTree = (int)Math.floor(hComp * 0.68);
+	private int 		hList = hComp - hTree;
+	private JScrollPane pTree = null;
+	private JScrollPane pList = null;
+	private JTree tree = null;
+	//private JList list = null;
+	private JTextArea list = null;
+	private DefaultMutableTreeNode raiz = null;
+	private Hashtable	map;
+	String rootName = "";
+
+	public TreePanel(String rootName) {
+		super();
+		this.rootName = rootName;
+		initialize();
+	}
+	
+	private void initialize() {
+		map = new Hashtable();
+		raiz =  new DefaultMutableTreeNode(rootName);
+        FlowLayout flowLayout = new FlowLayout();
+        flowLayout.setHgap(0);
+        flowLayout.setVgap(0);
+        this.setLayout(flowLayout);
+		
+		GridBagConstraints gridBagConstraints1 = new GridBagConstraints();
+		gridBagConstraints1.gridx = 0;
+		gridBagConstraints1.gridy = 1;
+		GridBagConstraints gridBagConstraints = new GridBagConstraints();
+		gridBagConstraints.gridx = 0;
+		gridBagConstraints.gridy = 0;
+		setLayout(new GridBagLayout());
+		setPreferredSize(new java.awt.Dimension(wComp,hComp));
+		add(getPTree(), gridBagConstraints);
+		add(getPList(), gridBagConstraints1);
+
+	}
+	
+	/**
+	 * This method initializes jPanel	
+	 * 	
+	 * @return javax.swing.JPanel	
+	 */
+	private JScrollPane getPTree() {
+		if (pTree == null) {
+			pTree = new JScrollPane();
+			pTree.setPreferredSize(new java.awt.Dimension(wComp, hTree));
+			pTree.setViewportBorder(javax.swing.BorderFactory.createBevelBorder(javax.swing.border.BevelBorder.LOWERED));
+			pTree.setVerticalScrollBarPolicy(javax.swing.JScrollPane.VERTICAL_SCROLLBAR_AS_NEEDED);
+			pTree.setViewportView(getTree());
+		}
+		return pTree;
+	}
+
+	/**
+	 * This method initializes jPanel1	
+	 * 	
+	 * @return javax.swing.JPanel	
+	 */
+	private JScrollPane getPList() {
+		if (pList == null) {
+			pList = new JScrollPane();
+			pList.setPreferredSize(new java.awt.Dimension(wComp, hList));
+			pList.setBorder(javax.swing.BorderFactory.createEtchedBorder(javax.swing.border.EtchedBorder.RAISED));
+			pList.setBackground(java.awt.Color.white);
+			pList.setVerticalScrollBarPolicy(javax.swing.JScrollPane.VERTICAL_SCROLLBAR_AS_NEEDED);
+			pList.setHorizontalScrollBarPolicy(javax.swing.JScrollPane.HORIZONTAL_SCROLLBAR_NEVER);
+			pList.setViewportView(getList());
+		}
+		return pList;
+	}
+
+	/**
+	 * This method initializes jTree	
+	 * 	
+	 * @return javax.swing.JTree	
+	 */
+	public JTree getTree() {
+		if (tree == null) {
+			tree = new JTree(raiz);
+		}
+		return tree;
+	}
+
+	/**
+	 * This method initializes jList	
+	 * 	
+	 * @return javax.swing.JList	
+	 */
+	public JTextArea getList() {
+		if (list == null) {
+			list = new JTextArea();
+			list.setLineWrap(true);
+			list.setWrapStyleWord(true);
+			list.setEditable(false);
+		}
+		return list;
+	}
+	
+	public void setPanelSize(int w, int h){
+		wComp = w;
+		hComp = h;
+		hTree = (int)Math.floor(hComp * 0.68);
+		hList = hComp - hTree;
+        this.setPreferredSize(new java.awt.Dimension(wComp, hComp));
+		setPreferredSize(new java.awt.Dimension(wComp, hComp));
+		pTree.setPreferredSize(new java.awt.Dimension(wComp, hTree));
+		pList.setPreferredSize(new java.awt.Dimension(wComp, hList));
+	}
+	
+	/**
+	 * A�ade una nueva categoria al arbol
+	 * @param name	Etiqueta que aparece en el arbol. 
+	 * @param pos	Posici�n en el arbol de la nueva categoria
+	 */
+	public void addClass(String name, int pos){
+		DefaultTreeModel model =(DefaultTreeModel)tree.getModel();
+		DefaultMutableTreeNode r = new DefaultMutableTreeNode( name );
+		model.insertNodeInto(r, raiz, pos);
+	}
+	
+	/**
+	 * A�ade una entrada a una categoria
+	 * @param name Nombre de la entrada a a�adir
+	 * @param parentName Categoria a la que a�adimos
+	 * @param value Valor asociado a la entrada
+	 */
+	public void addEntry(String name, String parentName, String value){
+		DefaultTreeModel model =(DefaultTreeModel)tree.getModel();
+		for(int i = 0; i < model.getChildCount(raiz); i++){
+			if(model.getChild(raiz, i).toString().equals(parentName)){
+				DefaultMutableTreeNode node = (DefaultMutableTreeNode)model.getChild(raiz, i);
+				node.add(new DefaultMutableTreeNode(name));
+				if (value!=null)
+					map.put(name,value);
+			}
+		}
+	}
+	
+	public void setRoot(String name){
+		DefaultTreeModel model =(DefaultTreeModel)tree.getModel();
+		//for (int index = 0; index<model.getChildCount(model.getRoot());index++)
+		//	model.removeNodeFromParent((DefaultMutableTreeNode)model.getChild(raiz, index));
+		rootName=name;
+		raiz =  new DefaultMutableTreeNode(rootName);
+		model.setRoot(raiz);
+		map.clear();
+		
+	}
+}

Property changes on: tags/Root_F2/libraries/libJCRS/src/org/gvsig/crs/gui/panels/TreePanel.java
___________________________________________________________________
Added: svn:keywords
   + Author Date Id Revision
Added: svn:eol-style
   + native

Index: tags/Root_F2/libraries/libJCRS/src/org/gvsig/crs/gui/panels/IAU2000panel.java
===================================================================
--- tags/Root_F2/libraries/libJCRS/src/org/gvsig/crs/gui/panels/IAU2000panel.java	(revision 0)
+++ tags/Root_F2/libraries/libJCRS/src/org/gvsig/crs/gui/panels/IAU2000panel.java	(revision 10155)
@@ -0,0 +1,526 @@
+/* gvSIG. Sistema de Informaci�n Geogr�fica de la Generalitat Valenciana
+ *
+ * Copyright (C) 2006 Instituto de Desarrollo Regional and Generalitat Valenciana.
+ *
+ * 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., 59 Temple Place - Suite 330, Boston, MA  02111-1307,USA.
+ *
+ * For more information, contact:
+ *
+ *  Generalitat Valenciana
+ *   Conselleria d'Infraestructures i Transport
+ *   Av. Blasco Ib��ez, 50
+ *   46010 VALENCIA
+ *   SPAIN
+ *
+ *      +34 963862235
+ *   gvsig@gva.es
+ *      www.gvsig.gva.es
+ *
+ *    or
+ *
+ *   Instituto de Desarrollo Regional (Universidad de Castilla La-Mancha)
+ *   Campus Universitario s/n
+ *   02071 Alabacete
+ *   Spain
+ *
+ *   +34 967 599 200
+ */
+
+package org.gvsig.crs.gui.panels;
+
+import java.awt.Color;
+import java.awt.Dimension;
+import java.awt.FlowLayout;
+import java.awt.GridLayout;
+import java.awt.event.ActionEvent;
+import java.awt.event.ActionListener;
+import java.awt.event.KeyEvent;
+import java.awt.event.KeyListener;
+import java.sql.ResultSet;
+import java.sql.SQLException;
+
+import javax.swing.BorderFactory;
+import javax.swing.JButton;
+import javax.swing.JLabel;
+import javax.swing.JOptionPane;
+import javax.swing.JPanel;
+import javax.swing.JRadioButton;
+import javax.swing.JScrollPane;
+import javax.swing.JTable;
+import javax.swing.JTextField;
+import javax.swing.ListSelectionModel;
+import javax.swing.table.DefaultTableModel;
+import javax.swing.table.TableColumn;
+
+import org.cresques.cts.IProjection;
+import org.gvsig.crs.CrsException;
+import org.gvsig.crs.CrsFactory;
+import org.gvsig.crs.EpsgConnection;
+import org.gvsig.crs.ICrs;
+import org.gvsig.crs.Query;
+import org.gvsig.crs.ogr.Iau2wkt;
+
+import com.iver.andami.PluginServices;
+import com.iver.cit.gvsig.gui.TableSorter;
+
+/**
+ * Clase que genera el panel para la b�squeda de CRS del repositorio
+ * de la IAU2000
+ * 
+ * @author Jos� Luis G�mez Mart�nez (jolugomar@gmail.com)
+ *
+ */
+public class IAU2000panel extends JPanel implements KeyListener, ActionListener {
+
+	/**
+	 * 
+	 */
+	private static final long serialVersionUID = 1L;
+	public JPanel IAU2000panel = null;
+	
+	private JRadioButton codeRadioButton = null;
+	private JRadioButton nameRadioButton = null;	
+	private JPanel groupRadioButton = null;
+	
+	JLabel jLabel = null;
+	JTextField crsTextFld = null;	
+	
+	String cadWKT = "";
+	
+	int transf = 0;	
+	boolean source_yn = false;
+	int source_cod = 0;
+	int method_code = 0;
+	int datum_code = 0;
+	int projection_conv_code = 0;
+	public String crs_kind = null;
+	
+	public TableSorter sorter = null;
+	
+	public EpsgConnection connect = null;
+	
+	private JButton searchButton = null;
+	private JTextField searchTextField = null;
+	public JTable jTable = null;
+	private JScrollPane jScrollPane = null;
+	public DefaultTableModel dtm = null;
+	public String key;
+	public int selectedRowTable = -1;	
+	
+	private int codeCRS = -1;	
+	
+	public IAU2000panel() {		
+		initialize();
+	}
+	
+	private void initialize(){
+		this.setLayout(new GridLayout(2,3));
+		this.setLayout(new FlowLayout(FlowLayout.LEFT,10,10));
+		this.add(getGroupRadioButton(), null);
+		this.add(getSearchButton(), null);
+		this.add(getSearchTextField(), null);		
+		this.add(getJScrollPane(), null);	
+	}
+	
+	public void connection(){
+		connect = new EpsgConnection();
+		connect.setConnectionIAU2000();
+		
+	}
+	
+	private JRadioButton getCodeRadioButton() {
+		if (codeRadioButton == null) {
+			codeRadioButton = new JRadioButton();
+			codeRadioButton.setText(PluginServices.getText(this,"por_codigo"));//setText("By Code EPSG");
+			codeRadioButton.setSelected(true);
+			codeRadioButton.addActionListener(this);
+		}
+		return codeRadioButton;
+	}
+		  
+	private JRadioButton getNameRadioButton() {
+		if (nameRadioButton == null) {
+			nameRadioButton = new JRadioButton();
+			nameRadioButton.setText(PluginServices.getText(this,"por_nombre"));
+			nameRadioButton.addActionListener(this);
+		}
+		return nameRadioButton;
+	}
+		 
+	private JPanel getGroupRadioButton() {
+		if (groupRadioButton == null) {
+			groupRadioButton = new JPanel();
+			groupRadioButton.setLayout(new GridLayout(1,0));
+			groupRadioButton.setPreferredSize(new Dimension(500,30));
+			groupRadioButton.add(getLabel());
+			groupRadioButton.add(getCodeRadioButton());
+			groupRadioButton.add(getNameRadioButton());			
+		}
+		return groupRadioButton;
+	}
+	
+	private JLabel getLabel(){
+		JLabel criterio = new JLabel();
+		criterio.setPreferredSize(new Dimension(100, 20));
+		criterio.setText(PluginServices.getText(this, "criterio_busqueda"));
+		return criterio;
+	}
+	
+	/**
+	 * M�todo que controla la b�squeda de CRS del repositorio de IAU2000.
+	 * Tambi�n maneja los errores en caso de que los par�metros de b�squeda
+	 * sean err�neos, o que no se encuentren resultados.
+	 *
+	 */
+	private void searchButton() {		
+		searchTextField.setBackground(Color.white);
+		boolean not_numeric = false;
+		
+		if (searchTextField.getText().equals("")) {
+			searchTextField.setBackground(new Color(255,204,204));
+			JOptionPane.showMessageDialog(this, PluginServices.getText(this,"fill_name"), "Warning...", JOptionPane.WARNING_MESSAGE);
+		}
+		
+		else {
+            //Eliminar filas en cada nueva bsqueda
+			int numRow = dtm.getRowCount();
+			while (numRow != 0) {
+				numRow = numRow - 1;
+				dtm.removeRow(numRow);
+			}
+			
+			if (codeRadioButton.isSelected() && (searchTextField.getText().length()!=searchTextField.getText().replaceAll("[^0-9]", "").length())){
+				not_numeric = true;
+			}
+			
+			//Dependiendo de la opcion se realizada una busqueda
+			ResultSet result = null;
+								  			
+			if (codeRadioButton.isSelected() && !not_numeric) {
+					
+				key = searchTextField.getText();
+				int code = Integer.parseInt(key);
+				String sentence = "SELECT iau_code, iau_wkt, iau_proj, iau_geog, iau_datum " +							 
+								  "FROM IAU2000 " +	                              
+	                              "WHERE iau_code = " + code;
+								
+				result = Query.select(sentence,connect.getConnection());	
+				
+				
+				Object[] data = new Object[4];
+				try {
+					while (result.next()){
+						data[0]	= result.getString("iau_code");
+						data[1] = result.getString("iau_wkt");
+						String proj = result.getString("iau_proj");
+						if (!proj.equals("")){
+							data[1] = proj;
+							data[2] = PluginServices.getText(this,"si");
+						} 
+						else 
+						{
+							data[1] = result.getString("iau_geog");
+							data[2] = PluginServices.getText(this,"no");
+						}
+						
+						data[3] = result.getString("iau_datum");
+						dtm.addRow(data);
+					}
+				} catch (SQLException e1) {
+					e1.printStackTrace();
+				}
+			}
+			else if (nameRadioButton.isSelected()) {
+				key = searchTextField.getText();
+				String key2 = key.substring(0,1);
+				String key3 = key.substring(1,key.length());
+				key2 = key2.toUpperCase();
+				
+				String sentence = "SELECT iau_code, iau_wkt, iau_proj, iau_geog, iau_datum " +							 
+					"FROM IAU2000 " +	                              
+					"WHERE (iau_proj LIKE '%" + key + "%') OR (iau_proj LIKE '%"+ 
+					key.toUpperCase() +"%') " +
+					"OR (iau_proj LIKE '%" + key2+key3 +"%') OR " +
+							"(iau_geog LIKE '%" + key + "%') OR (iau_geog LIKE '%"+ 
+					key.toUpperCase() +"%') " +
+					"OR (iau_geog LIKE '%" + key2+key3 +"%')";
+								
+				result = Query.select(sentence,connect.getConnection());	
+								
+				Object[] data = new Object[4];
+				try {
+					while (result.next()){
+						data[0]	= result.getString("iau_code");
+						data[1] = result.getString("iau_wkt");
+						String proj = result.getString("iau_proj");
+						if (!proj.equals("")){
+							data[1] = proj;
+							data[2] = PluginServices.getText(this,"si");
+						} 
+						else 
+						{
+							data[1] = result.getString("iau_geog");
+							data[2] = PluginServices.getText(this,"no");
+						}
+						
+						data[3] = result.getString("iau_datum");
+						dtm.addRow(data);
+					}
+				} catch (SQLException e1) {
+					e1.printStackTrace();
+				}
+			}
+						
+			int numr = dtm.getRowCount();
+			if (not_numeric) {
+				JOptionPane.showMessageDialog(IAU2000panel.this, 
+						PluginServices.getText(this,"numeric_format"), 
+						"Warning...", JOptionPane.WARNING_MESSAGE);
+				searchTextField.setText("");
+			}
+			else if (numr == 0){
+			JOptionPane.showMessageDialog(this, PluginServices.getText(this,"no_results"), "Warning...",
+					JOptionPane.WARNING_MESSAGE);
+			}
+			else{
+				this.getJTable().setRowSelectionInterval(0,0);				
+			}
+		}		
+	}	
+		
+	private JButton getSearchButton() {
+		if (searchButton == null) {
+			searchButton = new JButton();
+			searchButton.setPreferredSize(new Dimension(75,20));
+			searchButton.setText(PluginServices.getText(this,"buscar"));
+			searchButton.setMnemonic('S');			
+			searchButton.addActionListener(this);			
+		}
+		return searchButton;
+	}	
+	
+	private JTextField getSearchTextField() {
+		if (searchTextField == null) {
+			searchTextField = new JTextField();
+			searchTextField.setPreferredSize(new Dimension(300,20));
+			searchTextField.addKeyListener(this);
+		}		
+		return searchTextField;
+	}
+	
+	public JTable getJTable() {
+		if (jTable == null) {
+			String[] columnNames= {PluginServices.getText(this,"codigo"),
+					PluginServices.getText(this,"nombre"),
+					PluginServices.getText(this,"projected"),
+					PluginServices.getText(this,"datum")};
+			Object[][]data = {};			
+			dtm = new DefaultTableModel(data, columnNames)
+			 {
+				public boolean isCellEditable(int row, int column) {
+					return false;
+				}
+				/*
+				 * metodo necesario para cuando utilizamos tablas ordenadas
+				 * ya que sino al ordenar por algun campo no se queda con el orden
+				 * actual al seleccionar una fila (non-Javadoc)
+				 * @see javax.swing.table.TableModel#getColumnClass(int)
+				 */
+				public Class getColumnClass(int column)
+				{
+					return getValueAt(0, column).getClass();
+				}
+				};
+			sorter = new TableSorter(dtm);			
+
+			jTable = new JTable(sorter);
+			sorter.setTableHeader(jTable.getTableHeader());			
+			jTable.setCellSelectionEnabled(false);
+			jTable.setRowSelectionAllowed(true);
+			jTable.setColumnSelectionAllowed(false);
+			jTable.setSelectionMode(ListSelectionModel.SINGLE_SELECTION);
+			TableColumn column = null;
+			for (int i = 0; i < 4; i++) {
+			    column = jTable.getColumnModel().getColumn(i);
+			    if (i == 0) {
+			        column.setPreferredWidth(80); //code column is shorter			     	
+			    }else if (i ==2) {
+			    	column.setPreferredWidth(50);
+			    } else {
+			    	column.setPreferredWidth(175);
+			    }
+			    
+			}			
+	}
+		return jTable;
+		
+	}
+	
+	public void setCodeCRS(int code) {
+		codeCRS = code;
+	}
+	
+	public int getCodeCRS() {
+		return codeCRS;
+	}	
+	
+	private JScrollPane getJScrollPane() {
+		if (jScrollPane == null) {
+			jScrollPane = new JScrollPane();
+			jScrollPane.setPreferredSize(new Dimension(500,150));
+			jScrollPane.setBorder(
+				    BorderFactory.createCompoundBorder(
+					BorderFactory.createCompoundBorder(
+							BorderFactory.createTitledBorder(PluginServices.getText(this,"IAU2000")),
+							BorderFactory.createEmptyBorder(5,5,5,5)),
+							jScrollPane.getBorder()));
+			jScrollPane.setViewportView(getJTable());
+		}
+		return jScrollPane;
+	}
+	
+	public ICrs getProjection() {
+		try {
+			String txt = getWKT();			
+			ICrs crs = new CrsFactory().getCRS(getCodeCRS(), txt); 
+			return crs ;
+		} catch (CrsException e) {
+			e.printStackTrace();
+		}
+		return null;
+	}
+	
+	/**
+	 * Consigue la cadena wkt del CRS seleccionado, y genera la cadena que m�s
+	 * tarde volver� a ser tratada para la consecuci�n de una cadena wkt
+	 * legible por la proj4.
+	 *
+	 */
+	public void setWKT(){
+		int code = getCodeCRS();
+		String sentence = "SELECT iau_code, iau_wkt, iau_proj, iau_geog, iau_datum " +							 
+						  "FROM IAU2000 " +	                              
+                          "WHERE iau_code = " + code;
+		
+		
+		ResultSet result = Query.select(sentence,connect.getConnection());	
+	
+		try {
+			result.next();			
+			cadWKT = result.getString("iau_wkt");			
+		} catch (SQLException e1) {
+			e1.printStackTrace();
+		}		
+		cadWKT = cadWKT.substring(0, cadWKT.length()-1) + ", AUTHORITY[\"IAU2000\","+ getCodeCRS()+"]]";
+		if (cadWKT.charAt(0) == 'P'){
+			Iau2wkt wk = new Iau2wkt(cadWKT);
+			cadWKT = wk.getWkt();
+		}
+	}
+	
+	public String getWKT(){
+		return cadWKT;
+	}
+	
+	public void setProjection(IProjection crs) {
+		//setCrs((ICrs) crs);
+	}
+	
+	/**
+	 * Metodo para cargar en el CRS de la capa el CRS de la vista.
+	 * Se utilizar� a la hora de arrancar la definici�n del CRS de la nueva capa
+	 */
+	public void loadViewCRS(int code){
+		connection();		
+		String sentence = "SELECT iau_code, iau_wkt, iau_proj, iau_geog, iau_datum " +							 
+						  "FROM IAU2000 " +	                              
+                          "WHERE iau_code = " + code;
+				
+		ResultSet result = Query.select(sentence,connect.getConnection());	
+				
+		Object[] data = new Object[4];
+		try {
+			while (result.next()){
+				data[0]	= result.getString("iau_code");
+				data[1] = result.getString("iau_wkt");
+				String proj = result.getString("iau_proj");
+				if (!proj.equals("")){
+					data[1] = proj;
+					data[2] = PluginServices.getText(this,"si");
+				} 
+				else 
+				{
+					data[1] = result.getString("iau_geog");
+					data[2] = PluginServices.getText(this,"no");
+				}
+				
+				data[3] = result.getString("iau_datum");
+				dtm.addRow(data);
+			}
+		} catch (SQLException e1) {
+			e1.printStackTrace();
+		}
+	}
+
+	public void keyPressed(KeyEvent e) {
+		if (e.getSource() == this.getSearchTextField()){
+			if (e.getKeyCode() == 10) {
+				searchButton();
+			}			
+		}		
+	}
+
+	public void keyReleased(KeyEvent arg0) {
+		// TODO Auto-generated method stub
+		
+	}
+
+	public void keyTyped(KeyEvent arg0) {
+		// TODO Auto-generated method stub
+		
+	}
+
+	/**
+	 * Maneja los eventos de los botones y los radioButtons del panel
+	 * del repositorio IAU2000.
+	 */
+	public void actionPerformed(ActionEvent e) {
+		// TODO Auto-generated method stub
+		if (e.getSource() == this.getSearchButton()){
+			searchTextField.setBackground(Color.white);
+			if (searchTextField.getText().equals("")) {
+				searchTextField.setBackground(new Color(255,204,204));
+				JOptionPane.showMessageDialog(IAU2000panel.this, 
+						PluginServices.getText(this,"fill_name"), 
+						"Warning...", JOptionPane.WARNING_MESSAGE);
+			}
+			else {
+				searchButton();
+			}
+		}
+		if (e.getSource() == this.getCodeRadioButton()) {
+			searchTextField.setText("");
+			codeRadioButton.setSelected(true);
+			nameRadioButton.setSelected(false);
+		}
+		
+		if (e.getSource() == this.getNameRadioButton()) {
+			searchTextField.setText("");
+			nameRadioButton.setSelected(true);
+			codeRadioButton.setSelected(false);
+		}		
+	}
+
+}

Property changes on: tags/Root_F2/libraries/libJCRS/src/org/gvsig/crs/gui/panels/IAU2000panel.java
___________________________________________________________________
Added: svn:keywords
   + Author Date Id Revision
Added: svn:eol-style
   + native

Index: tags/Root_F2/libraries/libJCRS/src/org/gvsig/crs/gui/panels/USGSpanel.java
===================================================================
--- tags/Root_F2/libraries/libJCRS/src/org/gvsig/crs/gui/panels/USGSpanel.java	(revision 0)
+++ tags/Root_F2/libraries/libJCRS/src/org/gvsig/crs/gui/panels/USGSpanel.java	(revision 10155)
@@ -0,0 +1,10 @@
+package org.gvsig.crs.gui.panels;
+
+public class USGSpanel {
+
+	public USGSpanel() {
+		super();
+		// TODO Auto-generated constructor stub
+	}
+
+}

Property changes on: tags/Root_F2/libraries/libJCRS/src/org/gvsig/crs/gui/panels/USGSpanel.java
___________________________________________________________________
Added: svn:keywords
   + Author Date Id Revision
Added: svn:eol-style
   + native

Index: tags/Root_F2/libraries/libJCRS/src/org/gvsig/crs/gui/panels/ESRIpanel.java
===================================================================
--- tags/Root_F2/libraries/libJCRS/src/org/gvsig/crs/gui/panels/ESRIpanel.java	(revision 0)
+++ tags/Root_F2/libraries/libJCRS/src/org/gvsig/crs/gui/panels/ESRIpanel.java	(revision 10155)
@@ -0,0 +1,476 @@
+/* gvSIG. Sistema de Informaci�n Geogr�fica de la Generalitat Valenciana
+ *
+ * Copyright (C) 2006 Instituto de Desarrollo Regional and Generalitat Valenciana.
+ *
+ * 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., 59 Temple Place - Suite 330, Boston, MA  02111-1307,USA.
+ *
+ * For more information, contact:
+ *
+ *  Generalitat Valenciana
+ *   Conselleria d'Infraestructures i Transport
+ *   Av. Blasco Ib��ez, 50
+ *   46010 VALENCIA
+ *   SPAIN
+ *
+ *      +34 963862235
+ *   gvsig@gva.es
+ *      www.gvsig.gva.es
+ *
+ *    or
+ *
+ *   Instituto de Desarrollo Regional (Universidad de Castilla La-Mancha)
+ *   Campus Universitario s/n
+ *   02071 Alabacete
+ *   Spain
+ *
+ *   +34 967 599 200
+ */
+
+package org.gvsig.crs.gui.panels;
+import java.awt.Color;
+import java.awt.Dimension;
+import java.awt.FlowLayout;
+import java.awt.GridLayout;
+import java.awt.event.ActionEvent;
+import java.awt.event.ActionListener;
+import java.awt.event.KeyEvent;
+import java.awt.event.KeyListener;
+import java.io.File;
+import java.sql.ResultSet;
+import java.sql.SQLException;
+
+import javax.swing.BorderFactory;
+import javax.swing.JButton;
+import javax.swing.JFileChooser;
+import javax.swing.JLabel;
+import javax.swing.JOptionPane;
+import javax.swing.JPanel;
+import javax.swing.JRadioButton;
+import javax.swing.JScrollPane;
+import javax.swing.JTable;
+import javax.swing.JTextField;
+import javax.swing.ListSelectionModel;
+import javax.swing.filechooser.FileFilter;
+import javax.swing.table.DefaultTableModel;
+import javax.swing.table.TableColumn;
+
+import org.cresques.cts.IProjection;
+import org.gvsig.crs.CrsException;
+import org.gvsig.crs.CrsFactory;
+import org.gvsig.crs.EpsgConnection;
+import org.gvsig.crs.ICrs;
+import org.gvsig.crs.Query;
+import org.gvsig.crs.ogr.Iau2wkt;
+
+import com.iver.andami.PluginServices;
+import com.iver.cit.gvsig.gui.TableSorter;
+
+
+/**
+ * Clase que genera el panel para el repositorio ESRI
+ * 
+ * @author Jos� Luis G�mez Mart�nez (jolugomar@gmail.com)
+ *
+ */
+public class ESRIpanel extends JPanel implements ActionListener, KeyListener {
+	
+	/**
+	 * 
+	 */
+	private static final long serialVersionUID = 1L;	
+	
+
+	private JRadioButton codeRadioButton = null;
+	private JRadioButton nameRadioButton = null;	
+	private JPanel groupRadioButton = null;
+	public TableSorter sorter = null;
+	public JTable jTable = null;
+	private JScrollPane jScrollPane = null;
+	private JButton searchButton = null;
+	private JTextField searchTextField = null;
+	public DefaultTableModel dtm = null;
+	private int codeCRS = -1;
+	public String key;
+	String cadWKT;
+	public int selectedRowTable = -1;	
+	
+	public EpsgConnection connect = null;
+	
+	public ESRIpanel() {
+		initialize();		
+	}
+	
+	private void initialize(){
+		this.setLayout(new GridLayout(2,3));
+		this.setLayout(new FlowLayout(FlowLayout.LEFT,10,10));
+		this.add(getGroupRadioButton(), null);
+		this.add(getSearchButton(), null);
+		this.add(getSearchTextField(), null);		
+		this.add(getJScrollPane(), null);	
+	}
+	
+	public void connection(){
+		connect = new EpsgConnection();
+//		connect.setConnectionEsri();				
+	}
+	
+	private JRadioButton getCodeRadioButton() {
+		if (codeRadioButton == null) {
+			codeRadioButton = new JRadioButton();
+			codeRadioButton.setText(PluginServices.getText(this,"por_codigo"));//setText("By Code EPSG");
+			codeRadioButton.setSelected(true);
+			codeRadioButton.addActionListener(this);
+		}
+		return codeRadioButton;
+	}
+		  
+	private JRadioButton getNameRadioButton() {
+		if (nameRadioButton == null) {
+			nameRadioButton = new JRadioButton();
+			nameRadioButton.setText(PluginServices.getText(this,"por_nombre"));
+			nameRadioButton.addActionListener(this);
+		}
+		return nameRadioButton;
+	}
+		 
+	private JPanel getGroupRadioButton() {
+		if (groupRadioButton == null) {
+			groupRadioButton = new JPanel();
+			groupRadioButton.setLayout(new GridLayout(1,0));
+			groupRadioButton.setPreferredSize(new Dimension(500,30));
+			groupRadioButton.add(getLabel());
+			groupRadioButton.add(getCodeRadioButton());
+			groupRadioButton.add(getNameRadioButton());			
+		}
+		return groupRadioButton;
+	}
+	
+	private JLabel getLabel(){
+		JLabel criterio = new JLabel();
+		criterio.setPreferredSize(new Dimension(100, 20));
+		criterio.setText(PluginServices.getText(this, "criterio_busqueda"));
+		return criterio;
+	}
+	
+	private JButton getSearchButton() {
+		if (searchButton == null) {
+			searchButton = new JButton();
+			searchButton.setPreferredSize(new Dimension(75,20));
+			searchButton.setText(PluginServices.getText(this,"buscar"));
+			searchButton.setMnemonic('S');			
+			searchButton.addActionListener(this);			
+		}
+		return searchButton;
+	}	
+	
+	private JTextField getSearchTextField() {
+		if (searchTextField == null) {
+			searchTextField = new JTextField();
+			searchTextField.setPreferredSize(new Dimension(300,20));
+			searchTextField.addKeyListener(this);
+		}		
+		return searchTextField;
+	}
+	
+	public JTable getJTable() {
+		if (jTable == null) {
+			String[] columnNames= {PluginServices.getText(this,"codigo"),
+					PluginServices.getText(this,"nombre"),
+					PluginServices.getText(this,"projected"),
+					PluginServices.getText(this,"datum")};
+			Object[][]data = {};			
+			dtm = new DefaultTableModel(data, columnNames)
+			 {
+				public boolean isCellEditable(int row, int column) {
+					return false;
+				}
+				/*
+				 * metodo necesario para cuando utilizamos tablas ordenadas
+				 * ya que sino al ordenar por algun campo no se queda con el orden
+				 * actual al seleccionar una fila (non-Javadoc)
+				 * @see javax.swing.table.TableModel#getColumnClass(int)
+				 */
+				public Class getColumnClass(int column)
+				{
+					return getValueAt(0, column).getClass();
+				}
+				};
+			sorter = new TableSorter(dtm);			
+
+			jTable = new JTable(sorter);
+			sorter.setTableHeader(jTable.getTableHeader());			
+			jTable.setCellSelectionEnabled(false);
+			jTable.setRowSelectionAllowed(true);
+			jTable.setColumnSelectionAllowed(false);
+			jTable.setSelectionMode(ListSelectionModel.SINGLE_SELECTION);
+			TableColumn column = null;
+			for (int i = 0; i < 4; i++) {
+			    column = jTable.getColumnModel().getColumn(i);
+			    if (i == 0) {
+			        column.setPreferredWidth(80); //code column is shorter			     	
+			    }else if (i ==2) {
+			    	column.setPreferredWidth(50);
+			    } else {
+			    	column.setPreferredWidth(175);
+			    }
+			    
+			}			
+	}
+		return jTable;
+		
+	}
+	
+	public void setCodeCRS(int code) {
+		codeCRS = code;
+	}
+	
+	public int getCodeCRS() {
+		return codeCRS;
+	}	
+	
+	private JScrollPane getJScrollPane() {
+		if (jScrollPane == null) {
+			jScrollPane = new JScrollPane();
+			jScrollPane.setPreferredSize(new Dimension(500,150));
+			jScrollPane.setBorder(
+				    BorderFactory.createCompoundBorder(
+					BorderFactory.createCompoundBorder(
+							BorderFactory.createTitledBorder(PluginServices.getText(this,"ESRI")),
+							BorderFactory.createEmptyBorder(5,5,5,5)),
+							jScrollPane.getBorder()));
+			jScrollPane.setViewportView(getJTable());
+		}
+		return jScrollPane;
+	}
+	
+	public void keyPressed(KeyEvent e) {
+		if (e.getSource() == this.getSearchTextField()){
+			if (e.getKeyCode() == 10) {
+				searchButton();
+			}			
+		}		
+	}
+	
+	/**
+	 * M�todo que controla la b�squeda de CRS del repositorio de ESRI.
+	 * Tambi�n maneja los errores en caso de que los par�metros de b�squeda
+	 * sean err�neos, o que no se encuentren resultados.
+	 *
+	 */
+	private void searchButton() {		
+		searchTextField.setBackground(Color.white);
+		boolean not_numeric = false;
+		
+		if (searchTextField.getText().equals("")) {
+			searchTextField.setBackground(new Color(255,204,204));
+			JOptionPane.showMessageDialog(this, PluginServices.getText(this,"fill_name"), "Warning...", JOptionPane.WARNING_MESSAGE);
+		}
+		
+		else {
+            //Eliminar filas en cada nueva bsqueda
+			int numRow = dtm.getRowCount();
+			while (numRow != 0) {
+				numRow = numRow - 1;
+				dtm.removeRow(numRow);
+			}
+			
+			if (codeRadioButton.isSelected() && (searchTextField.getText().length()!=searchTextField.getText().replaceAll("[^0-9]", "").length())){
+				not_numeric = true;
+			}
+			
+			//Dependiendo de la opcion se realizada una busqueda
+			ResultSet result = null;
+								  			
+			if (codeRadioButton.isSelected() && !not_numeric) {
+					
+				key = searchTextField.getText();
+				int code = Integer.parseInt(key);
+				String sentence = "SELECT esri_code, esri_wkt, esri_proj, esri_geog, esri_datum " +							 
+								  "FROM ESRI " +	                              
+	                              "WHERE esri_code = " + code;
+								
+				result = Query.select(sentence,connect.getConnection());	
+				
+				
+				Object[] data = new Object[4];
+				try {
+					while (result.next()){
+						data[0]	= result.getString("esri_code");
+						data[1] = result.getString("esri_wkt");
+						String proj = result.getString("esri_proj");
+						if (!proj.equals("")){
+							data[1] = proj;
+							data[2] = PluginServices.getText(this,"si");
+						} 
+						else 
+						{
+							data[1] = result.getString("esri_geog");
+							data[2] = PluginServices.getText(this,"no");
+						}
+						
+						data[3] = result.getString("esri_datum");
+						dtm.addRow(data);
+					}
+				} catch (SQLException e1) {
+					e1.printStackTrace();
+				}
+			}
+			else if (nameRadioButton.isSelected()) {
+				key = searchTextField.getText();
+				String key2 = key.substring(0,1);
+				String key3 = key.substring(1,key.length());
+				key2 = key2.toUpperCase();
+				
+				String sentence = "SELECT esri_code, esri_wkt, esri_proj, esri_geog, esri_datum " +							 
+					"FROM ESRI " +	                              
+					"WHERE (esri_proj LIKE '%" + key + "%') OR (esri_proj LIKE '%"+ 
+					key.toUpperCase() +"%') " +
+					"OR (esri_proj LIKE '%" + key2+key3 +"%') OR " +
+							"(esri_geog LIKE '%" + key + "%') OR (esri_geog LIKE '%"+ 
+					key.toUpperCase() +"%') " +
+					"OR (esri_geog LIKE '%" + key2+key3 +"%')";
+								
+				result = Query.select(sentence,connect.getConnection());	
+								
+				Object[] data = new Object[4];
+				try {
+					while (result.next()){
+						data[0]	= result.getString("esri_code");
+						data[1] = result.getString("esri_wkt");
+						String proj = result.getString("esri_proj");
+						if (!proj.equals("")){
+							data[1] = proj;
+							data[2] = PluginServices.getText(this,"si");
+						} 
+						else 
+						{
+							data[1] = result.getString("esri_geog");
+							data[2] = PluginServices.getText(this,"no");
+						}
+						
+						data[3] = result.getString("esri_datum");
+						dtm.addRow(data);
+					}
+				} catch (SQLException e1) {
+					e1.printStackTrace();
+				}
+			}
+						
+			int numr = dtm.getRowCount();
+			if (not_numeric) {
+				JOptionPane.showMessageDialog(ESRIpanel.this, 
+						PluginServices.getText(this,"numeric_format"), 
+						"Warning...", JOptionPane.WARNING_MESSAGE);
+				searchTextField.setText("");
+			}
+			else if (numr == 0){
+			JOptionPane.showMessageDialog(this, PluginServices.getText(this,"no_results"), "Warning...",
+					JOptionPane.WARNING_MESSAGE);
+			}
+			else{
+				this.getJTable().setRowSelectionInterval(0,0);				
+			}
+		}		
+	}	
+
+	public void keyReleased(KeyEvent arg0) {
+		// TODO Auto-generated method stub
+		
+	}
+
+	public void keyTyped(KeyEvent arg0) {
+		// TODO Auto-generated method stub
+		
+	}
+
+	/**
+	 * Maneja los eventos de los botones y los radioButtons del panel
+	 * del repositorio ESRI.
+	 */
+	public void actionPerformed(ActionEvent e) {
+		// TODO Auto-generated method stub
+		if (e.getSource() == this.getSearchButton()){
+			searchTextField.setBackground(Color.white);
+			if (searchTextField.getText().equals("")) {
+				searchTextField.setBackground(new Color(255,204,204));
+				JOptionPane.showMessageDialog(ESRIpanel.this, 
+						PluginServices.getText(this,"fill_name"), 
+						"Warning...", JOptionPane.WARNING_MESSAGE);
+			}
+			else {
+				searchButton();
+			}
+		}
+		if (e.getSource() == this.getCodeRadioButton()) {
+			searchTextField.setText("");
+			codeRadioButton.setSelected(true);
+			nameRadioButton.setSelected(false);
+		}
+		
+		if (e.getSource() == this.getNameRadioButton()) {
+			searchTextField.setText("");
+			nameRadioButton.setSelected(true);
+			codeRadioButton.setSelected(false);
+		}		
+	}	
+	
+	public ICrs getProjection() {
+		try {
+			String txt = getWKT();			
+			ICrs crs = new CrsFactory().getCRS(getCodeCRS(), txt); 
+			return crs ;
+		} catch (CrsException e) {
+			e.printStackTrace();
+		}
+		return null;
+	}
+	
+	/**
+	 * Consigue la cadena wkt del CRS seleccionado, y genera la cadena que m�s
+	 * tarde volver� a ser tratada para la consecuci�n de una cadena wkt
+	 * legible por la proj4.
+	 *
+	 */
+	public void setWKT(){
+		int code = getCodeCRS();
+		String sentence = "SELECT esri_wkt " +							 
+						  "FROM ESRI " +	                              
+                          "WHERE esri_code = " + code;
+		
+		
+		ResultSet result = Query.select(sentence,connect.getConnection());	
+	
+		try {
+			result.next();			
+			cadWKT = result.getString("esri_wkt");			
+		} catch (SQLException e1) {
+			e1.printStackTrace();
+		}		
+		cadWKT = cadWKT.substring(0, cadWKT.length()-1) + ", AUTHORITY[\"ESRI\","+ getCodeCRS()+"]]";
+		
+	}
+	
+	public String getWKT(){
+		return cadWKT;
+	}
+	
+	public void setProjection(IProjection crs) {
+		//setCrs((ICrs) crs);
+	}
+	
+	
+	
+	
+}
\ No newline at end of file

Property changes on: tags/Root_F2/libraries/libJCRS/src/org/gvsig/crs/gui/panels/ESRIpanel.java
___________________________________________________________________
Added: svn:eol-style
   + native
Added: svn:keywords
   + Author Date Id Revision

Index: tags/Root_F2/libraries/libJCRS/src/org/gvsig/crs/gui/panels/TransformationNadgridsPanel.java
===================================================================
--- tags/Root_F2/libraries/libJCRS/src/org/gvsig/crs/gui/panels/TransformationNadgridsPanel.java	(revision 0)
+++ tags/Root_F2/libraries/libJCRS/src/org/gvsig/crs/gui/panels/TransformationNadgridsPanel.java	(revision 10155)
@@ -0,0 +1,590 @@
+/* gvSIG. Sistema de Informaci�n Geogr�fica de la Generalitat Valenciana
+ *
+ * Copyright (C) 2006 Instituto de Desarrollo Regional and Generalitat Valenciana.
+ *
+ * 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., 59 Temple Place - Suite 330, Boston, MA  02111-1307,USA.
+ *
+ * For more information, contact:
+ *
+ *  Generalitat Valenciana
+ *   Conselleria d'Infraestructures i Transport
+ *   Av. Blasco Ib��ez, 50
+ *   46010 VALENCIA
+ *   SPAIN
+ *
+ *      +34 963862235
+ *   gvsig@gva.es
+ *      www.gvsig.gva.es
+ *
+ *    or
+ *
+ *   Instituto de Desarrollo Regional (Universidad de Castilla La-Mancha)
+ *   Campus Universitario s/n
+ *   02071 Alabacete
+ *   Spain
+ *
+ *   +34 967 599 200
+ */
+
+package org.gvsig.crs.gui.panels;
+
+import java.awt.Component;
+import java.awt.Dimension;
+import java.awt.FlowLayout;
+import java.awt.GridLayout;
+import java.awt.event.ActionEvent;
+import java.awt.event.ActionListener;
+import java.io.File;
+import java.io.FileInputStream;
+import java.io.FileNotFoundException;
+import java.io.FileOutputStream;
+import java.io.IOException;
+import java.io.InputStream;
+import java.io.OutputStream;
+import java.io.RandomAccessFile;
+
+import javax.swing.BorderFactory;
+import javax.swing.JButton;
+import javax.swing.JComboBox;
+import javax.swing.JFileChooser;
+import javax.swing.JLabel;
+import javax.swing.JPanel;
+import javax.swing.JRadioButton;
+import javax.swing.JTextArea;
+import javax.swing.filechooser.FileFilter;
+
+import org.cresques.cts.IProjection;
+import org.gvsig.crs.CrsException;
+import org.gvsig.crs.CrsFactory;
+import org.gvsig.crs.CrsWkt;
+import org.gvsig.crs.ICrs;
+import org.gvsig.crs.persistence.RecentCRSsPersistence;
+
+import au.com.objectix.jgridshift.GridShiftFile;
+import au.com.objectix.jgridshift.SubGrid;
+
+import com.iver.andami.PluginServices;
+import com.iver.andami.ui.mdiManager.IWindow;
+import com.iver.andami.ui.mdiManager.WindowInfo;
+import com.iver.utiles.XMLEntity;
+
+/**
+ * Clase para generar el panel de la tranformaci�n nadgrids y su
+ * manejo
+ * 
+ * @author Diego Guerrero Sevilla (diego.guerrero@uclm.es)
+ * @author Jos� Luis G�mez Mart�nez (jolugomar@gmail.com)
+ *
+ */
+public class TransformationNadgridsPanel extends JPanel implements IWindow, ActionListener {
+	
+	private static final long serialVersionUID = 1L;
+	
+	private JPanel groupRadioButton = null;
+	private JLabel jLabelChooser = null;
+	private JRadioButton jRadioButtonSource = null;
+	private JRadioButton jRadioButtonTarget = null;
+	
+	private IProjection firstProj;
+	private String nadFile = null;
+	String[] targetAuthority;
+	String targetAbrev = "";
+	String sourceAbrev = "";
+	
+	private String cadWKT = "";
+	private String dataPath = "./gvSIG/extensiones/org.gvsig.crs/data/";
+	private int codeEpsg;
+	
+	private JPanel jPanelOpen;
+	private JPanel jPanelSelectNad;
+	private JLabel jLabelOpenGsb;
+	private JFileChooser openFileChooser;
+	private JButton jButtonOpen;
+	private TreePanel treePanel = null;
+	private JComboBox jComboNadFile = null;
+	private JLabel jLabelSelectNad = null;
+	
+	
+	private JTextArea jTextAreaInfo;
+	
+	private PluginServices ps = null;
+	private XMLEntity xml = null;
+	
+	boolean targetNad = false;
+
+	public TransformationNadgridsPanel() {
+		ps = PluginServices.getPluginServices(RecentCRSsPersistence.pluginClassInstance); 
+		xml = ps.getPersistentXML();
+		initialize();
+	}
+		
+	private void initialize(){
+			setLayout(new GridLayout(1,4));
+			setLayout(new FlowLayout(FlowLayout.LEADING,5,10));
+			setPreferredSize(new Dimension(525, 110));
+			setBorder(
+				    BorderFactory.createCompoundBorder(
+							BorderFactory.createCompoundBorder(
+									BorderFactory.createTitledBorder("+"+PluginServices.getText(this,"nadgrids")),
+									BorderFactory.createEmptyBorder(2,2,2,2)),
+									getBorder()));
+			add(getJPanelOpen());
+			setNadFile(restoreNadFileName());//nadFile = restoreNadFileName();
+			add(getJPanelSelectNad());
+			add(getJLabelChooser());
+			add(getGroupRadioButton());
+			initializeTree();
+			add(getTreePanel());
+	}
+	
+	private JPanel getGroupRadioButton() {
+		if (groupRadioButton == null) {
+			groupRadioButton = new JPanel();
+			groupRadioButton.setLayout(new GridLayout(1,0));
+			groupRadioButton.setPreferredSize(new Dimension(400,30));			
+			groupRadioButton.add(getJRadioButtonSource());
+			groupRadioButton.add(getJRadioButtonTarget());			
+		}
+		return groupRadioButton;
+	}
+	
+	private JRadioButton getJRadioButtonSource() {
+		if (jRadioButtonSource == null) {
+			jRadioButtonSource = new JRadioButton();			
+			jRadioButtonSource.setSelected(true);
+			jRadioButtonSource.addActionListener(this);
+		}
+		jRadioButtonSource.setText(PluginServices.getText(this,"aplicar_capa") + " " + "("+getSourceAbrev()+")" );
+		return jRadioButtonSource;
+	}
+	
+	
+	private JRadioButton getJRadioButtonTarget() {		
+		if (jRadioButtonTarget == null) {
+			jRadioButtonTarget = new JRadioButton();			
+			jRadioButtonTarget.setSelected(false);
+			jRadioButtonTarget.addActionListener(this);
+		}
+		jRadioButtonTarget.setText(PluginServices.getText(this,"aplicar_vista") + " " + "("+ getTargetAbrev()+")");
+		return jRadioButtonTarget;
+	}	
+	
+	private JLabel getJLabelChooser(){
+		jLabelChooser = new JLabel();
+		jLabelChooser.setPreferredSize(new Dimension(400, 20));
+		jLabelChooser.setText(PluginServices.getText(this, "seleccion_nadgrids")+":");
+		return jLabelChooser;
+	}
+		
+	private Component getJTextAreaInfo() {
+		if (jTextAreaInfo == null){
+			jTextAreaInfo = new JTextArea();
+			jTextAreaInfo.setLineWrap(true);
+			jTextAreaInfo.setWrapStyleWord(true);
+			jTextAreaInfo.setPreferredSize(new Dimension(400, 100));
+			jTextAreaInfo.setEditable(false);
+			jTextAreaInfo.setText(getWKT());
+		}
+		jTextAreaInfo.setText(getWKT());
+		return jTextAreaInfo;
+	}
+		
+	private JPanel getJPanelOpen() {
+		if(jPanelOpen == null) {
+			jPanelOpen = new JPanel();
+			jPanelOpen.setPreferredSize(new Dimension(525,30));
+			jPanelOpen.setLayout(new GridLayout(2,2));
+			jPanelOpen.setLayout(new FlowLayout(FlowLayout.LEFT,5,5));
+			jPanelOpen.add(getJLabelOpenGsb(), null);
+			jPanelOpen.add(getJButtonOpen(), null);			
+		}
+		return jPanelOpen;
+	}
+	
+	private JLabel getJLabelOpenGsb() {
+		if(jLabelOpenGsb == null) {
+			jLabelOpenGsb = new JLabel();
+			jLabelOpenGsb.setPreferredSize(new Dimension(130,20));
+			jLabelOpenGsb.setText(PluginServices.getText(this,"importar")+" .gsb:");
+		}
+		return jLabelOpenGsb;
+	}
+	
+	private JFileChooser getOpenFileChooser(){
+		if(openFileChooser == null){
+			openFileChooser = new JFileChooser();			
+			openFileChooser.setEnabled(false);
+			openFileChooser.addChoosableFileFilter(new FiltroNadgrids());
+		}
+		return openFileChooser;
+	}
+
+	private JButton getJButtonOpen() {
+		if(jButtonOpen == null) {
+			jButtonOpen = new JButton();
+			jButtonOpen.setText("");
+			jButtonOpen.setPreferredSize(new Dimension(20,20));
+			jButtonOpen.setText("...");
+			jButtonOpen.addActionListener(this);
+		}
+		return jButtonOpen;
+	}
+	
+	public ICrs getProjection() {
+		ICrs crs;
+		if (jRadioButtonSource.isSelected()){
+			try {
+				setNad(false);
+				crs = new CrsFactory().getCRS(getCode(),
+						getWKT());
+				crs.setNadGrid("+nadgrids="+getNadFile());//nadFile);
+				return crs;
+			} catch (org.gvsig.crs.CrsException e) {
+				e.printStackTrace();
+			}
+			return null;
+		}
+		else {	
+			setNad(true);
+			try {
+				crs = new CrsFactory().getCRS(getCode(),
+						getWKT());
+				crs.setNadGrid("+nadgrids="+getNadFile());//nadFile);
+				crs.setNadInTarget(true);
+				
+				return crs;
+			} catch (CrsException e) {				
+				e.printStackTrace();
+			}
+			return null;
+		}		
+	}
+	
+	public void setProjection(IProjection proj) {
+		firstProj = proj;
+	}
+	
+	public void setNad(boolean nadg){
+		targetNad = nadg;		
+	}
+	
+	public boolean getNad(){
+		return targetNad;		
+	}
+	
+	public void setCode(int cod){
+		codeEpsg = cod;
+	}
+	
+	public int getCode(){
+		return codeEpsg;
+	}
+	
+	public void setWKT(String cad){
+		cadWKT = cad;
+		CrsWkt parser = new CrsWkt(cad);
+		setSourceAbrev(parser.getAuthority()[0], parser.getAuthority()[1]);
+		getJTextAreaInfo();
+		getJRadioButtonSource();
+	}
+	
+	public String getWKT(){
+		return cadWKT;
+	}
+	
+	public void setTargetAuthority(String[] authority){
+		targetAuthority = authority;
+		setTargetAbrev(targetAuthority[0], targetAuthority[1]);
+		getJRadioButtonTarget();		
+	}
+	
+	public String[] getTargetAuthority(){
+		return targetAuthority;
+	}
+	
+	public void setTargetAbrev(String fuente, String codigo){
+		targetAbrev = fuente + ":" + codigo;
+	}
+	
+	public String getTargetAbrev() {
+		return targetAbrev;
+	}
+	
+	public void setSourceAbrev(String fuente, String codigo){
+		sourceAbrev = fuente + ":" + codigo;
+	}
+	
+	public String getSourceAbrev(){
+		return sourceAbrev;
+	}
+
+	public WindowInfo getWindowInfo() {
+		WindowInfo m_viewinfo=new WindowInfo(WindowInfo.MODALDIALOG);
+   		m_viewinfo.setTitle(PluginServices.getText(this,"nadgrids"));
+		return m_viewinfo;
+	}
+
+	public void actionPerformed(ActionEvent e) {
+		// TODO Auto-generated method stub
+		if (e.getSource() == this.getJRadioButtonSource()){
+			jRadioButtonSource.setSelected(true);
+			jRadioButtonTarget.setSelected(false);
+		}
+		
+		if (e.getSource() == this.getJRadioButtonTarget()){
+			jRadioButtonTarget.setSelected(true);
+			jRadioButtonSource.setSelected(false);
+		}
+		
+		if (e.getSource() == this.getJButtonOpen()){
+			jPanelOpen.add(getOpenFileChooser(), null);
+			//openChooser.setCurrentDirectory(f);
+			int returnVal = openFileChooser.showOpenDialog(TransformationNadgridsPanel.this);
+	        if (returnVal == JFileChooser.APPROVE_OPTION) {
+	            File inFile = openFileChooser.getSelectedFile();
+	            //jTextOpen.setText(file.getAbsolutePath());
+
+	            String fileName = inFile.getName();
+	            
+	            //Comprobar que el fichero existe y tiene formato valido
+	    		RandomAccessFile raFile = null;
+	    		try {
+	    			raFile = new RandomAccessFile(inFile.getAbsolutePath(),"r");
+	    		} catch (FileNotFoundException ex) {
+	    			ex.printStackTrace();
+	    			getJComboNadFile().setSelectedIndex(0);
+	    			getTreePanel().setRoot(PluginServices.getText(this,"nadfile_not_found"));
+	    			setNadFile(null);//nadFile = null;
+	    			return;
+	    		}
+	    		GridShiftFile gsf = new GridShiftFile();
+	    		try {
+	    			gsf.loadGridShiftFile(raFile);
+	    		} catch (IOException ex) {
+	    			ex.printStackTrace();
+	    			getJComboNadFile().setSelectedIndex(0);
+	    			getTreePanel().setRoot(PluginServices.getText(this,"nadfile_bad_format"));
+	    			setNadFile(null);//nadFile = null;
+	    			return;
+	    		}catch (java.lang.Exception ex) {
+	    			ex.printStackTrace();
+	    			getJComboNadFile().setSelectedIndex(0);
+	    			getTreePanel().setRoot(PluginServices.getText(this,"nadfile_bad_format"));
+	    			setNadFile(null);//nadFile = null;
+	    			return;
+	    		}
+	            
+	            //Copiar el fichero seleccionado al directorio data de la extensi�n:
+	            
+	    		File outFile = new File(dataPath+fileName);
+	    		InputStream in = null;
+	    		OutputStream out = null;
+	    		try {
+	    			in = new FileInputStream(inFile);
+	    			out = new FileOutputStream(outFile);
+	    		} catch (FileNotFoundException ex) {
+	    			ex.printStackTrace();
+	    		}
+	    		byte[] buf = new byte[1024];
+	    		int len;
+	    		try {
+	    			while ((len = in.read(buf)) > 0) {
+	    				out.write(buf, 0, len);
+	    			}
+	    			in.close();
+	    			out.close();
+	    		} catch (IOException ex) {
+	    			ex.printStackTrace();
+	    		}
+	    		
+	    		//Incluir el fichero importado en el combo y seleccionarlo
+	    		boolean exists = false;
+	    		for (int item=0; item<getJComboNadFile().getItemCount() && !exists;item++)
+	    			if (getJComboNadFile().getItemAt(item).equals(fileName))
+	    				exists = true;
+	    		if(!exists)
+		    		getJComboNadFile().addItem(fileName);
+	    		getJComboNadFile().setSelectedItem(fileName);
+	    		setNadFile(fileName);//nadFile = fileName;
+	        }
+		}
+	}
+
+	public TreePanel getTreePanel() {
+		if (treePanel == null){
+			treePanel = new TreePanel(PluginServices.getText(this,"grids_en")+": "+nadFile);
+			treePanel.getTree().expandRow(0);
+			treePanel.setPanelSize(530,200);
+		}
+		return treePanel;
+	}
+	
+	public void initializeTree(){
+		// leer el fichero nadgrids
+		RandomAccessFile raFile = null;
+		try {
+			raFile = new RandomAccessFile("./gvSIG/extensiones/org.gvsig.crs/data/"+nadFile,"r");
+		} catch (FileNotFoundException e) {
+			e.printStackTrace();
+			getTreePanel().setRoot(PluginServices.getText(this,"nadfile_not_found"));
+			setNadFile(null);//nadFile = null;
+			return;
+		}
+		GridShiftFile gsf = new GridShiftFile();
+		try {
+			gsf.loadGridShiftFile(raFile);
+		} catch (IOException e) {
+			e.printStackTrace();
+			getTreePanel().setRoot(PluginServices.getText(this,"nadfile_bad_format"));
+			setNadFile(null);//nadFile = null;
+			return;
+		}catch (java.lang.Exception e) {
+			e.printStackTrace();
+			getTreePanel().setRoot(PluginServices.getText(this,"nadfile_bad_format"));
+			setNadFile(null);//nadFile = null;
+			return;
+		}
+		
+		SubGrid subGrid[] = gsf.getSubGridTree(); 
+		
+		for (int i=0;i<subGrid.length;i++){
+			getTreePanel().addClass(subGrid[i].getSubGridName(),i);
+			getTreePanel().addEntry(PluginServices.getText(this,"long_min")+": "+String.valueOf(subGrid[i].getMaxLon()/-3600)+"�",subGrid[i].getSubGridName(), "");
+			getTreePanel().addEntry(PluginServices.getText(this,"lat_min")+": "+String.valueOf(subGrid[i].getMinLat()/3600)+"�",subGrid[i].getSubGridName(), "");
+			getTreePanel().addEntry(PluginServices.getText(this,"long_max")+": "+String.valueOf(subGrid[i].getMinLon()/-3600+"�"),subGrid[i].getSubGridName(), "");
+			getTreePanel().addEntry(PluginServices.getText(this,"lat_max")+": "+String.valueOf(subGrid[i].getMaxLat()/3600+"�"),subGrid[i].getSubGridName(), "");
+			getTreePanel().addEntry(PluginServices.getText(this,"node_count")+": "+String.valueOf(subGrid[i].getNodeCount()),subGrid[i].getSubGridName(), "");
+			getTreePanel().addEntry(PluginServices.getText(this,"detalles")+": "+String.valueOf(subGrid[i].getDetails()),subGrid[i].getSubGridName(), "");
+		}
+		getTreePanel().getTree().expandRow(0);
+		getTreePanel().getList().setText(PluginServices.getText(this,"advertencia_nad"));
+	}
+
+	public JComboBox getJComboNadFile() {
+		if (jComboNadFile == null){
+			jComboNadFile = new JComboBox();
+			jComboNadFile.setPreferredSize(new Dimension(200,25));
+			jComboNadFile.setEditable(false);
+			jComboNadFile.addItem(PluginServices.getText(this,"seleccionar")+"...");
+			//A�adir los al combo los nombres de los .gsb que hay en el directorio data
+			File dataDir = new File(dataPath);
+			for (int i = 0; i<dataDir.list().length;i++)
+				if (dataDir.list()[i].substring(dataDir.list()[i].lastIndexOf('.')+1).equals("gsb")){
+					jComboNadFile.addItem(dataDir.list()[i]);
+				}
+			if (getNadFile() != null)//nadFile != null)
+				jComboNadFile.setSelectedItem(getNadFile());//nadFile);
+						
+		}
+		return jComboNadFile;
+	}
+
+	public JLabel getJLabelSelectNad() {
+		if (jLabelSelectNad == null){
+			jLabelSelectNad = new JLabel(PluginServices.getText(this,"Fichero nadgrids")+":  ");
+			jLabelSelectNad.setPreferredSize(new Dimension(130,25));
+		}
+		return jLabelSelectNad;
+	}
+
+	public JPanel getJPanelSelectNad() {
+		if (jPanelSelectNad == null){
+			jPanelSelectNad = new JPanel();
+			jPanelOpen.setPreferredSize(new Dimension(525,30));
+			jPanelOpen.setLayout(new GridLayout(2,2));
+			jPanelOpen.setLayout(new FlowLayout(FlowLayout.LEFT,5,5));		
+			jPanelSelectNad.add(getJLabelSelectNad());
+			jPanelSelectNad.add(getJComboNadFile());
+		}
+		return jPanelSelectNad;
+	}
+	
+	public void setNadFile(String nad){
+		nadFile = nad;
+	}
+	
+	public String getNadFile(){
+		return nadFile;
+	}	
+	
+	/**
+	 * Guarda el nombre del fichero nadgrids mediante el modelo de persistencia
+	 * de Andami
+	 * @param name Nombre del fichero nadgrids
+	 */
+	public void saveNadFileName(String name){
+		ps = PluginServices.getPluginServices(RecentCRSsPersistence.pluginClassInstance); 
+		xml = ps.getPersistentXML();
+		
+		for (int child = 0; child<xml.getChildrenCount();child++)
+			if (xml.getChild(child).getPropertyName(0).equals("nadFile"))
+				xml.removeChild(child);
+		
+		
+		XMLEntity xmlEnt = new XMLEntity();
+		xmlEnt.putProperty("nadFile",name);
+		xml.addChild(xmlEnt);
+		ps.setPersistentXML(xml);
+	}
+	
+	/**
+	 * Obtiene el nombre del fichero nadgrids guardado mediante el
+	 * modelo de persistencia de Andami.
+	 * 
+	 * @return nombre del fichero nadgrids o null si no ha sido guardado.
+	 */
+	private String restoreNadFileName(){
+		String fileName;
+		for (int child = 0; child<xml.getChildrenCount();child++)
+			if (xml.getChild(child).getPropertyName(0).equals("nadFile")){
+				fileName = xml.getChild(child).getPropertyValue(0);
+				File dataDir = new File(dataPath);
+				for (int i = 0; i<dataDir.list().length;i++)
+					if (dataDir.list()[i].equals(fileName)){
+						return fileName;
+					}
+			}
+		
+		return null;
+	}
+	
+}
+
+class FiltroNadgrids extends FileFilter {
+
+	final static String gsb = "gsb";
+	public boolean accept(File f) {
+		if (f.isDirectory()) {
+           return true;
+       }
+       String s = f.getName();
+       int i = s.lastIndexOf('.');
+
+       if (i > 0 &&  i < s.length() - 1) {
+           String extension = s.substring(i+1).toLowerCase();
+           if (gsb.equals(extension)){
+                   return true;
+           } else {
+               return false;
+           }
+       }
+       return false;
+	}
+
+	public String getDescription() {
+		 return "Archivos .gsb";
+	}
+	
+}

Property changes on: tags/Root_F2/libraries/libJCRS/src/org/gvsig/crs/gui/panels/TransformationNadgridsPanel.java
___________________________________________________________________
Added: svn:keywords
   + Author Date Id Revision
Added: svn:eol-style
   + native

Index: tags/Root_F2/libraries/libJCRS/src/org/gvsig/crs/gui/panels/InfoCRSPanel.java
===================================================================
--- tags/Root_F2/libraries/libJCRS/src/org/gvsig/crs/gui/panels/InfoCRSPanel.java	(revision 0)
+++ tags/Root_F2/libraries/libJCRS/src/org/gvsig/crs/gui/panels/InfoCRSPanel.java	(revision 10155)
@@ -0,0 +1,382 @@
+/* gvSIG. Sistema de Informaci�n Geogr�fica de la Generalitat Valenciana
+ *
+ * Copyright (C) 2006 Instituto de Desarrollo Regional and Generalitat Valenciana.
+ *
+ * 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., 59 Temple Place - Suite 330, Boston, MA  02111-1307,USA.
+ *
+ * For more information, contact:
+ *
+ *  Generalitat Valenciana
+ *   Conselleria d'Infraestructures i Transport
+ *   Av. Blasco Ib��ez, 50
+ *   46010 VALENCIA
+ *   SPAIN
+ *
+ *      +34 963862235
+ *   gvsig@gva.es
+ *      www.gvsig.gva.es
+ *
+ *    or
+ *
+ *   Instituto de Desarrollo Regional (Universidad de Castilla La-Mancha)
+ *   Campus Universitario s/n
+ *   02071 Alabacete
+ *   Spain
+ *
+ *   +34 967 599 200
+ */
+
+package org.gvsig.crs.gui.panels;
+
+import java.awt.Dimension;
+import java.awt.FlowLayout;
+import java.awt.Font;
+import java.awt.GridLayout;
+import java.awt.event.ActionEvent;
+import java.awt.event.ActionListener;
+
+import javax.swing.JButton;
+import javax.swing.JLabel;
+import javax.swing.JPanel;
+import javax.swing.JScrollPane;
+import javax.swing.JTable;
+import javax.swing.ListSelectionModel;
+import javax.swing.table.DefaultTableModel;
+
+import org.cresques.ui.DefaultDialogPanel;
+import org.gvsig.crs.ICrs;
+
+import com.iver.andami.PluginServices;
+import com.iver.andami.ui.mdiManager.IWindow;
+import com.iver.andami.ui.mdiManager.WindowInfo;
+
+/**
+ * Clase que genera el panel de informaci�n del CRS seleccionado
+ * en el caso del repositorio de la EPSG
+ * @author Miguel Garc�a Jim�nez (garciajimenez.miguel@gmail.com)
+ *
+ */
+public class InfoCRSPanel extends DefaultDialogPanel implements IWindow, ActionListener{
+	
+	private static final long serialVersionUID = 1L;
+
+	private JPanel panelLabels;
+	
+	private JTable jTable;
+	public DefaultTableModel dtm = null;
+	private JScrollPane jScrollPane1 = null;
+	private JPanel jPanelbuttons;
+	private JButton jButtonOk;
+	
+	private ICrs proj;
+	
+	private JLabel jLabelProjcs;
+	private JLabel jLabelGeogcs;
+	private JLabel jLabelDatum;
+	private JLabel jLabelSpheroid;
+	private JLabel jLabelPrimem;
+	private JLabel jLabelProjection;
+	private JLabel jLabelUnits;
+	private JLabel jLabelUnits_p;
+	private JLabel jLabelProjcsdinamic;
+	private JLabel jLabelGeogcsdinamic;
+	private JLabel jLabelDatumdinamic;
+	private JLabel jLabelSpheroiddinamic;
+	private JLabel jLabelPrimemdinamic;
+	private JLabel jLabelProjectiondinamic;
+	private JLabel jLabelUnitsdinamic;
+	private JLabel jLabelUnits_pdinamic;
+	
+	public InfoCRSPanel(ICrs p) {
+		super(false);
+		proj = p;	
+		inicializate();
+	}
+	
+	private void inicializate() {
+		this.add(getPanel(), null);
+		this.add(getJPanelButtons(),null);
+	}
+
+	private JPanel getPanel() {
+		if(panelLabels == null) {
+			panelLabels = new JPanel();
+			panelLabels.setLayout(new GridLayout(6,4));
+			panelLabels.setLayout(new FlowLayout(FlowLayout.LEADING,5,10));
+			panelLabels.setPreferredSize(new Dimension(525, 300));
+			panelLabels.add(getJLabelProjcs(),null);
+			panelLabels.add(getJLabelProjcsDinamic(),null);
+			panelLabels.add(getJLabelGeogcs(),null);
+			panelLabels.add(getJLabelGeogcsDinamic(),null);
+			panelLabels.add(getJLabelDatum(),null);
+			panelLabels.add(getJLabelDatumDinamic(),null);
+			panelLabels.add(getJLabelSpheroid(),null);
+			panelLabels.add(getJLabelSpheroidDinamic(),null);
+			panelLabels.add(getJLabelPrimen(),null);
+			panelLabels.add(getJLabelPrimenDinamic(),null);
+			panelLabels.add(getJLabelUnits(),null);
+			panelLabels.add(getJLabelUnitsDinamic(),null);
+			panelLabels.add(getJLabelProjection(),null);
+			panelLabels.add(getJLabelProjectionDinamic(),null);
+			panelLabels.add(getJLabelUnits_p(),null);
+			panelLabels.add(getJLabelUnits_pDinamic(),null);
+			panelLabels.add(getJScrollPane1(), null);
+		}
+		return panelLabels;
+	}
+	
+	private JPanel getJPanelButtons() {
+		if(jPanelbuttons == null) {
+			jPanelbuttons = new JPanel();
+			jPanelbuttons.setLayout(new FlowLayout(FlowLayout.RIGHT));
+			jPanelbuttons.setPreferredSize(new Dimension(525,50));
+			jPanelbuttons.add(getJButtonOk(),null);
+		}
+		return jPanelbuttons;
+	}
+	
+	private JButton getJButtonOk() {
+		if(jButtonOk == null) {
+			jButtonOk = new JButton();
+			jButtonOk.setText(PluginServices.getText(this,"ok"));
+			jButtonOk.setPreferredSize(new Dimension(100,25));
+			jButtonOk.setMnemonic('O');
+			jButtonOk.setToolTipText("Accept");
+			jButtonOk.addActionListener(this);
+		}
+		return jButtonOk;
+	}
+	
+	private JLabel getJLabelProjcs() {
+		if(jLabelProjcs == null) {
+			jLabelProjcs = new JLabel();
+			jLabelProjcs.setPreferredSize(new Dimension(75,20));
+			jLabelProjcs.setFont(new Font("Projcs:",Font.BOLD,10));
+			jLabelProjcs.setText(PluginServices.getText(this,"projcs")+":");
+		}
+		return jLabelProjcs;
+	}
+	
+	private JLabel getJLabelProjcsDinamic() {
+		if(jLabelProjcsdinamic == null) {
+			jLabelProjcsdinamic = new JLabel();
+			jLabelProjcsdinamic.setPreferredSize(new Dimension(150,20));
+			jLabelProjcsdinamic.setFont(new Font("",Font.ROMAN_BASELINE,10));
+			jLabelProjcsdinamic.setText(proj.getCrsWkt().getProjcs());
+		}
+		return jLabelProjcsdinamic;
+	}
+	
+	private JLabel getJLabelGeogcs() {
+		if(jLabelGeogcs == null) {
+			jLabelGeogcs = new JLabel();
+			jLabelGeogcs.setPreferredSize(new Dimension(75,20));
+			jLabelGeogcs.setFont(new Font("Geogcs:",Font.BOLD,10));
+			jLabelGeogcs.setText(PluginServices.getText(this,"geogcs")+ ":");
+		}
+		return jLabelGeogcs;
+	}
+	
+	private JLabel getJLabelGeogcsDinamic() {
+		if(jLabelGeogcsdinamic == null) {
+			jLabelGeogcsdinamic = new JLabel();
+			jLabelGeogcsdinamic.setPreferredSize(new Dimension(150,20));
+			jLabelGeogcsdinamic.setFont(new Font("",Font.ROMAN_BASELINE,10));
+			jLabelGeogcsdinamic.setText(proj.getCrsWkt().getGeogcs());
+		}
+		return jLabelGeogcsdinamic;
+	}
+	
+	private JLabel getJLabelDatum() {
+		if(jLabelDatum == null) {
+			jLabelDatum = new JLabel();
+			jLabelDatum.setPreferredSize(new Dimension(75,20));
+			jLabelDatum.setFont(new Font("Datum:",Font.BOLD,10));
+			jLabelDatum.setText(PluginServices.getText(this,"datum")+":");
+		}
+		return jLabelDatum;
+	}
+	
+	private JLabel getJLabelDatumDinamic() {
+		if(jLabelDatumdinamic == null) {
+			jLabelDatumdinamic = new JLabel();
+			jLabelDatumdinamic.setPreferredSize(new Dimension(150,20));
+			jLabelDatumdinamic.setFont(new Font("",Font.ROMAN_BASELINE,10));
+			jLabelDatumdinamic.setText(proj.getCrsWkt().getDatumName());
+		}
+		return jLabelDatumdinamic;
+	}
+	
+	private JLabel getJLabelSpheroid() {
+		if(jLabelSpheroid == null) {
+			jLabelSpheroid = new JLabel();
+			jLabelSpheroid.setPreferredSize(new Dimension(75,20));
+			jLabelSpheroid.setFont(new Font("Spheroid",Font.BOLD,10));
+			jLabelSpheroid.setText(PluginServices.getText(this,"spheriod")+":");
+		}
+		return jLabelSpheroid;
+	}
+	
+	private JLabel getJLabelSpheroidDinamic() {
+		if(jLabelSpheroiddinamic == null) {
+			String[] sphe = proj.getCrsWkt().getSpheroid();
+			jLabelSpheroiddinamic = new JLabel();
+			jLabelSpheroiddinamic.setPreferredSize(new Dimension(200,20));
+			jLabelSpheroiddinamic.setFont(new Font("",Font.ROMAN_BASELINE,10));
+			jLabelSpheroiddinamic.setText(sphe[0]+" , "+sphe[1]+" , "+sphe[2]);
+		}
+		return jLabelSpheroiddinamic;
+	}
+	
+	private JLabel getJLabelPrimen() {
+		if(jLabelPrimem == null) {
+			jLabelPrimem = new JLabel();
+			jLabelPrimem.setPreferredSize(new Dimension(75,20));
+			jLabelPrimem.setFont(new Font("Primen:",Font.BOLD,10));
+			jLabelPrimem.setText(PluginServices.getText(this,"primem")+":");
+		}
+		return jLabelPrimem;
+	}
+	
+	private JLabel getJLabelPrimenDinamic() {
+		if(jLabelPrimemdinamic == null) {
+			String pri[] = proj.getCrsWkt().getPrimen();
+			jLabelPrimemdinamic = new JLabel();
+			jLabelPrimemdinamic.setPreferredSize(new Dimension(150,20));
+			jLabelPrimemdinamic.setFont(new Font("",Font.ROMAN_BASELINE,10));
+			jLabelPrimemdinamic.setText(pri[0]+" , "+pri[1]);
+		}
+		return jLabelPrimemdinamic;
+	}
+	
+	private JLabel getJLabelProjection() {
+		if(jLabelProjection == null) {
+			jLabelProjection = new JLabel();
+			jLabelProjection.setPreferredSize(new Dimension(75,20));
+			jLabelProjection.setFont(new Font("Projection",Font.BOLD,10));
+			jLabelProjection.setText(PluginServices.getText(this,"projection")+":");
+		}
+		return jLabelProjection;
+	}
+	
+	private JLabel getJLabelProjectionDinamic() {
+		if(jLabelProjectiondinamic == null) {
+			jLabelProjectiondinamic = new JLabel();
+			jLabelProjectiondinamic.setPreferredSize(new Dimension(150,20));
+			jLabelProjectiondinamic.setFont(new Font("",Font.ROMAN_BASELINE,10));
+			jLabelProjectiondinamic.setText(proj.getCrsWkt().getProjection());
+		}
+		return jLabelProjectiondinamic;
+	}
+	
+	private JLabel getJLabelUnits() {
+		if(jLabelUnits == null) {
+			jLabelUnits = new JLabel();
+			jLabelUnits.setPreferredSize(new Dimension(75,20));
+			jLabelUnits.setFont(new Font("Units",Font.BOLD,10));
+			jLabelUnits.setText(PluginServices.getText(this,"units")+":");
+		}
+		return jLabelUnits;
+	}
+	
+	private JLabel getJLabelUnitsDinamic() {
+		if(jLabelUnitsdinamic == null) {
+			String[] units = proj.getCrsWkt().getUnit();
+			jLabelUnitsdinamic = new JLabel();
+			jLabelUnitsdinamic.setPreferredSize(new Dimension(200,20));
+			jLabelUnitsdinamic.setFont(new Font("",Font.ROMAN_BASELINE,10));
+			jLabelUnitsdinamic.setText(units[0]+" , "+units[1]);
+		}
+		return jLabelUnitsdinamic;
+	}
+	
+	private JLabel getJLabelUnits_p() {
+		if(jLabelUnits_p == null) {
+			jLabelUnits_p = new JLabel();
+			jLabelUnits_p.setPreferredSize(new Dimension(75,20));
+			jLabelUnits_p.setFont(new Font("",Font.BOLD,10));
+			jLabelUnits_p.setText(PluginServices.getText(this,"units_p")+":");
+		}
+		return jLabelUnits_p;
+	}
+	
+	private JLabel getJLabelUnits_pDinamic() {
+		if(jLabelUnits_pdinamic == null) {
+			String[] uni_p = proj.getCrsWkt().getUnit_p();
+			jLabelUnits_pdinamic = new JLabel();
+			jLabelUnits_pdinamic.setPreferredSize(new Dimension(150,20));
+			jLabelUnits_pdinamic.setFont(new Font("",Font.ROMAN_BASELINE,10));
+			jLabelUnits_pdinamic.setText(uni_p[0]+" , "+uni_p[1]);
+			
+		}
+		return jLabelUnits_pdinamic;
+	}
+	
+	private JScrollPane getJScrollPane1() {
+		if(jScrollPane1 == null) {
+			jScrollPane1 = new JScrollPane();
+			jScrollPane1.setPreferredSize(new Dimension(400,150));
+		/*	jScrollPane1.setBorder(
+				    BorderFactory.createCompoundBorder(
+					BorderFactory.createCompoundBorder(
+							BorderFactory.createTitledBorder("Transformations"),
+							BorderFactory.createEmptyBorder(5,5,5,5)),
+							jScrollPane1.getBorder()));*/
+			jScrollPane1.setViewportView(getJTable());
+		}
+		return jScrollPane1;
+	}
+	
+	private JTable getJTable() {
+		if(jTable == null) {
+			String[] columnNames = {PluginServices.getText(this,"nombre")
+					,PluginServices.getText(this,"valor")};
+			String[] param_n = proj.getCrsWkt().getParam_name();
+			String[] param_v = proj.getCrsWkt().getParam_value();
+			Object[][]data;
+			if(param_v != null) {
+				data = new Object[param_v.length][2];
+				for(int i = 0 ; i < 2 ; i++ )
+					for(int j = 0 ; j < param_n.length ; j++) {
+						if(i == 0)
+							data[j][i] = param_n[j];
+						else
+							data[j][i] = param_v[j];
+					}
+			} else 
+				data = new Object[1][1];
+			dtm = new DefaultTableModel(data, columnNames);
+			jTable = new JTable(dtm);
+			jTable.setCellSelectionEnabled(false);
+			jTable.setRowSelectionAllowed(true);
+			jTable.setColumnSelectionAllowed(false);
+			jTable.setSelectionMode(ListSelectionModel.SINGLE_SELECTION);
+			
+		}
+		return jTable;
+	}
+
+	public WindowInfo getWindowInfo() {
+		WindowInfo m_viewinfo=new WindowInfo(WindowInfo.MODALDIALOG);
+   		m_viewinfo.setTitle(PluginServices.getText(this,proj.getCrsWkt().getName()));
+		return m_viewinfo;
+	}
+
+	public void actionPerformed(ActionEvent e) {
+		if (e.getSource() == getJButtonOk()){
+			PluginServices.getMDIManager().closeWindow(this);
+		}
+	}
+}

Property changes on: tags/Root_F2/libraries/libJCRS/src/org/gvsig/crs/gui/panels/InfoCRSPanel.java
___________________________________________________________________
Added: svn:eol-style
   + native
Added: svn:keywords
   + Author Date Id Revision

Index: tags/Root_F2/libraries/libJCRS/src/org/gvsig/crs/gui/panels/TransformationManualPanel.java
===================================================================
--- tags/Root_F2/libraries/libJCRS/src/org/gvsig/crs/gui/panels/TransformationManualPanel.java	(revision 0)
+++ tags/Root_F2/libraries/libJCRS/src/org/gvsig/crs/gui/panels/TransformationManualPanel.java	(revision 10155)
@@ -0,0 +1,615 @@
+/* gvSIG. Sistema de Informaci�n Geogr�fica de la Generalitat Valenciana
+ *
+ * Copyright (C) 2006 Instituto de Desarrollo Regional and Generalitat Valenciana.
+ *
+ * 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., 59 Temple Place - Suite 330, Boston, MA  02111-1307,USA.
+ *
+ * For more information, contact:
+ *
+ *  Generalitat Valenciana
+ *   Conselleria d'Infraestructures i Transport
+ *   Av. Blasco Ib��ez, 50
+ *   46010 VALENCIA
+ *   SPAIN
+ *
+ *      +34 963862235
+ *   gvsig@gva.es
+ *      www.gvsig.gva.es
+ *
+ *    or
+ *
+ *   Instituto de Desarrollo Regional (Universidad de Castilla La-Mancha)
+ *   Campus Universitario s/n
+ *   02071 Alabacete
+ *   Spain
+ *
+ *   +34 967 599 200
+ */
+
+package org.gvsig.crs.gui.panels;
+
+import java.awt.Color;
+import java.awt.Component;
+import java.awt.Dimension;
+import java.awt.FlowLayout;
+import java.awt.GridLayout;
+
+import javax.swing.BorderFactory;
+import javax.swing.JLabel;
+import javax.swing.JPanel;
+import javax.swing.JTextArea;
+import javax.swing.JTextField;
+
+import org.gvsig.crs.CrsFactory;
+import org.gvsig.crs.CrsWkt;
+import org.gvsig.crs.ICrs;
+
+import com.iver.andami.PluginServices;
+
+/**
+ * Clase que define el panel de tranformaciones manuales, as� como su
+ * funcionamiento.
+ * 
+ * @author Jos� Luis G�mez Mart�nez (jolugomar@gmail.com)
+ *
+ */
+public class TransformationManualPanel extends JPanel {
+	
+	private static final long serialVersionUID = 1L;
+	
+	private static boolean pressed = true;
+	
+	private JLabel x_Translation;
+	private JLabel y_Translation;
+	private JLabel z_Translation;
+	private JLabel x_Rotation;
+	private JLabel y_Rotation;
+	private JLabel z_Rotation;
+	private JLabel scale;
+	
+	private JTextField tx_Translation;
+	private JTextField ty_Translation;
+	private JTextField tz_Translation;
+	private JTextField tx_Rotation;
+	private JTextField ty_Rotation;
+	private JTextField tz_Rotation;
+	private JTextField tScale;
+	
+	private JLabel domainTranslation;
+	private JLabel domainRotation;
+	private JLabel domainScale;
+	
+	private JLabel wkt;
+	private JTextArea info;	
+	int codeEpsg;
+	String targetAbrev = "";
+	String sourceAbrev = "";
+	String[] targetAuthority;
+	
+	private String cadWKT = "";	
+	
+	public TransformationManualPanel() {		
+		initialize();	
+	}
+	
+	private void initialize(){
+			setLayout(new GridLayout(0,3));
+			setLayout(new FlowLayout(FlowLayout.LEFT,10,20));
+			setBorder(
+				    BorderFactory.createCompoundBorder(
+							BorderFactory.createCompoundBorder(
+									BorderFactory.createTitledBorder(PluginServices.getText(this,"transformacion_manual")),
+									BorderFactory.createEmptyBorder(2,2,2,2)),
+									getBorder()));
+			setPreferredSize(new Dimension(525,400));
+			add(getX_Translation(),null);
+			add(getTx_Translation(),null);
+			add(getDomainTranslation(), null);			
+			add(getY_Translation(),null);
+			add(getTy_Translation(),null);
+			add(getDomainTranslation(), null);
+			add(getZ_Translation(),null);
+			add(getTz_Translation(),null);
+			add(getDomainTranslation(), null);
+			add(getX_Rotation(),null);
+			add(getTx_Rotation(),null);
+			add(getDomainRotation(), null);
+			add(getY_Rotation(),null);
+			add(getTy_Rotation(),null);
+			add(getDomainRotation(), null);			
+			add(getZ_Rotation(),null);
+			add(getTz_Rotation(),null);
+			add(getDomainRotation(), null);
+			add(getScale(),null);
+			add(getTscale(),null);
+			add(getDomainScale(), null);
+			//panel.add(getJPanelParams(), null);
+			//panel.add(getButtonPane(), null);
+	}
+	
+	private JLabel getDomainTranslation(){
+		domainTranslation = new JLabel();
+		domainTranslation.setPreferredSize(new Dimension(150, 20));
+		domainTranslation.setText("[-1000.0, 1000.0]");
+		return domainTranslation;
+	}
+	
+	private JLabel getDomainRotation(){
+		domainRotation = new JLabel();
+		domainRotation.setPreferredSize(new Dimension(150, 20));
+		domainRotation.setText("[-60.0, 60.0]");
+		return domainRotation;
+	}
+	
+	private JLabel getDomainScale(){
+		domainScale = new JLabel();
+		domainScale.setPreferredSize(new Dimension(150, 20));
+		domainScale.setText("[-20.0, 20.0]");
+		return domainScale;
+	}
+
+	private JLabel getX_Translation() {
+		if(x_Translation == null ) {
+			x_Translation = new JLabel();
+			x_Translation.setPreferredSize(new Dimension(120,20));
+			//x_Translation.setFont(new Font("x_Translation:",Font.BOLD,15));
+			x_Translation.setText(PluginServices.getText(this,"x_Translation")+":");
+			
+		}
+		return x_Translation;
+	}
+	
+	private JLabel getY_Translation() {
+		if(y_Translation == null ) {
+			y_Translation = new JLabel();
+			y_Translation.setPreferredSize(new Dimension(120,20));
+			//y_Translation.setFont(new Font("y_Translation:",Font.BOLD,15));
+			y_Translation.setText(PluginServices.getText(this,"y_Translation")+":");
+			
+		}
+		return y_Translation;
+	}
+	
+	private JLabel getZ_Translation() {
+		if(z_Translation == null ) {
+			z_Translation = new JLabel();
+			z_Translation.setPreferredSize(new Dimension(120,20));
+			//z_Translation.setFont(new Font("z_Translation:",Font.BOLD,15));
+			z_Translation.setText(PluginServices.getText(this,"z_Translation")+":");
+			
+		}
+		return z_Translation;
+	}
+	
+	private JLabel getX_Rotation() {
+		if(x_Rotation == null ) {
+			x_Rotation = new JLabel();
+			x_Rotation.setPreferredSize(new Dimension(120,20));
+			//x_Rotation.setFont(new Font("x_Rotation:",Font.BOLD,15));
+			x_Rotation.setText(PluginServices.getText(this,"x_Rotation")+":");
+			
+		}
+		return x_Rotation;
+	}
+	
+	private JLabel getY_Rotation() {
+		if(y_Rotation == null ) {
+			y_Rotation = new JLabel();
+			y_Rotation.setPreferredSize(new Dimension(120,20));
+			//y_Rotation.setFont(new Font("x_Rotation:",Font.BOLD,15));
+			y_Rotation.setText(PluginServices.getText(this,"y_Rotation")+":");
+			
+		}
+		return y_Rotation;
+	}
+	
+	private JLabel getZ_Rotation() {
+		if(z_Rotation == null ) {
+			z_Rotation = new JLabel();
+			z_Rotation.setPreferredSize(new Dimension(120,20));
+			//z_Rotation.setFont(new Font("x_Translation:",Font.BOLD,15));
+			z_Rotation.setText(PluginServices.getText(this,"z_Rotation")+":");
+			
+		}
+		return z_Rotation;
+	}
+	
+	private JLabel getScale() {
+		if(scale == null ) {
+			scale = new JLabel();
+			scale.setPreferredSize(new Dimension(120,20));
+			//scale.setFont(new Font("scale:",Font.BOLD,15));
+			scale.setText(PluginServices.getText(this,"scale")+":");
+			
+		}
+		return scale;
+	}
+	
+	public JTextField getTx_Translation() {
+		if(tx_Translation == null ) {
+			tx_Translation = new JTextField();
+			tx_Translation.setPreferredSize(new Dimension(120,20));
+			//tx_Translation.setFont(new Font("",Font.ITALIC,10));
+			tx_Translation.setText("0");
+			tx_Translation.setEditable(true);
+			//tx_Translation.addKeyListener(this);
+		}
+		return tx_Translation;
+	}
+	
+	public JTextField getTy_Translation() {
+		if(ty_Translation == null ) {
+			ty_Translation = new JTextField();
+			ty_Translation.setPreferredSize(new Dimension(120,20));
+			//ty_Translation.setFont(new Font("",Font.ITALIC,10));
+			ty_Translation.setText("0");
+			ty_Translation.setEditable(true);
+			//ty_Translation.addKeyListener(this);
+		}
+		return ty_Translation;
+	}
+	
+	public JTextField getTz_Translation() {
+		if(tz_Translation == null ) {
+			tz_Translation = new JTextField();
+			tz_Translation.setPreferredSize(new Dimension(120,20));
+			//tz_Translation.setFont(new Font("",Font.ITALIC,10));
+			tz_Translation.setText("0");
+			tz_Translation.setEditable(true);
+			//tz_Translation.addKeyListener(this);
+		}
+		return tz_Translation;
+	}
+	
+	public JTextField getTx_Rotation() {
+		if(tx_Rotation == null ) {
+			tx_Rotation = new JTextField();
+			tx_Rotation.setPreferredSize(new Dimension(120,20));
+			//tx_Rotation.setFont(new Font("",Font.ITALIC,10));
+			tx_Rotation.setText("0");
+			tx_Rotation.setEditable(true);
+			//tx_Rotation.addKeyListener(this);
+		}
+		return tx_Rotation;
+	}
+	
+	public JTextField getTy_Rotation() {
+		if(ty_Rotation == null ) {
+			ty_Rotation = new JTextField();
+			ty_Rotation.setPreferredSize(new Dimension(120,20));
+			//ty_Rotation.setFont(new Font("",Font.ITALIC,10));
+			ty_Rotation.setText("0");
+			ty_Rotation.setEditable(true);
+			//ty_Rotation.addKeyListener(this);
+		}
+		return ty_Rotation;
+	}
+	
+	public JTextField getTz_Rotation() {
+		if(tz_Rotation == null ) {
+			tz_Rotation = new JTextField();
+			tz_Rotation.setPreferredSize(new Dimension(120,20));
+			//tz_Rotation.setFont(new Font("",Font.ITALIC,10));
+			tz_Rotation.setText("0");
+			tz_Rotation.setEditable(true);
+			//tz_Rotation.addKeyListener(this);
+		}
+		return tz_Rotation;
+	}
+	
+	public JTextField getTscale() {
+		if(tScale == null ) {
+			tScale = new JTextField();
+			tScale.setPreferredSize(new Dimension(120,20));
+			//tScale.setFont(new Font("",Font.ITALIC,10));
+			tScale.setText("0");
+			tScale.setEditable(true);
+			//tScale.addKeyListener(this);
+		}
+		return tScale;
+	}
+		
+	private Component getInfo() {
+		if (info == null){
+			info = new JTextArea();
+			info.setLineWrap(true);
+			info.setWrapStyleWord(true);
+			info.setPreferredSize(new Dimension(400, 240));
+			info.setEditable(false);
+			info.setText(getWKT());
+		}
+		info.setText(getWKT());
+		return info;
+	}
+	
+	/**
+	 * 
+	 * @return
+	 */
+	public ICrs getProjection() {
+		if(tx_Translation.getText().equals("")){
+			tx_Translation.setText("0");
+		}
+		else if (ty_Translation.getText().equals("")){
+			ty_Translation.setText("0");
+		}
+		else if (tz_Translation.getText().equals("")){
+			tz_Translation.setText("0");
+		}
+		else if (tx_Rotation.getText().equals("")){
+			tx_Rotation.setText("0");
+		}
+		else if (ty_Rotation.getText().equals("")){
+			ty_Rotation.setText("0");
+		}
+		else if (tz_Rotation.getText().equals("")){
+			tz_Rotation.setText("0");
+		}
+		else if (tScale.getText().equals("")){
+			tScale.setText("0");
+		}		
+		String param = "+towgs84="+ tx_Translation.getText()+","+
+					   ty_Translation.getText()+","+
+					   tz_Translation.getText()+","+
+					   tx_Rotation.getText()+","+
+					   ty_Rotation.getText()+","+
+					   tz_Rotation.getText()+","+
+					   tScale.getText() + " ";
+		
+		try {
+			ICrs crs = new CrsFactory().getCRS(getCode(),
+					getWKT(),param);
+			return crs;
+		} catch (org.gvsig.crs.CrsException e) {
+			e.printStackTrace();
+		}
+		return null;
+	}
+	
+	/**
+	 * 
+	 * @param cod
+	 */
+	public void setCode(int cod){
+		codeEpsg = cod;
+	}
+	
+	/**
+	 * 
+	 * @return
+	 */
+	public int getCode(){
+		return codeEpsg;
+	}
+	
+	/**
+	 * 
+	 * @param cad
+	 */
+	public void setWKT(String cad){
+		cadWKT = cad;
+		CrsWkt parser = new CrsWkt(cad);
+		setSourceAbrev(parser.getAuthority()[0], parser.getAuthority()[1]);
+		getInfo();
+	}	
+	
+	/**
+	 * 
+	 * @return
+	 */
+	public String getWKT(){
+		return cadWKT;
+	}
+	
+	/**
+	 * 
+	 * @return
+	 */
+	public static boolean isPressed() { return pressed; }
+	
+	
+	/**
+	 * metodo para comprobar si los JTextfile estan escritos 
+	 * correctamente los campos de la transformacion manual
+	 */
+	public boolean correctJTextField(){
+		boolean correct = true;
+		
+		if ((tx_Translation.getText().length()==0) || (tx_Translation.getText().length()!=verify(tx_Translation.getText()).length())){
+			tx_Translation.setText("0");
+			tx_Translation.setBackground(new Color(255,204,204));
+			correct = false;
+		}
+		else tx_Translation.setBackground(new Color(255,255,255));
+		if ((ty_Translation.getText().length()==0) || (ty_Translation.getText().length()!=verify(ty_Translation.getText()).length())){
+			ty_Translation.setText("0");
+			ty_Translation.setBackground(new Color(255,204,204));
+			correct = false;
+		}
+		else ty_Translation.setBackground(new Color(255,255,255));
+		if ((tz_Translation.getText().length()==0) || (tz_Translation.getText().length()!=verify(tz_Translation.getText()).length())){
+			tz_Translation.setText("0");
+			tz_Translation.setBackground(new Color(255,204,204));
+			correct = false;
+		}
+		else tz_Translation.setBackground(new Color(255,255,255));
+		if ((tx_Rotation.getText().length() == 0) || (tx_Rotation.getText().length()!=verify(tx_Rotation.getText()).length())){
+			tx_Rotation.setText("0");
+			tx_Rotation.setBackground(new Color(255,204,204));
+			correct = false;
+		}
+		else tx_Rotation.setBackground(new Color(255,255,255));
+		if ((ty_Rotation.getText().length() == 0) || (ty_Rotation.getText().length()!=verify(ty_Rotation.getText()).length())){
+			ty_Rotation.setText("0");
+			ty_Rotation.setBackground(new Color(255,204,204));
+			correct = false;
+		}
+		else ty_Rotation.setBackground(new Color(255,255,255));
+		if ((tz_Rotation.getText().length() == 0) || (tz_Rotation.getText().length()!=verify(tz_Rotation.getText()).length())){
+			tz_Rotation.setText("0");
+			tz_Rotation.setBackground(new Color(255,204,204));
+			correct = false;
+		}
+		else tz_Rotation.setBackground(new Color(255,255,255));
+		if ((tScale.getText().length() == 0) || (tScale.getText().length()!=verify(tScale.getText()).length())){
+			tScale.setText("0");
+			tScale.setBackground(new Color(255,204,204));
+			correct = false;
+		}
+		else tScale.setBackground(new Color(255,255,255));
+		return correct;
+	}
+	
+	/**
+	 * Verifica que el valor insertado en el campo JTextField correspondiente
+	 * se corresponde con un valor n�merico y de tipo double
+	 * 
+	 * @param cad
+	 * @return
+	 */
+	private String verify(String cad) {
+		String num_cad = "";
+		int pto = 0;
+		char[] nums = {'0','1','2','3','4','5','6','7','8','9'};
+		if (cad.startsWith("-")) num_cad += "-";
+		for (int i=0; i< cad.length(); i++){						
+			if (cad.charAt(i) == '.'){				
+				if (cad.startsWith(".") || cad.endsWith(".") || pto>0);
+				else {
+					pto++;
+					num_cad += cad.charAt(i);
+				}
+			}			
+			else
+				for (int j=0; j< nums.length; j++)
+					if (cad.charAt(i) == nums[j])
+						num_cad += cad.charAt(i);				
+		}		
+		return num_cad;
+	}
+	
+	/**
+	 * Mira si los JTextField tienen dominios correctos
+	 * @return
+	 */
+	public boolean correctDomain(){
+		boolean correctDomain = true;
+		double tx = Double.parseDouble(tx_Translation.getText());
+		double ty = Double.parseDouble(ty_Translation.getText());
+		double tz = Double.parseDouble(tz_Translation.getText());
+		double rx = Double.parseDouble(tx_Rotation.getText());
+		double ry = Double.parseDouble(ty_Rotation.getText());
+		double rz = Double.parseDouble(tz_Rotation.getText());
+		double sc = Double.parseDouble(tScale.getText());
+		
+		if (tx < -1000.0 || tx > 1000.0) {
+			tx_Translation.setText("0");
+			tx_Translation.setBackground(new Color(255,204,204));
+			correctDomain = false;
+		}
+		else tx_Translation.setBackground(new Color(255,255,255));
+		if (ty < -1000.0 || ty > 1000.0) {
+			ty_Translation.setText("0");
+			ty_Translation.setBackground(new Color(255,204,204));
+			correctDomain = false;
+		}
+		else ty_Translation.setBackground(new Color(255,255,255));
+		if (tz < -1000.0 || tz > 1000.0) {
+			tz_Translation.setText("0");
+			tz_Translation.setBackground(new Color(255,204,204));
+			correctDomain = false;
+		}
+		else tz_Translation.setBackground(new Color(255,255,255));
+		if (rx < -60.0 || rx > 60.0) {
+			tx_Rotation.setText("0");
+			tx_Rotation.setBackground(new Color(255,204,204));
+			correctDomain = false;
+		}
+		else tx_Rotation.setBackground(new Color(255,255,255));
+		if (ry < -60.0 || ry > 60.0) {
+			ty_Rotation.setText("0");
+			ty_Rotation.setBackground(new Color(255,204,204));
+			correctDomain = false;
+		}
+		else ty_Rotation.setBackground(new Color(255,255,255));
+		if (rz < -60.0 || rz > 60.0) {
+			tz_Rotation.setText("0");
+			tz_Rotation.setBackground(new Color(255,204,204));
+			correctDomain = false;
+		}
+		else tz_Rotation.setBackground(new Color(255,255,255));
+		if (sc < -20.0 || sc > 20.0) {
+			tScale.setText("0");
+			tScale.setBackground(new Color(255,204,204));
+			correctDomain = false;
+		}
+		else tScale.setBackground(new Color(255,255,255));
+		return correctDomain;
+	}
+	
+	/**
+	 * Consigue el estado actual de los par�metros insertados. En caso
+	 * de que todos los par�metros sean 0, o haya par�metros sin valor
+	 * deshabilitar� el bot�n de aceptar
+	 * @return
+	 */
+	public boolean getStatus() {
+		if ((tx_Translation.getText().equals("0") || tx_Translation.getText().equals("")) &&
+				(ty_Translation.getText().equals("0")  || ty_Translation.getText().equals(""))&&
+				(tz_Translation.getText().equals("0")  || tz_Translation.getText().equals(""))&&
+				(tx_Rotation.getText().equals("0")  || tx_Rotation.getText().equals(""))&&
+				(ty_Rotation.getText().equals("0")  || ty_Rotation.getText().equals(""))&&
+				(tz_Rotation.getText().equals("0")  || tz_Rotation.getText().equals(""))&&
+				(tScale.getText().equals("0")  || tScale.getText().equals("")))
+			return false;
+		else if (tx_Translation.getText().equals("") ||
+				(ty_Translation.getText().equals(""))||
+				(tz_Translation.getText().equals(""))||
+				(tx_Rotation.getText().equals(""))||
+				(ty_Rotation.getText().equals(""))||
+				(tz_Rotation.getText().equals(""))||
+				(tScale.getText().equals("")))
+			return false;
+		return true;
+	}
+	
+	public void setTargetAuthority(String[] authority){
+		targetAuthority = authority;
+		setTargetAbrev(targetAuthority[0], targetAuthority[1]);		
+	}
+	
+	public void setTargetAbrev(String fuente, String codigo){
+		targetAbrev = fuente + ":" + codigo;
+	}
+	
+	public String getTargetAbrev() {
+		return targetAbrev;
+	}
+	
+	public void setSourceAbrev(String fuente, String codigo){
+		sourceAbrev = fuente + ":" + codigo;
+	}
+	
+	public String getSourceAbrev(){
+		return sourceAbrev;
+	}
+	
+	public String getValues(){
+		return "["+tx_Translation.getText()+","+ty_Translation.getText()+
+		","+tz_Translation.getText()+","+tx_Rotation.getText()+","+ty_Rotation.getText()+","
+		+tz_Rotation.getText()+","+tScale.getText()+"]";
+	}
+
+}

Property changes on: tags/Root_F2/libraries/libJCRS/src/org/gvsig/crs/gui/panels/TransformationManualPanel.java
___________________________________________________________________
Added: svn:keywords
   + Author Date Id Revision
Added: svn:eol-style
   + native

Index: tags/Root_F2/libraries/libJCRS/src/org/gvsig/crs/gui/panels/TransformationEpsgPanel.java
===================================================================
--- tags/Root_F2/libraries/libJCRS/src/org/gvsig/crs/gui/panels/TransformationEpsgPanel.java	(revision 0)
+++ tags/Root_F2/libraries/libJCRS/src/org/gvsig/crs/gui/panels/TransformationEpsgPanel.java	(revision 10155)
@@ -0,0 +1,542 @@
+/* gvSIG. Sistema de Informaci�n Geogr�fica de la Generalitat Valenciana
+ *
+ * Copyright (C) 2006 Instituto de Desarrollo Regional and Generalitat Valenciana.
+ *
+ * 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., 59 Temple Place - Suite 330, Boston, MA  02111-1307,USA.
+ *
+ * For more information, contact:
+ *
+ *  Generalitat Valenciana
+ *   Conselleria d'Infraestructures i Transport
+ *   Av. Blasco Ib��ez, 50
+ *   46010 VALENCIA
+ *   SPAIN
+ *
+ *      +34 963862235
+ *   gvsig@gva.es
+ *      www.gvsig.gva.es
+ *
+ *    or
+ *
+ *   Instituto de Desarrollo Regional (Universidad de Castilla La-Mancha)
+ *   Campus Universitario s/n
+ *   02071 Alabacete
+ *   Spain
+ *
+ *   +34 967 599 200
+ */
+
+package org.gvsig.crs.gui.panels;
+
+import java.awt.Component;
+import java.awt.Dimension;
+import java.awt.FlowLayout;
+import java.awt.GridLayout;
+import java.sql.ResultSet;
+import java.sql.SQLException;
+import java.util.ArrayList;
+
+import javax.swing.BorderFactory;
+import javax.swing.JPanel;
+import javax.swing.JScrollPane;
+import javax.swing.JTable;
+import javax.swing.JTextArea;
+import javax.swing.ListSelectionModel;
+import javax.swing.table.DefaultTableModel;
+import javax.swing.table.TableColumn;
+
+import org.cresques.cts.IProjection;
+import org.gvsig.crs.CrsFactory;
+import org.gvsig.crs.EpsgConnection;
+import org.gvsig.crs.ICrs;
+import org.gvsig.crs.Query;
+
+import com.iver.andami.PluginServices;
+import com.iver.andami.ui.mdiManager.WindowInfo;
+import com.iver.cit.gvsig.gui.TableSorter;
+
+/**
+ * Clase para la creaci�n y el manejo del panel de transformaci�n
+ * para el caso de la EPSG
+ * 
+ * @author Jos� Luis G�mez Mart�nez (jolugomar@gmail.com)
+ *
+ */
+public class TransformationEpsgPanel extends JPanel  {
+	/**
+	 * 
+	 */
+	private static final long serialVersionUID = 1L;
+	private IProjection firstProj;
+	
+	String[] transformations = {"9603", "9606", "9607", "9613", "9615", "9633"};
+	
+	private int transformation_code = -1;
+	private String[] values;
+	private String params = "+towgs84=";
+	
+	private JTable transformationTable;	
+	private JScrollPane jScrollPane = null;
+	public boolean inverseTranformation = false;
+	
+	public EpsgConnection connect = null;	
+	public int crs_target = -1;
+	
+	public DefaultTableModel dtm = null;
+	
+	private int crs_source_code;
+	private String cadWKT = "";
+	private ListSelectionModel lsm2 = null;
+	public int selectedRowTable = -1;
+	boolean tra = false;
+	int real_target;
+	
+	private JTextArea info;	
+	public TableSorter sorter = null;
+	
+	public TransformationEpsgPanel(int target) {
+		connect = new EpsgConnection();
+		connect.setConnectionEPSG();
+		real_target = target;
+		String sentence = "SELECT source_geogcrs_code, coord_ref_sys_kind " +
+			"FROM epsg_coordinatereferencesystem " +
+			"WHERE coord_ref_sys_code = "+ target ;
+		ResultSet result = Query.select(sentence,connect.getConnection());		
+		try {
+			result.next();
+			String kind = result.getString("coord_ref_sys_kind");
+			if (kind.equals("projected"))
+				target = result.getInt("source_geogcrs_code");
+		} catch (SQLException e1) {
+			e1.printStackTrace();
+		}        
+		crs_target = target;
+		initialize();
+	}
+	
+	private void initialize(){
+		
+			setLayout(new GridLayout(1,2));
+			setLayout(new FlowLayout(FlowLayout.LEADING,5,10));
+			setPreferredSize(new Dimension(525, 100));
+			setBorder(
+				    BorderFactory.createCompoundBorder(
+							BorderFactory.createCompoundBorder(
+									BorderFactory.createTitledBorder("Transformacion EPSG"),
+									BorderFactory.createEmptyBorder(2,2,2,2)),
+									getBorder()));
+			add(getJScrollPane());
+	}
+	
+	private Component getInfo() {
+		if (info == null){
+			info = new JTextArea();
+			info.setLineWrap(true);
+			info.setWrapStyleWord(true);
+			info.setPreferredSize(new Dimension(400, 240));
+			info.setEditable(false);
+			info.append(getWKT());
+		}
+		info.setText(getWKT());
+		return info;
+	}
+	
+	public JTable getJTable() {
+		if (transformationTable == null) {
+			String[] columnNames= {PluginServices.getText(this,"code_transformation"),
+					PluginServices.getText(this,"name_transformation"),
+					PluginServices.getText(this,"type_transformation"),
+					PluginServices.getText(this,"source_crs"),
+					PluginServices.getText(this,"target_crs"),
+					PluginServices.getText(this,"description_area")};
+			Object[][]data = {};
+			dtm = new DefaultTableModel(data, columnNames)
+			{
+				public boolean isCellEditable(int row, int column) {
+					return false;
+				}
+				/*
+				 * metodo necesario para cuando utilizamos tablas ordenadas
+				 * ya que sino al ordenar por algun campo no se queda con el orden
+				 * actual al seleccionar una fila (non-Javadoc)
+				 * @see javax.swing.table.TableModel#getColumnClass(int)
+				 */
+				public Class getColumnClass(int column)
+				{
+					return getValueAt(0, column).getClass();
+				}
+			};
+			sorter = new TableSorter(dtm);			
+
+			transformationTable = new JTable(sorter);
+			sorter.setTableHeader(transformationTable.getTableHeader());	
+			transformationTable.setCellSelectionEnabled(false);
+			transformationTable.setRowSelectionAllowed(true);
+			transformationTable.setAutoResizeMode(JTable.AUTO_RESIZE_OFF);
+			transformationTable.setColumnSelectionAllowed(false);
+			transformationTable.setSelectionMode(ListSelectionModel.SINGLE_SELECTION);
+			TableColumn column = null;
+			for (int i = 0; i < columnNames.length; i++) {
+			    column = transformationTable.getColumnModel().getColumn(i);
+			    if (i == 0 || i == 3 || i == 4) {
+			        column.setPreferredWidth(40);			     	
+			    }else if (i == 2) {
+			    	column.setPreferredWidth(80);
+			    }
+			    else {			    
+			        column.setPreferredWidth(160);
+			    }
+			}			
+		}
+		return transformationTable;
+	}
+	
+	private JScrollPane getJScrollPane() {
+		if (jScrollPane == null) {
+			jScrollPane = new JScrollPane();
+			jScrollPane.setPreferredSize(new Dimension(525,200));
+			jScrollPane.setBorder(
+				    BorderFactory.createCompoundBorder(
+					BorderFactory.createCompoundBorder(
+							BorderFactory.createTitledBorder(PluginServices.getText(this,"transformations")),
+							BorderFactory.createEmptyBorder(5,5,5,5)),
+							jScrollPane.getBorder()));
+			jScrollPane.setViewportView(getJTable());
+		}
+		return jScrollPane;
+	}
+		
+	/**
+	 * Busca las tranformaciones directas entre el CRS de la capa y el CRS de la
+	 * vista.
+	 * @param crsCode
+	 */
+	private void callTransformation(int crsCode){		
+        int numRow = dtm.getRowCount();
+		
+        while (numRow != 0) {
+			numRow = numRow - 1;
+			dtm.removeRow(numRow);
+		}
+        
+        String sentence = "SELECT source_geogcrs_code " +
+						"FROM epsg_coordinatereferencesystem " +
+						"WHERE coord_ref_sys_code = "+ crsCode ;
+		ResultSet result = Query.select(sentence,connect.getConnection());
+		int source = 0;
+		try {
+			result.next();
+			source = result.getInt("source_geogcrs_code");
+		} catch (SQLException e1) {
+			e1.printStackTrace();
+		}
+		
+        ResultSet result2 = null;
+        ResultSet result3 = null;
+        if (source != 0){
+        		crsCode = source;		            	
+        }
+        
+        ArrayList codecs = new ArrayList();
+        codecs.add(String.valueOf(crsCode));		
+		
+		for (int j=0; j< codecs.size(); j++){
+			sentence = "SELECT coord_op_code, coord_op_name, coord_op_type, source_crs_code, target_crs_code, area_of_use_code, coord_op_method_code " +
+					"FROM epsg_coordoperation " +                        
+					"WHERE source_crs_code = " + codecs.get(j) + "AND target_crs_code = " + crs_target;
+
+            result = Query.select(sentence,connect.getConnection());	
+            
+            try {
+            	while(result.next()) {
+            		Object[]data = new Object[6];				            		
+            		data[0] = String.valueOf(result.getInt("coord_op_code"));
+            		data[1] = result.getString("coord_op_name");
+            		data[2] = result.getString("coord_op_type");
+            		data[3] = String.valueOf(result.getInt("source_crs_code"));
+            		data[4] = String.valueOf(result.getInt("target_crs_code"));
+            		/*codecs.add(data[4]);
+            		codecs = deleteItems(codecs);*/
+            		
+            		int aouc = Integer.parseInt(result.getString("area_of_use_code"));
+					
+					sentence = "SELECT area_of_use FROM epsg_area " +
+									"WHERE area_code = "+ aouc ;
+					
+					result2 = Query.select(sentence,connect.getConnection());
+            		while (result2.next())
+            			data[5] = result2.getString("area_of_use");
+            		
+            		String coord_op_method = result.getString("coord_op_method_code");				            		
+	            		
+            		sentence = "SELECT reverse_op FROM epsg_coordoperationmethod "+
+            					"WHERE coord_op_method_code LIKE " + coord_op_method;
+            		result3 = Query.select(sentence,connect.getConnection());
+            		
+            		while(result3.next()){
+            			if (Integer.parseInt(result3.getString("reverse_op")) == 1){
+            				for (int i=0; i< transformations.length; i++){
+            					if (coord_op_method.equals(transformations[i])){
+            						dtm.addRow(data);
+            					}
+            				}            				
+            			}
+            		}
+            	}
+            } 	
+            catch (SQLException e1) {
+            	e1.printStackTrace();
+            }
+		}
+	}
+	
+	/**
+	 * M�todo auxiliar para eliminar valores repetidos dentro del ArrayList
+	 * de codecs.
+	 * @param codecs
+	 * @return
+	 */
+	private ArrayList deleteItems(ArrayList codecs) {
+		ArrayList cod = new ArrayList();
+		boolean equal = false;
+		for (int i = 0; i< codecs.size(); i++){
+			String c = (String) codecs.get(i);
+			for (int j = 0; j<cod.size(); j++){
+				if (cod.get(j).equals(c)){
+					equal = true;
+				}
+			}
+			if (!equal){
+				cod.add(c);				
+			}
+			equal = false;
+		}
+		return cod;
+	}
+	
+	/**
+	 * Busca las tranformaciones inversas entre el CRS de la capa y el CRS de la
+	 * vista. Aquellas cuyo valor de reverse_op sean iguales a uno.
+	 * @param crsCode
+	 */
+	private void callInverseTransformation(int crsCode){
+		//inverseTranformation = true;
+        
+        String sentence = "SELECT source_geogcrs_code " +
+						"FROM epsg_coordinatereferencesystem " +
+						"WHERE coord_ref_sys_code = "+ crsCode ;
+		ResultSet result = Query.select(sentence,connect.getConnection());
+		int source = 0;
+		try {
+			result.next();
+			source = result.getInt("source_geogcrs_code");
+		} catch (SQLException e1) {
+			e1.printStackTrace();
+		}
+		
+        ResultSet result2 = null;
+        ResultSet result3 = null;
+        if (source != 0){
+        		crsCode = source;		            	
+        }
+        
+        ArrayList codecs = new ArrayList();
+        codecs.add(String.valueOf(crsCode));
+       
+		codecs = deleteItems(codecs);
+		
+		for (int j=0; j< codecs.size(); j++){
+			sentence = "SELECT coord_op_code, coord_op_name, coord_op_type, source_crs_code, target_crs_code, area_of_use_code, coord_op_method_code " +
+					"FROM epsg_coordoperation " +                        
+					"WHERE source_crs_code = " + codecs.get(j) + "AND target_crs_code = " + crs_target;
+
+            result = Query.select(sentence,connect.getConnection());	
+            
+            try {
+            	while(result.next()) {
+            		Object[]data = new Object[6];				            		
+            		data[0] = String.valueOf(result.getInt("coord_op_code"));
+            		data[1] = result.getString("coord_op_name");
+            		data[2] = result.getString("coord_op_type");
+            		data[4] = String.valueOf(result.getInt("source_crs_code"));
+            		data[3] = String.valueOf(result.getInt("target_crs_code"));
+            		/*codecs.add(data[4]);
+            		codecs = deleteItems(codecs);*/
+            		
+            		int aouc = Integer.parseInt(result.getString("area_of_use_code"));
+					
+					sentence = "SELECT area_of_use FROM epsg_area " +
+									"WHERE area_code = "+ aouc ;
+					
+					result2 = Query.select(sentence,connect.getConnection());
+            		while (result2.next())
+            			data[5] = result2.getString("area_of_use");
+            		
+            		String coord_op_method = result.getString("coord_op_method_code");				            		
+	            		
+            		sentence = "SELECT reverse_op FROM epsg_coordoperationmethod "+
+            					"WHERE coord_op_method_code LIKE " + coord_op_method;
+            		result3 = Query.select(sentence,connect.getConnection());
+            		
+            		while(result3.next()){
+            			if (Integer.parseInt(result3.getString("reverse_op")) == 1){
+            				for (int i=0; i< transformations.length; i++){
+            					if (coord_op_method.equals(transformations[i])){
+            						dtm.addRow(data);
+            					}
+            				}
+            			}
+            		}
+            	}
+            } 	
+            catch (SQLException e1) {
+            	e1.printStackTrace();
+            }
+		}
+	}
+	
+	/**
+	 * 
+	 * @param val
+	 */
+	public void setValues(String[] val) {
+		values = val;
+	}
+	
+	/**
+	 * 
+	 * @return
+	 */
+	public String[] getValues() {
+		return values;
+	}
+	
+	/**
+	 * 
+	 * @param t_cod
+	 */
+	public void setTrasformation_code(int t_cod) {
+		transformation_code = t_cod;
+	}
+	
+	/**
+	 * 
+	 * @return
+	 */
+	public int getTransformation_code() {
+		return transformation_code;
+	}
+	
+	/**
+	 * 
+	 * @return
+	 */
+	public ICrs getProjection() {
+		params += values[0];
+		for(int i = 1; i < values.length; i++)
+			params +=","+values[i];
+		try {
+			ICrs crs = new CrsFactory().getCRS(crs_source_code,
+					cadWKT,params);
+			return crs;
+		} catch (org.gvsig.crs.CrsException e) {
+			e.printStackTrace();
+		}
+		return null;
+	}
+	
+	/**
+	 * 
+	 * @param proj
+	 */
+	public void setProjection(IProjection proj) {
+		firstProj = proj;
+	}
+	
+	/**
+	 * 
+	 * @param cad
+	 */
+	public void setWKT(String cad){
+		cadWKT = cad;
+		getInfo();
+	}
+	
+	/**
+	 * 
+	 * @return
+	 */
+	public String getWKT(){
+		return cadWKT;
+	}
+	
+	/**
+	 * Indica el CRS que se utilizar� en la capa y busca las transformaciones
+	 * directas e inversas que pueda tener
+	 * @param code
+	 */
+	public void setSource(int code){
+		connect = new EpsgConnection();
+		connect.setConnectionEPSG();
+		inverseTranformation = false;
+		crs_source_code = code;
+		callTransformation(crs_source_code);
+		
+		int new_target = crs_target;
+		int base_target = code;
+		String sentence = "SELECT source_geogcrs_code, coord_ref_sys_kind " +
+					"FROM epsg_coordinatereferencesystem " +
+					"WHERE coord_ref_sys_code = "+ code;
+		ResultSet result = Query.select(sentence,connect.getConnection());		
+		try {
+			result.next();
+			String kind = result.getString("coord_ref_sys_kind");
+			if (kind.equals("projected"))
+				base_target = result.getInt("source_geogcrs_code");
+		} catch (SQLException e1) {
+			e1.printStackTrace();
+		}        
+		crs_target = base_target;
+		
+		crs_source_code = new_target;
+		callInverseTransformation(crs_source_code);
+		crs_target = new_target;
+		crs_source_code = code;
+	    
+		int numr = dtm.getRowCount();
+		if (numr > 0 ){
+			this.getJTable().setRowSelectionInterval(0,0);
+		}
+	}
+	
+	/**
+	 * 
+	 * @return
+	 */
+	public int getSource(){
+		return crs_source_code;
+	}
+	
+	public int getTarget(){
+		return real_target;
+	}
+	
+	public WindowInfo getWindowInfo() {
+		WindowInfo m_viewinfo=new WindowInfo(WindowInfo.MODALDIALOG);
+   		m_viewinfo.setTitle("Transformation EPSG");
+		return m_viewinfo;
+	}	
+
+}

Property changes on: tags/Root_F2/libraries/libJCRS/src/org/gvsig/crs/gui/panels/TransformationEpsgPanel.java
___________________________________________________________________
Added: svn:eol-style
   + native
Added: svn:keywords
   + Author Date Id Revision

Index: tags/Root_F2/libraries/libJCRS/src/org/gvsig/crs/persistence/RecentTrsPersistence.java
===================================================================
--- tags/Root_F2/libraries/libJCRS/src/org/gvsig/crs/persistence/RecentTrsPersistence.java	(revision 0)
+++ tags/Root_F2/libraries/libJCRS/src/org/gvsig/crs/persistence/RecentTrsPersistence.java	(revision 10155)
@@ -0,0 +1,274 @@
+/* gvSIG. Sistema de Informaci�n Geogr�fica de la Generalitat Valenciana
+*
+* Copyright (C) 2006 Instituto de Desarrollo Regional and Generalitat Valenciana.
+*
+* 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., 59 Temple Place - Suite 330, Boston, MA  02111-1307,USA.
+*
+* For more information, contact:
+*
+*  Generalitat Valenciana
+*   Conselleria d'Infraestructures i Transport
+*   Av. Blasco Ib��ez, 50
+*   46010 VALENCIA
+*   SPAIN
+*
+*      +34 963862235
+*   gvsig@gva.es
+*      www.gvsig.gva.es
+*
+*    or
+*
+*   Instituto de Desarrollo Regional (Universidad de Castilla La-Mancha
+*   Campus Universitario s/n
+*   02071 Alabacete
+*   Spain
+*
+*   +34 967 599 200
+*/
+
+package org.gvsig.crs.persistence;
+
+import java.util.Arrays;
+import java.util.Date;
+import java.util.Iterator;
+import java.util.Properties;
+import java.util.Set;
+
+import com.iver.andami.PluginServices;
+import com.iver.utiles.DateTime;
+import com.iver.utiles.XMLEntity;
+
+/**
+ * This class is used to save a list of Transfomations (using the
+ * Andami persistence model) to the plugins-persistence.xml file.
+ * It has methods to create a set of TrData objects  from an
+ * xml file. It can also save a set of TrData objects in an
+ * xml file.
+ *
+ * @author Diego Guerrero Sevilla diego.guerrero@uclm.es
+ */
+public class RecentTrsPersistence {
+	private XMLEntity xml = null;
+	private XMLEntity recentsXml = null;
+	private PluginServices ps = null;
+	private static final String TR_RECENTS = "recentTransformations";
+	private static final String TR_AUTHORITY = "authority";
+	private static final String TR_NAME = "name";
+	private static final String TR_CODE = "code";
+	private static final String TR_CRS_SOURCE = "crsSource";
+	private static final String TR_CRS_TARGET = "crsTarget";
+	private static final String TR_DETAILS = "details";
+	private static final String TR_DATE = "date";
+	
+	
+	public static Object pluginClassInstance = null;
+	
+	/**
+	 * Constructor
+	 * @param pluginClassInstance
+	 */
+	public RecentTrsPersistence(Object pluginClassInstance){
+		ps = PluginServices.getPluginServices(pluginClassInstance);
+		xml = ps.getPersistentXML();
+		for (int child = 0; child<xml.getChildrenCount();child++)
+			if (xml.getChild(child).getPropertyValue(0).equals(TR_RECENTS))
+				recentsXml = xml.getChild(child); 
+		if (recentsXml == null){
+			XMLEntity xmlEntity = new XMLEntity();
+			xmlEntity.putProperty("groupName", TR_RECENTS);
+			xml.addChild(xmlEntity);
+			recentsXml = xmlEntity;
+		}
+	}
+	
+	/**
+	 * Constructor
+	 */
+	public RecentTrsPersistence(){
+		ps = PluginServices.getPluginServices(pluginClassInstance);
+		xml = ps.getPersistentXML();
+		for (int child = 0; child<xml.getChildrenCount();child++)
+			if (xml.getChild(child).getPropertyValue(0).equals(TR_RECENTS))
+				recentsXml = xml.getChild(child); 
+		if (recentsXml == null){
+			XMLEntity xmlEntity = new XMLEntity();
+			xmlEntity.putProperty("groupName", TR_RECENTS);
+			xml.addChild(xmlEntity); 
+			recentsXml = xmlEntity;
+		}
+	}
+
+	/**
+	 * This methos is used to save the information in an XML file
+	 */
+	public void setPersistent(){
+		ps.setPersistentXML(xml);
+	}
+
+	/**
+	 * This method saves an array of TrData using the Anadami
+	 * persistence model
+	 * @param tr
+	 * Array of trData to save.
+	 */
+	public void setArrayOfTrData(TrData[] trs){
+		recentsXml.getXmlTag().removeAllXmlTag();
+
+		for (int i=0 ; i<trs.length ; i++){
+			recentsXml.addChild(trDataToXml(trs[i]));
+		}
+
+	}
+
+	/**
+	 * This method adds a TrData using the Anadami
+	 * persistence model. If the Transformation exists just actualizes
+	 * the type name and the wkt string.
+	 * @param tr
+	 * TrData
+	 */
+	public void addTrData(TrData tr){
+		TrData[] trs = getArrayOfTrData();
+
+		boolean found = false;
+
+		for (int i = 0; i < trs.length; i++) {
+			if (trs[i].getAuthority().equals(tr.getAuthority())&& trs[i].getCode()==tr.getCode() 
+					&& trs[i].getCrsSource().equals(tr.getCrsSource()) && trs[i].getCrsTarget().equals(tr.getCrsTarget()) && trs[i].getDetails().equals(tr.getDetails())) {
+				found = true;
+				trs[i].setName(tr.getName());
+				trs[i].setProperies(tr.getProperies());
+				trs[i].updateLastAccess();
+				setArrayOfTrData(trs);
+			}
+		}
+		
+		if (!found) {
+			if (trs.length<10){ //L�mitie de almacenamiento: 10 Transf.
+				TrData[] newTrs = new TrData[trs.length + 1];
+				System.arraycopy(trs, 0, newTrs, 0, trs.length);
+				newTrs[trs.length] = tr;
+				setArrayOfTrData(newTrs);
+			}
+			else {
+				Arrays.sort(trs);
+				trs[0]=tr;
+				setArrayOfTrData(trs);
+			}
+		}
+	}
+
+
+
+	/**
+	 * This method returns an array of TrData objects that
+	 * have been saved using the Andami persistence model.
+	 * @return
+	 * TrData[]
+	 */
+	public TrData[] getArrayOfTrData(){
+		TrData[] trs = new TrData[recentsXml.getChildrenCount()];
+		for (int i=0 ; i<recentsXml.getChildrenCount() ; i++){
+			trs[i] = xmlToTrData(recentsXml.getChild(i));
+		}
+		
+		/*
+		 * Ordenar el array por fechas
+		 */
+		Arrays.sort(trs);
+		
+		return trs;
+	}
+
+
+	/**
+	 * This method creates and returns a new XMLEntity.
+	 * @param tr
+	 * TrData with all the Transformation information
+	 * @return
+	 * XMLEntity
+	 */
+	public XMLEntity trDataToXml(TrData tr){
+		String dFormat="Y-m-d H:i:s.Z";
+	
+		XMLEntity xmlEnt = new XMLEntity();
+		xmlEnt.putProperty(TR_AUTHORITY,tr.getAuthority());
+		xmlEnt.putProperty(TR_CODE,Integer.toString(tr.getCode()));
+		xmlEnt.putProperty(TR_NAME,(tr.getName()));
+		xmlEnt.putProperty(TR_CRS_SOURCE,(tr.getCrsSource()));
+		xmlEnt.putProperty(TR_CRS_TARGET,(tr.getCrsTarget()));
+		xmlEnt.putProperty(TR_DETAILS,(tr.getDetails()));
+		xmlEnt.putProperty(TR_DATE,DateTime.dateToString(tr.getDate(),dFormat));
+		Set keys = tr.getProperies().keySet();
+		Iterator it = keys.iterator();
+	    while (it.hasNext()) {
+	    	String next = (String)it.next();
+	    	xmlEnt.putProperty(next,
+	    			tr.getProperies().get(next));
+	    }		   
+		return xmlEnt;
+	}
+
+	/**
+	 * This method creates a new TrData from a XMLEntity
+	 * @param xmlEnt
+	 * XMLRntity that contains the Tr information
+	 * @return
+	 * TrData
+	 */
+	public TrData xmlToTrData(XMLEntity xmlEnt){
+		String authority = "";
+		int code = 0;
+		String name = "";
+		String crsSource = "";
+		String crsTarget = "";
+		String details = "";
+		Date date = null;
+
+		authority = xmlEnt.getStringProperty(TR_AUTHORITY);
+		code = Integer.valueOf(xmlEnt.getStringProperty(TR_CODE)).intValue();
+		name = xmlEnt.getStringProperty(TR_NAME);
+		crsSource = xmlEnt.getStringProperty(TR_CRS_SOURCE);
+		crsTarget = xmlEnt.getStringProperty(TR_CRS_TARGET);
+		details = xmlEnt.getStringProperty(TR_DETAILS);
+		date = DateTime.stringToDate(xmlEnt.getStringProperty(TR_DATE));
+		
+		TrData trData = new TrData(authority,code,name,crsSource,crsTarget,details,date);
+		
+		Properties props = new Properties();
+		for (int i=0 ; i<xmlEnt.getPropertyCount() ; i++){
+			String property = xmlEnt.getPropertyName(i);
+			if (!((property.equals(TR_AUTHORITY)) ||
+				(property.equals(TR_CODE)) ||
+				(property.equals(TR_NAME)) ||
+				(property.equals(TR_CRS_SOURCE)) ||
+				(property.equals(TR_CRS_TARGET)) ||
+				(property.equals(TR_DETAILS)) ||
+				(property.equals(TR_DATE)))){
+					props.put(property,xmlEnt.getStringProperty(property));
+				}					
+		}
+		trData.setProperies(props);
+		return trData;
+	}
+
+	public XMLEntity getXml() {
+		return xml;
+	}
+
+	public void setXml(XMLEntity xml) {
+		this.xml = xml;
+	}
+}

Property changes on: tags/Root_F2/libraries/libJCRS/src/org/gvsig/crs/persistence/RecentTrsPersistence.java
___________________________________________________________________
Added: svn:keywords
   + Author Date Id Revision
Added: svn:eol-style
   + native

Index: tags/Root_F2/libraries/libJCRS/src/org/gvsig/crs/persistence/package.html
===================================================================
--- tags/Root_F2/libraries/libJCRS/src/org/gvsig/crs/persistence/package.html	(revision 0)
+++ tags/Root_F2/libraries/libJCRS/src/org/gvsig/crs/persistence/package.html	(revision 10155)
@@ -0,0 +1,4 @@
+<html>
+	<body>Clases relacionadas con la persistencia de la extensi�n CRS.
+</body>
+</html>

Property changes on: tags/Root_F2/libraries/libJCRS/src/org/gvsig/crs/persistence/package.html
___________________________________________________________________
Added: svn:keywords
   + Author Date Id Revision
Added: svn:eol-style
   + native

Index: tags/Root_F2/libraries/libJCRS/src/org/gvsig/crs/persistence/TrData.java
===================================================================
--- tags/Root_F2/libraries/libJCRS/src/org/gvsig/crs/persistence/TrData.java	(revision 0)
+++ tags/Root_F2/libraries/libJCRS/src/org/gvsig/crs/persistence/TrData.java	(revision 10155)
@@ -0,0 +1,170 @@
+/* gvSIG. Sistema de Informaci�n Geogr�fica de la Generalitat Valenciana
+ *
+ * Copyright (C) 2006 Instituto de Desarrollo Regional and Generalitat Valenciana.
+ *
+ * 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., 59 Temple Place - Suite 330, Boston, MA  02111-1307,USA.
+ *
+ * For more information, contact:
+ *
+ *  Generalitat Valenciana
+ *   Conselleria d'Infraestructures i Transport
+ *   Av. Blasco Ib��ez, 50
+ *   46010 VALENCIA
+ *   SPAIN
+ *
+ *      +34 963862235
+ *   gvsig@gva.es
+ *      www.gvsig.gva.es
+ *
+ *    or
+ *
+ *   Instituto de Desarrollo Regional (Universidad de Castilla La-Mancha)
+ *   Campus Universitario s/n
+ *   02071 Alabacete
+ *   Spain
+ *
+ *   +34 967 599 200
+ */
+
+package org.gvsig.crs.persistence;
+
+import java.util.Date;
+import java.util.Properties;
+
+import com.iver.utiles.DateTime;
+
+/**
+ * Esta clase contiene los datos de una Transformaci�n que son utilizados 
+ * por el mecanismo de persistencia para almacenar las Transformaciones
+ * recientemente utilizados. 
+ * 
+ * @author Diego Guerrero Sevilla diego.guerrero@uclm.es
+ */
+public class TrData implements Comparable{
+	
+	private String authority = null;
+	private int code = 0;
+	private String name = null;
+	private String crsSource = null;
+	private String crsTarget = null;
+	private String details = null;
+	private Date date = null;
+	private Properties properies = new Properties();
+	
+	
+	
+	public TrData(String authority, int code, String name, String crsSource, String crsTarget, String detalis) {
+		super();
+		// TODO Auto-generated constructor stub
+		this.authority = authority;
+		this.code = code;
+		this.name = name;
+		this.crsSource= crsSource;
+		this.crsTarget = crsTarget;
+		this.details = detalis;
+		this.date = DateTime.getCurrentDate();
+	}
+	
+	public TrData(String authority, int code, String name,String crsSource, String crsTarget, String detalis, Date date) {
+		super();
+		// TODO Auto-generated constructor stub
+		this.authority = authority;
+		this.code = code;
+		this.name = name;
+		this.crsSource= crsSource;
+		this.crsTarget = crsTarget;
+		this.details = detalis;
+		this.date = date;
+	}
+
+	public TrData() {
+		// TODO Auto-generated constructor stub
+	}
+	
+	public String getAuthority() {
+		return authority;
+	}
+	
+	public int getCode() {
+		return code;
+	}
+	
+	public String getName() {
+		return name;
+	}
+	
+	/**
+	 * @return Returns the properies.
+	 */
+	public Properties getProperies() {
+		return properies;
+	}
+
+	/**
+	 * @param properies The properies to set.
+	 */
+	public void setProperies(Properties properies) {
+		this.properies = properies;
+	}
+
+	public void setAuthority(String authority) {
+		this.authority = authority;
+	}
+
+	public void setCode(int code) {
+		this.code = code;
+	}
+
+	public void setName(String name) {
+		this.name = name;
+	}
+
+	public Date getDate() {
+		return date;
+	} 
+	
+	public void updateLastAccess() {        
+		date = DateTime.getCurrentDate();
+	}
+
+	public int compareTo(Object o) {
+		TrData trData = (TrData)o;
+		return this.date.compareTo(trData.getDate());
+	}
+
+	public String getCrsSource() {
+		return crsSource;
+	}
+
+	public void setCrsSource(String crsSource) {
+		this.crsSource = crsSource;
+	}
+
+	public String getCrsTarget() {
+		return crsTarget;
+	}
+
+	public void setCrsTarget(String crsTarget) {
+		this.crsTarget = crsTarget;
+	}
+
+	public String getDetails() {
+		return details;
+	}
+
+	public void setDetails(String details) {
+		this.details = details;
+	} 
+}

Property changes on: tags/Root_F2/libraries/libJCRS/src/org/gvsig/crs/persistence/TrData.java
___________________________________________________________________
Added: svn:eol-style
   + native
Added: svn:keywords
   + Author Date Id Revision

Index: tags/Root_F2/libraries/libJCRS/src/org/gvsig/crs/persistence/RecentCRSsPersistence.java
===================================================================
--- tags/Root_F2/libraries/libJCRS/src/org/gvsig/crs/persistence/RecentCRSsPersistence.java	(revision 0)
+++ tags/Root_F2/libraries/libJCRS/src/org/gvsig/crs/persistence/RecentCRSsPersistence.java	(revision 10155)
@@ -0,0 +1,258 @@
+/* gvSIG. Sistema de Informaci�n Geogr�fica de la Generalitat Valenciana
+*
+* Copyright (C) 2006 Instituto de Desarrollo Regional and Generalitat Valenciana.
+*
+* 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., 59 Temple Place - Suite 330, Boston, MA  02111-1307,USA.
+*
+* For more information, contact:
+*
+*  Generalitat Valenciana
+*   Conselleria d'Infraestructures i Transport
+*   Av. Blasco Ib��ez, 50
+*   46010 VALENCIA
+*   SPAIN
+*
+*      +34 963862235
+*   gvsig@gva.es
+*      www.gvsig.gva.es
+*
+*    or
+*
+*   Instituto de Desarrollo Regional (Universidad de Castilla La-Mancha
+*   Campus Universitario s/n
+*   02071 Alabacete
+*   Spain
+*
+*   +34 967 599 200
+*/
+
+package org.gvsig.crs.persistence;
+
+import java.util.Arrays;
+import java.util.Date;
+import java.util.Iterator;
+import java.util.Properties;
+import java.util.Set;
+
+import com.iver.andami.PluginServices;
+import com.iver.utiles.DateTime;
+import com.iver.utiles.XMLEntity;
+
+/**
+ * This class is used to save a list of CRSs (using the
+ * Andami persistence model) to the plugins-persistence.xml file.
+ * It has methods to create a set of CrsData objects  from an
+ * xml file. It can also save a set of CRSs objects in an
+ * xml file.
+ *
+ * @author Diego Guerrero Sevilla diego.guerrero@uclm.es
+ */
+public class RecentCRSsPersistence {
+	private XMLEntity xml = null;
+	private XMLEntity recentsXml = null;
+	private PluginServices ps = null;
+	private static final String CRS_RECENTS = "recentCrss";
+	private static final String CRS_AUTHORITY = "authority";
+	private static final String CRS_NAME = "name";
+	private static final String CRS_CODE = "code";
+	private static final String CRS_DATE = "date";
+	
+	
+	public static Object pluginClassInstance = null;
+	
+	/**
+	 * Constructor
+	 * @param pluginClassInstance
+	 */
+	public RecentCRSsPersistence(Object pluginClassInstance){
+		ps = PluginServices.getPluginServices(pluginClassInstance);
+		xml = ps.getPersistentXML();
+		for (int child = 0; child<xml.getChildrenCount();child++)
+			if (xml.getChild(child).getPropertyValue(0).equals(CRS_RECENTS))
+				recentsXml = xml.getChild(child); 
+		if (recentsXml == null){
+			XMLEntity xmlEntity = new XMLEntity();
+			xmlEntity.putProperty("groupName", CRS_RECENTS);
+			xml.addChild(xmlEntity);
+			recentsXml = xmlEntity;
+		}
+	}
+	
+	/**
+	 * Constructor
+	 */
+	public RecentCRSsPersistence(){
+		ps = PluginServices.getPluginServices(pluginClassInstance);
+		xml = ps.getPersistentXML();
+		for (int child = 0; child<xml.getChildrenCount();child++)
+			if (xml.getChild(child).getPropertyValue(0).equals(CRS_RECENTS))
+				recentsXml = xml.getChild(child); 
+		if (recentsXml == null){
+			XMLEntity xmlEntity = new XMLEntity();
+			xmlEntity.putProperty("groupName", CRS_RECENTS);
+			xml.addChild(xmlEntity); 
+			recentsXml = xmlEntity;
+		}
+	}
+
+	/**
+	 * This methos is used to save the information in an XML file
+	 */
+	public void setPersistent(){
+		ps.setPersistentXML(xml);
+	}
+
+	/**
+	 * This method saves an array of CrsData using the Anadami
+	 * persistence model
+	 * @param crsss
+	 * Array of crss
+	 */
+	public void setArrayOfCrsData(CrsData[] crss){
+		recentsXml.getXmlTag().removeAllXmlTag();
+
+		for (int i=0 ; i<crss.length ; i++){
+			recentsXml.addChild(crsDataToXml(crss[i]));
+		}
+
+	}
+
+	/**
+	 * This method adds a CrsData using the Anadami
+	 * persistence model. If the Crs exists just actualizes
+	 * the type name and the wkt string.
+	 * @param crs
+	 * CrsData
+	 */
+	public void addCrsData(CrsData crs){
+		CrsData[] crss = getArrayOfCrsData();
+
+		boolean found = false;
+
+		for (int i = 0; i < crss.length; i++) {
+			if (crss[i].getAuthority().equals(crs.getAuthority())&& crss[i].getCode()==crs.getCode()) {
+				found = true;
+				crss[i].setName(crs.getName());
+				crss[i].setProperies(crs.getProperies());
+				crss[i].updateLastAccess();
+				setArrayOfCrsData(crss);
+			}
+		}
+		
+		if (!found) {
+			if (crss.length<10){ //L�mite de almacenamiento: 10 CRSs
+				CrsData[] newCrss = new CrsData[crss.length + 1];
+				System.arraycopy(crss, 0, newCrss, 0, crss.length);
+				newCrss[crss.length] = crs;
+				setArrayOfCrsData(newCrss);
+			}
+			else {
+				Arrays.sort(crss);
+				crss[0]=crs;
+				setArrayOfCrsData(crss);
+			}
+		}
+	}
+
+
+
+	/**
+	 * This method returns an array of CrsData objects that
+	 * have been saved using the Andami persistence model.
+	 * @return
+	 * CrsData[]
+	 */
+	public CrsData[] getArrayOfCrsData(){
+		CrsData[] crss = new CrsData[recentsXml.getChildrenCount()];
+		for (int i=0 ; i<recentsXml.getChildrenCount() ; i++){
+			crss[i] = xmlToCrsData(recentsXml.getChild(i));
+		}
+		
+		/*
+		 * Ordenar el array por fechas
+		 */
+		Arrays.sort(crss);
+		
+		return crss;
+	}
+
+
+	/**
+	 * This method creates and returns a new XMLEntity.
+	 * @param crs
+	 * CrsData with all the Crs information
+	 * @return
+	 * XMLEntity
+	 */
+	public XMLEntity crsDataToXml(CrsData crs){
+		String dFormat="Y-m-d H:i:s.Z";
+	
+		XMLEntity xmlEnt = new XMLEntity();
+		xmlEnt.putProperty(CRS_AUTHORITY,crs.getAuthority());
+		xmlEnt.putProperty(CRS_CODE,Integer.toString(crs.getCode()));
+		xmlEnt.putProperty(CRS_NAME,(crs.getName()));
+		xmlEnt.putProperty(CRS_DATE,DateTime.dateToString(crs.getDate(),dFormat));
+		Set keys = crs.getProperies().keySet();
+		Iterator it = keys.iterator();
+	    while (it.hasNext()) {
+	    	String next = (String)it.next();
+	    	xmlEnt.putProperty(next,
+	    			crs.getProperies().get(next));
+	    }		   
+		return xmlEnt;
+	}
+
+	/**
+	 * This method creates a new CrsData from a XMLEntity
+	 * @param xmlEnt
+	 * XMLRntity that contains the Crs information
+	 * @return
+	 * CrsData
+	 */
+	public CrsData xmlToCrsData(XMLEntity xmlEnt){
+		String authority = "";
+		int code = 0;
+		String name = "";
+		Date date = null;
+
+		authority = xmlEnt.getStringProperty(CRS_AUTHORITY);
+		code = Integer.valueOf(xmlEnt.getStringProperty(CRS_CODE)).intValue();
+		name = xmlEnt.getStringProperty(CRS_NAME);
+		date = DateTime.stringToDate(xmlEnt.getStringProperty(CRS_DATE));
+		
+		CrsData crsData = new CrsData(authority,code,name,date);
+		
+		Properties props = new Properties();
+		for (int i=0 ; i<xmlEnt.getPropertyCount() ; i++){
+			String property = xmlEnt.getPropertyName(i);
+			if (!((property.equals(CRS_AUTHORITY)) ||
+				(property.equals(CRS_CODE)) ||
+				(property.equals(CRS_NAME)) ||
+				(property.equals(CRS_DATE)))){
+					props.put(property,xmlEnt.getStringProperty(property));
+				}					
+		}
+		crsData.setProperies(props);
+		return crsData;
+	}
+
+	public XMLEntity getXml() {
+		return xml;
+	}
+
+	public void setXml(XMLEntity xml) {
+		this.xml = xml;
+	}
+}

Property changes on: tags/Root_F2/libraries/libJCRS/src/org/gvsig/crs/persistence/RecentCRSsPersistence.java
___________________________________________________________________
Added: svn:eol-style
   + native
Added: svn:keywords
   + Author Date Id Revision

Index: tags/Root_F2/libraries/libJCRS/src/org/gvsig/crs/persistence/CrsData.java
===================================================================
--- tags/Root_F2/libraries/libJCRS/src/org/gvsig/crs/persistence/CrsData.java	(revision 0)
+++ tags/Root_F2/libraries/libJCRS/src/org/gvsig/crs/persistence/CrsData.java	(revision 10155)
@@ -0,0 +1,137 @@
+/* gvSIG. Sistema de Informaci�n Geogr�fica de la Generalitat Valenciana
+ *
+ * Copyright (C) 2006 Instituto de Desarrollo Regional and Generalitat Valenciana.
+ *
+ * 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., 59 Temple Place - Suite 330, Boston, MA  02111-1307,USA.
+ *
+ * For more information, contact:
+ *
+ *  Generalitat Valenciana
+ *   Conselleria d'Infraestructures i Transport
+ *   Av. Blasco Ib��ez, 50
+ *   46010 VALENCIA
+ *   SPAIN
+ *
+ *      +34 963862235
+ *   gvsig@gva.es
+ *      www.gvsig.gva.es
+ *
+ *    or
+ *
+ *   Instituto de Desarrollo Regional (Universidad de Castilla La-Mancha)
+ *   Campus Universitario s/n
+ *   02071 Alabacete
+ *   Spain
+ *
+ *   +34 967 599 200
+ */
+
+package org.gvsig.crs.persistence;
+
+import java.util.Date;
+import java.util.Properties;
+
+import com.iver.utiles.DateTime;
+
+/**
+ * Esta clase contiene los datos de un CRS que son utilizados 
+ * por el mecanismo de persistencia para almacenar los CRSs
+ * recientemente utilizados. 
+ * 
+ * @author Diego Guerrero Sevilla diego.guerrero@uclm.es
+ */
+public class CrsData implements Comparable{
+	
+	private String authority = null;
+	private int code = 0;
+	private String name = null;
+	private Date date = null;
+	private Properties properies = new Properties();
+	
+	
+	
+	public CrsData(String authority, int code, String name) {
+		super();
+		// TODO Auto-generated constructor stub
+		this.authority = authority;
+		this.code = code;
+		this.name = name;
+		this.date = DateTime.getCurrentDate();
+	}
+	
+	public CrsData(String authority, int code, String name, Date date) {
+		super();
+		// TODO Auto-generated constructor stub
+		this.authority = authority;
+		this.code = code;
+		this.name = name;
+		this.date = date;
+	}
+
+	public CrsData() {
+		// TODO Auto-generated constructor stub
+	}
+	
+	public String getAuthority() {
+		return authority;
+	}
+	
+	public int getCode() {
+		return code;
+	}
+	
+	public String getName() {
+		return name;
+	}
+	
+	/**
+	 * @return Returns the properies.
+	 */
+	public Properties getProperies() {
+		return properies;
+	}
+
+	/**
+	 * @param properies The properies to set.
+	 */
+	public void setProperies(Properties properies) {
+		this.properies = properies;
+	}
+
+	public void setAuthority(String authority) {
+		this.authority = authority;
+	}
+
+	public void setCode(int code) {
+		this.code = code;
+	}
+
+	public void setName(String name) {
+		this.name = name;
+	}
+
+	public Date getDate() {
+		return date;
+	} 
+	
+	public void updateLastAccess() {        
+		date = DateTime.getCurrentDate();
+	}
+
+	public int compareTo(Object o) {
+		CrsData crsData = (CrsData)o;
+		return this.date.compareTo(crsData.getDate());
+	} 
+}

Property changes on: tags/Root_F2/libraries/libJCRS/src/org/gvsig/crs/persistence/CrsData.java
___________________________________________________________________
Added: svn:keywords
   + Author Date Id Revision
Added: svn:eol-style
   + native

Index: tags/Root_F2/libraries/libJCRS/src/org/gvsig/crs/Query.java
===================================================================
--- tags/Root_F2/libraries/libJCRS/src/org/gvsig/crs/Query.java	(revision 0)
+++ tags/Root_F2/libraries/libJCRS/src/org/gvsig/crs/Query.java	(revision 10155)
@@ -0,0 +1,84 @@
+/* gvSIG. Sistema de Informaci�n Geogr�fica de la Generalitat Valenciana
+ *
+ * Copyright (C) 2006 Instituto de Desarrollo Regional and Generalitat Valenciana.
+ *
+ * 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., 59 Temple Place - Suite 330, Boston, MA  02111-1307,USA.
+ *
+ * For more information, contact:
+ *
+ *  Generalitat Valenciana
+ *   Conselleria d'Infraestructures i Transport
+ *   Av. Blasco Ib��ez, 50
+ *   46010 VALENCIA
+ *   SPAIN
+ *
+ *      +34 963862235
+ *   gvsig@gva.es
+ *      www.gvsig.gva.es
+ *
+ *    or
+ *
+ *   Instituto de Desarrollo Regional (Universidad de Castilla La-Mancha)
+ *   Campus Universitario s/n
+ *   02071 Alabacete
+ *   Spain
+ *
+ *   +34 967 599 200
+ */
+
+package org.gvsig.crs;
+
+import java.io.Serializable;
+import java.sql.Connection;
+import java.sql.ResultSet;
+import java.sql.ResultSetMetaData;
+import java.sql.SQLException;
+import java.sql.Statement;
+
+/**
+ * Clase para realizar las consultas a las bases de datos utilizadas
+ * 
+ * @author Jos� Luis G�mez Mart�nez (jolugomar@gmail.com)
+ *
+ */
+public class Query implements Serializable{
+	
+	/**
+	 * 
+	 */
+	private static final long serialVersionUID = 1L;
+
+	/**
+	 * Acepta la sentencia y la conexi�n a la base de datos actual,
+	 * realiza una selecci�n y devuelve los datos en un ResultSet
+	 * @param sentence
+	 * @param conn
+	 * @return
+	 */
+	public static synchronized ResultSet select(String sentence, Connection conn){
+		Statement st = null;
+		ResultSet rs = null;
+				
+		try {
+			st = conn.createStatement();
+			rs = st.executeQuery(sentence);
+			st.close();
+		} catch (SQLException e) {
+			e.printStackTrace();
+		}		
+		return rs;
+	}	
+}
+

Property changes on: tags/Root_F2/libraries/libJCRS/src/org/gvsig/crs/Query.java
___________________________________________________________________
Added: svn:eol-style
   + native
Added: svn:keywords
   + Author Date Id Revision

Index: tags/Root_F2/libraries/libJCRS/src/org/gvsig/crs/CrsException.java
===================================================================
--- tags/Root_F2/libraries/libJCRS/src/org/gvsig/crs/CrsException.java	(revision 0)
+++ tags/Root_F2/libraries/libJCRS/src/org/gvsig/crs/CrsException.java	(revision 10155)
@@ -0,0 +1,58 @@
+/* gvSIG. Sistema de Informaci�n Geogr�fica de la Generalitat Valenciana
+ *
+ * Copyright (C) 2006 Instituto de Desarrollo Regional and Generalitat Valenciana.
+ *
+ * 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., 59 Temple Place - Suite 330, Boston, MA  02111-1307,USA.
+ *
+ * For more information, contact:
+ *
+ *  Generalitat Valenciana
+ *   Conselleria d'Infraestructures i Transport
+ *   Av. Blasco Ib��ez, 50
+ *   46010 VALENCIA
+ *   SPAIN
+ *
+ *      +34 963862235
+ *   gvsig@gva.es
+ *      www.gvsig.gva.es
+ *
+ *    or
+ *
+ *   Instituto de Desarrollo Regional (Universidad de Castilla La-Mancha)
+ *   Campus Universitario s/n
+ *   02071 Alabacete
+ *   Spain
+ *
+ *   +34 967 599 200
+ */
+
+package org.gvsig.crs;
+
+/**
+ * Clase que captura las excepciones cuando se definen los CRS
+ * 
+ * @author Miguel Garc�a Jim�nez (garciajimenez.miguel@gmail.com)
+ *
+ */
+public class CrsException extends Exception {
+	/**
+	 * 
+	 */
+	private static final long serialVersionUID = 1L;
+
+	public CrsException(Exception e) {
+		super(e);
+	}
+}

Property changes on: tags/Root_F2/libraries/libJCRS/src/org/gvsig/crs/CrsException.java
___________________________________________________________________
Added: svn:keywords
   + Author Date Id Revision
Added: svn:eol-style
   + native

Index: tags/Root_F2/libraries/libJCRS/src/org/gvsig/crs/ogr/OGRSpatialReference.java
===================================================================
--- tags/Root_F2/libraries/libJCRS/src/org/gvsig/crs/ogr/OGRSpatialReference.java	(revision 0)
+++ tags/Root_F2/libraries/libJCRS/src/org/gvsig/crs/ogr/OGRSpatialReference.java	(revision 10155)
@@ -0,0 +1,66 @@
+/* gvSIG. Sistema de Informaci�n Geogr�fica de la Generalitat Valenciana
+ *
+ * Copyright (C) 2006 Instituto de Desarrollo Regional and Generalitat Valenciana.
+ *
+ * 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., 59 Temple Place - Suite 330, Boston, MA  02111-1307,USA.
+ *
+ * For more information, contact:
+ *
+ *  Generalitat Valenciana
+ *   Conselleria d'Infraestructures i Transport
+ *   Av. Blasco Ib��ez, 50
+ *   46010 VALENCIA
+ *   SPAIN
+ *
+ *      +34 963862235
+ *   gvsig@gva.es
+ *      www.gvsig.gva.es
+ *
+ *    or
+ *
+ *   Instituto de Desarrollo Regional (Universidad de Castilla La-Mancha)
+ *   Campus Universitario s/n
+ *   02071 Alabacete
+ *   Spain
+ *
+ *   +34 967 599 200
+ */
+
+package org.gvsig.crs.ogr;
+
+/**
+ * 
+ * @author Diego Guerrero Sevilla (diego.guerrero@uclm.es)
+ *
+ */
+public class OGRSpatialReference extends JNIBase{
+	
+	public OGRSpatialReference()
+	{
+		try
+		{
+			createOGRSpatialReference();
+		}
+		catch(crsgdalException exp)
+		{
+			System.out.println(exp.getStrError());
+		}
+	}
+	public void finalice() throws crsgdalException
+	{
+		deleteOGRSpatialReference();
+	}
+
+}

Property changes on: tags/Root_F2/libraries/libJCRS/src/org/gvsig/crs/ogr/OGRSpatialReference.java
___________________________________________________________________
Added: svn:keywords
   + Author Date Id Revision
Added: svn:eol-style
   + native

Index: tags/Root_F2/libraries/libJCRS/src/org/gvsig/crs/ogr/Epsg2wkt.java
===================================================================
--- tags/Root_F2/libraries/libJCRS/src/org/gvsig/crs/ogr/Epsg2wkt.java	(revision 0)
+++ tags/Root_F2/libraries/libJCRS/src/org/gvsig/crs/ogr/Epsg2wkt.java	(revision 10155)
@@ -0,0 +1,197 @@
+/* gvSIG. Sistema de Informaci�n Geogr�fica de la Generalitat Valenciana
+ *
+ * Copyright (C) 2006 Instituto de Desarrollo Regional and Generalitat Valenciana.
+ *
+ * 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., 59 Temple Place - Suite 330, Boston, MA  02111-1307,USA.
+ *
+ * For more information, contact:
+ *
+ *  Generalitat Valenciana
+ *   Conselleria d'Infraestructures i Transport
+ *   Av. Blasco Ib��ez, 50
+ *   46010 VALENCIA
+ *   SPAIN
+ *
+ *      +34 963862235
+ *   gvsig@gva.es
+ *      www.gvsig.gva.es
+ *
+ *    or
+ *
+ *   Instituto de Desarrollo Regional (Universidad de Castilla La-Mancha)
+ *   Campus Universitario s/n
+ *   02071 Alabacete
+ *   Spain
+ *
+ *   +34 967 599 200
+ */
+
+package org.gvsig.crs.ogr;
+
+import java.util.ArrayList;
+
+/**
+ * Clase que genera de un CRS escogido del repositorio de EPSG su cadena
+ * en wkt correctamente para la creaci�n del CRS conforme a los par�metros
+ * aceptados en la librer�a proj4 (en cuanto a formato)
+ * 
+ * @author Jos� Luis G�mez Mart�nez (jolugomar@gmail.com)
+ */
+public class Epsg2wkt {
+	
+	String cadWKT= "";	
+	
+	/*
+	 * definimos 2 arrays para el cambio de proyecciones y de parametros de la epsg a 
+	 * proyecciones y par�metros entendibles por gdal, de manera que el elemento i 
+	 * de cada uno de ellos coincide con el cambio correcto de epsg a gdal.
+	 */
+	String[] paramsEPSG = {"Angle from Rectified to Skew Grid", "Azimuth of initial line", 
+			"Easting at false origin", "Easting at projection centre", "False easting", 
+			"False northing", "Latitude of false origin", "Latitude of 1st standard parallel",
+			"Latitude of natural origin", "Latitude of origin", "Latitude of projection centre",
+			"Latitude of 2nd standard parallel", "Longitude of false origin",
+			"Longitude of natural origin", "Longitude of origin", "Longitude of projection centre",
+			"Northing at false origin", "Northing at projection centre",
+			"Scale factor at natural origin", "Scale factor on initial line",};
+	
+	String[] paramsWkt = {"rectified_grid_angle", "azimuth", "false_easting", "false_easting",
+			"false_easting", "false_northing", "latitude_of_origin", "standard_parallel_1",
+			"latitude_of_origin", "latitude_of_origin", "latitude_of_center", "standard_parallel_2",
+			"central_meridian", "central_meridian", "central_meridian", "longitude_of_center",
+			"false_northing", "false_northing", "scale_factor", "scale_factor",};
+
+	String[] projectionsEPSG = {"Lambert Conic Conformal (1SP)","Lambert Conic Conformal (2SP)",
+			"Lambert Conic Conformal (2SP) Belgium", "American Polyconic", "Krovak Oblique Conic Conformal", 
+			"Albers Equal Area"};
+	
+	String[] projectionsWkt = {"Lambert Conformal Conic 1SP","Lambert Conformal Conic 2SP",
+			"Lambert Conformal Conic 2SP Belgium", "Polyconic", "Krovak", "Albers Conic Equal Area"};
+			
+	
+	/**
+	 * Constructor para un CRS horizontal y proyectado 
+	 */
+	public Epsg2wkt(GetCRSepsg epsg, String kind) {
+		
+		if (kind.equals("proj")){
+			String[] spheroid = epsg.getSPHEROID();
+			String[] primem = epsg.getPRIMEM();
+			String[] param_name = epsg.getParam_name();
+			String[] param_value = epsg.getParam_value();
+			String[] authority = epsg.getAUTHORITY();
+			
+			cadWKT = "PROJCS[\""+ epsg.getPROJCS()+"\", GEOGCS[\"" + epsg.getGEOGCS() + "\", DATUM[\""+ epsg.getDATUM() +
+					"\", SPHEROID[\""+ spheroid[0] + "\", "+ spheroid[1] + ", "+ spheroid[2] +"]], " +
+					"PRIMEM[\""+ primem[0] + "\", "+ primem[1] +"], UNIT[\""+ epsg.getUNIT_A() + "\", " + (Math.PI/180) +
+					"]], PROJECTION[\""+ getNameProjectionWkt(epsg.getPROJECTION()) + "\"], ";
+						
+			/*
+			 * falta la parte de los par�metros... metodo para nombres...
+			 */
+			for (int i= 0; i< param_name.length;i++){
+				param_name[i] = getParametersWkt(param_name[i]);
+				cadWKT += "PARAMETER[\""+param_name[i]+"\", " + param_value[i]+ "], ";
+			}
+			
+			cadWKT += "UNIT[\""+ epsg.getUNIT_B() + "\", 1.0], ";
+			cadWKT += "AUTHORITY[\""+ authority[0] + "\", " + authority[1] + "]]";
+		}
+		else if (kind.equals("geog")) {
+			String[] spheroid = epsg.getSPHEROID();
+			String[] primem = epsg.getPRIMEM();
+			String[] authority = epsg.getAUTHORITY();
+			cadWKT = "GEOGCS[\"" + epsg.getGEOGCS() + "\", DATUM[\""+ epsg.getDATUM() +
+					"\", SPHEROID[\""+ spheroid[0] + "\", "+ spheroid[1] + ", "+ spheroid[2] +"]], " +
+					"PRIMEM[\""+ primem[0] + "\", "+ primem[1] +"], UNIT[\""+ epsg.getUNIT_A() + "\", " + (Math.PI/180) +
+			"], ";
+			cadWKT += "AUTHORITY[\""+ authority[0] + "\", " + authority[1] + "]]";
+		}
+		
+		else if (kind.equals("geoc")){
+			String[] spheroid = epsg.getSPHEROID();
+			String[] primem = epsg.getPRIMEM();
+			cadWKT = "GEOCCS[\"" + epsg.getGEOGCS() + "\", DATUM[\""+ epsg.getDATUM() +
+					"\", SPHEROID[\""+ spheroid[0] + "\", "+ spheroid[1] + ", "+ spheroid[2] +"]], " +
+					"PRIMEM[\""+ primem[0] + "\", "+ primem[1] +"], UNIT[\""+ epsg.getUNIT_A() + "\", " + (Math.PI/180) +
+			"]]";
+			/*
+			 * parte necesaria cuando tratemos CRS geocentricos
+			 */
+		}
+		
+		else if (kind.equals("comp")){
+			/*
+			 * parte necesaria cuando tratemos CRS compuestos (Hablar con David)
+			 */
+		}	
+	}
+	
+	/*
+	 * Contructor para un CRS local (por ahora no se contempla)
+	 */
+	public Epsg2wkt(String localcs, String local_datum,  String unit, ArrayList axis) {
+		cadWKT = "LOCAL_CS[" + localcs + ", LOCAL_DATUM["+ local_datum +
+		"], UNIT["+ unit +"]";	
+		
+		for (int i =0; i< axis.size(); i++){
+			cadWKT += ", AXIS[" + axis.get(i) + "]";
+		}
+		
+		cadWKT += "]";		
+	}
+	
+	public String getWKT(){
+		return cadWKT;
+	}
+	
+	/**
+	 * Consigue la proyecci�n en el formato correcto para que sea legible
+	 * por la librer�a proj4. Acepta la proyecci�n del CRS seleccionado y
+	 * devuelve la misma proyecci�n escrita de manera correcta.
+	 * @param projection
+	 * @return
+	 */	
+	private String getNameProjectionWkt(String projection) {
+		String proj = null;
+		/*
+		 * hacer el cambio de nombre de proyeccion correcta
+		 */
+		for (int i = 0; i< projectionsEPSG.length; i++){
+			if (projectionsEPSG[i].equals(projection)){
+				projection = projectionsWkt[i];
+			}
+		}		
+		proj = projection.replaceAll(" ", "_");		
+		return proj;
+	}
+	
+	/**
+	 * Acepta el par�metro actual, realiza el cambio necesario para que
+	 * sea legible por la proj4, y lo devuelve para insertarlo en la
+	 * cadena wkt
+	 * 
+	 * @param param
+	 * @return
+	 */
+	private String getParametersWkt(String param){
+		for (int j=0; j< paramsEPSG.length; j++){
+			if (param.equals(paramsEPSG[j])){
+				param = paramsWkt[j];
+			}
+		}		
+		return param.replaceAll(" ", "_");		
+	}	
+}

Property changes on: tags/Root_F2/libraries/libJCRS/src/org/gvsig/crs/ogr/Epsg2wkt.java
___________________________________________________________________
Added: svn:keywords
   + Author Date Id Revision
Added: svn:eol-style
   + native

Index: tags/Root_F2/libraries/libJCRS/src/org/gvsig/crs/ogr/GetCRSepsg.java
===================================================================
--- tags/Root_F2/libraries/libJCRS/src/org/gvsig/crs/ogr/GetCRSepsg.java	(revision 0)
+++ tags/Root_F2/libraries/libJCRS/src/org/gvsig/crs/ogr/GetCRSepsg.java	(revision 10155)
@@ -0,0 +1,517 @@
+/* gvSIG. Sistema de Informaci�n Geogr�fica de la Generalitat Valenciana
+ *
+ * Copyright (C) 2006 Instituto de Desarrollo Regional and Generalitat Valenciana.
+ *
+ * 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., 59 Temple Place - Suite 330, Boston, MA  02111-1307,USA.
+ *
+ * For more information, contact:
+ *
+ *  Generalitat Valenciana
+ *   Conselleria d'Infraestructures i Transport
+ *   Av. Blasco Ib��ez, 50
+ *   46010 VALENCIA
+ *   SPAIN
+ *
+ *      +34 963862235
+ *   gvsig@gva.es
+ *      www.gvsig.gva.es
+ *
+ *    or
+ *
+ *   Instituto de Desarrollo Regional (Universidad de Castilla La-Mancha)
+ *   Campus Universitario s/n
+ *   02071 Alabacete
+ *   Spain
+ *
+ *   +34 967 599 200
+ */
+
+package org.gvsig.crs.ogr;
+
+import java.sql.ResultSet;
+import java.sql.SQLException;
+
+import org.gvsig.crs.EpsgConnection;
+import org.gvsig.crs.Query;
+
+/**
+ * Clase que consigue los par�metros necesarios de la base de
+ * datos de la EPSG una vez escogido un CRS, y que ser�n
+ * los que se utilicen para la generaci�n de la cadena wkt
+ * correcta para generar el CRS.
+ * 
+ * @author Jos� Luis G�mez Mart�nez (jolugomar@gmail.com)
+ *
+ */
+public class GetCRSepsg {
+	
+	int epsg_code;
+	boolean crs_source;
+	int source_code;
+	int projection_code;	
+	int coord_op_code;	
+	
+		
+	int datum_code;
+	int ellipsoid_code, prime_meridian_code;
+	
+	String PROJCS = null;
+	String GEOGCS = null;
+	String DATUM = null;
+	String[] SPHEROID = null;
+	String[] PRIMEM = null;
+	String UNIT_A = "Decimal Degree";
+	String UNIT_B = "Meter";
+	String PROJECTION = null;
+	//ArrayList PARAMETER = null;
+	String[] param_name = null;
+	String[] param_value = null;
+	String[] AUTHORITY = null;
+	EpsgConnection connect;
+	
+	public GetCRSepsg(){		
+	}	
+	
+	public GetCRSepsg(int code, boolean source_yn, int source_cod, int coord_op_cod, EpsgConnection conn){
+		epsg_code = code;
+		crs_source = source_yn;
+		source_code = source_cod;		
+		coord_op_code = coord_op_cod;
+		connect = conn;
+		SPHEROID = new String[3];
+		PRIMEM = new String[2];
+		AUTHORITY = new String[2];
+	}
+	
+	public void Getepsgdata(){
+		ResultSet result;
+		ResultSet result2;
+		/*
+		 * Si es base solamente realizamos una consulta, y ya tenemos el Datum
+		 * (ver en caso de ser fuente que PROJCS no tiene que estar definido)
+		 */
+		if (crs_source){
+			String sentence = "SELECT coord_ref_sys_name, datum_code " +
+							  "FROM epsg_coordinatereferencesystem " +	                              
+							  "WHERE coord_ref_sys_code = " + epsg_code;
+			result = Query.select(sentence,connect.getConnection());
+			try {
+				while (result.next()){
+					GEOGCS = result.getString("coord_ref_sys_name");
+					datum_code = Integer.parseInt(result.getString("datum_code"));					
+				}
+			} catch (SQLException e) {
+				e.printStackTrace();
+			}			
+		}
+		else{
+			String sentence = "SELECT coord_ref_sys_name " +
+							  "FROM epsg_coordinatereferencesystem " +	                              
+							  "WHERE coord_ref_sys_code = " + epsg_code;
+			result = Query.select(sentence,connect.getConnection());
+			
+			String sentence2 = "SELECT coord_ref_sys_name, datum_code " +
+							  "FROM epsg_coordinatereferencesystem " +	                              
+							  "WHERE coord_ref_sys_code = " + source_code;
+			result2 = Query.select(sentence2,connect.getConnection());
+			
+			try {
+				while (result.next()){
+					PROJCS = result.getString("coord_ref_sys_name");					
+				}
+				while (result2.next()){
+					datum_code = Integer.parseInt(result2.getString("datum_code"));
+					GEOGCS = result2.getString("coord_ref_sys_name");
+				}
+			} catch (SQLException e) {
+				e.printStackTrace();
+			}
+		}
+		/*
+		 * hasta aqui hemos rellenado projcs, geocs y tenemos el codigo de datum
+		 * vamos a obtener los c�digos del elipsoide y el prime_meridian
+		 */
+		String sentence = "SELECT datum_name, ellipsoid_code, prime_meridian_code " +
+						  "FROM epsg_datum " +	                              
+						  "WHERE datum_code = " + datum_code;
+		result = Query.select(sentence,connect.getConnection());
+		try {
+			while (result.next()){
+				DATUM = result.getString("datum_name");
+				ellipsoid_code = Integer.parseInt(result.getString("ellipsoid_code"));	
+				prime_meridian_code = Integer.parseInt(result.getString("prime_meridian_code"));
+			}			
+		} catch (SQLException e) {
+			e.printStackTrace();
+		}
+		
+		/*
+		 * Ahora vamos a coger varios campos del elipsoide y operaremos con ellos, si la
+		 * informaci�n de los mismos no esta en las unidades de medida que utilizaremos.
+		 */
+		sentence = "SELECT ellipsoid_name, semi_major_axis, inv_flattening, uom_code, " +
+					"semi_minor_axis, ellipsoid_shape " +
+					  "FROM epsg_ellipsoid " +	                              
+					  "WHERE ellipsoid_code = " + ellipsoid_code;
+		result = Query.select(sentence,connect.getConnection());
+		
+		SPHEROID = getEllipsoid(result);
+		
+		sentence = "SELECT prime_meridian_name, greenwich_longitude, uom_code " +
+					  "FROM epsg_primemeridian " +	                              
+					  "WHERE prime_meridian_code = " + prime_meridian_code;
+		result = Query.select(sentence,connect.getConnection());
+		
+		PRIMEM = getPrimeMeridian(result);
+		AUTHORITY = getAuthority(epsg_code);
+		/*
+		 * si tiene proyecci�n porque es proyectado, la buscamos
+		 */
+		if (!crs_source){			
+			sentence = "SELECT coord_op_method_code " +
+						"FROM epsg_coordoperation " +
+						"WHERE coord_op_code = " + coord_op_code;
+			result = Query.select(sentence,connect.getConnection());
+			try {
+				while (result.next()){
+					projection_code = result.getInt("coord_op_method_code");
+				}
+			} catch (SQLException e) {
+				e.printStackTrace();
+			}
+			
+			
+			sentence = "SELECT coord_op_method_name " +
+						  "FROM epsg_coordoperationmethod " +	                              
+						  "WHERE coord_op_method_code = " + projection_code;
+			result = Query.select(sentence,connect.getConnection());
+			try {
+				while (result.next()){
+					PROJECTION = result.getString("coord_op_method_name");				
+				}			
+			} catch (SQLException e) {
+				e.printStackTrace();
+			}
+			
+			parameters(projection_code);
+		}
+		/*
+		 * Una vez que tengo todo, hago la llamada al constructor de Epsg2wkt para pasarle los
+		 * parametros y realizar la cadena
+		 * CAMBIARLO Y PONER METODOS getXXX para todos los parametros para hacerlo mas generico
+		 	
+		if (crs_source){
+			cadwkt = new Epsg2wkt(0);
+		}
+		else{
+			cadwkt = new Epsg2wkt();
+		}
+		*/
+	}
+	
+	/**
+	 * Cuando recuperamos el elipsoide del CRS que hemos seleccionado,
+	 * buscamos sus par�metros, los pasamos a las unidades correctas
+	 * y devolvemos un array de string con el nombre y los valores
+	 * del esferoide.
+	 * @param result
+	 * @return
+	 */
+	private String[] getEllipsoid(ResultSet result) {
+		String[] spheroid = new String[3];		
+		double semi_major_axis = 0;
+		double semi_minor_axis = 0;
+		double inv_flattening = 0;
+		int uom_code = 0;
+		int ellipsoid_shape = 0;
+		
+		try {
+			while (result.next()){
+				spheroid[0] = result.getString("ellipsoid_name");
+				semi_major_axis = result.getDouble("semi_major_axis");
+				semi_minor_axis = result.getDouble("semi_minor_axis");
+				inv_flattening = result.getDouble("inv_flattening");
+				uom_code = result.getInt("uom_code");
+				ellipsoid_shape = result.getInt("ellipsoid_shape");
+			}			
+		} catch (SQLException e) {
+			e.printStackTrace();
+		}
+		
+		/*
+		 * pasaremos a metros las unidades del semi_major_axis, semi_minor_axis
+		 */
+		String sentence = "SELECT factor_b, factor_c " +
+						  "FROM epsg_unitofmeasure " +	                              
+						  "WHERE uom_code = " + uom_code;
+		ResultSet result2 = Query.select(sentence,connect.getConnection());
+		
+		double factor_b = 0;
+		double factor_c = 0;
+		try{			
+			while (result2.next()){
+				factor_b = result2.getDouble("factor_b");
+				factor_c = result2.getDouble("factor_c");				
+			}
+		} catch (SQLException e) {
+			e.printStackTrace();
+		}
+		if (factor_b != 0 && factor_c != 0 ){
+			semi_major_axis = (semi_major_axis * factor_b)/ factor_c;
+			if (semi_minor_axis != 0){
+				semi_minor_axis = (semi_minor_axis * factor_b) / factor_c;
+			}
+		}
+		/*
+		 * calculamos inv_flattening en caso de que sea nulo
+		 */
+		if (inv_flattening == 0){
+			if (ellipsoid_shape == 0){
+				inv_flattening = 0;
+			}
+			else{
+				inv_flattening = (semi_major_axis) / (semi_major_axis - semi_minor_axis);
+			}
+		}		
+		spheroid[1] = ""+semi_major_axis;
+		spheroid[2] = ""+inv_flattening;
+		
+		return spheroid;
+	}
+
+	/**
+	 * Este m�todo acepta un result en el que tenemos los par�metros
+	 * del PrimeMeridian, se hace la conversi�n a las unidades correctas
+	 * y se devuelve un array de String con el nombre y los par�metros 
+	 * pertenecientes a PrimeMeridian.
+	 * @param result
+	 * @return
+	 */
+	private String[] getPrimeMeridian(ResultSet result) {
+		String[] primem = new String[2];
+		double greenwich_longitude = 0;
+		
+		try {
+			while (result.next()){
+				primem[0] = result.getString("prime_meridian_name");
+				greenwich_longitude = result.getDouble("greenwich_longitude");
+				int co= Integer.parseInt((String)result.getString("uom_code"));
+				/*
+				 * Realizamos este cambio de meridiano origen de la unidad de la epsg
+				 * a degrees, para insertarlo en este formato en wkt
+				 */
+				ResultSet result2 = null;
+				if (co != 9110){
+					String sentence = "SELECT factor_b, factor_c " +
+					  "FROM epsg_unitofmeasure " +	                              
+					  "WHERE uom_code = " + co;
+					result2 = Query.select(sentence,connect.getConnection());
+					
+					while(result.next()){						
+						greenwich_longitude = ((greenwich_longitude * result2.getDouble("factor_b") )/ result2.getDouble("factor_c")) * (180.0 / Math.PI);
+					}					
+				}
+			}
+		} catch (SQLException e) {
+			e.printStackTrace();
+		}
+		
+		primem[1] = ""+greenwich_longitude;
+		return primem;
+	}
+	
+	/**
+	 * M�todo para bucar los par�metros de la proyecci�n que
+	 * se est� utilizando. Se rellenan las variables param_name y
+	 * param_value con los datos de la proyecci�n utilizada.
+	 * @param proj
+	 */
+	private void parameters(int proj) {
+		/*
+		 * para la consecucion de los parametros se tiene que ir buscando dependiendo de la
+		 * proyeccion que se utilice, hay que ver que parametros exactos tiene cada uno de ellos
+		 * y si hay mas de 17, que son los que se utilizan en WKT, como vamos a tratarlos, mensaje
+		 * de error, intentar no mostrarlos, o simplemente pasar de ellos
+		 */		
+					
+		ResultSet result;
+		ResultSet result2;
+		ResultSet result3;
+		
+		/*
+		 * Conseguimos la lista de parametros y valores, ordenados segun sort_order de manera
+		 * ascendente por lo que coincidiram siempre param_name[i] y param_value[i]
+		 */
+		String sentence = "SELECT COUNT(*) " +
+				"FROM epsg_coordoperationparamusage " +
+				"WHERE coord_op_method_code = " + proj;
+		result = Query.select(sentence,connect.getConnection());
+		
+		int count = 0;
+		try {
+			result.next();
+			count = result.getInt(1);
+		} catch (SQLException e1) {
+			e1.printStackTrace();
+		}		
+		param_name = new String[count];
+		param_value = new String[count];
+		
+		sentence = "SELECT parameter_code " +
+		"FROM epsg_coordoperationparamusage " +
+		"WHERE coord_op_method_code = " + proj + " " +
+				"ORDER BY sort_order ASC";
+		result = Query.select(sentence,connect.getConnection());
+		
+		int i = 0;
+		try {
+			while (result.next()) {
+				
+				int cod = result.getInt("parameter_code");
+				/*
+				 * con el codigo del parametro, obtenemos tanto su nombre como su valor
+				 */
+				sentence = "SELECT parameter_name " +
+						"FROM epsg_coordoperationparam " +
+						"WHERE parameter_code = " + cod;
+				result2 = Query.select(sentence,connect.getConnection());
+				
+				result2.next();
+				param_name[i] = result2.getString("parameter_name");
+				
+				sentence = "SELECT parameter_value, uom_code " +
+						"FROM epsg_coordoperationparamvalue " +
+						"WHERE parameter_code = " + cod + " AND coord_op_code = " + coord_op_code;
+				result3 = Query.select(sentence,connect.getConnection());
+				
+				result3.next();
+				double param_val = result3.getDouble("parameter_value");
+				int uom_code = result3.getInt("uom_code");
+				
+				sentence = "SELECT factor_b, factor_c, unit_of_meas_type " +
+						  "FROM epsg_unitofmeasure " +	                              
+						  "WHERE uom_code = " + uom_code;
+				ResultSet result4 = Query.select(sentence,connect.getConnection());
+				
+				double factor_b = 0;
+				double factor_c = 0;				
+				result4.next();
+				String type = result4.getString("unit_of_meas_type");
+				factor_b = result4.getDouble("factor_b");
+				factor_c = result4.getDouble("factor_c");				
+								
+				if (factor_b != 0 && factor_c != 0 && !type.equals("angle")){
+					param_val = (param_val * factor_b) / factor_c;
+				}
+				else if(factor_b != 0 && factor_c != 0 && type.equals("angle")){
+					param_val = ((param_val * factor_b) / factor_c) * (180.0 / Math.PI);;
+				}else if (uom_code == 9110){
+					param_val = especialDegree(param_val);
+					param_val = Math.toDegrees(param_val);
+				}else {
+					System.out.println("C�digo de medida no v�lido...");					
+				}				
+				param_value[i] = ""+param_val;
+				
+				i++;
+			}
+		} catch (SQLException e) {
+			e.printStackTrace();
+		}
+			
+	}	
+	
+	/**
+	 * M�todo para pasar a las unidades correctas el valor de los distintos
+	 * par�metros de la proyecci�n.
+	 * @param val
+	 * @return
+	 */
+	private double especialDegree(double val){
+		int signo = 1;
+		double grad, min;
+		double sec;
+		
+		if (val < 0){
+			signo = -1;
+			val = Math.abs(val);
+		}		
+		
+		grad = Math.floor(val);
+		val=(val-grad)*100.0;
+		min=Math.floor(val);
+		sec=(val-min)*100.0;
+		
+		val = ((grad + (min/60.0) + (sec/3600.0)) * (Math.PI/180.0)) * signo;
+		
+		return val;
+	}	
+	
+	/**
+	 * Genera el authority del CRS
+	 * @param epsg_cod
+	 * @return
+	 */	
+	private String[] getAuthority(int epsg_cod) {
+		String[] aut = new String[2];
+		aut[0] = "EPSG";
+		aut[1] = ""+epsg_cod;
+		return aut;
+	}
+	
+	public String getPROJCS(){
+		return PROJCS;
+	}
+	
+	public String getGEOGCS(){
+		return GEOGCS;
+	}
+	
+	public String getDATUM(){
+		return DATUM;
+	}
+	
+	public String[] getSPHEROID(){
+		return SPHEROID;
+	}
+	
+	public String[] getPRIMEM(){
+		return PRIMEM;
+	}
+	
+	public String getUNIT_A(){
+		return UNIT_A;
+	}
+	
+	public String getPROJECTION(){
+		return PROJECTION;
+	}
+	
+	public String[] getParam_name(){
+		return param_name;
+	}
+	
+	public String[] getParam_value(){
+		return param_value;
+	}
+	
+	public String getUNIT_B(){
+		return UNIT_B;
+	}	
+	
+	public String[] getAUTHORITY(){
+		return AUTHORITY;
+	}
+}
\ No newline at end of file

Property changes on: tags/Root_F2/libraries/libJCRS/src/org/gvsig/crs/ogr/GetCRSepsg.java
___________________________________________________________________
Added: svn:eol-style
   + native
Added: svn:keywords
   + Author Date Id Revision

Index: tags/Root_F2/libraries/libJCRS/src/org/gvsig/crs/ogr/GetTransepsg.java
===================================================================
--- tags/Root_F2/libraries/libJCRS/src/org/gvsig/crs/ogr/GetTransepsg.java	(revision 0)
+++ tags/Root_F2/libraries/libJCRS/src/org/gvsig/crs/ogr/GetTransepsg.java	(revision 10155)
@@ -0,0 +1,195 @@
+/* gvSIG. Sistema de Informaci�n Geogr�fica de la Generalitat Valenciana
+ *
+ * Copyright (C) 2006 Instituto de Desarrollo Regional and Generalitat Valenciana.
+ *
+ * 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., 59 Temple Place - Suite 330, Boston, MA  02111-1307,USA.
+ *
+ * For more information, contact:
+ *
+ *  Generalitat Valenciana
+ *   Conselleria d'Infraestructures i Transport
+ *   Av. Blasco Ib��ez, 50
+ *   46010 VALENCIA
+ *   SPAIN
+ *
+ *      +34 963862235
+ *   gvsig@gva.es
+ *      www.gvsig.gva.es
+ *
+ *    or
+ *
+ *   Instituto de Desarrollo Regional (Universidad de Castilla La-Mancha)
+ *   Campus Universitario s/n
+ *   02071 Alabacete
+ *   Spain
+ *
+ *   +34 967 599 200
+ */
+
+package org.gvsig.crs.ogr;
+
+import java.sql.ResultSet;
+import java.sql.SQLException;
+
+import org.gvsig.crs.EpsgConnection;
+import org.gvsig.crs.Query;
+
+import com.iver.cit.gvsig.gui.panels.ProjChooserPanel;
+
+/**
+ * Clase para conseguir la informaci�n de la transformaci�n elegida
+ * de la EPSG
+ * 
+ * @author Jos� Luis G�mez Mart�nez (jolugomar@gmail.com)
+ *
+ */
+
+public class GetTransepsg {
+	int parameter_code = 0;
+	int coord_op_method_code = 0;
+	boolean inverseTransformation = false;
+	
+	public EpsgConnection connect;
+	
+	double[] param_value_double = {0,0,0,0,0,0,0};
+	String[] param_value = {"0","0","0","0","0","0","0"};
+	String[] param_name = {"0","0","0","0","0","0","0"};
+
+	/**
+	 * Acepta el c�digo de la transformaci�n a utilizar, y se
+	 * recupera la informaci�n necesaria para la generaci�n del CRS
+	 * @param coord_op_code
+	 * @param conn
+	 * @param invTr
+	 */
+	public GetTransepsg(int coord_op_code, EpsgConnection conn, boolean invTr){
+		inverseTransformation = invTr;
+		ResultSet result;
+		connect = conn;
+		int uom_code = 0;				
+		String sentence = "SELECT coord_op_method_code, parameter_code, parameter_value, uom_code " +
+				"FROM epsg_coordoperationparamvalue " +
+				"WHERE coord_op_code = " + coord_op_code;
+		result = Query.select(sentence,connect.getConnection());
+		int i = 0;
+		try {
+			while (result.next()){
+				coord_op_method_code = result.getInt("coord_op_method_code");
+				parameter_code = result.getInt("parameter_code");
+				
+				double param_val = result.getDouble("parameter_value");				
+								
+				sentence = "SELECT parameter_name " +
+							"FROM epsg_coordoperationparam " +
+							"WHERE parameter_code = " + parameter_code;
+				ResultSet result2 = Query.select(sentence,connect.getConnection());
+		
+				result2.next();
+				param_name[i] = result2.getString("parameter_name");
+				uom_code = result.getInt("uom_code");
+				if (uom_code != 0){
+					sentence = "SELECT factor_b, factor_c, unit_of_meas_type " +
+					  "FROM epsg_unitofmeasure " +	                              
+					  "WHERE uom_code = " + uom_code;
+					ResultSet result3 = Query.select(sentence,connect.getConnection());
+					
+					double factor_b = 0;
+					double factor_c = 0;				
+					result3.next();
+					String type = result3.getString("unit_of_meas_type");
+					factor_b = result3.getDouble("factor_b");
+					factor_c = result3.getDouble("factor_c");				
+					
+					if (uom_code == 9202){}
+					else {
+						if (factor_b != 0 && factor_c != 0 && !type.equals("angle")){						
+							param_val = (param_val * factor_b) / factor_c;
+							if (type.equals("scale")) 
+								param_val = (param_val -1) * 1000000;						
+						}
+						else if(factor_b != 0 && factor_c != 0 && type.equals("angle")){
+							param_val = ((param_val * factor_b) / factor_c) * (180.0 / Math.PI);
+							param_val = param_val * 3600;
+						}else if (uom_code == 9110){
+							param_val = especialDegree(param_val);
+							param_val = Math.toDegrees(param_val);
+							param_val = param_val * 3600;
+						}else {
+							System.out.println("C�digo de medida no v�lido...");					
+						}
+					}
+					param_value_double[i] = param_val;
+					i++;
+				}
+			}
+			
+			if (inverseTransformation) {
+				for (int j = 0; j < param_value_double.length; j++){
+					param_value_double[j] = param_value_double[j] * -1.0;
+				}
+			}
+			
+		} catch (SQLException e) {
+			e.printStackTrace();
+		}
+		for (int k = 0; k < param_value_double.length; k++){
+			param_value[k] = ""+ String.valueOf(param_value_double[k]);
+		}
+	}
+	
+	/**
+	 * M�todo para pasar a las unidades correctas el valor de los distintos
+	 * par�metros de la proyecci�n.
+	 * @param val
+	 * @return
+	 */
+	private double especialDegree(double val){
+		int signo = 1;
+		double grad, min;
+		double sec;
+		
+		if (val < 0){
+			signo = -1;
+			val = Math.abs(val);
+		}		
+		
+		grad = Math.floor(val);
+		val=(val-grad)*100.0;
+		min=Math.floor(val);
+		sec=(val-min)*100.0;
+		
+		val = ((grad + (min/60.0) + (sec/3600.0)) * (Math.PI/180.0)) * signo;
+		
+		return val;
+	}
+	
+	private float round(double f,int i)
+	{
+		double d=Math.pow(10.0,(double) i);
+		double aux=f*d;
+		int auxi=(int) aux;
+		float df=auxi/((float) d);
+		return df;
+	}
+	
+	public String[] getParamName(){
+		return param_name;
+	}
+	
+	public String[] getParamValue(){
+		return param_value;
+	}
+
+}

Property changes on: tags/Root_F2/libraries/libJCRS/src/org/gvsig/crs/ogr/GetTransepsg.java
___________________________________________________________________
Added: svn:keywords
   + Author Date Id Revision
Added: svn:eol-style
   + native

Index: tags/Root_F2/libraries/libJCRS/src/org/gvsig/crs/ogr/Iau2wkt.java
===================================================================
--- tags/Root_F2/libraries/libJCRS/src/org/gvsig/crs/ogr/Iau2wkt.java	(revision 0)
+++ tags/Root_F2/libraries/libJCRS/src/org/gvsig/crs/ogr/Iau2wkt.java	(revision 10155)
@@ -0,0 +1,149 @@
+/* gvSIG. Sistema de Informaci�n Geogr�fica de la Generalitat Valenciana
+ *
+ * Copyright (C) 2006 Instituto de Desarrollo Regional and Generalitat Valenciana.
+ *
+ * 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., 59 Temple Place - Suite 330, Boston, MA  02111-1307,USA.
+ *
+ * For more information, contact:
+ *
+ *  Generalitat Valenciana
+ *   Conselleria d'Infraestructures i Transport
+ *   Av. Blasco Ib��ez, 50
+ *   46010 VALENCIA
+ *   SPAIN
+ *
+ *      +34 963862235
+ *   gvsig@gva.es
+ *      www.gvsig.gva.es
+ *
+ *    or
+ *
+ *   Instituto de Desarrollo Regional (Universidad de Castilla La-Mancha)
+ *   Campus Universitario s/n
+ *   02071 Alabacete
+ *   Spain
+ *
+ *   +34 967 599 200
+ */
+
+package org.gvsig.crs.ogr;
+
+import org.gvsig.crs.CrsWkt;
+
+/**
+ * Aunque iau2000 posee la cadena wkt, tendremos que volver a generarla con los
+ * par�metros v�lidos para que no falle con gdal. Lo que haremos ser� recuperar
+ * todos los campos, buscar la proyecci�n correcta y volver a generar una
+ * cadena wkt entendible por gdal
+ * @author Jos� Luis G�mez Mart�nez
+ *
+ */
+
+public class Iau2wkt {
+
+	String[] projectionsIAU = {"Albers"};
+	String[] projectionsGDAL = {"Albers_Conic_Equal_Area"};
+	CrsWkt datos = null;
+	String cadWKT = "";
+	String[] param_name = null;
+	String[] param_value = null;
+	
+	public Iau2wkt(String wkt) {	
+		datos = new CrsWkt(wkt);		
+		param_name = datos.getParam_name();
+		param_value = datos.getParam_value();
+	}
+	
+	/**
+	 * Formacion de la cadena wkt con los nombres correctos de las proyecciones
+	 * de iau2000 para la libreria proj4.
+	 * @return
+	 */
+	public String getWkt(){
+		String proj = getNameProjectionWkt(datos.getProjection());
+				
+		cadWKT = "PROJCS[\""+ datos.getProjcs()+"\", GEOGCS[\"" + datos.getGeogcs() + "\", DATUM[\""+ datos.getDatumName() +
+		"\", SPHEROID[\""+ datos.getSpheroid()[0] + "\", "+ datos.getSpheroid()[1] + ", "+ datos.getSpheroid()[2] +"]], " +
+		"PRIMEM[\""+ datos.getPrimen()[0] + "\", "+ datos.getPrimen()[1] +"], UNIT[\""+ datos.getUnit()[0] + "\", " + (Math.PI/180) +
+		"]], PROJECTION[\""+ proj + "\"], ";
+			
+		/*
+		 * falta la parte de los par�metros... metodo para nombres...
+		 */
+		for (int i= 0; i< param_name.length;i++){
+			if (proj.equals("Mercator_1SP")){
+				if (param_name[i].equals("Standard_Parallel_1"))
+					if (param_value[i].startsWith("-"))
+						cadWKT += "PARAMETER[\""+param_name[i]+"\", " + param_value[i].substring(1,param_value[i].length())+ "], ";
+					else
+						cadWKT += "PARAMETER[\""+param_name[i]+"\", " + param_value[i]+ "], ";
+				else if (param_name[i].equals("Standard_Parallel_2")){}					
+				else 
+					cadWKT += "PARAMETER[\""+param_name[i]+"\", " + param_value[i]+ "], ";
+				
+			}else
+				cadWKT += "PARAMETER[\""+param_name[i]+"\", " + param_value[i]+ "], ";
+		}
+		
+		cadWKT += "UNIT[\""+ datos.getUnit_p()[0] + "\", 1.0], ";
+		cadWKT += "AUTHORITY[\""+ datos.getAuthority()[0] + "\", " + datos.getAuthority()[1] + "]]";
+				
+		return cadWKT;
+	}
+	
+	/** 
+	 * Metodo auxiliar para el cambio del nombre de la proyeccion.
+	 */	
+	private String getNameProjectionWkt(String projection) {
+		String proj = null;
+		
+		for (int i = 0; i<projectionsIAU.length; i++){
+			if (projection.equals(projectionsIAU[i])) {
+				projection = projectionsGDAL[i];
+			}
+		}
+		
+		if (projection.equals("Lambert_Conformal_Conic")){
+			projection = "Lambert_Conformal_Conic_1SP";
+			String standardParallel1 = "";
+			String standardParallel2 = "";
+			for (int i = 0; i < param_name.length; i++) {
+				if (param_name[i].equals("Standard_Parallel_1")) {
+					standardParallel1 = param_value[i];
+				}
+				if (param_name[i].equals("Standard_Parallel_2")) {
+					standardParallel2 = param_value[i];
+					projection = "Lambert_Conformal_Conic_2SP";
+				}
+			}
+			if (standardParallel1.startsWith("-") && standardParallel2.equals(standardParallel1.substring(1, standardParallel1.length())))
+				projection = "Mercator_1SP";
+		}
+		
+		if (projection.equals("Mercator")){
+			projection = "Mercator_1SP";
+			for (int i = 0; i < param_name.length; i++) {
+				if (param_name[i].equals("Standard_Parallel_2")) {
+					projection = "Mercator_2SP";
+				}
+			}
+		}		
+		proj = projection.replaceAll(" ", "_");		
+		return proj;
+	}
+	
+	
+
+}

Property changes on: tags/Root_F2/libraries/libJCRS/src/org/gvsig/crs/ogr/Iau2wkt.java
___________________________________________________________________
Added: svn:keywords
   + Author Date Id Revision
Added: svn:eol-style
   + native

Index: tags/Root_F2/libraries/libJCRS/src/org/gvsig/crs/ogr/OGRException.java
===================================================================
--- tags/Root_F2/libraries/libJCRS/src/org/gvsig/crs/ogr/OGRException.java	(revision 0)
+++ tags/Root_F2/libraries/libJCRS/src/org/gvsig/crs/ogr/OGRException.java	(revision 10155)
@@ -0,0 +1,75 @@
+/* gvSIG. Sistema de Informaci�n Geogr�fica de la Generalitat Valenciana
+ *
+ * Copyright (C) 2006 Instituto de Desarrollo Regional and Generalitat Valenciana.
+ *
+ * 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., 59 Temple Place - Suite 330, Boston, MA  02111-1307,USA.
+ *
+ * For more information, contact:
+ *
+ *  Generalitat Valenciana
+ *   Conselleria d'Infraestructures i Transport
+ *   Av. Blasco Ib��ez, 50
+ *   46010 VALENCIA
+ *   SPAIN
+ *
+ *      +34 963862235
+ *   gvsig@gva.es
+ *      www.gvsig.gva.es
+ *
+ *    or
+ *
+ *   Instituto de Desarrollo Regional (Universidad de Castilla La-Mancha)
+ *   Campus Universitario s/n
+ *   02071 Alabacete
+ *   Spain
+ *
+ *   +34 967 599 200
+ */
+
+package org.gvsig.crs.ogr;
+
+/**
+ * Clase que gestionan las excepciones de gdal
+ * 
+ * @author Diego Guerrero Sevilla (diego.guerrero@uclm.es)
+ *
+ */
+
+public class OGRException extends Exception {
+
+	OGRException(String msg){
+		super(msg);
+	}
+	
+	public OGRException(int n, String msg, OGRSpatialReference ORGSpace) throws CrsOgrException, crsgdalException
+	{
+		if(n == 1)
+			System.out.println(msg+"Insuficientes parametros para construir el dato");
+		else if(n == 2)
+			System.out.println(msg+"Insuficiente memoria para construir el dato");
+		else if(n == 3)
+			System.out.println(msg+"Geometria no soportada");
+		else if(n == 4)
+			System.out.println(msg+"Operacion no soportada");
+		else if(n == 5)
+			System.out.println(msg+"Algun dato esta corrupto");
+		else if(n == 6)
+			System.out.println(msg+"Fallo");
+		else if(n == 7)
+			System.out.println(msg+"CRS no soportado");
+		throw new CrsOgrException(ORGSpace);
+		
+	}
+}
\ No newline at end of file

Property changes on: tags/Root_F2/libraries/libJCRS/src/org/gvsig/crs/ogr/OGRException.java
___________________________________________________________________
Added: svn:keywords
   + Author Date Id Revision
Added: svn:eol-style
   + native

Index: tags/Root_F2/libraries/libJCRS/src/org/gvsig/crs/ogr/Esri2wkt.java
===================================================================
--- tags/Root_F2/libraries/libJCRS/src/org/gvsig/crs/ogr/Esri2wkt.java	(revision 0)
+++ tags/Root_F2/libraries/libJCRS/src/org/gvsig/crs/ogr/Esri2wkt.java	(revision 10155)
@@ -0,0 +1,9 @@
+package org.gvsig.crs.ogr;
+
+public class Esri2wkt {
+
+	public Esri2wkt() {
+		super();
+		// TODO Auto-generated constructor stub
+	}
+}

Property changes on: tags/Root_F2/libraries/libJCRS/src/org/gvsig/crs/ogr/Esri2wkt.java
___________________________________________________________________
Added: svn:keywords
   + Author Date Id Revision
Added: svn:eol-style
   + native

Index: tags/Root_F2/libraries/libJCRS/src/org/gvsig/crs/ogr/JNIBase.java
===================================================================
--- tags/Root_F2/libraries/libJCRS/src/org/gvsig/crs/ogr/JNIBase.java	(revision 0)
+++ tags/Root_F2/libraries/libJCRS/src/org/gvsig/crs/ogr/JNIBase.java	(revision 10155)
@@ -0,0 +1,80 @@
+/* gvSIG. Sistema de Informaci�n Geogr�fica de la Generalitat Valenciana
+ *
+ * Copyright (C) 2006 Instituto de Desarrollo Regional and Generalitat Valenciana.
+ *
+ * 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., 59 Temple Place - Suite 330, Boston, MA  02111-1307,USA.
+ *
+ * For more information, contact:
+ *
+ *  Generalitat Valenciana
+ *   Conselleria d'Infraestructures i Transport
+ *   Av. Blasco Ib��ez, 50
+ *   46010 VALENCIA
+ *   SPAIN
+ *
+ *      +34 963862235
+ *   gvsig@gva.es
+ *      www.gvsig.gva.es
+ *
+ *    or
+ *
+ *   Instituto de Desarrollo Regional (Universidad de Castilla La-Mancha)
+ *   Campus Universitario s/n
+ *   02071 Alabacete
+ *   Spain
+ *
+ *   +34 967 599 200
+ */
+
+package org.gvsig.crs.ogr;
+
+/**
+ * 
+ * @author Miguel Garc�a Jim�nez (garciajimenez.miguel@gmail.com)
+ *
+ */
+public class JNIBase {
+	
+	
+	protected long cPtr;
+	
+	protected native long OGRSpatialReferenceNat() throws crsgdalException;
+	protected native void OGRDestroySpatialReferenceNat(long crs);
+	
+	protected long createOGRSpatialReference() throws crsgdalException
+	{
+		cPtr = OGRSpatialReferenceNat();
+		if(cPtr<=0) throw new crsgdalException();
+		return cPtr;
+	}
+	
+	protected void deleteOGRSpatialReference() throws crsgdalException
+	{	
+		if(cPtr>0) OGRDestroySpatialReferenceNat(cPtr); 
+	}
+	
+	protected long getPtr() throws crsgdalException {
+		if (cPtr>0)	return cPtr;
+		else throw new crsgdalException();
+	}
+	
+	static {
+		String os = System.getProperty("os.name");
+		if(os.toLowerCase().startsWith("windows"))
+			System.loadLibrary("jgdal060");
+		else
+			System.loadLibrary("jgdal");
+	}
+}

Property changes on: tags/Root_F2/libraries/libJCRS/src/org/gvsig/crs/ogr/JNIBase.java
___________________________________________________________________
Added: svn:keywords
   + Author Date Id Revision
Added: svn:eol-style
   + native

Index: tags/Root_F2/libraries/libJCRS/src/org/gvsig/crs/ogr/CrsOgrException.java
===================================================================
--- tags/Root_F2/libraries/libJCRS/src/org/gvsig/crs/ogr/CrsOgrException.java	(revision 0)
+++ tags/Root_F2/libraries/libJCRS/src/org/gvsig/crs/ogr/CrsOgrException.java	(revision 10155)
@@ -0,0 +1,61 @@
+/* gvSIG. Sistema de Informaci�n Geogr�fica de la Generalitat Valenciana
+ *
+ * Copyright (C) 2006 Instituto de Desarrollo Regional and Generalitat Valenciana.
+ *
+ * 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., 59 Temple Place - Suite 330, Boston, MA  02111-1307,USA.
+ *
+ * For more information, contact:
+ *
+ *  Generalitat Valenciana
+ *   Conselleria d'Infraestructures i Transport
+ *   Av. Blasco Ib��ez, 50
+ *   46010 VALENCIA
+ *   SPAIN
+ *
+ *      +34 963862235
+ *   gvsig@gva.es
+ *      www.gvsig.gva.es
+ *
+ *    or
+ *
+ *   Instituto de Desarrollo Regional (Universidad de Castilla La-Mancha)
+ *   Campus Universitario s/n
+ *   02071 Alabacete
+ *   Spain
+ *
+ *   +34 967 599 200
+ */
+
+package org.gvsig.crs.ogr;
+
+/**
+ * 
+ * @author Miguel Garc�a Jim�nez (garciajimenez.miguel@gmail.com)
+ *
+ */
+
+public class CrsOgrException extends Exception {
+	
+	public CrsOgrException(OGRSpatialReference ORGS) throws crsgdalException
+	{
+		ORGSpace=ORGS.getPtr();
+	}
+	public String getStrError()
+	{
+		return ("Error al exportar la cadena de Proj4");
+	}
+	private long ORGSpace;
+
+}

Property changes on: tags/Root_F2/libraries/libJCRS/src/org/gvsig/crs/ogr/CrsOgrException.java
___________________________________________________________________
Added: svn:keywords
   + Author Date Id Revision
Added: svn:eol-style
   + native

Index: tags/Root_F2/libraries/libJCRS/src/org/gvsig/crs/ogr/crsgdalException.java
===================================================================
--- tags/Root_F2/libraries/libJCRS/src/org/gvsig/crs/ogr/crsgdalException.java	(revision 0)
+++ tags/Root_F2/libraries/libJCRS/src/org/gvsig/crs/ogr/crsgdalException.java	(revision 10155)
@@ -0,0 +1,59 @@
+/* gvSIG. Sistema de Informaci�n Geogr�fica de la Generalitat Valenciana
+ *
+ * Copyright (C) 2006 Instituto de Desarrollo Regional and Generalitat Valenciana.
+ *
+ * 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., 59 Temple Place - Suite 330, Boston, MA  02111-1307,USA.
+ *
+ * For more information, contact:
+ *
+ *  Generalitat Valenciana
+ *   Conselleria d'Infraestructures i Transport
+ *   Av. Blasco Ib��ez, 50
+ *   46010 VALENCIA
+ *   SPAIN
+ *
+ *      +34 963862235
+ *   gvsig@gva.es
+ *      www.gvsig.gva.es
+ *
+ *    or
+ *
+ *   Instituto de Desarrollo Regional (Universidad de Castilla La-Mancha)
+ *   Campus Universitario s/n
+ *   02071 Alabacete
+ *   Spain
+ *
+ *   +34 967 599 200
+ */
+
+package org.gvsig.crs.ogr;
+
+/**
+ * Clase para gestionar las excepciones de gdal
+ * 
+ * @author Diego Guerrero Sevilla (diego.guerrero@uclm.es)
+ *
+ */
+public class crsgdalException extends Exception{
+	
+	public crsgdalException()
+	{
+		getStrError();
+	}
+	public String getStrError()
+	{
+		return ("Imposible crear objeto ");
+	}
+}

Property changes on: tags/Root_F2/libraries/libJCRS/src/org/gvsig/crs/ogr/crsgdalException.java
___________________________________________________________________
Added: svn:keywords
   + Author Date Id Revision
Added: svn:eol-style
   + native

Index: tags/Root_F2/libraries/libJCRS/src/org/gvsig/crs/ogr/package.html
===================================================================
--- tags/Root_F2/libraries/libJCRS/src/org/gvsig/crs/ogr/package.html	(revision 0)
+++ tags/Root_F2/libraries/libJCRS/src/org/gvsig/crs/ogr/package.html	(revision 10155)
@@ -0,0 +1,4 @@
+<html>
+	<body>Clases relacionadas con la obtenci�n de los datos y generaci�n del CRS de la extensi�n CRS.
+</body>
+</html>

Property changes on: tags/Root_F2/libraries/libJCRS/src/org/gvsig/crs/ogr/package.html
___________________________________________________________________
Added: svn:keywords
   + Author Date Id Revision
Added: svn:eol-style
   + native

Index: tags/Root_F2/libraries/libJCRS/src/org/gvsig/crs/ogr/CrsOgr.java
===================================================================
--- tags/Root_F2/libraries/libJCRS/src/org/gvsig/crs/ogr/CrsOgr.java	(revision 0)
+++ tags/Root_F2/libraries/libJCRS/src/org/gvsig/crs/ogr/CrsOgr.java	(revision 10155)
@@ -0,0 +1,142 @@
+/* gvSIG. Sistema de Informaci�n Geogr�fica de la Generalitat Valenciana
+ *
+ * Copyright (C) 2006 Instituto de Desarrollo Regional and Generalitat Valenciana.
+ *
+ * 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., 59 Temple Place - Suite 330, Boston, MA  02111-1307,USA.
+ *
+ * For more information, contact:
+ *
+ *  Generalitat Valenciana
+ *   Conselleria d'Infraestructures i Transport
+ *   Av. Blasco Ib��ez, 50
+ *   46010 VALENCIA
+ *   SPAIN
+ *
+ *      +34 963862235
+ *   gvsig@gva.es
+ *      www.gvsig.gva.es
+ *
+ *    or
+ *
+ *   Instituto de Desarrollo Regional (Universidad de Castilla La-Mancha)
+ *   Campus Universitario s/n
+ *   02071 Alabacete
+ *   Spain
+ *
+ *   +34 967 599 200
+ */
+
+package org.gvsig.crs.ogr;
+
+/**
+ * 
+ * @author Miguel Garc�a Jim�nez (garciajimenez.miguel@gmail.com)
+ *
+ */
+public class CrsOgr extends JNIBaseCRS
+{
+	public static String exportToWkt(OGRSpatialReference ORGSpace)throws CrsOgrException, crsgdalException
+	{
+		String result = exportToWktNat(ORGSpace.getPtr());
+		if(result.length() == 0) throw new CrsOgrException(ORGSpace);
+		return result;
+	}
+	
+	public static int importFromWkt(OGRSpatialReference ORGSpace, String cadenas) throws crsgdalException, CrsOgrException, OGRException
+	{
+		int result = importFromWktNat(ORGSpace.getPtr(), cadenas);
+		if(result != 0) throw new OGRException(result,"Error en Wkt().La creacion del objeto no tuvo exito. ",ORGSpace);
+		return result;
+	}
+	
+	public static int setUTM(OGRSpatialReference ORGSpace ,int zona, boolean norte_sur)throws OGRException, crsgdalException, CrsOgrException{
+		
+		if(ORGSpace.getPtr() <= 0)
+			throw new OGRException("Error en setUTM(). La llamada de creaci�n de objeto no tuvo exito.");
+		
+		int ns=-1;
+		if(norte_sur)ns=1;
+		else ns=0;
+		
+		int res = setUTMNat(ORGSpace.getPtr(), zona, ns);
+		
+		if(res != 0)
+			throw new OGRException(res,"Error en setUTM(). No se ha podido asignar la zona especificada. ",ORGSpace);
+		return res;
+	}
+	
+	public static int setWellKnownGeogCS(OGRSpatialReference ORGSpace, String cs)throws OGRException, crsgdalException, CrsOgrException{
+		
+		if(ORGSpace.getPtr() <= 0)
+			throw new OGRException("Error en setWellKnownGeogCS(). La llamada de creaci�n de objeto no tuvo exito.");
+		
+		int res = setWellKnownGeogCSNat(ORGSpace.getPtr(), cs);
+		
+		if(res != 0)
+			throw new OGRException(res,"Error en setWellKnownGeoCS(). No se ha podido asignar el sistema de coordenadas especificado. ",ORGSpace);
+		return res;
+	}
+	
+	public static int importFromEPSG(OGRSpatialReference ORGSpace, int cod) throws OGRException, crsgdalException, CrsOgrException
+	{
+		int result = importFromEPSGNat(ORGSpace.getPtr(), cod);
+		if(result != 0) throw new OGRException(result,"Error en EPSG().La creacion del objeto no tuvo exito. ",ORGSpace);
+		return result;
+	}
+	
+	public static int importFromProj4(OGRSpatialReference ORGSpace, String cs)throws OGRException, crsgdalException, CrsOgrException{
+		
+		if(ORGSpace.getPtr() <= 0)
+			throw new OGRException("Error en Proj4(). La llamada de creaci�n de objeto no tuvo exito.");
+		
+		int res = importFromProj4Nat(ORGSpace.getPtr(), cs);
+		
+		if(res != 0)
+			throw new OGRException(res, "Error en Proj4(). No se ha podido asignar el sistema de coordenadas especificado. ", ORGSpace);
+		
+		return res;
+		
+	}
+	
+	public static String exportToProj4(OGRSpatialReference ORGSpace)throws CrsOgrException, crsgdalException
+	{
+		String result = exportToProj4Nat(ORGSpace.getPtr());
+		if(result.length() == 0) throw new CrsOgrException(ORGSpace);
+		return result;
+	}
+	
+	public static int importFromPCI(OGRSpatialReference ORGSpace,String cod, String cs, double[] coord)throws CrsOgrException, crsgdalException, OGRException
+	{
+		int result = importFromPCINat(ORGSpace.getPtr(),cod, cs, coord);
+		if(result != 0) throw new OGRException(result,"Error en PCI().La creacion del objeto no tuvo exito. ",ORGSpace);
+		return result;
+	}
+	
+	public static int importFromUSGS(OGRSpatialReference ORGSpace, long code, long zone, double[] params, long datum) throws crsgdalException, OGRException, CrsOgrException
+	{
+		int result = importFromUSGSNat(ORGSpace.getPtr(),code, zone, params, datum);
+		if(result != 0) throw new OGRException(result,"Error en USGS().La creacion del objeto no tuvo exito. ",ORGSpace);
+		return result;	
+		
+	}
+	
+	public static int importFromESRI(OGRSpatialReference ORGSpace, String cadenas) throws crsgdalException, CrsOgrException, OGRException
+	{
+		int result = importFromESRINat(ORGSpace.getPtr(), cadenas);
+		if(result != 0) throw new OGRException(result,"Error en ESRI().La creacion del objeto no tuvo exito. ",ORGSpace);
+		return result;
+	}
+}
+

Property changes on: tags/Root_F2/libraries/libJCRS/src/org/gvsig/crs/ogr/CrsOgr.java
___________________________________________________________________
Added: svn:keywords
   + Author Date Id Revision
Added: svn:eol-style
   + native

Index: tags/Root_F2/libraries/libJCRS/src/org/gvsig/crs/ogr/JNIBaseCRS.java
===================================================================
--- tags/Root_F2/libraries/libJCRS/src/org/gvsig/crs/ogr/JNIBaseCRS.java	(revision 0)
+++ tags/Root_F2/libraries/libJCRS/src/org/gvsig/crs/ogr/JNIBaseCRS.java	(revision 10155)
@@ -0,0 +1,70 @@
+/* gvSIG. Sistema de Informaci�n Geogr�fica de la Generalitat Valenciana
+ *
+ * Copyright (C) 2006 Instituto de Desarrollo Regional and Generalitat Valenciana.
+ *
+ * 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., 59 Temple Place - Suite 330, Boston, MA  02111-1307,USA.
+ *
+ * For more information, contact:
+ *
+ *  Generalitat Valenciana
+ *   Conselleria d'Infraestructures i Transport
+ *   Av. Blasco Ib��ez, 50
+ *   46010 VALENCIA
+ *   SPAIN
+ *
+ *      +34 963862235
+ *   gvsig@gva.es
+ *      www.gvsig.gva.es
+ *
+ *    or
+ *
+ *   Instituto de Desarrollo Regional (Universidad de Castilla La-Mancha)
+ *   Campus Universitario s/n
+ *   02071 Alabacete
+ *   Spain
+ *
+ *   +34 967 599 200
+ */
+
+package org.gvsig.crs.ogr;
+
+/**
+ * 
+ * @author Miguel Garc�a Jim�nez (garciajimenez.miguel@gmail.com)
+ *
+ */
+public class JNIBaseCRS
+{
+	
+	protected static native String exportToProj4Nat(long cPtr);
+	protected static native String exportToWktNat(long cPtr);
+	protected static native int importFromWktNat(long cPtr, String cadenas);
+	protected static native int setUTMNat(long cPtr, int zona, int norte_sur);
+	protected static native int setWellKnownGeogCSNat(long cPtr, String cs);
+	protected static native int importFromEPSGNat(long cPtr, int cod);
+	protected static native int importFromProj4Nat(long cPtr, String cs);
+	protected static native int importFromPCINat(long cPtr,String cod, String cs,double[] coord);
+	protected static native int importFromUSGSNat(long cPtr, long code, long zone, double[] params, long datum);
+	protected static native int importFromESRINat(long cPtr, String cadenas);
+	
+	static {
+		String os = System.getProperty("os.name");
+		if(os.toLowerCase().startsWith("windows"))
+			System.loadLibrary("jgdal060");
+		else
+			System.loadLibrary("jgdal");
+	}
+	
+}

Property changes on: tags/Root_F2/libraries/libJCRS/src/org/gvsig/crs/ogr/JNIBaseCRS.java
___________________________________________________________________
Added: svn:eol-style
   + native
Added: svn:keywords
   + Author Date Id Revision

Index: tags/Root_F2/libraries/libJCRS/src/org/gvsig/crs/ICOperation.java
===================================================================
--- tags/Root_F2/libraries/libJCRS/src/org/gvsig/crs/ICOperation.java	(revision 0)
+++ tags/Root_F2/libraries/libJCRS/src/org/gvsig/crs/ICOperation.java	(revision 10155)
@@ -0,0 +1,66 @@
+/* gvSIG. Sistema de Informaci�n Geogr�fica de la Generalitat Valenciana
+ *
+ * Copyright (C) 2006 Instituto de Desarrollo Regional and Generalitat Valenciana.
+ *
+ * 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., 59 Temple Place - Suite 330, Boston, MA  02111-1307,USA.
+ *
+ * For more information, contact:
+ *
+ *  Generalitat Valenciana
+ *   Conselleria d'Infraestructures i Transport
+ *   Av. Blasco Ib��ez, 50
+ *   46010 VALENCIA
+ *   SPAIN
+ *
+ *      +34 963862235
+ *   gvsig@gva.es
+ *      www.gvsig.gva.es
+ *
+ *    or
+ *
+ *   Instituto de Desarrollo Regional (Universidad de Castilla La-Mancha)
+ *   Campus Universitario s/n
+ *   02071 Alabacete
+ *   Spain
+ *
+ *   +34 967 599 200
+ */
+
+package org.gvsig.crs;
+
+import java.awt.geom.Point2D;
+import java.awt.geom.Rectangle2D;
+
+import org.cresques.cts.ICoordTrans;
+
+/**
+ * Interfaz que define una operaci�n entre CRSs:
+ * Cualquier operaci�n o combinaci�n de operaciones que permiten
+ * obtener un punto en el CRS de destino a partir de otro en el de
+ * origen.
+ * @author Miguel Garc�a Jim�nez (garciajimenez.miguel@gmail.com)
+ */
+
+public interface ICOperation extends ICoordTrans {
+	public ICrs getSource();
+	
+	public ICrs getTarget();
+	
+	public Point2D operate(Point2D pt0) throws CrsException ;
+	
+	public Point2D convert(Point2D ptOrig, Point2D ptDest);
+	
+	public Rectangle2D convert(Rectangle2D rect);
+}

Property changes on: tags/Root_F2/libraries/libJCRS/src/org/gvsig/crs/ICOperation.java
___________________________________________________________________
Added: svn:keywords
   + Author Date Id Revision
Added: svn:eol-style
   + native

Index: tags/Root_F2/libraries/libJCRS/src/org/gvsig/crs/CrsWkt.java
===================================================================
--- tags/Root_F2/libraries/libJCRS/src/org/gvsig/crs/CrsWkt.java	(revision 0)
+++ tags/Root_F2/libraries/libJCRS/src/org/gvsig/crs/CrsWkt.java	(revision 10155)
@@ -0,0 +1,533 @@
+/* gvSIG. Sistema de Informaci�n Geogr�fica de la Generalitat Valenciana
+ *
+ * Copyright (C) 2006 Instituto de Desarrollo Regional and Generalitat Valenciana.
+ *
+ * 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., 59 Temple Place - Suite 330, Boston, MA  02111-1307,USA.
+ *
+ * For more information, contact:
+ *
+ *  Generalitat Valenciana
+ *   Conselleria d'Infraestructures i Transport
+ *   Av. Blasco Ib��ez, 50
+ *   46010 VALENCIA
+ *   SPAIN
+ *
+ *      +34 963862235
+ *   gvsig@gva.es
+ *      www.gvsig.gva.es
+ *
+ *    or
+ *
+ *   Instituto de Desarrollo Regional (Universidad de Castilla La-Mancha)
+ *   Campus Universitario s/n
+ *   02071 Alabacete
+ *   Spain
+ *
+ *   +34 967 599 200
+ */
+
+package org.gvsig.crs;
+
+import java.awt.dnd.Autoscroll;
+import java.util.ArrayList;
+
+/**
+ * Clase que parsea una cadena wkt y consigue todos sus par�metros
+ * de manera independiente para poder ser utilizados
+ * en distintas funciones
+ * 
+ * @author Jos� Luis G�mez Mart�nez
+ *
+ */
+
+public class CrsWkt {
+	private String projcs = "";
+	private String geogcs = "";
+	private String datum = "";
+	private String[] spheroid = {"" ,"",""};
+	private String[] primem = {"",""};
+	private String[] unit = {"",""};
+	private String[] unit_p = {"",""};
+	private String projection = "";
+	private String[] param_name;
+	private String[] param_value;
+	private int contador = 0;
+	private String[] authority = {"",""};
+	
+	public CrsWkt(String wkt_spaces) {
+		String aux;
+		String wkt = "";
+		for(int i = 0; i < wkt_spaces.length(); i++) {
+			aux = ""+wkt_spaces.charAt(i);
+			if(!aux.equals(" ")) {
+				wkt+=aux;
+			}else {
+				wkt += "";
+			}
+		}
+		fromWKT(wkt, false);
+	}
+	
+	/**
+	 * Acepta la cadena wkt y si es un CRS proyectado para conseguir el parser
+	 * de los dos modelos de cadena wkt que se utilizan, una cuando es base
+	 * y otra cuando es proyectado
+	 * @param wkt
+	 * @param isProj
+	 */
+	private void fromWKT(String wkt, boolean isProj) {
+		
+		String res = new String();
+		if(!wkt.startsWith("EPSG:")) {
+			res = "";
+			for(; wkt.charAt(contador) != '"'; contador++) {
+				res += wkt.charAt(contador);
+			}
+			if(res.equals("GEOGCS[")) {
+				
+				contador++;
+				for(; wkt.charAt(contador) != '"'; contador++) {
+					geogcs += wkt.charAt(contador);
+				}
+				
+				res = "";
+				contador++;
+				for(; wkt.charAt(contador) != '"'; contador++) {
+					res += wkt.charAt(contador);
+				}
+				if(res.equals(",DATUM[")) {
+					contador++;
+					for(; wkt.charAt(contador) != '"'; contador++) {
+						datum += wkt.charAt(contador);
+					}
+				}
+				res = "";
+				contador++;
+				for(; wkt.charAt(contador) != '"'; contador++) {
+					res += wkt.charAt(contador);
+				}
+				if(res.equals(",SPHEROID[")) {
+					contador++;
+					for(; wkt.charAt(contador) != ']'; contador++) {
+						while(wkt.charAt(contador) != '"' ) {
+							spheroid[0] += wkt.charAt(contador);
+							contador++;
+						}
+						contador +=2;
+						while(wkt.charAt(contador) != ',') {
+							spheroid[1] += wkt.charAt(contador);
+							contador++;
+						}
+						contador++;
+						while(wkt.charAt(contador) != ']') {
+							spheroid[2] += wkt.charAt(contador);
+							contador++;
+						}
+					}
+				}
+				contador++;
+				res = "";
+				for(; wkt.charAt(contador) != '"'; contador++) {
+					res += wkt.charAt(contador);
+				}
+				if(res.equals(",PRIMEM[")) {
+					contador++;
+					for(; wkt.charAt(contador) != ','; contador++) {
+						while(wkt.charAt(contador) != '"' ){
+							primem[0] += wkt.charAt(contador);
+							contador ++;
+						}
+						contador +=2;
+						while(wkt.charAt(contador) != ']') {
+							primem[1] += wkt.charAt(contador);
+							contador ++;
+						}
+					}
+				}
+				contador++;
+				res = "";
+				for(; wkt.charAt(contador) != '"'; contador++) {
+					res += wkt.charAt(contador);
+				}
+				if(res.equals("UNIT[")) {
+					contador++;
+					for(; wkt.charAt(contador) != ','; contador++) {
+						while(wkt.charAt(contador) != '"' ){
+							unit[0] += wkt.charAt(contador);
+							contador ++;
+						}
+						contador +=2;
+						while(wkt.charAt(contador) != ']') {
+							unit[1] += wkt.charAt(contador);
+							contador ++;
+						}
+					}
+				}
+				contador++;
+				res = "";
+				for(; wkt.charAt(contador) != '"'; contador++) {
+					res += wkt.charAt(contador);
+				}
+				if(res.equals("AUTHORITY[")) {
+					contador++;
+					for(; wkt.charAt(contador) != ']'; contador++) {
+						while(wkt.charAt(contador) != '"' ){
+							authority[0] += wkt.charAt(contador);
+							contador ++;
+						}
+						contador +=2;
+						while(wkt.charAt(contador) != ']') {
+							authority[1] += wkt.charAt(contador);
+							contador ++;
+						}
+					}
+				}
+			}else if (res.equals("PROJCS[")) {
+				contador++;
+				for(; wkt.charAt(contador) != '"'; contador++) {
+					projcs += wkt.charAt(contador);
+				}
+				contador++;
+				res = "";
+				for(; wkt.charAt(contador) != '"'; contador++) {
+					res += wkt.charAt(contador);
+				}
+				if(res.equals(",GEOGCS[")) {
+					contador++;
+					for(; wkt.charAt(contador) != '"'; contador++) {
+						geogcs += wkt.charAt(contador);
+					}
+				}
+								
+				res = "";
+				contador++;
+				for(; wkt.charAt(contador) != '"'; contador++) {
+					res += wkt.charAt(contador);
+				}
+				if(res.equals(",DATUM[")) {
+					contador++;
+					for(; wkt.charAt(contador) != '"'; contador++) {
+						datum += wkt.charAt(contador);
+					}
+				}
+				res = "";
+				contador++;
+				for(; wkt.charAt(contador) != '"'; contador++) {
+					res += wkt.charAt(contador);
+				}
+				if(res.equals(",SPHEROID[")) {
+					contador++;
+					for(; wkt.charAt(contador) != ']'; contador++) {
+						while(wkt.charAt(contador) != '"' ) {
+							spheroid[0] += wkt.charAt(contador);
+							contador++;
+						}
+						contador +=2;
+						while(wkt.charAt(contador) != ',') {
+							spheroid[1] += wkt.charAt(contador);
+							contador++;
+						}
+						contador++;
+						while(wkt.charAt(contador) != ']') {
+							spheroid[2] += wkt.charAt(contador);
+							contador++;
+						}
+					}
+				}
+				contador++;
+				res = "";
+				for(; wkt.charAt(contador) != '"'; contador++) {
+					res += wkt.charAt(contador);
+				}
+				if(res.equals(",PRIMEM[")) {
+					contador++;
+					for(; wkt.charAt(contador) != ','; contador++) {
+						while(wkt.charAt(contador) != '"' ){
+							primem[0] += wkt.charAt(contador);
+							contador ++;
+						}
+						contador +=2;
+						while(wkt.charAt(contador) != ']') {
+							primem[1] += wkt.charAt(contador);
+							contador ++;
+						}
+					}
+				}
+				contador++;
+				res = "";
+				for(; wkt.charAt(contador) != '"'; contador++) {
+					res += wkt.charAt(contador);
+				}
+				if(res.equals("UNIT[")) {
+					contador++;
+					for(; wkt.charAt(contador) != ']'; contador++) {
+						while(wkt.charAt(contador) != '"' ){
+							unit[0] += wkt.charAt(contador);
+							contador ++;
+						}
+						contador +=2;
+						while(wkt.charAt(contador) != ']') {
+							unit[1] += wkt.charAt(contador);
+							contador ++;
+						}
+					}
+				}
+				contador++;
+				res = "";
+				for(; wkt.charAt(contador) != '"'; contador++) {
+					res += wkt.charAt(contador);
+				}
+				if(res.equals(",PROJECTION[")) {
+					contador++;
+					for(; wkt.charAt(contador) != '"'; contador++) {
+						projection += wkt.charAt(contador);
+					}
+				}
+				contador = contador+2;
+				res = "";
+				for(; wkt.charAt(contador) != '"'; contador++) {
+					res += wkt.charAt(contador);
+				}
+				//Hallamos el numero de parametros que tiene la cadena wkt
+				int i = 0;
+				
+				int copiacontador = contador;
+				if(res.equals(",PARAMETER[")) {
+					do{
+						for(; wkt.charAt(copiacontador) != ']'; copiacontador++) {
+							while(wkt.charAt(copiacontador) != '"' )
+								copiacontador++;
+							copiacontador += 2;
+							while(wkt.charAt(copiacontador) != ']' )
+								copiacontador++;
+							copiacontador--;
+						}
+						i++;
+						copiacontador++;
+						res = "";
+						for(; wkt.charAt(copiacontador) != '"'; copiacontador++) {
+							res += wkt.charAt(copiacontador);
+						}
+					} while (res.equals(",PARAMETER["));
+					res = ",PARAMETER[";
+				}
+				// Inicializamos los parametros
+				param_name = new String[i];
+				param_value = new String[i];
+				for(int j = 0 ;j < i; j++ ){
+					param_name[j] = "";
+					param_value[j] = "";
+				}
+				i = 0;
+				if(res.equals(",PARAMETER[")) {
+					do{
+						contador++;
+						for(; wkt.charAt(contador) != ']'; contador++) {
+							while(wkt.charAt(contador) != '"' ){
+								param_name[i] += wkt.charAt(contador);
+								contador++;
+							}
+							contador += 2;
+							while(wkt.charAt(contador) != ']' ){
+								param_value[i] += wkt.charAt(contador);
+								contador++;
+							}
+							contador--;
+						}
+						i++;
+						contador++;
+						res = "";
+						for(; wkt.charAt(contador) != '"'; contador++) {
+							res += wkt.charAt(contador);
+						}
+					} while (res.equals(",PARAMETER["));					
+				}
+				
+				if (res.equals(",UNIT[")){
+					contador++;
+					for(; wkt.charAt(contador) != ','; contador++) {
+						while(wkt.charAt(contador) != '"' ){
+							unit_p[0] += wkt.charAt(contador);
+							contador ++;
+						}
+						contador +=2;
+						while(wkt.charAt(contador) != ']') {
+							unit_p[1] += wkt.charAt(contador);
+							contador ++;
+						}
+					}
+				}
+				contador++;
+				res = "";
+				for(; wkt.charAt(contador) != '"'; contador++) {
+					res += wkt.charAt(contador);
+				}
+				if(res.equals("AUTHORITY[")) {
+					contador++;
+					for(; wkt.charAt(contador) != ']'; contador++) {
+						while(wkt.charAt(contador) != '"' ){
+							authority[0] += wkt.charAt(contador);
+							contador ++;
+						}
+						contador +=2;
+						while(wkt.charAt(contador) != ']') {
+							authority[1] += wkt.charAt(contador);
+							contador ++;
+						}
+					}
+				}
+			}
+			else if (res.equals("GEOCCS[")){
+				/*
+				 * parte necesaria para capturar la cadena geocentrica...
+				 */
+				
+			}
+		}else
+			geogcs = wkt;
+	}
+	
+	public String getProjection() {
+		return projection;
+	}
+	
+	public String getProjcs() {
+		return projcs;
+	}
+	
+	public String getGeogcs() {
+		return geogcs;
+	}
+	
+	public String getDatumName() {
+		return datum;
+	}
+	
+	public String[] getSpheroid() {
+		return spheroid;
+	}
+	
+	public String[] getPrimen() {
+		return primem;
+	}
+	
+	public String getName() {
+		if(projcs == "") 
+			return geogcs;
+		return projcs;
+	}
+	
+	public String[] getUnit() {
+		return unit;
+	}
+	
+	public String[] getUnit_p() {
+		return unit_p;
+	}
+	
+	public String[] getParam_name() {
+		return param_name;
+	}
+	
+	public String[] getParam_value() {
+		return param_value;
+	}
+	
+	public String[] getAuthority(){
+		return authority;
+	}
+	
+	/*
+	 * Parser a medio hacer, orientado a objeto y recursivo.
+	 * by LWS.
+	 */
+	
+	public static class WKT {
+		public class Param {
+			String key;
+			ArrayList values = new ArrayList();
+			ArrayList params = new ArrayList();
+			public int pos = 0;
+			public Param(String key) {
+				this.key = key;
+			}
+			public void addValue(String name) {
+				values.add(name);
+			}
+			public void addParam(Param p) {
+				params.add(p);
+			}
+		}
+		String data;
+		public WKT(String data) {
+			this.data = data;
+			WKT.Param param = parseParam(0);
+		}
+		private WKT.Param parseParam(int pos) {
+			WKT.Param param = null;
+			String key, name;
+			
+			int l = data.length();
+			for (int i = pos; i<l;) {
+				int nextParam = data.indexOf(",", i);
+				if (nextParam == i) {
+					nextParam = data.indexOf(",", ++i);
+				}
+				int cierra = data.indexOf("]", i);
+				int abre = data.indexOf("[", i);
+				if (cierra < abre) { // Esta mal
+					pinta(" =>");
+					param.pos = cierra;
+					return param;
+				}
+				if (param == null) {
+					if (abre > 0) { //hay claves
+						key = data.substring(i, data.indexOf("[", i));
+						pinta(key+ " <= ");
+						i = abre+1;
+						param = new WKT.Param(key);
+					}
+				} else {
+					if (data.substring(i).startsWith("\"")) {
+						name = data.substring(i+1, data.indexOf("\"", i+1));
+						i+=name.length()+2;
+						pinta("|"+name+"|,");
+						param.addValue(name);
+					} else if (nextParam<abre) {
+						name = data.substring(i, data.indexOf(",", i));
+						i+=name.length();
+						pinta(name+",");
+						param.addValue(name);
+					} else {
+						Param p = parseParam(i);
+						i = p.pos+1;
+					}
+				}
+			}
+			return param;
+		}
+		static int cnt=0;
+		public static void pinta(String str) {
+			cnt++;
+			if (cnt>60)
+				System.exit(1);
+			System.out.println(str);
+		}
+	}
+	
+	private void parseWKT(String data) {
+		WKT wkt = new WKT(data);
+	}
+}
\ No newline at end of file

Property changes on: tags/Root_F2/libraries/libJCRS/src/org/gvsig/crs/CrsWkt.java
___________________________________________________________________
Added: svn:keywords
   + Author Date Id Revision
Added: svn:eol-style
   + native

Index: tags/Root_F2/libraries/libJCRS/src/org/gvsig/crs/EpsgConnection.java
===================================================================
--- tags/Root_F2/libraries/libJCRS/src/org/gvsig/crs/EpsgConnection.java	(revision 0)
+++ tags/Root_F2/libraries/libJCRS/src/org/gvsig/crs/EpsgConnection.java	(revision 10155)
@@ -0,0 +1,119 @@
+/* gvSIG. Sistema de Informaci�n Geogr�fica de la Generalitat Valenciana
+ *
+ * Copyright (C) 2006 Instituto de Desarrollo Regional and Generalitat Valenciana.
+ *
+ * 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., 59 Temple Place - Suite 330, Boston, MA  02111-1307,USA.
+ *
+ * For more information, contact:
+ *
+ *  Generalitat Valenciana
+ *   Conselleria d'Infraestructures i Transport
+ *   Av. Blasco Ib��ez, 50
+ *   46010 VALENCIA
+ *   SPAIN
+ *
+ *      +34 963862235
+ *   gvsig@gva.es
+ *      www.gvsig.gva.es
+ *
+ *    or
+ *
+ *   Instituto de Desarrollo Regional (Universidad de Castilla La-Mancha)
+ *   Campus Universitario s/n
+ *   02071 Alabacete
+ *   Spain
+ *
+ *   +34 967 599 200
+ */
+
+package org.gvsig.crs;
+
+import java.sql.Connection;
+import java.sql.DriverManager;
+import java.sql.SQLException;
+import java.sql.Statement;
+
+/**
+ * Clase para la conexi�n con la base de datos de hsqldb.
+ * Establece el driver necesario, as� como la cadena de
+ * conexi�n a la base de datos de la EPSG y la IAU2000
+ * 
+ * @author Jos� Luis G�mez Mart�nez (jolugomar@gmail.com)
+ *
+ */
+
+public class EpsgConnection {
+	
+	Connection connect;
+
+	public EpsgConnection() {	
+		try {
+			Class.forName("org.hsqldb.jdbcDriver");
+		} catch (ClassNotFoundException e) {
+			e.printStackTrace();
+		}
+	}
+	
+	/**
+	 * Establece la conexi�n con la base de datos de la EPSG
+	 *
+	 */
+	public void setConnectionEPSG() {
+		try {			
+			connect =  DriverManager.getConnection("jdbc:hsqldb:file:gvSIG/extensiones/org.gvsig.crs/db_epsg", "sa", "");
+		} catch (SQLException e1) {
+			e1.printStackTrace();
+		}
+	}
+	
+	/**
+	 * Establece la conexi�n con la base de datos de la IAU2000
+	 *
+	 */
+	public void setConnectionIAU2000() {
+		try {			
+			connect =  DriverManager.getConnection("jdbc:hsqldb:file:gvSIG/extensiones/org.gvsig.crs/db_iau2000", "sa", "");			
+		} catch (SQLException e1) {
+			e1.printStackTrace();
+		}
+	}
+	
+	/**
+	 * Establece la conexi�n con la base de datos de ESRI
+	 *
+	 */
+	public void setConnectionEsri() {
+		try {			
+			connect =  DriverManager.getConnection("jdbc:hsqldb:file:gvSIG/extensiones/org.gvsig.crs/db_esri", "sa", "");			
+		} catch (SQLException e1) {
+			e1.printStackTrace();
+		}
+	}
+	
+	public Connection getConnection(){
+		return connect;
+	}
+	
+	public void shutdown() throws SQLException {
+
+        Statement st = connect.createStatement();
+
+        // db writes out to files and performs clean shuts down
+        // otherwise there will be an unclean shutdown
+        // when program ends
+        st.execute("SHUTDOWN");
+        connect.close();    // if there are no other open connection
+    }
+}

Property changes on: tags/Root_F2/libraries/libJCRS/src/org/gvsig/crs/EpsgConnection.java
___________________________________________________________________
Added: svn:eol-style
   + native
Added: svn:keywords
   + Author Date Id Revision

Index: tags/Root_F2/libraries/libJCRS/src/org/gvsig/crs/package.html
===================================================================
--- tags/Root_F2/libraries/libJCRS/src/org/gvsig/crs/package.html	(revision 0)
+++ tags/Root_F2/libraries/libJCRS/src/org/gvsig/crs/package.html	(revision 10155)
@@ -0,0 +1,4 @@
+<html>
+	<body>Clases relacionadas con la obtenci�n de los CRS de la extensi�n CRS.
+</body>
+</html>

Property changes on: tags/Root_F2/libraries/libJCRS/src/org/gvsig/crs/package.html
___________________________________________________________________
Added: svn:eol-style
   + native
Added: svn:keywords
   + Author Date Id Revision

Index: tags/Root_F2/libraries/libJCRS/src/org/gvsig/crs/CrsFactory.java
===================================================================
--- tags/Root_F2/libraries/libJCRS/src/org/gvsig/crs/CrsFactory.java	(revision 0)
+++ tags/Root_F2/libraries/libJCRS/src/org/gvsig/crs/CrsFactory.java	(revision 10155)
@@ -0,0 +1,180 @@
+/* gvSIG. Sistema de Informaci�n Geogr�fica de la Generalitat Valenciana
+ *
+ * Copyright (C) 2006 Instituto de Desarrollo Regional and Generalitat Valenciana.
+ *
+ * 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., 59 Temple Place - Suite 330, Boston, MA  02111-1307,USA.
+ *
+ * For more information, contact:
+ *
+ *  Generalitat Valenciana
+ *   Conselleria d'Infraestructures i Transport
+ *   Av. Blasco Ib��ez, 50
+ *   46010 VALENCIA
+ *   SPAIN
+ *
+ *      +34 963862235
+ *   gvsig@gva.es
+ *      www.gvsig.gva.es
+ *
+ *    or
+ *
+ *   Instituto de Desarrollo Regional (Universidad de Castilla La-Mancha)
+ *   Campus Universitario s/n
+ *   02071 Alabacete
+ *   Spain
+ *
+ *   +34 967 599 200
+ */
+
+package org.gvsig.crs;
+
+import java.util.TreeMap;
+
+import org.cresques.cts.ICRSFactory;
+import org.cresques.cts.IProjection;
+import org.gvsig.crs.repository.EpsgRepository;
+import org.gvsig.crs.repository.EsriRepository;
+import org.gvsig.crs.repository.ICrsRepository;
+import org.gvsig.crs.repository.Iau2000Repository;
+
+/**
+ * Clase que consigue el CRS a trav�s del c�digo de la EPSG o de
+ * la cadena WKT
+ * 
+ * @author Diego Guerrero Sevilla (diego.guerrero@uclm.es) 
+ *
+ */
+
+public class CrsFactory implements ICRSFactory {
+	static TreeMap data = new TreeMap();
+	
+	public CrsFactory() {	
+	}
+	/**
+	 * Obtiene un CRS a partir de su c�digo (p.e. EPSG:23030).
+	 * @param code
+	 * @return
+	 * @throws CrsException
+	 */
+	public ICrs getCRS(String code) throws CrsException {
+		
+		if (data.containsKey(code))
+			return (Crs) data.get(code);
+
+		String repoId = code.substring(0, code.indexOf(":"));
+		String crsCode = code.substring(code.indexOf(":")+1);
+		
+		ICrsRepository repo = null;
+		Crs crs = null;
+		
+		if(repoId.equals("EPSG")){
+			repo = new EpsgRepository();
+			crs = (Crs)repo.getCrs(crsCode);
+		}else if (repoId.equals("IAU2000")){
+			repo = new Iau2000Repository();
+			crs = (Crs)repo.getCrs(crsCode);
+		}else if (repoId.equals("ESRI")){
+			repo = new EsriRepository();
+			crs = (Crs)repo.getCrs(crsCode);
+		}
+		
+		// LWS Esta l�nea sobra, cuando el cuadro de di�logo est�
+		// mejor hecho.
+		code = crs.getAbrev();
+		
+		data.put(code, crs);
+
+		return crs;
+		
+		/*if (data.containsKey(code))
+			return (Crs) data.get(code);
+
+		Crs crs = new Crs(code);
+		
+		// LWS Esta l�nea sobra, cuando el cuadro de di�logo est�
+		// mejor hecho.
+		code = crs.getAbrev();
+		
+		data.put(code, crs);
+
+		return crs;*/
+	}
+	
+	/**
+	 * 
+	 * @param epsg_code
+	 * @param code
+	 * @return
+	 * @throws CrsException
+	 */
+	public ICrs getCRS(int epsg_code, String code) throws CrsException {
+		if (data.containsKey(code))
+			return (Crs) data.get(code);
+
+		Crs crs = new Crs(epsg_code, code);
+		
+		// LWS Esta l�nea sobra, cuando el cuadro de di�logo est�
+		// mejor hecho.
+		code = crs.getAbrev();
+		
+		data.put(code, crs);
+
+		return crs;
+	}
+	
+	/**
+	 * 
+	 * @param epsg_code
+	 * @param code
+	 * @param params
+	 * @return
+	 * @throws CrsException
+	 */
+	public ICrs getCRS(int epsg_code, String code, String params) throws CrsException {
+		if (data.containsKey(code))
+			return (Crs) data.get(code);
+		
+		Crs crs = new Crs(epsg_code, code,params);
+		
+		// LWS Esta l�nea sobra, cuando el cuadro de di�logo est�
+		// mejor hecho.
+		code = crs.getAbrev();
+		
+		data.put(code, crs);
+
+		return crs;
+	}
+	
+	/**
+	 * 
+	 */
+	public IProjection get(String name) {
+		// TODO Auto-generated method stub
+		try {
+			return getCRS(name);
+		} catch (CrsException e) {
+			// TODO Auto-generated catch block
+			e.printStackTrace();
+		}
+		return null;
+	}
+	
+	/**
+	 * 
+	 */
+	public boolean doesRigurousTransformations() {
+		return true;
+	}
+}

Property changes on: tags/Root_F2/libraries/libJCRS/src/org/gvsig/crs/CrsFactory.java
___________________________________________________________________
Added: svn:keywords
   + Author Date Id Revision
Added: svn:eol-style
   + native

Index: tags/Root_F2/libraries/libJCRS/src/org/gvsig/crs/Test.java
===================================================================
--- tags/Root_F2/libraries/libJCRS/src/org/gvsig/crs/Test.java	(revision 0)
+++ tags/Root_F2/libraries/libJCRS/src/org/gvsig/crs/Test.java	(revision 10155)
@@ -0,0 +1,174 @@
+package org.gvsig.crs;
+
+import java.io.BufferedReader;
+import java.io.File;
+import java.io.FileInputStream;
+import java.io.IOException;
+import java.io.InputStreamReader;
+
+import org.gvsig.crs.ogr.CrsOgr;
+import org.gvsig.crs.ogr.CrsOgrException;
+import org.gvsig.crs.ogr.OGRException;
+import org.gvsig.crs.ogr.OGRSpatialReference;
+import org.gvsig.crs.ogr.crsgdalException;
+import org.gvsig.crs.proj.CrsProj;
+import org.gvsig.crs.proj.CrsProjException;
+import org.gvsig.crs.proj.JNIBaseCrs;
+import org.gvsig.crs.proj.OperationCrsException;
+
+
+
+public class Test{
+	
+	private static String source = null;
+	private static String target = null;
+	private static double[] x = new double[1]; 
+	private static double[] y = new double[1];
+	private static double[] z = new double[1];
+	private static double[] coord = new double [15]; // Para la proyeccion PCI
+	
+	public static void main(String[] args) throws OGRException, CrsOgrException, crsgdalException, OperationCrsException, CrsProjException, IOException {
+		opera(args);
+		//pruebaWKT();
+	}
+	
+	public static void opera(String[] args) throws OGRException, CrsOgrException, crsgdalException, OperationCrsException, CrsProjException, IOException {
+
+		//System.out.print((new File(".").getCanonicalPath()));
+		OGRSpatialReference oSRSSource = new OGRSpatialReference();
+		OGRSpatialReference oSRSTarget = new OGRSpatialReference();
+		double[] params = {0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0}; // Para la proyeccion USGS
+		String cadens = "PROJCS[\"ETRS89 / UTM zone 33N\", GEOGCS[\"ETRS89\", DATUM[\"European Terrestrial Reference System 1989\", SPHEROID[\"GRS 1980\", 6378137.0, 298.257222101]], PRIMEM[\"Greenwich\", 0.0], UNIT[\"Decimal Degree\", 0.017453292519943295]], PROJECTION[\"Transverse_Mercator\"], PARAMETER[\"latitude_of_origin\", 0.0], PARAMETER[\"central_meridian\", 0.2617993877991492], PARAMETER[\"scale_factor\", 0.9996], PARAMETER[\"false_easting\", 500000.0], PARAMETER[\"false_northing\", 0.0], UNIT[\"Meter\", 1.0]]";
+
+		String cads = "";
+		int n,m;
+		n = args[0].charAt(0) - 48;
+		m = args[1].charAt(0) - 48;
+		if(n==7 || m==7){
+			File f;
+				// f = new File("C:/Archivos de programa/FWTools1.0.0a7/data/Geographic Coordinate Systems/Australia and New Zealand/Geocentric Datum of Australia 1994.prj");
+				f = new File("C:/Archivos de programa/FWTools1.0.0a7/data/Geographic Coordinate Systems/Asia/Batavia.prj");
+		    BufferedReader br = new BufferedReader(new InputStreamReader(
+		        new FileInputStream(f)));
+	
+		    String line = null;
+		     if ((line = br.readLine()) != null)
+		     {
+		    	 for( int i = 0; i<line.length();i++){
+					if( i == 0 && line.charAt(0) != '"'){
+						cads += line.charAt(i); 	
+					}else if(line.charAt(i) == '"'){
+						cads += '\\' ;
+						cads += line.charAt(i);
+					}else
+						cads += line.charAt(i);
+				}
+		     }else
+		      {
+		         System.out.println("Wrong file format");
+		         System.exit(0);
+		      }
+		}
+		if(n > 7 || n < 0 || m > 7 || m < 0 || args[0].substring(0).length()>1 || args[1].substring(0).length()>1)
+			System.out.println("Los parametros pasados por teclado tienen q estar comprendidos entre 0 y 7");
+		else
+		{
+			try
+			{
+				switch(n){
+				case 0: CrsOgr.importFromUSGS(oSRSSource, 1, 30, params, 4);break;
+				case 1: CrsOgr.importFromPCI(oSRSSource,"pppppppppppp Ennn","DEGREES", coord);break;
+				case 2: CrsOgr.setWellKnownGeogCS(oSRSSource, "EPSG:3002");break;
+				case 3: CrsOgr.importFromWkt(oSRSSource,cads);break;
+				case 4: CrsOgr.importFromEPSG(oSRSSource,/*4230*/23030);break;
+				case 5: CrsOgr.importFromProj4(oSRSSource,"+proj=utm +zone=30 +ellps=intl +units=m");break;
+				case 6: CrsOgr.setUTM(oSRSSource,11,true);break;
+				case 7: CrsOgr.importFromESRI(oSRSSource,cads);break;	   
+				}
+				
+				System.out.println("Proyeccion Origen ==> "+ CrsOgr.exportToProj4(oSRSSource));
+				source = CrsOgr.exportToProj4(oSRSSource)+"+nadgrids=sped2et.gsb";
+				
+	    	
+				switch(m){
+				case 0: CrsOgr.importFromUSGS(oSRSTarget, 1, 30, params, 8);break;
+				case 1: CrsOgr.importFromPCI(oSRSTarget,"Hola","DEGREES", coord);break;
+				case 2: CrsOgr.setWellKnownGeogCS(oSRSTarget, "EPSG:4326");break;
+				case 3: CrsOgr.importFromWkt(oSRSTarget,cadens);break;
+				case 4: CrsOgr.importFromEPSG(oSRSTarget,/*4258*/4230);break;
+				case 5: CrsOgr.importFromProj4(oSRSTarget,"+proj=utm +zone=30 +ellps=GRS80" );break;
+				case 6: CrsOgr.setUTM(oSRSTarget,11,true);break;
+				case 7: CrsOgr.importFromESRI(oSRSTarget,cads);break;		
+				}
+	    	
+				target = CrsOgr.exportToProj4(oSRSTarget);
+				System.out.println("Proyeccion Destino ==> "+ target);
+		//		System.out.println("Coordenadas Iniciales:     x = 465348.7823 y = 4473240.8768 z = 0.0" );
+				reiniciar(source,target);
+		/*		System.out.println();
+				System.out.println();
+				System.out.println();
+				System.out.println("Proyeccion Origen ==> "+ CrsOgr.exportToProj4(oSRSSource));
+				System.out.println("Proyeccion Destino ==> "+ target);
+				System.out.println("Coordenadas Iniciales:     x = 465348.7823 y = 4473240.8768 z = 0.0" );
+				reiniciarArraySimple(source,target);*/			
+	    	
+			} catch (CrsOgrException h) {
+				System.out.println(h.getStrError());
+			}
+	    
+			oSRSSource.finalice();
+			oSRSTarget.finalice();
+		}
+	}
+	public static void reiniciar(String strCrsSource, String strCrsTarget) throws OperationCrsException, CrsProjException
+	{
+	//	x[0] = -(3.0+24.0/60.0+30.12345/3600.0);
+	//	y[0] = (40.0+24.0/60.0+30.12345/3600.0);
+		z[0] = 0.0;
+		x[0]=465348.7823;
+		y[0]=4473240.8768;
+		double xgood = 465239.40;
+		double ygood =  4473032.98;
+	//	double xgood = -(3.0+24.0/60.0+34.804968/3600.0);//*Math.PI/180.0;
+	//	double ygood = (40.0+24.0/60.0+25.867951/3600.0);//*Math.PI/180;
+		CrsProj srcCrs = new CrsProj(strCrsSource);
+		CrsProj destCrs = new CrsProj(strCrsTarget);
+		System.out.println("Coordenadas Iniciales:     "+"x = " + x[0] + " y = " + y[0] + " z = " + z[0]);
+		JNIBaseCrs.operate(x, y, z, srcCrs, destCrs);
+		double difx=(xgood-x[0]);
+		double dify=(ygood-y[0]);
+		System.out.println("Coordenadas transformadas: "+"x = " + x[0] + " y = " + y[0] + " z = " + z[0]);
+		System.out.println("diferencia coordenadas: "+"x = " + difx + " y = " + dify + " z = " + z[0]);
+		System.out.println(srcCrs.isLatlong());
+		System.out.println(destCrs.isLatlong());
+	}
+	
+	public static void reiniciarSimple(String strCrsSource, String strCrsTarget) throws OperationCrsException, CrsProjException{
+		
+		double []pt = {465348.7823, 4473240.8768, 0.0};
+		CrsProj srcCrs = new CrsProj(strCrsSource);
+		CrsProj destCrs = new CrsProj(strCrsTarget);
+		System.out.print("Coordenadas transformadas: ");
+		JNIBaseCrs.operateSimple(pt[0],pt[1], pt[2], srcCrs, destCrs);
+	}
+	
+	public static void reiniciarArraySimple(String strCrsSource, String strCrsTarget) throws OperationCrsException, CrsProjException{
+		
+		double []pt = {465348.7823, 4473240.8768, 0.0};
+		CrsProj srcCrs = new CrsProj(strCrsSource);
+		CrsProj destCrs = new CrsProj(strCrsTarget);
+		JNIBaseCrs.operateArraySimple(pt, srcCrs, destCrs);
+		System.out.println("Coordenadas transformadas: "+"x = " + pt[0] + " y = " + pt[1] + " z = " + pt[2]);
+		
+	}
+	
+	public static void pruebaWKT() {
+		String data = "GEOGCS[\"WGS 84\",DATUM[\"WGS_1984\",SPHEROID[\"WGS 84\",6378137,298.257223563,"+
+			"AUTHORITY[\"EPSG\",7030]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY[\"EPSG\",6326]],"+
+			"PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",8901]],UNIT[\"DMSH\",0.0174532925199433,"+
+			"AUTHORITY[\"EPSG\",9108]],AXIS[\"Lat\",NORTH],AXIS[\"Long\",EAST],AUTHORITY[\"EPSG\","+
+			"4326]]";
+		CrsWkt.WKT wkt = new CrsWkt.WKT(data);
+	}
+}
\ No newline at end of file

Property changes on: tags/Root_F2/libraries/libJCRS/src/org/gvsig/crs/Test.java
___________________________________________________________________
Added: svn:keywords
   + Author Date Id Revision
Added: svn:eol-style
   + native

Index: tags/Root_F2/libraries/libJCRS/src/org/gvsig/crs/CRSDatum.java
===================================================================
--- tags/Root_F2/libraries/libJCRS/src/org/gvsig/crs/CRSDatum.java	(revision 0)
+++ tags/Root_F2/libraries/libJCRS/src/org/gvsig/crs/CRSDatum.java	(revision 10155)
@@ -0,0 +1,69 @@
+/* gvSIG. Sistema de Informaci�n Geogr�fica de la Generalitat Valenciana
+ *
+ * Copyright (C) 2006 Instituto de Desarrollo Regional and Generalitat Valenciana.
+ *
+ * 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., 59 Temple Place - Suite 330, Boston, MA  02111-1307,USA.
+ *
+ * For more information, contact:
+ *
+ *  Generalitat Valenciana
+ *   Conselleria d'Infraestructures i Transport
+ *   Av. Blasco Ib��ez, 50
+ *   46010 VALENCIA
+ *   SPAIN
+ *
+ *      +34 963862235
+ *   gvsig@gva.es
+ *      www.gvsig.gva.es
+ *
+ *    or
+ *
+ *   Instituto de Desarrollo Regional (Universidad de Castilla La-Mancha)
+ *   Campus Universitario s/n
+ *   02071 Alabacete
+ *   Spain
+ *
+ *   +34 967 599 200
+ */
+
+package org.gvsig.crs;
+
+import org.cresques.cts.IDatum;
+
+/**
+ * Clase que establece el datum del CRS seleccionado
+ * 
+ * @author Diego Guerrero Sevilla (diego.guerrero@uclm.es)
+ *
+ */
+
+public class CRSDatum implements IDatum {
+	private double eSemiMajorAxis = 0;
+	private double eIFlattening = 0;
+
+	public CRSDatum(double semiMajorAxis, double flattening) {
+		super();
+		eSemiMajorAxis = semiMajorAxis;
+		eIFlattening = flattening;
+	}
+
+	public double getESemiMajorAxis() {
+		return eSemiMajorAxis;
+	}
+
+	public double getEIFlattening() {
+		return eIFlattening;
+	}
+}

Property changes on: tags/Root_F2/libraries/libJCRS/src/org/gvsig/crs/CRSDatum.java
___________________________________________________________________
Added: svn:keywords
   + Author Date Id Revision
Added: svn:eol-style
   + native

Index: tags/Root_F2/libraries/libJCRS/.externalToolBuilders/crsgdal build.xml [Builder].launch
===================================================================
--- tags/Root_F2/libraries/libJCRS/.externalToolBuilders/crsgdal build.xml [Builder].launch	(revision 0)
+++ tags/Root_F2/libraries/libJCRS/.externalToolBuilders/crsgdal build.xml [Builder].launch	(revision 10155)
@@ -0,0 +1,14 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<launchConfiguration type="org.eclipse.ant.AntBuilderLaunchConfigurationType">
+<stringAttribute key="process_factory_id" value="org.eclipse.ant.ui.remoteAntProcessFactory"/>
+<booleanAttribute key="org.eclipse.debug.ui.ATTR_LAUNCH_IN_BACKGROUND" value="true"/>
+<booleanAttribute key="org.eclipse.ant.ui.DEFAULT_VM_INSTALL" value="true"/>
+<stringAttribute key="org.eclipse.jdt.launching.MAIN_TYPE" value="org.eclipse.ant.internal.ui.antsupport.InternalAntRunner"/>
+<stringAttribute key="org.eclipse.jdt.launching.VM_INSTALL_TYPE_ID" value="org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType"/>
+<stringAttribute key="org.eclipse.jdt.launching.PROJECT_ATTR" value="crsgdal"/>
+<stringAttribute key="org.eclipse.jdt.launching.VM_INSTALL_NAME" value="j2re1.4.2_11"/>
+<stringAttribute key="org.eclipse.ui.externaltools.ATTR_LOCATION" value="${workspace_loc:/crsgdal/build.xml}"/>
+<booleanAttribute key="org.eclipse.ui.externaltools.ATTR_TRIGGERS_CONFIGURED" value="true"/>
+<stringAttribute key="org.eclipse.jdt.launching.CLASSPATH_PROVIDER" value="org.eclipse.ant.ui.AntClasspathProvider"/>
+<stringAttribute key="org.eclipse.jdt.launching.SOURCE_PATH_PROVIDER" value="org.eclipse.ant.ui.AntClasspathProvider"/>
+</launchConfiguration>

Property changes on: tags/Root_F2/libraries/libJCRS/.externalToolBuilders/crsgdal build.xml [Builder].launch
___________________________________________________________________
Added: svn:eol-style
   + native
Added: svn:keywords
   + Author Date Id Revision

Index: tags/Root_F2/libraries/libJCRS/docs/interfaces.odt
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream

Property changes on: tags/Root_F2/libraries/libJCRS/docs/interfaces.odt
___________________________________________________________________
Added: svn:mime-type
   + application/octet-stream


Property changes on: tags/Root_F2/libraries/libJCRS
___________________________________________________________________
Added: svn:ignore
   + bin


Index: tags/Root_F2/extensions/extJCRS/.project
===================================================================
--- tags/Root_F2/extensions/extJCRS/.project	(revision 0)
+++ tags/Root_F2/extensions/extJCRS/.project	(revision 10155)
@@ -0,0 +1,17 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+	<name>extJCRS</name>
+	<comment></comment>
+	<projects>
+	</projects>
+	<buildSpec>
+		<buildCommand>
+			<name>org.eclipse.jdt.core.javabuilder</name>
+			<arguments>
+			</arguments>
+		</buildCommand>
+	</buildSpec>
+	<natures>
+		<nature>org.eclipse.jdt.core.javanature</nature>
+	</natures>
+</projectDescription>

Property changes on: tags/Root_F2/extensions/extJCRS/.project
___________________________________________________________________
Added: svn:keywords
   + Author Date Id Revision
Added: svn:eol-style
   + native

Index: tags/Root_F2/extensions/extJCRS/src-test/org/gvsig/crs/test/EnvTest.java
===================================================================
--- tags/Root_F2/extensions/extJCRS/src-test/org/gvsig/crs/test/EnvTest.java	(revision 0)
+++ tags/Root_F2/extensions/extJCRS/src-test/org/gvsig/crs/test/EnvTest.java	(revision 10155)
@@ -0,0 +1,10 @@
+package org.gvsig.crs.test;
+
+public class EnvTest {
+
+	public static void main(String[] args){
+		//System.setProperty("DIEGO", "diego");
+		System.out.println(System.getProperty("user.home"));
+	}
+	
+}

Property changes on: tags/Root_F2/extensions/extJCRS/src-test/org/gvsig/crs/test/EnvTest.java
___________________________________________________________________
Added: svn:keywords
   + Author Date Id Revision
Added: svn:eol-style
   + native

Index: tags/Root_F2/extensions/extJCRS/src-test/org/gvsig/crs/test/CopyFile.java
===================================================================
--- tags/Root_F2/extensions/extJCRS/src-test/org/gvsig/crs/test/CopyFile.java	(revision 0)
+++ tags/Root_F2/extensions/extJCRS/src-test/org/gvsig/crs/test/CopyFile.java	(revision 10155)
@@ -0,0 +1,45 @@
+package org.gvsig.crs.test;
+
+import java.io.File;
+import java.io.FileInputStream;
+import java.io.FileNotFoundException;
+import java.io.FileOutputStream;
+import java.io.IOException;
+import java.io.InputStream;
+import java.io.OutputStream;
+
+public class CopyFile {
+	public static void main(String[] args){
+
+		File fichero =new File("/home/dguerrero/Desarrollo-gvSIG/crs/workspace/extJCRS/data/sped2et.gsb");
+
+
+		File direc = new File("/home/dguerrero/Desktop/sped2et.gsb");
+
+
+		InputStream in = null;
+		OutputStream out = null;
+		try {
+			in = new FileInputStream(fichero);
+			out = new FileOutputStream(direc);
+		} catch (FileNotFoundException e) {
+			// TODO Auto-generated catch block
+			e.printStackTrace();
+		}
+
+//		 Transfer bytes from in to out
+		byte[] buf = new byte[1024];
+		int len;
+		try {
+			while ((len = in.read(buf)) > 0) {
+				out.write(buf, 0, len);
+			}
+			in.close();
+			out.close();
+		} catch (IOException e) {
+			// TODO Auto-generated catch block
+			e.printStackTrace();
+		}
+	}
+
+}

Property changes on: tags/Root_F2/extensions/extJCRS/src-test/org/gvsig/crs/test/CopyFile.java
___________________________________________________________________
Added: svn:eol-style
   + native
Added: svn:keywords
   + Author Date Id Revision

Index: tags/Root_F2/extensions/extJCRS/config/db_epsg.properties
===================================================================
--- tags/Root_F2/extensions/extJCRS/config/db_epsg.properties	(revision 0)
+++ tags/Root_F2/extensions/extJCRS/config/db_epsg.properties	(revision 10155)
@@ -0,0 +1,20 @@
+#HSQL database
+#Mon Oct 02 11:23:07 CEST 2006
+hsqldb.cache_file_scale=1
+runtime.gc_interval=0
+hsqldb.first_identity=0
+version=1.7.3
+modified=yes
+hsqldb.script_format=0
+sql.enforce_size=false
+hsqldb.cache_size_scale=10
+hsqldb.cache_scale=14
+hsqldb.version=1.7.3
+hsqldb.log_size=200
+sql.enforce_strict_size=false
+readonly=true
+hsqldb.compatible_version=1.7.2
+hsqldb.original_version=1.7.3
+sql.compare_in_locale=false
+hsqldb.nio_data_file=true
+hsqldb.cache_version=1.7.0

Property changes on: tags/Root_F2/extensions/extJCRS/config/db_epsg.properties
___________________________________________________________________
Added: svn:keywords
   + Author Date Id Revision
Added: svn:eol-style
   + native

Index: tags/Root_F2/extensions/extJCRS/config/about.htm
===================================================================
--- tags/Root_F2/extensions/extJCRS/config/about.htm	(revision 0)
+++ tags/Root_F2/extensions/extJCRS/config/about.htm	(revision 10155)
@@ -0,0 +1,28 @@
+<html>
+  <head>
+    <title>Extesi�n JCRS</title>
+    <meta content="">
+    <style></style>
+  </head>
+  <body>
+<table width="60%" border="0">
+  <tr>
+    <td width="35%"><img src="images/logoidr.png" width="127" height="100"></td>
+    <td width="65%"><div align="right"><img src="images/teledeteccion.png" width="368" height="100"></div></td>
+  </tr>
+  <tr>
+    <td colspan="2"><font face="Arial, Helvetica, sans-serif">&copy; Copyright
+      Generalitat Valenciana, Instituto de Desarrollo Regional, UCLM 2006.</font></td>
+  </tr>
+</table>
+  <h3>Extesi�n JCRS V 0.1</h3>
+  <p>Extensi�n para el manejo de Sistemas de Referencia de Coordenadas:</p> 
+  <ul>
+  	 <li>Nuevos repositorios de CRS: EPSG, IAU2000</li> 
+     <li>Transformaciones EPSG</li>
+     <li>Transformaciones por fichero Rejilla</li>
+     <li>...</li> 
+  </ul>
+  <p><br><br><b> Build Number: #build.number#</b></p>
+  </body>
+</html>
\ No newline at end of file

Property changes on: tags/Root_F2/extensions/extJCRS/config/about.htm
___________________________________________________________________
Added: svn:eol-style
   + native
Added: svn:keywords
   + Author Date Id Revision

Index: tags/Root_F2/extensions/extJCRS/config/text_en.properties
===================================================================
--- tags/Root_F2/extensions/extJCRS/config/text_en.properties	(revision 0)
+++ tags/Root_F2/extensions/extJCRS/config/text_en.properties	(revision 10155)
@@ -0,0 +1,165 @@
+#Translations for language [en]
+#Mon Sep 25 09:47:23 CEST 2006
+a_new_view=New view
+abstract=Abstract
+add=Add
+address=Address
+advanced=Advanced
+advanced_settings=Advanced options
+ancho_alto=Width x Height
+anterior=Previous
+apply=Apply
+bands=Bands
+brillo=Brightness
+brillo_y_contraste=Brightness and contrast
+browse=Browse
+cancel=Cancel
+cannotReproject=Unable to reproject this coordinate system
+cant_reproject_from_any_of=Unable to reproject from any of
+capas=Layers
+city=City
+clear=Clear
+conectar=Connect
+connect_error=Error connecting
+contact_info=Contact info
+contact_organization=Organization
+contact_person=Name
+contact_position=Position
+contraste=Contrast
+coor_geograficas=Geographic coordinates
+could_not_find_web_map_context_file=
+countries_of_the_world=Afghanistan;Albania;Algeria;American Samoa;Andorra;Angola;Anguilla;Antarctica;Antigua and Barbuda;Argentina;Armenia;Aruba;Ascension Island;Australia;Austria;Azerbaijan;Bahamas;Bahrain;Bangladesh;Barbados;Belarus;Belgium;Belize;Benin;Bermuda;Bhutan;Bolivia;Bosnia and Herzegovina;Botswana;Bouvet Island;Brazil;British Indian Ocean Territory;Brunei;Bulgaria;Burkina Faso;Burundi;Cambodia;Cameroon;Canada;Cape Verde;Cayman Islands;Central African Republic;Chad;Chile;China;Christmas Island;Cocos (Keeling) Islands;Colombia;Comoros;Congo (DRC);Congo;Cook Islands;Costa Rica;C\u00f4te d\u0092Ivoire;Croatia;Cuba;Cyprus;Czech Republic;Denmark;Djibouti;Dominica;Dominican Republic;Ecuador;Egypt;El Salvador;Equatorial Guinea;Eritrea;Estonia;Ethiopia;Falkland Islands (Islas Malvinas);Faroe Islands;Fiji Islands;Finland;France;French Guiana;French Polynesia;French Southern and Antarctic Lands;Gabon;Gambia, The;Georgia;Germany;Ghana;Gibraltar;Greece;Greenland;Grenada;Guadeloupe;Guam;Guatemala;Guernsey;Guinea;Guinea-Bissau;Guyana;Haiti;Heard Island and McDonald Islands;Honduras;Hong Kong SAR;Hungary;Iceland;India;Indonesia;Iran;Iraq;Ireland;Isle of Man;Israel;Italy;Jamaica;Japan;Jordan;Jersey;Kazakhstan;Kenya;Kiribati;Korea;Kuwait;Kyrgyzstan;Laos;Latvia;Lebanon;Lesotho;Liberia;Libya;Liechtenstein;Lithuania;Luxembourg;Macao SAR;Macedonia, Former Yugoslav Republic of;Madagascar;Malawi;Malaysia;Maldives;Mali;Malta;Marshall Islands;Martinique;Mauritania;Mauritius;Mayotte;Mexico;Micronesia;Moldova;Monaco;Mongolia;Montserrat;Morocco;Mozambique;Myanmar;Namibia;Nauru;Nepal;Netherlands Antilles;Netherlands, The;New Caledonia;New Zealand;Nicaragua;Niger;Nigeria;Niue;Norfolk Island;North Korea;Northern Mariana Islands;Norway;Oman;Pakistan;Palau;Palestinian Authority;Panama;Papua New Guinea;Paraguay;Peru;Philippines;Pitcairn Islands;Poland;Portugal;Puerto Rico;Qatar;Reunion;Romania;Russia;Rwanda;Samoa;San Marino;S\u00e3o Tom\u00e9 and Pr\u00edncipe;Saudi Arabia;Senegal;Serbia and Montenegro;Seychelles;Sierra Leone;Singapore;Slovakia;Slovenia;Solomon Islands;Somalia;South Africa;South Georgia and the South Sandwich Islands;Spain;Sri Lanka;St. Helena;St. Kitts and Nevis;St. Lucia;St. Pierre and Miquelon;St. Vincent and the Grenadines;Sudan;Suriname;Svalbard and Jan Mayen;Swaziland;Sweden;Switzerland;Syria;Taiwan;Tajikistan;Tanzania;Thailand;Timor-Leste;Togo;Tokelau;Tonga;Trinidad and Tobago;Tristan da Cunha;Tunisia;Turkey;Turkmenistan;Turks and Caicos Islands;Tuvalu;Uganda;Ukraine;United Arab Emirates;United Kingdom;United States of America;United States Minor Outlying Islands;Uruguay;Uzbekistan;Vanuatu;Vatican City;Venezuela;Vietnam;Virgin Islands;Virgin Islands, British;Wallis and Futuna;Yemen;Zambia;Zimbabwe
+country=Country
+covered_extension=Covered extension
+created_with=Created with
+defined_by_view_extent=Defined by the view\u0092s extent
+description=Description
+description_URL=Description URL
+dimension=Dimension
+dimensiones=Dimensions
+disagregate_layers=Maintain layer structure
+e-mail=E-mail
+edit_layer_properties_to_fix_them=Edit layer properties to fix them
+eliminar_extremos=Remove edges
+error=Error
+error_writting_file=
+estilos=Styles
+export=Export
+export_to_map_context=Export to Map Context
+extents_no_coincidentes=Extent of the selected image does not match with the origin image.
+fax=Fax
+Fichero=File
+fichero_existe=Selected file already exists as layer band
+file_name=File
+file_version=File version
+fit_WMS_layer=Config WMS Layer
+format=Format
+formato=Format
+formatos=Formats
+georeferenciado=Georeferenced
+height=Height
+html_in_a_new_view=<HTML>Creates a new view into the project. The new view will contain all the layers defined in the file.</HTML>
+html_in_other_view=<HTML>Adds the layers to the selected view in the list.</HTML>
+html_in_the_current_view=<HTML>Adds the layers defined in the file to the current active view.</HTML>
+id=ID
+import=Import
+import_map_context=Import maps from an OGC's Web Map Context file (.cml).
+in=in
+info=Information
+Informacion=Information
+interval=Interval
+invalid_dimension_values=Invalid dimension values
+is_required=is required
+keywords=Keywords
+layer=Layer
+layer_abstract=Abstract
+layer_name=Layer name
+layer_title=Layer title
+layers_in_other_view=Layers in other view
+layers_in_the_current_view=Layers in the current view
+lineal_directo=Direct linear
+logo_URL=Logo URL
+m/pixel=metros/pixel
+map_context_file_error=Web Map Context file error
+map_extent=Extent
+map_size_in_pixels=Map size (pixels)
+metadatos=Metadatos
+move_layer_down=Move down
+move_layer_up=Move up
+must_specify_a_file=You must specify a target file.
+name=Name
+none_selected=None selected
+not_available=Not available
+num_bandas=Band count
+ogc_mapcontext_file=OGC Web Map Context
+ok=Ok
+Ok=Ok
+opacidad=Opacity
+open_layers_as=Open layers as
+options=Options
+origen_de_datos=Data origin
+postcode=Postcode
+previsualizacion=Preview
+problems_encountered_while_importing=Problems encountered while importing
+properties=Properties
+propiedades_raster=Raster properties
+Proyecciones=Projections
+realce=Enhance
+recorte_colas=Tail trimming
+refresh_capabilities=Refresh cache
+refresh_capabilities_tooltip=Mark this check to override local data
+remove=Remove
+seleccionar_srs=Select SRS
+select_formats=Select formats
+select_layers=Select raster layers
+selected_dimensions=Selected dimensions
+selected_layers=Selected layers
+server=Server
+server_abstract=Summary
+server_cant_render_layers=This WMS server can't render these layers together.\nTry making separate requests, one for each layer.
+server_timeout=WMS server time out
+server_title=Title
+server_type=Server Type
+service_info=Service info
+set=Set
+settings=Settings
+settings_editor=Settings editor
+show_layer_names=Show names
+si=yes
+siguiente=Next
+single_value=Single value
+state_or_province=State/Province
+style=Style
+tamano=Size\:
+tamPixX=Pixel size X
+tamPixY=Pixel size Y
+telephone=Telephone
+tipo_dato=Data type
+title=Title
+to=To
+transparencia=Transparency
+unknown_response_format=Unkown response format
+unsupported_crs=Unsupported CRS
+unsupported_map_context_version=Uunsupported Web Map Context version.
+unsupported_version=Unsupported version
+use_custom_size=Custom size
+use_full_extent=Use full extent
+use_view_size=View size
+value=Value
+version=Version
+version_conflict=Version conflict
+view=View
+Vista=View
+web_map_context=Web Map Context
+web_map_context_settings=Web Map Context properties
+width=Width
+wms_cant_connect=Cannot connect to WMS
+wms_not_queryable=This server is not queryable
+wms_properties=WMS Properties
+wms_server_error=WMS Server error
+wms_transparency=Transparency
+WMSLayer=WMS Layer
+xmax=Maximum X
+xmin=Minimum X
+ymax=Maximum Y
+ymin=Minimum Y

Property changes on: tags/Root_F2/extensions/extJCRS/config/text_en.properties
___________________________________________________________________
Added: svn:keywords
   + Author Date Id Revision
Added: svn:eol-style
   + native

Index: tags/Root_F2/extensions/extJCRS/config/text_gl.properties
===================================================================
--- tags/Root_F2/extensions/extJCRS/config/text_gl.properties	(revision 0)
+++ tags/Root_F2/extensions/extJCRS/config/text_gl.properties	(revision 10155)
@@ -0,0 +1,165 @@
+#Translations for language [gl]
+#Tue Sep 19 14:57:24 CEST 2006
+a_new_view=Nova vista
+abstract=Resumo
+add=Engadir
+address=Enderezo
+advanced=Avanzada
+advanced_settings=Opci\u00f3ns avanzadas
+ancho_alto=Ancho alto
+anterior=Anterior
+apply=Aplicar
+bands=Bandas
+brillo=Brillo
+brillo_y_contraste=Brillo e Contraste
+browse=Examinar
+cancel=Cancelar
+cannotReproject=Non se pode reproxectar este sistema de coordenadas
+cant_reproject_from_any_of=
+capas=Capas
+city=Cidade
+clear=Limpar
+conectar=Conectar
+connect_error=Erro de conexi\u00f3n
+contact_info=Informaci\u00f3n de contacto
+contact_organization=Organizaci\u00f3n
+contact_person=Nome
+contact_position=Cargo
+contraste=Contraste
+coor_geograficas=Coordenadas xeogr\u00e1ficas
+could_not_find_web_map_context_file=
+countries_of_the_world=Acerbaix\u00e1n;Afganist\u00e1n;Albania;Alema\u00f1a;Alxeria;Andorra;Angola;Antiga e Barbuda;Arabia Saud\u00ed;Armenia;Arxentina;Australia;Austria;Bahamas;Bahrein;Bangladesh;Barbados;Belice;B\u00e9lxica;Ben\u00edn;Bermudas;Bielorrusia;Bolivia;Bosnia Hercegovina;Botsuana;Brasil;Brunei;Bulgaria;Burquina Faso;Burundi;But\u00e1n;Cabo Verde;Camboia;Camer\u00fan;Canad\u00e1;Casaquist\u00e1n;Chad;Chequia;Chile;China;Chipre;Cidade do Vaticano;Cimbabue;Colombia;Comores;Congo;Congo, Rep\u00fablica Democr\u00e1tica do;Corea do Norte;Corea do Sur;Costa do Marfil;Costa Rica;Croacia;Cuba;Curdist\u00e1n;Dinamarca;Dominica;Ecuador;Emiratos \u00c1rabes Unidos;Eritrea;Eslovaquia;Eslovenia;Espa\u00f1a;Estados Unidos de Am\u00e9rica;Estonia;Etiop\u00eda;Exipto;Fidxi;Filipinas;Finlandia;Francia;Gab\u00f3n;Gambia;Ghana;Granada;Grecia;Guadalupe;G\u00fciana;Guinea;Guinea Ecuatorial;Guinea-Bissau;Hait\u00ed;Honduras;Hungr\u00eda;Iemen;Illas Marshall;Illas Salom\u00f3n;India;Indonesia;Ir\u00e1n;Iraq;Irlanda;Islandia;Israel;Italia;Laos;Lesoto;Letonia;L\u00edbano;Liberia;Libia;Liechtenstein;Lituania;Luxemburgo;Macedonia, Antiga Rep\u00fablica Iusgolava de;Madagascar;Malaisia;Malaui;Maldivas;Mal\u00ed;Malta;Marrocos;Mauricio;Mauritania;M\u00e9xico;Micronesia, Estados Federados de;Moldavia;M\u00f3naco;Mongolia;Mozambique;Myanmar;Namibia;Nauru;Nepal;Nicaragua;Niue;N\u00edxer;Nixeria;Noruega;Nova Celandia;O Salvador;Om\u00e1n;Pa\u00edses Baixos;Palestina;Panam\u00e1;Pap\u00faa Nova Guinea;Paquist\u00e1n;Paraguai;Per\u00fa;Polonia;Porto Rico;Portugal;Qatar;Quenia;Quirguicist\u00e1n;Quiribati;Quvait;Reino Unido;Rep\u00fablica Centroafricana;Rep\u00fablica Dominicana;Ruanda;Ruman\u00eda;Rusia;Saint Kitts e Nevis;Samoa Occidental;San Mari\u00f1o;San Vicente e Granadinas;Santa Luc\u00eda;Santo Tom\u00e9 e Pr\u00edncipe;Senegal;Serbia e Montenegro;Serra Leona;Seychelles;Singapur;Siria;Somalia;Sri Lanka;Suacilandia;Sud\u00e1frica;Sud\u00e1n;Suecia;Su\u00edza;Surinam;Tailandia;Taiw\u00e1n;Tanzania;Taxiquist\u00e1n;Timor Leste;Togo;Tonga;Toquelau;Trinidade e Tobago;T\u00fanez;Turcomenist\u00e1n;Turqu\u00eda;Tuvalu;Ucra\u00edna;Uganda;Uruguai;Uzbequist\u00e1n;Vanuatu;Venezuela;Vietnam;Xap\u00f3n;Xeorxia;Xibuti;Xordania;Zambia
+country=Pa\u00eds
+covered_extension=Cobertura da extensi\u00f3n
+created_with=Creado con
+defined_by_view_extent=
+description=Descripci\u00f3n
+description_URL=URL descrici\u00f3n
+dimension=Dimensi\u00f3n
+dimensiones=Dimensi\u00f3ns
+disagregate_layers=
+e-mail=Correo electr\u00f3nico
+edit_layer_properties_to_fix_them=
+eliminar_extremos=Eliminar extremos
+error=Erro
+error_writting_file=Erro ao escribir o arquivo
+estilos=Estilos
+export=Exportar
+export_to_map_context=
+extents_no_coincidentes=Extensi\u00f3ns non coincidentes
+fax=Fax
+Fichero=Arquivo
+fichero_existe=Arquivo existe
+file_name=Arquivo
+file_version=Versi\u00f3n do arquivo
+fit_WMS_layer=Axustar capa WMS
+format=Formato
+formato=Formato
+formatos=Formatos
+georeferenciado=
+height=Alto
+html_in_a_new_view=<HTML>Crea unha vista nova no proxecto. A nova vista conter\u00e1 t\u00f3dalas capas definidas polo arquivo.</HTML>
+html_in_other_view=<HTML>Engade as capas na vista que especifique da lista seguinte\:</HTML>
+html_in_the_current_view=<HTML>Engade as capas definidas no arquivo \u00e1 vista activa.</HTML>
+id=ID
+import=Importar
+import_map_context=Importar mapas dende un arquivo Web Map Context de OGC
+in=en
+info=Informaci\u00f3n
+Informacion=Informaci\u00f3n
+interval=Int\u00e9rvalo
+invalid_dimension_values=
+is_required=\u00e9 obligatorio
+keywords=Palabras clave
+layer=Capa
+layer_abstract=Resumo da capa
+layer_name=Nome da capa
+layer_title=T\u00edtulo da capa
+layers_in_other_view=Capas na vista que eu escolla
+layers_in_the_current_view=Capas na vista actual
+lineal_directo=Lineal directo
+logo_URL=URL logotipo
+m/pixel=metros/pixel
+map_context_file_error=Erro no arquivo Web Map Context
+map_extent=Extensi\u00f3
+map_size_in_pixels=Tama\u00f1o do mapa (p\u00edxeles)
+metadatos=Metadatos
+move_layer_down=Mover abaixo
+move_layer_up=Mover arriba
+must_specify_a_file=Debe especificar un arquivo de destino.
+name=Nome
+none_selected=Ning\u00fan seleccionado
+not_available=Non dispo\u00f1ible
+num_bandas=N\u00famero de bandas
+ogc_mapcontext_file=OGC Web Map Context
+ok=Aceptar
+Ok=Aceptar
+opacidad=Opacidade
+open_layers_as=Abrir as capas como
+options=Opci\u00f3ns
+origen_de_datos=Origen de dades
+postcode=C\u00f3digo postal
+previsualizacion=Previsualizaci\u00f3n
+problems_encountered_while_importing=
+properties=Propiedades
+propiedades_raster=Propiedades do raster
+Proyecciones=
+realce=Realce
+recorte_colas=Recorte colas
+refresh_capabilities=Refrescar cach\u00e9
+refresh_capabilities_tooltip=Marque esta casilla para sobreescribir os datos anteriores.
+remove=Quitar
+seleccionar_srs=Seleccionar SRS
+select_formats=Seleccionar formatos
+select_layers=Seleccionar capas
+selected_dimensions=Dimensi\u00f3ns seleccionadas
+selected_layers=Capas seleccionadas
+server=Servidor
+server_abstract=Resumo do servidor
+server_cant_render_layers=Este servidor non pode renderizar estas capas xuntas. \nFaga petici\u00f3ns separadas para cada capa.
+server_timeout=Rematou o tempo de conexi\u00f3n ao servidor
+server_title=T\u00edtulo do servidor
+server_type=Tipo de servidor
+service_info=Informaci\u00f3n do servicio
+set=Establecer
+settings=Axustes
+settings_editor=Editor de axustes
+show_layer_names=Amosar nomes de capas
+si=
+siguiente=Seguinte
+single_value=Valor simple
+state_or_province=Estado/Provincia
+style=Estilo
+tamano=Tama\u00f1o\:
+tamPixX=
+tamPixY=
+telephone=Tel\u00e9fono
+tipo_dato=Tipo dato
+title=T\u00edtulo
+to=Hata
+transparencia=Transparencia
+unknown_response_format=Formato de resposta desco\u00f1ecido
+unsupported_crs=
+unsupported_map_context_version=
+unsupported_version=Versi\u00f3n non soportada
+use_custom_size=Tama\u00f1o personalizado
+use_full_extent=
+use_view_size=Tama\u00f1o da vista
+value=Valor
+version=Versi\u00f3n
+version_conflict=Conflicto de versi\u00f3n
+view=Vista
+Vista=Vista
+web_map_context=Web Map Context
+web_map_context_settings=Propiedades Web Map Context
+width=Ancho
+wms_cant_connect=
+wms_not_queryable=Este servidor non acepta petici\u00f3ns deste tipo
+wms_properties=Propiedades WMS
+wms_server_error=Erro do servidor WMS
+wms_transparency=Transparenza
+WMSLayer=Capa WMS
+xmax=xmax
+xmin=xmin
+ymax=ymax
+ymin=ymin

Property changes on: tags/Root_F2/extensions/extJCRS/config/text_gl.properties
___________________________________________________________________
Added: svn:eol-style
   + native
Added: svn:keywords
   + Author Date Id Revision

Index: tags/Root_F2/extensions/extJCRS/config/config.xml
===================================================================
--- tags/Root_F2/extensions/extJCRS/config/config.xml	(revision 0)
+++ tags/Root_F2/extensions/extJCRS/config/config.xml	(revision 10155)
@@ -0,0 +1,13 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<plugin-config>
+	<depends plugin-name="com.iver.cit.gvsig"/>
+	<libraries library-dir="."/>
+	<resourceBundle name="text"/>
+	<extensions>
+		<extension class-name="org.gvsig.crs.JCrsExtension"
+			description="M�dulo de JCrs." 
+			active="true" 
+			priority="1">
+		</extension>
+	</extensions>		
+</plugin-config>
\ No newline at end of file

Property changes on: tags/Root_F2/extensions/extJCRS/config/config.xml
___________________________________________________________________
Added: svn:eol-style
   + native
Added: svn:keywords
   + Author Date Id Revision

Index: tags/Root_F2/extensions/extJCRS/config/text_cs.properties
===================================================================
--- tags/Root_F2/extensions/extJCRS/config/text_cs.properties	(revision 0)
+++ tags/Root_F2/extensions/extJCRS/config/text_cs.properties	(revision 10155)
@@ -0,0 +1,165 @@
+#Translations for language [cs]
+#Tue Sep 19 14:57:24 CEST 2006
+a_new_view=
+abstract=Abstrakt
+add=P\u0159idat
+address=Adre\u00e7a
+advanced=
+advanced_settings=
+ancho_alto=\u0160\u00ed\u0159ka X v\u00fd\u0161ka
+anterior=P\u0159edchoz\u00ed
+apply=Pou\u017e\u00edt
+bands=Okraje
+brillo=
+brillo_y_contraste=
+browse=
+cancel=Zru\u0161it
+cannotReproject=Nelze znovuzobrazit sou\u0159adnicov\u00fd syst\u00e9m
+cant_reproject_from_any_of=
+capas=Vrstvy
+city=
+clear=Vy\u010distit
+conectar=Spojit
+connect_error=Chyba spojen\u00ed
+contact_info=
+contact_organization=
+contact_person=Jm\u00e9no
+contact_position=C\u00e0rrec
+contraste=Contrast
+coor_geograficas=Geografick\u00e9 sou\u0159adnice
+could_not_find_web_map_context_file=
+countries_of_the_world=Afghanistan;Albania;Algeria;American Samoa;Andorra;Angola;Anguilla;Antarctica;Antigua and Barbuda;Argentina;Armenia;Aruba;Ascension Island;Australia;Austria;Azerbaijan;Bahamas;Bahrain;Bangladesh;Barbados;Belarus;Belgium;Belize;Benin;Bermuda;Bhutan;Bolivia;Bosnia and Herzegovina;Botswana;Bouvet Island;Brazil;British Indian Ocean Territory;Brunei;Bulgaria;Burkina Faso;Burundi;Cambodia;Cameroon;Canada;Cape Verde;Cayman Islands;Central African Republic;Chad;Chile;China;Christmas Island;Cocos (Keeling) Islands;Colombia;Comoros;Congo (DRC);Congo;Cook Islands;Costa Rica;C\u00f4te d\u0092Ivoire;Croatia;Cuba;Cyprus;Czech Republic;Denmark;Djibouti;Dominica;Dominican Republic;Ecuador;Egypt;El Salvador;Equatorial Guinea;Eritrea;Estonia;Ethiopia;Falkland Islands (Islas Malvinas);Faroe Islands;Fiji Islands;Finland;France;French Guiana;French Polynesia;French Southern and Antarctic Lands;Gabon;Gambia, The;Georgia;Germany;Ghana;Gibraltar;Greece;Greenland;Grenada;Guadeloupe;Guam;Guatemala;Guernsey;Guinea;Guinea-Bissau;Guyana;Haiti;Heard Island and McDonald Islands;Honduras;Hong Kong SAR;Hungary;Iceland;India;Indonesia;Iran;Iraq;Ireland;Isle of Man;Israel;Italy;Jamaica;Japan;Jordan;Jersey;Kazakhstan;Kenya;Kiribati;Korea;Kuwait;Kyrgyzstan;Laos;Latvia;Lebanon;Lesotho;Liberia;Libya;Liechtenstein;Lithuania;Luxembourg;Macao SAR;Macedonia, Former Yugoslav Republic of;Madagascar;Malawi;Malaysia;Maldives;Mali;Malta;Marshall Islands;Martinique;Mauritania;Mauritius;Mayotte;Mexico;Micronesia;Moldova;Monaco;Mongolia;Montserrat;Morocco;Mozambique;Myanmar;Namibia;Nauru;Nepal;Netherlands Antilles;Netherlands, The;New Caledonia;New Zealand;Nicaragua;Niger;Nigeria;Niue;Norfolk Island;North Korea;Northern Mariana Islands;Norway;Oman;Pakistan;Palau;Palestinian Authority;Panama;Papua New Guinea;Paraguay;Peru;Philippines;Pitcairn Islands;Poland;Portugal;Puerto Rico;Qatar;Reunion;Romania;Russia;Rwanda;Samoa;San Marino;S\u00e3o Tom\u00e9 and Pr\u00edncipe;Saudi Arabia;Senegal;Serbia and Montenegro;Seychelles;Sierra Leone;Singapore;Slovakia;Slovenia;Solomon Islands;Somalia;South Africa;South Georgia and the South Sandwich Islands;Spain;Sri Lanka;St. Helena;St. Kitts and Nevis;St. Lucia;St. Pierre and Miquelon;St. Vincent and the Grenadines;Sudan;Suriname;Svalbard and Jan Mayen;Swaziland;Sweden;Switzerland;Syria;Taiwan;Tajikistan;Tanzania;Thailand;Timor-Leste;Togo;Tokelau;Tonga;Trinidad and Tobago;Tristan da Cunha;Tunisia;Turkey;Turkmenistan;Turks and Caicos Islands;Tuvalu;Uganda;Ukraine;United Arab Emirates;United Kingdom;United States of America;United States Minor Outlying Islands;Uruguay;Uzbekistan;Vanuatu;Vatican City;Venezuela;Vietnam;Virgin Islands;Virgin Islands, British;Wallis and Futuna;Yemen;Zambia;Zimbabwe
+country=
+covered_extension=Roz\u0161\u00ed\u0159en\u00ed
+created_with=
+defined_by_view_extent=
+description=Popis
+description_URL=
+dimension=Rozm\u011br
+dimensiones=Rozm\u011bry
+disagregate_layers=\u00daprava struktury vrstev
+e-mail=E-mail
+edit_layer_properties_to_fix_them=
+eliminar_extremos=Odstranit hrany
+error=Error
+error_writting_file=
+estilos=Styly
+export=Exportovat
+export_to_map_context=
+extents_no_coincidentes=Zvolen\u00e1 hranice nesouhlas\u00ed s p\u016fvodn\u00edm obr\u00e1zkem.
+fax=Fax
+Fichero=Soubor
+fichero_existe=Zvolen\u00fd soubor ji\u017e existuje jako vrstva
+file_name=
+file_version=
+fit_WMS_layer=Upravit WMS Vrstvu
+format=Form\u00e1t
+formato=Form\u00e1t
+formatos=Form\u00e1ty
+georeferenciado=
+height=
+html_in_a_new_view=
+html_in_other_view=
+html_in_the_current_view=
+id=ID
+import=Import
+import_map_context=
+in=v
+info=Informace
+Informacion=Informace
+interval=Interval
+invalid_dimension_values=
+is_required=\u00e9s obligatori
+keywords=Paraules clau
+layer=Vrstva
+layer_abstract=Abstrakt
+layer_name=N\u00e1zev vrstvy
+layer_title=N\u00e1zev vrstvy
+layers_in_other_view=
+layers_in_the_current_view=
+lineal_directo=P\u0159\u00edmo line\u00e1rn\u00ed
+logo_URL=URL logotip
+m/pixel=metros/pixel
+map_context_file_error=
+map_extent=Roz\u0161\u00ed\u0159en\u00ed
+map_size_in_pixels=
+metadatos=Metadatos
+move_layer_down=Dol\u016f
+move_layer_up=Nahoru
+must_specify_a_file=
+name=Jm\u00e9no
+none_selected=Nic nezvoleno
+not_available=Nen\u00ed k dispozici
+num_bandas=Okrajov\u00e9 hodnoty
+ogc_mapcontext_file=OGC Web Map Context
+ok=Budi\u017e
+Ok=Budi\u017e
+opacidad=Stupe\u0148 pr\u016fsvitnosti
+open_layers_as=
+options=
+origen_de_datos=P\u016fvod dat
+postcode=
+previsualizacion=
+problems_encountered_while_importing=
+properties=Vlastnosti
+propiedades_raster=Vlastnosti rastru
+Proyecciones=
+realce=vylep\u0161en\u00ed
+recorte_colas=O\u0159ez fronty
+refresh_capabilities=Obnovit cache
+refresh_capabilities_tooltip=P\u0159epsat lok\u00e1ln\u00ed data
+remove=Odstranit
+seleccionar_srs=Vybrat SRS
+select_formats=Zvolen\u00e9 form\u00e1ty
+select_layers=Vybrat vrstvu
+selected_dimensions=Zvolen\u00e9 rozm\u011bry
+selected_layers=Zvolen\u00e9 vrstvy
+server=Server
+server_abstract=Shrnut\u00ed
+server_cant_render_layers=Tento WMS nem\u016f\u017ee spojit tyto vrstvy. \nPokuste se odd\u011blit dotazy pro ka\u017edou vrstvu.
+server_timeout=WMS vypr\u0161el \u010dasov\u00fd limit
+server_title=N\u00e1zev
+server_type=Typ serveru
+service_info=Informace o serveru
+set=Nastavit
+settings=Nastaven\u00ed
+settings_editor=Editor nastaven\u00ed
+show_layer_names=
+si=
+siguiente=Dal\u0161\u00ed
+single_value=Jedna hodnota
+state_or_province=Estat/Prov\u00edncia
+style=Styl
+tamano=Velikost\:
+tamPixX=
+tamPixY=
+telephone=Tel\u00e8fon
+tipo_dato=Datov\u00fd typ
+title=N\u00e1zev
+to=Do
+transparencia=Pr\u016fhlednost
+unknown_response_format=Nezn\u00e1m\u00fd form\u00e1t odpov\u011bdi
+unsupported_crs=
+unsupported_map_context_version=
+unsupported_version=
+use_custom_size=
+use_full_extent=
+use_view_size=
+value=Hodnota
+version=Versi\u00f3
+version_conflict=Konflikt verz\u00ed
+view=Pohled
+Vista=Pohled
+web_map_context=
+web_map_context_settings=
+width=Ampl\u00e0ria
+wms_cant_connect=Nelze se spojit s WMS
+wms_not_queryable=Server neum\u00ed vyhled\u00e1vat
+wms_properties=WMS vlastnosti
+wms_server_error=Chyba WMS
+wms_transparency=Pr\u016fhlednost
+WMSLayer=WMS vrstva
+xmax=maximum X
+xmin=minimum X
+ymax=maximum Y
+ymin=minimum Y

Property changes on: tags/Root_F2/extensions/extJCRS/config/text_cs.properties
___________________________________________________________________
Added: svn:eol-style
   + native
Added: svn:keywords
   + Author Date Id Revision

Index: tags/Root_F2/extensions/extJCRS/config/db_epsg.script
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream

Property changes on: tags/Root_F2/extensions/extJCRS/config/db_epsg.script
___________________________________________________________________
Added: svn:mime-type
   + application/octet-stream

Index: tags/Root_F2/extensions/extJCRS/config/text_fr.properties
===================================================================
--- tags/Root_F2/extensions/extJCRS/config/text_fr.properties	(revision 0)
+++ tags/Root_F2/extensions/extJCRS/config/text_fr.properties	(revision 10155)
@@ -0,0 +1,165 @@
+#Translations for language [fr]
+#Tue Sep 19 14:57:24 CEST 2006
+a_new_view=
+abstract=R\u00e9sum\u00e9
+add=Ajouter
+address=Adre\u00e7a
+advanced=
+advanced_settings=
+ancho_alto=Largeur X hauteur
+anterior=Pr\u00e9c\u00e9dent
+apply=Appliquer
+bands=Bandes
+brillo=Brightness
+brillo_y_contraste=
+browse=
+cancel=Annuler
+cannotReproject=No es pot reprojectar aquest sistema de refer\u00e8ncia
+cant_reproject_from_any_of=
+capas=Couches g\u00e9ographiques
+city=
+clear=Effacer
+conectar=Connecter
+connect_error=
+contact_info=
+contact_organization=Organitzaci\u00f3
+contact_person=Nom
+contact_position=C\u00e0rrec
+contraste=Contrast
+coor_geograficas=Coordonn\u00e9es g\u00e9ographiques
+could_not_find_web_map_context_file=
+countries_of_the_world=Afghanistan;Albania;Algeria;American Samoa;Andorra;Angola;Anguilla;Antarctica;Antigua and Barbuda;Argentina;Armenia;Aruba;Ascension Island;Australia;Austria;Azerbaijan;Bahamas;Bahrain;Bangladesh;Barbados;Belarus;Belgium;Belize;Benin;Bermuda;Bhutan;Bolivia;Bosnia and Herzegovina;Botswana;Bouvet Island;Brazil;British Indian Ocean Territory;Brunei;Bulgaria;Burkina Faso;Burundi;Cambodia;Cameroon;Canada;Cape Verde;Cayman Islands;Central African Republic;Chad;Chile;China;Christmas Island;Cocos (Keeling) Islands;Colombia;Comoros;Congo (DRC);Congo;Cook Islands;Costa Rica;C\u00f4te d\u0092Ivoire;Croatia;Cuba;Cyprus;Czech Republic;Denmark;Djibouti;Dominica;Dominican Republic;Ecuador;Egypt;El Salvador;Equatorial Guinea;Eritrea;Estonia;Ethiopia;Falkland Islands (Islas Malvinas);Faroe Islands;Fiji Islands;Finland;France;French Guiana;French Polynesia;French Southern and Antarctic Lands;Gabon;Gambia, The;Georgia;Germany;Ghana;Gibraltar;Greece;Greenland;Grenada;Guadeloupe;Guam;Guatemala;Guernsey;Guinea;Guinea-Bissau;Guyana;Haiti;Heard Island and McDonald Islands;Honduras;Hong Kong SAR;Hungary;Iceland;India;Indonesia;Iran;Iraq;Ireland;Isle of Man;Israel;Italy;Jamaica;Japan;Jordan;Jersey;Kazakhstan;Kenya;Kiribati;Korea;Kuwait;Kyrgyzstan;Laos;Latvia;Lebanon;Lesotho;Liberia;Libya;Liechtenstein;Lithuania;Luxembourg;Macao SAR;Macedonia, Former Yugoslav Republic of;Madagascar;Malawi;Malaysia;Maldives;Mali;Malta;Marshall Islands;Martinique;Mauritania;Mauritius;Mayotte;Mexico;Micronesia;Moldova;Monaco;Mongolia;Montserrat;Morocco;Mozambique;Myanmar;Namibia;Nauru;Nepal;Netherlands Antilles;Netherlands, The;New Caledonia;New Zealand;Nicaragua;Niger;Nigeria;Niue;Norfolk Island;North Korea;Northern Mariana Islands;Norway;Oman;Pakistan;Palau;Palestinian Authority;Panama;Papua New Guinea;Paraguay;Peru;Philippines;Pitcairn Islands;Poland;Portugal;Puerto Rico;Qatar;Reunion;Romania;Russia;Rwanda;Samoa;San Marino;S\u00e3o Tom\u00e9 and Pr\u00edncipe;Saudi Arabia;Senegal;Serbia and Montenegro;Seychelles;Sierra Leone;Singapore;Slovakia;Slovenia;Solomon Islands;Somalia;South Africa;South Georgia and the South Sandwich Islands;Spain;Sri Lanka;St. Helena;St. Kitts and Nevis;St. Lucia;St. Pierre and Miquelon;St. Vincent and the Grenadines;Sudan;Suriname;Svalbard and Jan Mayen;Swaziland;Sweden;Switzerland;Syria;Taiwan;Tajikistan;Tanzania;Thailand;Timor-Leste;Togo;Tokelau;Tonga;Trinidad and Tobago;Tristan da Cunha;Tunisia;Turkey;Turkmenistan;Turks and Caicos Islands;Tuvalu;Uganda;Ukraine;United Arab Emirates;United Kingdom;United States of America;United States Minor Outlying Islands;Uruguay;Uzbekistan;Vanuatu;Vatican City;Venezuela;Vietnam;Virgin Islands;Virgin Islands, British;Wallis and Futuna;Yemen;Zambia;Zimbabwe
+country=
+covered_extension=
+created_with=Creat amb
+defined_by_view_extent=
+description=Description
+description_URL=
+dimension=Dimension
+dimensiones=Dimensions
+disagregate_layers=
+e-mail=E-mail
+edit_layer_properties_to_fix_them=
+eliminar_extremos=Eliminer les extr\u00eames
+error=Error
+error_writting_file=
+estilos=Styles
+export=Exporter
+export_to_map_context=
+extents_no_coincidentes=Les dimmensions de l'image selectionn\u00e9e ne co\u00efncident pas avec celles de l'image d'origine.
+fax=Fax
+Fichero=Fichier
+fichero_existe=Le fichier selectionn\u00e9 existe d\u00e9j\u00e0
+file_name=Nom de fichier 
+file_version=
+fit_WMS_layer=Ajuster \u00e0 la couche WMS
+format=Format
+formato=Format
+formatos=Formats
+georeferenciado=
+height=
+html_in_a_new_view=<HTML>Crea una vista nova al projecte. La nova vista contindr\u00e0 totes les capes definides pel fitxer.</HTML>
+html_in_other_view=<HTML>Afegeix les capes a la vista que especifique de les de la llista seg\u00fcent.</HTML>
+html_in_the_current_view=<HTML>Afegeix les capes definides pel fitxer a la actual vista activa.</HTML>
+id=ID
+import=
+import_map_context=
+in=\u00e0 l'int\u00e9rieur
+info=Information
+Informacion=
+interval=Intervalle
+invalid_dimension_values=
+is_required=\u00e9s obligatori
+keywords=Paraules clau
+layer=Couche
+layer_abstract=R\u00e9sum\u00e9
+layer_name=Nom de la couche
+layer_title=Titre de la couche
+layers_in_other_view=Capes la vista que jo trie
+layers_in_the_current_view=
+lineal_directo=Lin\u00e9aire direct
+logo_URL=URL logotip
+m/pixel=metros/pixel
+map_context_file_error=
+map_extent=Extension
+map_size_in_pixels=Tamany del mapa (p\u00edxels)
+metadatos=Metadatos
+move_layer_down=Moure avall
+move_layer_up=Moure amunt
+must_specify_a_file=
+name=Nom
+none_selected=Aucune selection
+not_available=No disponible
+num_bandas=Nombre de bandes
+ogc_mapcontext_file=OGC Web Map Context
+ok=Accepter
+Ok=Accepter
+opacidad=Opacit\u00e9
+open_layers_as=
+options=
+origen_de_datos=Origine des donn\u00e9es
+postcode=
+previsualizacion=
+problems_encountered_while_importing=
+properties=Propri\u00e9t\u00e9s
+propiedades_raster=Propri\u00e9t\u00e9s du raster
+Proyecciones=
+realce=R\u00e9heussement
+recorte_colas=Couper les r\u00e9sidus
+refresh_capabilities=Refrescar mem\u00f2ria cau
+refresh_capabilities_tooltip=Marque esta casella per a sobreescriure les dades anteriores.
+remove=Quitter
+seleccionar_srs=S\u00e9lectionner SRS
+select_formats=S\u00e9lection des formats
+select_layers=S\u00e9lectionner des couches
+selected_dimensions=S\u00e9lectionner une dimension
+selected_layers=Couches s\u00e9lectionn\u00e9es
+server=Serveur
+server_abstract=R\u00e9sum\u00e9
+server_cant_render_layers=Aquest servidor WMS no pot renderitzar aquestes dues capes conjuntament.\nSepareles en dues cosultes diferents.
+server_timeout=WMS d\u00e9lais d\u00e9pass\u00e9
+server_title=Titre
+server_type=Type de server
+service_info=Information sur le service
+set=Etablir
+settings=
+settings_editor=
+show_layer_names=
+si=
+siguiente=Suivant
+single_value=Valeur unique
+state_or_province=
+style=Style
+tamano=Taille\:
+tamPixX=
+tamPixY=
+telephone=Tel\u00e8fon
+tipo_dato=Type de donn\u00e9e
+title=Titre
+to=Jusqu'\u00e0
+transparencia=Transparence
+unknown_response_format=
+unsupported_crs=
+unsupported_map_context_version=
+unsupported_version=Versi\u00f3 no suportada
+use_custom_size=
+use_full_extent=
+use_view_size=
+value=Valeur
+version=Versi\u00f3
+version_conflict=Conflicte de versi\u00f3
+view=Vue
+Vista=Vue
+web_map_context=
+web_map_context_settings=
+width=Ampl\u00e0ria
+wms_cant_connect=Cannot connect to WMS
+wms_not_queryable=Aquest servidor no accepta peticions d\u0092aquest tipus
+wms_properties=Propri\u00e9t\u00e9s WMS
+wms_server_error=Error del servidor WMS
+wms_transparency=Transparence
+WMSLayer=Couche WMS
+xmax=X minimum
+xmin=X minimum
+ymax=Y minimum
+ymin=Y minimum

Property changes on: tags/Root_F2/extensions/extJCRS/config/text_fr.properties
___________________________________________________________________
Added: svn:eol-style
   + native
Added: svn:keywords
   + Author Date Id Revision

Index: tags/Root_F2/extensions/extJCRS/config/text_eu.properties
===================================================================
--- tags/Root_F2/extensions/extJCRS/config/text_eu.properties	(revision 0)
+++ tags/Root_F2/extensions/extJCRS/config/text_eu.properties	(revision 10155)
@@ -0,0 +1,165 @@
+#Translations for language [eu]
+#Tue Sep 19 14:57:24 CEST 2006
+a_new_view=Bista berria
+abstract=Laburpena
+add=Gehitu
+address=Helbidea
+advanced=Aurreratua
+advanced_settings=Aukera aurreratuak
+ancho_alto=Zabalera altuera
+anterior=Aurrekoa
+apply=Aplikatu
+bands=Bandak
+brillo=Distira
+brillo_y_contraste=Distira eta kontrastea
+browse=Aztertu
+cancel=Utzi
+cannotReproject=Koordenatu sistema hau ezin da berriro proiektatu
+cant_reproject_from_any_of=
+capas=Geruzak
+city=Herria
+clear=Garbitu
+conectar=Konektatu
+connect_error=Konexio-errorea
+contact_info=Harremanetarako informazioa
+contact_organization=Antolaketa
+contact_person=Izena
+contact_position=Kargua
+contraste=Kontrastea
+coor_geograficas=Koordenatu geografikoak
+could_not_find_web_map_context_file=
+countries_of_the_world=Afganistan;Albania;Aljeria;Ameriketako Samoa;Andorra;Angola;Anguilla;Antartika;Antigua eta Barbuda;Argentina;Armenia;Aruba;Ascension uhartea;Australia;Austria;Azerbaijan;Bahamak;Bahrain;Bangladesh;Barbados;Bielorrusia;Belgika;Belize;Benin;Bermuda;Bhutan;Bolivia;Bosnia-Herzegovina;Botswana;Bouvet uhartea;Brazil;Indiako ozeanoko Britainiar Lurraldea;Brunei;Bulgaria;Burkina Faso;Burundi;Kanbodia;Kamerun;Kanada;Cabo Verde;Cayman uharteak;Afrika Erdiko Errepublika;Txad;Txile;Txina;Christmas uhartea;Kokoen uhartea(Keeling);Kolonbia;Komoreak;Kongo (KED);Kongo;Cook uharteak;Costa Rica;Boli Kosta;Kroazia;Kuba;Zipre;Txekiar Errepublika;Danimarka;Djibouti;Dominika;Dominikar Errepublika;Ekuador;Egipto;El Salvador;Ekuatore Ginea;Eritrea;Estonia;Etiopia;Falkland uharteak;Faroe uharteak;Fiji;Finlandia;Frantzia;Guyana Frantsesa;Polinesia Frantsesa;Hegoaldeko eta Antartikoko Frantziako lurraldea;Gabon;Gambia;Georgia;Alemania;Ghana;Gibraltar;Grezia;Groenlandia;Grenada;Guadalupe;Guam;Guatemala;Guernesey;Ginea;Ginea-Bissau;Guyana;Haiti;Heard uhartea eta McDonald uharteak;Honduras;Hong Kong SAR;Hungaria;Islandia;India;Indonesia;Iran;Irak;Irlanda;Man uhartea;Israel;Italia;Jamaika;Japonia;Jordania;Jersey;Kazakhstan;Kenya;Kiribati;Korea;Kuwait;Kirgizistan;Laos;Latvia;Libano;Lesotho;Liberia;Libia;Liechtenstein;Lituania;Luxenburgo;Macau SAR;Mazedonia;Madagaskar;Malawi;Malaysia;Maldivak;Mali;Malta;Marshall uharteak;Martinika;Mauritania;Maurizio;Mayotte;Mexiko;Mikronesia;Moldavia;Monako;Mongolia;Montserrat;Maroko;Mozambike;Myanmar;Namibia;Nauru;Nepal;Holandarren Antillak;Herbehereak;Kaledonia Berria;Zeelanda Berria;Nikaragua;Niger;Nigeria;Niue;Norfolk uhartea;Ipar Korea;Mariana uharteak;Norvegia;Oman;Pakistan;Palau;Palestinako Agintea;Panama;Papua Ginea Berria;Paraguai;Peru;Filipinak;Pitcairn uharteak;Polonia;Portugal;Puerto Rico;Qatar;Reunion;Errumania;Errusia;Ruanda;Samoa;San Marino;Santo Tome eta Principe;Saudi Arabia;Senegal;Serbia eta Montenegro;Seychelleak;Sierra Leona;Singapur;Eslovakia;Eslovenia;Solomon uharteak;Somalia;Hegoafrika;South Georgia eta hegoaldeko Sandwich uharteak;Espainia;Sri Lanka;Santa Helena;St. Kitts eta Nevis;St. Luzia;Sain-Pierre eta Mikelune;Saint Vincent eta Grenadinak;Sudan;Surinam;Svalbard eta Jan Mayen;Swazilandia;Suedia;Suitza;Siria;Taiwan;Tadjikistan;Tanzania;Thailandia;Timor-Leste;Togo;Tokelau;Tonga;Trinidad eta Tobago;Tristan da Cunha;Tunisia;Turkia;Turkmenistan;Turk eta Caiko uharteak;Tuvalu;Uganda;Ukraina;Arabiar Emirerri Batuak;Britainia Handia;Ameriketako Estatu Batuak;Estatu Batuetako Garrantzia Txikiko Uharte Periferikoak;Uruguai;Uzbekistan;Vanuatu;Vatikano Hiria;Venezuela;Vietnam;Birjina uharteak;Birjina uharteak,Britainia;Wallis eta Futuna;Yemen;Zambia;Zimbabwe
+country=Herrialdea
+covered_extension=Hedaduraren estaldura
+created_with=Honekin sortua\:
+defined_by_view_extent=
+description=Deskripzioa
+description_URL=URL deskribapena
+dimension=Neurria
+dimensiones=Neurriak
+disagregate_layers=Geruzen egitura mantendu
+e-mail=e-posta
+edit_layer_properties_to_fix_them=
+eliminar_extremos=Ezabatu muturrak
+error=Errorea
+error_writting_file=Errorea fitxategia idaztean
+estilos=Estiloak
+export=Esportatu
+export_to_map_context=
+extents_no_coincidentes=Hedadurak ez datoz bat
+fax=Faxa
+Fichero=Fitxategia
+fichero_existe=Fitxategia badago
+file_name=Fitxategia
+file_version=Fitxategiaren bertsioa
+fit_WMS_layer=Doitu WMS geruza
+format=Formatua
+formato=Formatua
+formatos=Formatuak
+georeferenciado=
+height=Altuera
+html_in_a_new_view=Sortu bista berria proiektuan. Bista berrian fitxategiak zehaztutako geruza guztiak jasoko dira.
+html_in_other_view=Gehitu geruzak zerrenda honetan zehaztutako bistan\:
+html_in_the_current_view=<HTML>Fitxategian zehaztutako geruzak aktibo dagoen bistan gehitzen ditu.</HTML>
+id=ID
+import=Inportatu
+import_map_context=Inportatu mapak OGC Web Map Context fitxategi batetik
+in=hemen\:
+info=Informazioa
+Informacion=Informazioa
+interval=Tartea
+invalid_dimension_values=
+is_required=nahitaezkoa da
+keywords=Gako-hitzak
+layer=Geruza
+layer_abstract=Laburpena
+layer_name=Geruzaren izena
+layer_title=Geruzaren izenburua
+layers_in_other_view=Geruzak nik aukeratutako bistan
+layers_in_the_current_view=Oraingo bistako geruzak
+lineal_directo=Zuzeneko lineala
+logo_URL=URL logotipoa
+m/pixel=metros/pixel
+map_context_file_error=Errorea Web Map Context fitxategian
+map_extent=Luzapena
+map_size_in_pixels=Maparen tamaina (pixelak)
+metadatos=Metadatos
+move_layer_down=Behera mugitu
+move_layer_up=Gora mugitu
+must_specify_a_file=Xede fitxategi bat zehaztu behar duzu.
+name=Izena
+none_selected=Ez da bat ere ez hautatu
+not_available=Ez dago erabilgarri
+num_bandas=Banda kopurua
+ogc_mapcontext_file=OGC Web Map Context
+ok=Ados
+Ok=Ados
+opacidad=Opakotasuna
+open_layers_as=Zabaldu geruzak honela\:
+options=Aukerak
+origen_de_datos=Datu-iturburua
+postcode=Posta kodea
+previsualizacion=Aurrebista
+problems_encountered_while_importing=
+properties=Ezaugarriak
+propiedades_raster=Raster-aren ezaugarriak
+Proyecciones=
+realce=Irtengunea
+recorte_colas=Ilarak ebaki
+refresh_capabilities=Eguneratu aurrememoria
+refresh_capabilities_tooltip=Markatu lauki hau aurreko datuen gainean idazteko
+remove=Kendu
+seleccionar_srs=Hautatu SRS
+select_formats=Hautatu formatuak
+select_layers=Hautatu geruzak
+selected_dimensions=Hautatutako dimentsioak
+selected_layers=Hautatutako geruzak
+server=Zerbitzaria
+server_abstract=Aurkibidea
+server_cant_render_layers=Zerbitzari honek ezin ditu geruza horiek batera errendatu. Saia zaitez geruza bakoitzerako eskari bat egiten
+server_timeout=Server timeout
+server_title=Zerbitzariaren izenburua
+server_type=Zerbitzari mota
+service_info=Zerbitzuari buruzko argibideak
+set=Ezarri
+settings=Doikuntzak
+settings_editor=Doikuntza-editorea
+show_layer_names=Erakutsi geruzen izenak
+si=
+siguiente=Hurrengoa
+single_value=Balio bakuna
+state_or_province=Estatua/Probintzia
+style=Estiloa
+tamano=Tamaina\:
+tamPixX=
+tamPixY=
+telephone=Telefonoa
+tipo_dato=Datu mota
+title=Izenburua
+to=Honaino
+transparencia=Gardentasuna
+unknown_response_format=Erantzunaren formatua ezezaguna da
+unsupported_crs=
+unsupported_map_context_version=Web Map Context fitxategiaren bertsioa ezin da jasan
+unsupported_version=Ezin da bertsio hori jasan
+use_custom_size=Tamaina pertsonalizatua
+use_full_extent=
+use_view_size=Bistaren tamaina
+value=Balioa
+version=Bertsioa
+version_conflict=Bertsio-gatazka
+view=Bista
+Vista=Bista
+web_map_context=Web Map Context
+web_map_context_settings=Web Map Context fitxategiaren ezaugarriak
+width=Zabalera
+wms_cant_connect=Ezin izan da WMSrekin konexioa egin
+wms_not_queryable=Zerbitzari honek ez ditu era horretako eskariak onartzen
+wms_properties=WMS ezaugarriak
+wms_server_error=WMS zerbitzariaren errorea
+wms_transparency=Gardentasuna
+WMSLayer=WMS geruza
+xmax=xmax
+xmin=xmin
+ymax=ymax
+ymin=ymin

Property changes on: tags/Root_F2/extensions/extJCRS/config/text_eu.properties
___________________________________________________________________
Added: svn:eol-style
   + native
Added: svn:keywords
   + Author Date Id Revision

Index: tags/Root_F2/extensions/extJCRS/config/text_it.properties
===================================================================
--- tags/Root_F2/extensions/extJCRS/config/text_it.properties	(revision 0)
+++ tags/Root_F2/extensions/extJCRS/config/text_it.properties	(revision 10155)
@@ -0,0 +1,165 @@
+#Translations for language [it]
+#Tue Sep 19 14:57:24 CEST 2006
+a_new_view=
+abstract=Riassunto
+add=Aggiungi
+address=Adre\u00e7a
+advanced=
+advanced_settings=
+ancho_alto=Larghezza X altezza
+anterior=Anteriore
+apply=Applica
+bands=Bande
+brillo=Brightness
+brillo_y_contraste=
+browse=
+cancel=Cancella
+cannotReproject=No es pot reprojectar aquest sistema de refer\u00e8ncia
+cant_reproject_from_any_of=
+capas=Layers
+city=
+clear=Pulisci
+conectar=Connettere
+connect_error=Error de conbexi\u00f3
+contact_info=
+contact_organization=Organitzaci\u00f3
+contact_person=Nome
+contact_position=C\u00e0rrec
+contraste=Contrast
+coor_geograficas=Coordinate geografiche
+could_not_find_web_map_context_file=
+countries_of_the_world=Afghanistan;Albania;Algeria;American Samoa;Andorra;Angola;Anguilla;Antarctica;Antigua and Barbuda;Argentina;Armenia;Aruba;Ascension Island;Australia;Austria;Azerbaijan;Bahamas;Bahrain;Bangladesh;Barbados;Belarus;Belgium;Belize;Benin;Bermuda;Bhutan;Bolivia;Bosnia and Herzegovina;Botswana;Bouvet Island;Brazil;British Indian Ocean Territory;Brunei;Bulgaria;Burkina Faso;Burundi;Cambodia;Cameroon;Canada;Cape Verde;Cayman Islands;Central African Republic;Chad;Chile;China;Christmas Island;Cocos (Keeling) Islands;Colombia;Comoros;Congo (DRC);Congo;Cook Islands;Costa Rica;C\u00f4te d\u0092Ivoire;Croatia;Cuba;Cyprus;Czech Republic;Denmark;Djibouti;Dominica;Dominican Republic;Ecuador;Egypt;El Salvador;Equatorial Guinea;Eritrea;Estonia;Ethiopia;Falkland Islands (Islas Malvinas);Faroe Islands;Fiji Islands;Finland;France;French Guiana;French Polynesia;French Southern and Antarctic Lands;Gabon;Gambia, The;Georgia;Germany;Ghana;Gibraltar;Greece;Greenland;Grenada;Guadeloupe;Guam;Guatemala;Guernsey;Guinea;Guinea-Bissau;Guyana;Haiti;Heard Island and McDonald Islands;Honduras;Hong Kong SAR;Hungary;Iceland;India;Indonesia;Iran;Iraq;Ireland;Isle of Man;Israel;Italy;Jamaica;Japan;Jordan;Jersey;Kazakhstan;Kenya;Kiribati;Korea;Kuwait;Kyrgyzstan;Laos;Latvia;Lebanon;Lesotho;Liberia;Libya;Liechtenstein;Lithuania;Luxembourg;Macao SAR;Macedonia, Former Yugoslav Republic of;Madagascar;Malawi;Malaysia;Maldives;Mali;Malta;Marshall Islands;Martinique;Mauritania;Mauritius;Mayotte;Mexico;Micronesia;Moldova;Monaco;Mongolia;Montserrat;Morocco;Mozambique;Myanmar;Namibia;Nauru;Nepal;Netherlands Antilles;Netherlands, The;New Caledonia;New Zealand;Nicaragua;Niger;Nigeria;Niue;Norfolk Island;North Korea;Northern Mariana Islands;Norway;Oman;Pakistan;Palau;Palestinian Authority;Panama;Papua New Guinea;Paraguay;Peru;Philippines;Pitcairn Islands;Poland;Portugal;Puerto Rico;Qatar;Reunion;Romania;Russia;Rwanda;Samoa;San Marino;S\u00e3o Tom\u00e9 and Pr\u00edncipe;Saudi Arabia;Senegal;Serbia and Montenegro;Seychelles;Sierra Leone;Singapore;Slovakia;Slovenia;Solomon Islands;Somalia;South Africa;South Georgia and the South Sandwich Islands;Spain;Sri Lanka;St. Helena;St. Kitts and Nevis;St. Lucia;St. Pierre and Miquelon;St. Vincent and the Grenadines;Sudan;Suriname;Svalbard and Jan Mayen;Swaziland;Sweden;Switzerland;Syria;Taiwan;Tajikistan;Tanzania;Thailand;Timor-Leste;Togo;Tokelau;Tonga;Trinidad and Tobago;Tristan da Cunha;Tunisia;Turkey;Turkmenistan;Turks and Caicos Islands;Tuvalu;Uganda;Ukraine;United Arab Emirates;United Kingdom;United States of America;United States Minor Outlying Islands;Uruguay;Uzbekistan;Vanuatu;Vatican City;Venezuela;Vietnam;Virgin Islands;Virgin Islands, British;Wallis and Futuna;Yemen;Zambia;Zimbabwe
+country=
+covered_extension=Estensione
+created_with=
+defined_by_view_extent=
+description=Descrizione
+description_URL=
+dimension=Dimensione
+dimensiones=Dimensioni
+disagregate_layers=
+e-mail=E-mail
+edit_layer_properties_to_fix_them=
+eliminar_extremos=Elimina gli estremi
+error=Error
+error_writting_file=
+estilos=Stili
+export=Exportar
+export_to_map_context=
+extents_no_coincidentes=L'estensione della immagine selezionata non coincide con la immagine di origine.
+fax=Fax
+Fichero=Archivio
+fichero_existe=Il file selezionato esiste gi\u00e1 come banda del layer
+file_name=
+file_version=
+fit_WMS_layer=Aggiusta layer WMS
+format=Formato
+formato=Formato
+formatos=Formati
+georeferenciado=
+height=
+html_in_a_new_view=<HTML>Crea una vista nova al projecte. La nova vista contindr\u00e0 totes les capes definides pel fitxer.</HTML>
+html_in_other_view=
+html_in_the_current_view=<HTML>Afegeix les capes definides pel fitxer a la actual vista activa.</HTML>
+id=ID
+import=
+import_map_context=
+in=in
+info=Informazione
+Informacion=Informazione
+interval=Intervallo
+invalid_dimension_values=
+is_required=\u00e9s obligatori
+keywords=Paraules clau
+layer=Livello
+layer_abstract=Riassunto
+layer_name=Nome del layer
+layer_title=Titolo del layer
+layers_in_other_view=
+layers_in_the_current_view=
+lineal_directo=Lineare diretto
+logo_URL=URL logotip
+m/pixel=metros/pixel
+map_context_file_error=
+map_extent=Estensione
+map_size_in_pixels=Tamany del mapa (p\u00edxels)
+metadatos=Metadatos
+move_layer_down=Moure avall
+move_layer_up=Moure amunt
+must_specify_a_file=
+name=Nome
+none_selected=Nessuna selezione
+not_available=No disponible
+num_bandas=Numero delle bande
+ogc_mapcontext_file=OGC Web Map Context
+ok=Accetta
+Ok=Accetta
+opacidad=Opacit\u00e1
+open_layers_as=
+options=
+origen_de_datos=Origine dei dati
+postcode=
+previsualizacion=
+problems_encountered_while_importing=
+properties=Proprieta'
+propiedades_raster=Propriet\u00e1 del raster
+Proyecciones=
+realce=Rilievo
+recorte_colas=Ritaglio degli estremi
+refresh_capabilities=Refrescar mem\u00f2ria cau
+refresh_capabilities_tooltip=Marque esta casella per a sobreescriure les dades anteriores.
+remove=Rimuovi
+seleccionar_srs=Selezionare SRS
+select_formats=Seleziona formati
+select_layers=Seleziona Layers
+selected_dimensions=Dimensioni selezionate
+selected_layers=Layers selezionati
+server=Server
+server_abstract=Sommario
+server_cant_render_layers=Aquest servidor WMS no pot renderitzar aquestes dues capes conjuntament.\nSepareles en dues cosultes diferents.
+server_timeout=Tempo massimo di attesa di risposta WMS terminato
+server_title=Titolo
+server_type=Tipo di Server
+service_info=Informazione di servizio
+set=Stabilisci
+settings=
+settings_editor=
+show_layer_names=
+si=
+siguiente=Seguente
+single_value=Valore unico
+state_or_province=
+style=Stile
+tamano=Dimensione\:
+tamPixX=
+tamPixY=
+telephone=Tel\u00e8fon
+tipo_dato=Tipo di Dato
+title=Titolo
+to=Fino a
+transparencia=Transparenza
+unknown_response_format=
+unsupported_crs=
+unsupported_map_context_version=
+unsupported_version=Versi\u00f3 no suportada
+use_custom_size=
+use_full_extent=
+use_view_size=
+value=Valore
+version=Versi\u00f3
+version_conflict=Conflicte de versi\u00f3
+view=Vista
+Vista=Vista
+web_map_context=
+web_map_context_settings=
+width=Ampl\u00e0ria
+wms_cant_connect=Non \u00e9 stato possibile realizzare la connessione con il WMS
+wms_not_queryable=Aquest servidor no accepta peticions d\u0092aquest tipus
+wms_properties=Propriet\u00e1 WMS
+wms_server_error=Error del servidor WMS
+wms_transparency=Transparenza
+WMSLayer=WMS layer
+xmax=X massima
+xmin=X minima
+ymax=Y massima
+ymin=Y minima

Property changes on: tags/Root_F2/extensions/extJCRS/config/text_it.properties
___________________________________________________________________
Added: svn:eol-style
   + native
Added: svn:keywords
   + Author Date Id Revision

Index: tags/Root_F2/extensions/extJCRS/config/text.properties
===================================================================
--- tags/Root_F2/extensions/extJCRS/config/text.properties	(revision 0)
+++ tags/Root_F2/extensions/extJCRS/config/text.properties	(revision 10155)
@@ -0,0 +1,100 @@
+#Translations for language [es]
+#Mon Sep 25 09:47:23 CEST 2006
+abrir=Abrir
+advertencia_nad=IMPORTANTE: La transformaci�n se aplicar� dentro de los l�mites de las rejillas.
+anterior=Anterior
+aplicar_capa=CRS de la capa
+aplicar_vista=CRS de la vista
+apply=Aplicar
+area=�rea
+browse=Examinar
+buscar=Buscar
+calculated_in=Calculado en
+cancel=Cancelar
+code_transformation=C�digo de la Transformaci�n
+codigo=C�digo
+coordinate_reference_systems= Coordinate Reference Systems
+criterio_busqueda= Criterio de b�squeda
+crs_no_selected=No se ha seleccionado CRS
+crs_not_soported=CRS no soportado
+crsview=CrsView
+datum=Datum
+descripcion=Descripci�n
+description_area=Descripci�n del �rea
+detalles=Detalles
+details=Detalles
+EPSG=EPSG
+ESRI=ESRI
+fill_name=Rellenar el nombre
+finalizar=Finalizar
+fuente=Fuente
+geogcs=Geogcs
+grids_en=Grids en
+IAU2000=IAU2000
+in=en
+incorrect_domain=Dominio Incorrecto
+infocrs=Info CRS
+Informacion=Informaci\u00f3n
+info_transformations= Informaci�n de la transformaci�n
+importar=Importar
+lat_max=Latitud m�xmima
+lat_min=Latitud m�nima
+long_max=Longitud m�xima 
+long_min=Longitud m�nima
+name=Nombre
+nadfile_not_found=No se encuentra el fichero de rejillas.
+nadfile_bad_format=No se reconoce el formato del fichero de rejillas.
+nadgrids=Rejillas
+nadgrids_file=Fichero de rejillas
+name_transformation=Nombre de la Transformaci�n
+no=No
+no_results=No se han encontrado resultados
+node_count=N�mero de nodos
+nombre=Nombre
+nuevo_crs=Nuevo CRS
+numeric_format=Este campo solo acepta caracteres num�ricos
+ok=Aceptar
+Ok=Aceptar
+por_area=Por �rea
+por_codigo=Por c�digo
+por_nombre=Por nombre
+primem=Primem
+projcs=Projcs
+projected=Proyectado
+projection=Proyecci�n
+proyeccion_actual=Proyecci�n actual
+recents_transformation=Transformaciones Recientes
+scale=Escala
+seleccionar=Seleccionar
+seleccion_nadgrids=Fichero rejilla calculado en
+selecciona_sistema_de_referencia=Selecciona Sistema de Referencia
+seleccionar_crs=Selecionar CRS
+seleccione_crs_capa=Seleccione CRS de la capa
+seleccione_crs_vista=Seleccione CRS de la vista
+seleccione_transformacion=Seleccione Transformaci�n
+si=S�
+siguiente=Siguiente
+sin_transformacion=Sin Transformaci�n
+source_crs=CRS fuente
+spheroid=Esferoide
+recientes=Recientes
+target_crs=CRS destino
+tipo=Tipo
+transformation_code=C�digo de la Transformaci�n
+transformacion_epsg=Transformaci�n EPSG
+transformacion_manual=Transformaci�n Manual
+transformation_name=Nombre de la Transformaci�n
+transformations=Transformaciones
+type_transformation=Tipo de la Transofmaci�n
+ultimos_crs_utilizados=�ltimos CRSs utilizados
+units=Unidades
+units_p=Unidades_p
+valor=Valor
+wkt=WKT
+x_Rotation=Rotacion en x
+x_Translation=Translacion en x
+y_Rotation=Rotacion en y
+y_Translation=Translacion en y
+z_Rotation=Rotacion en z
+z_Translation=Translacion en z
+

Property changes on: tags/Root_F2/extensions/extJCRS/config/text.properties
___________________________________________________________________
Added: svn:keywords
   + Author Date Id Revision
Added: svn:eol-style
   + native

Index: tags/Root_F2/extensions/extJCRS/config/db_iau2000.properties
===================================================================
--- tags/Root_F2/extensions/extJCRS/config/db_iau2000.properties	(revision 0)
+++ tags/Root_F2/extensions/extJCRS/config/db_iau2000.properties	(revision 10155)
@@ -0,0 +1,20 @@
+#HSQL database
+#Wed Oct 18 12:53:57 CEST 2006
+hsqldb.cache_file_scale=1
+runtime.gc_interval=0
+hsqldb.first_identity=0
+version=1.7.3
+modified=no
+hsqldb.script_format=0
+sql.enforce_size=false
+hsqldb.cache_size_scale=10
+hsqldb.cache_scale=14
+hsqldb.version=1.7.3
+hsqldb.log_size=200
+sql.enforce_strict_size=false
+readonly=true
+hsqldb.compatible_version=1.7.2
+hsqldb.original_version=1.7.3
+sql.compare_in_locale=false
+hsqldb.nio_data_file=true
+hsqldb.cache_version=1.7.0

Property changes on: tags/Root_F2/extensions/extJCRS/config/db_iau2000.properties
___________________________________________________________________
Added: svn:keywords
   + Author Date Id Revision
Added: svn:eol-style
   + native

Index: tags/Root_F2/extensions/extJCRS/config/text_ca.properties
===================================================================
--- tags/Root_F2/extensions/extJCRS/config/text_ca.properties	(revision 0)
+++ tags/Root_F2/extensions/extJCRS/config/text_ca.properties	(revision 10155)
@@ -0,0 +1,165 @@
+#Translations for language [ca]
+#Tue Sep 19 14:57:24 CEST 2006
+a_new_view=Vista nova
+abstract=Resum
+add=Afegir
+address=Adre\u00e7a
+advanced=Avan\u00e7ada
+advanced_settings=Opcions avan\u00e7ades
+ancho_alto=Amplada al\u00e7ada
+anterior=Anterior
+apply=Aplicar
+bands=Bandes
+brillo=Brillantor
+brillo_y_contraste=Brillantor i contrast
+browse=Examinar
+cancel=Cancel\u00b7lar
+cannotReproject=No es pot reprojectar este sistema de coordenades
+cant_reproject_from_any_of=
+capas=Capes
+city=Ciutat
+clear=Netejar
+conectar=Connectar
+connect_error=Error de connexi\u00f3
+contact_info=Informaci\u00f3 de contacte
+contact_organization=Organitzaci\u00f3
+contact_person=Nom
+contact_position=C\u00e0rrec
+contraste=Contrast
+coor_geograficas=Coordenades geogr\u00e0fiques
+could_not_find_web_map_context_file=
+countries_of_the_world=Afghanistan;Albania;Algeria;American Samoa;Andorra;Angola;Anguilla;Antarctica;Antigua and Barbuda;Argentina;Armenia;Aruba;Ascension Island;Australia;Austria;Azerbaijan;Bahamas;Bahrain;Bangladesh;Barbados;Belarus;Belgium;Belize;Benin;Bermuda;Bhutan;Bolivia;Bosnia and Herzegovina;Botswana;Bouvet Island;Brazil;British Indian Ocean Territory;Brunei;Bulgaria;Burkina Faso;Burundi;Cambodia;Cameroon;Canada;Cape Verde;Cayman Islands;Central African Republic;Chad;Chile;China;Christmas Island;Cocos (Keeling) Islands;Colombia;Comoros;Congo (DRC);Congo;Cook Islands;Costa Rica;C\u00f4te d\u0092Ivoire;Croatia;Cuba;Cyprus;Czech Republic;Denmark;Djibouti;Dominica;Dominican Republic;Ecuador;Egypt;El Salvador;Equatorial Guinea;Eritrea;Estonia;Ethiopia;Falkland Islands (Islas Malvinas);Faroe Islands;Fiji Islands;Finland;France;French Guiana;French Polynesia;French Southern and Antarctic Lands;Gabon;Gambia, The;Georgia;Germany;Ghana;Gibraltar;Greece;Greenland;Grenada;Guadeloupe;Guam;Guatemala;Guernsey;Guinea;Guinea-Bissau;Guyana;Haiti;Heard Island and McDonald Islands;Honduras;Hong Kong SAR;Hungary;Iceland;India;Indonesia;Iran;Iraq;Ireland;Isle of Man;Israel;Italy;Jamaica;Japan;Jordan;Jersey;Kazakhstan;Kenya;Kiribati;Korea;Kuwait;Kyrgyzstan;Laos;Latvia;Lebanon;Lesotho;Liberia;Libya;Liechtenstein;Lithuania;Luxembourg;Macao SAR;Macedonia, Former Yugoslav Republic of;Madagascar;Malawi;Malaysia;Maldives;Mali;Malta;Marshall Islands;Martinique;Mauritania;Mauritius;Mayotte;Mexico;Micronesia;Moldova;Monaco;Mongolia;Montserrat;Morocco;Mozambique;Myanmar;Namibia;Nauru;Nepal;Netherlands Antilles;Netherlands, The;New Caledonia;New Zealand;Nicaragua;Niger;Nigeria;Niue;Norfolk Island;North Korea;Northern Mariana Islands;Norway;Oman;Pakistan;Palau;Palestinian Authority;Panama;Papua New Guinea;Paraguay;Peru;Philippines;Pitcairn Islands;Poland;Portugal;Puerto Rico;Qatar;Reunion;Romania;Russia;Rwanda;Samoa;San Marino;S\u00e3o Tom\u00e9 and Pr\u00edncipe;Saudi Arabia;Senegal;Serbia and Montenegro;Seychelles;Sierra Leone;Singapore;Slovakia;Slovenia;Solomon Islands;Somalia;South Africa;South Georgia and the South Sandwich Islands;Spain;Sri Lanka;St. Helena;St. Kitts and Nevis;St. Lucia;St. Pierre and Miquelon;St. Vincent and the Grenadines;Sudan;Suriname;Svalbard and Jan Mayen;Swaziland;Sweden;Switzerland;Syria;Taiwan;Tajikistan;Tanzania;Thailand;Timor-Leste;Togo;Tokelau;Tonga;Trinidad and Tobago;Tristan da Cunha;Tunisia;Turkey;Turkmenistan;Turks and Caicos Islands;Tuvalu;Uganda;Ukraine;United Arab Emirates;United Kingdom;United States of America;United States Minor Outlying Islands;Uruguay;Uzbekistan;Vanuatu;Vatican City;Venezuela;Vietnam;Virgin Islands;Virgin Islands, British;Wallis and Futuna;Yemen;Zambia;Zimbabwe
+country=Pa\u00eds
+covered_extension=Cobertura de l'extensi\u00f3
+created_with=Creat amb
+defined_by_view_extent=Extensi\u00f3 de la vista
+description=Descripci\u00f3
+description_URL=URL descripci\u00f3
+dimension=Dimensi\u00f3
+dimensiones=Dimensions
+disagregate_layers=Conservar estructura de capes
+e-mail=Correu electr\u00f2nic
+edit_layer_properties_to_fix_them=
+eliminar_extremos=Eliminar extrems
+error=Error
+error_writting_file=Error en escriure el fitxer
+estilos=Estils
+export=Exportar
+export_to_map_context=
+extents_no_coincidentes=Extensions no coincidents
+fax=Fax
+Fichero=Fitxer
+fichero_existe=Hi ha fitxer
+file_name=Fitxer
+file_version=Versi\u00f3 del fitxer
+fit_WMS_layer=Ajustar capa WMS
+format=Format
+formato=Format
+formatos=Formats
+georeferenciado=
+height=Al\u00e7ada
+html_in_a_new_view=<HTML>Crea una vista nova en el projecte. La nova vista contindr\u00e0 totes les capes definides pel fitxer.</HTML>
+html_in_other_view=<HTML>Afig les capes en la vista que especifique de la llista seg\u00fcent\:</HTML>
+html_in_the_current_view=<HTML>Afig les capes definides en el fitxer a la vista activa.</HTML>
+id=ID
+import=Importar
+import_map_context=Importar mapes des d'un fitxer Web Map Context d'OGC
+in=en
+info=Informaci\u00f3
+Informacion=Informaci\u00f3
+interval=Interval
+invalid_dimension_values=
+is_required=\u00e9s obligatori
+keywords=Paraules clau
+layer=Capa
+layer_abstract=Resum de la capa
+layer_name=Nom de la capa
+layer_title=T\u00edtol de la capa
+layers_in_other_view=Capes en la llista que jo elegisca
+layers_in_the_current_view=Capes en la vista actual
+lineal_directo=Lineal directe
+logo_URL=URL logotip
+m/pixel=metros/pixel
+map_context_file_error=Error en el fitxer Web Map Context
+map_extent=Extensi\u00f3
+map_size_in_pixels=Dimensi\u00f3 del mapa (p\u00edxels)
+metadatos=Metadatos
+move_layer_down=Moure amunt
+move_layer_up=Moure avall
+must_specify_a_file=Ha d'especificar un fitxer de dest\u00ed
+name=Nom
+none_selected=Cap seleccionat
+not_available=No disponible
+num_bandas=Nombre de bandes
+ogc_mapcontext_file=OGC Web Map Context
+ok=D'acord
+Ok=D'acord
+opacidad=Opacitat
+open_layers_as=Obrir les capes com a
+options=Opcions
+origen_de_datos=Origen de dades
+postcode=Codi postal
+previsualizacion=Previsualitzaci\u00f3
+problems_encountered_while_importing=
+properties=Propietats
+propiedades_raster=Propietats del raster
+Proyecciones=
+realce=Relleu
+recorte_colas=Retall de cues
+refresh_capabilities=Refrescar la mem\u00f2ria cau
+refresh_capabilities_tooltip=Marque esta casella per a sobreescriure les dades anteriors.
+remove=Llevar
+seleccionar_srs=Seleccioneu SRS
+select_formats=Seleccionar formats
+select_layers=Seleccionar capes
+selected_dimensions=Dimensions seleccionades
+selected_layers=Capes seleccionades
+server=Servidor
+server_abstract=Resum del servidor
+server_cant_render_layers=Este servidor no pot representar estes capes juntes. Prove a fer peticions separades per a cada capa.
+server_timeout=Temps de connexi\u00f3 excedit
+server_title=T\u00edtol del servidor
+server_type=Tipus de servidor
+service_info=Informaci\u00f3 del servici
+set=Establir
+settings=Ajustaments
+settings_editor=Editor d'ajustaments
+show_layer_names=Mostrar noms de capes
+si=
+siguiente=Seg\u00fcent
+single_value=Valor simple
+state_or_province=Estat/Prov\u00edncia
+style=Estil
+tamano=Dimensi\u00f3\:
+tamPixX=
+tamPixY=
+telephone=Tel\u00e8fon
+tipo_dato=Tipus de dada
+title=T\u00edtol
+to=Fins a
+transparencia=Transpar\u00e8ncia
+unknown_response_format=Format de resposta desconeguda
+unsupported_crs=
+unsupported_map_context_version=Versi\u00f3 de Web Map Context no suportada
+unsupported_version=Versi\u00f3 no suportada
+use_custom_size=Dimensi\u00f3 personalitzada
+use_full_extent=Extensi\u00f3 total
+use_view_size=Dimensi\u00f3 de la vista
+value=Valor
+version=Versi\u00f3
+version_conflict=Conflicte de versi\u00f3
+view=Vista
+Vista=Vista
+web_map_context=Web Map Context
+web_map_context_settings=Propietats Web Map Context
+width=Amplada
+wms_cant_connect=No es pot realitzar la connexi\u00f3 amb WMS
+wms_not_queryable=Este servidor no accepta peticions d'este tipus
+wms_properties=Propietats WMS
+wms_server_error=Error del servidor WMS
+wms_transparency=Transpar\u00e8ncia
+WMSLayer=Capa WMS
+xmax=X m\u00e0xima
+xmin=X m\u00ednima
+ymax=Y m\u00e0xima
+ymin=Y m\u00ednima

Property changes on: tags/Root_F2/extensions/extJCRS/config/text_ca.properties
___________________________________________________________________
Added: svn:eol-style
   + native
Added: svn:keywords
   + Author Date Id Revision

Index: tags/Root_F2/extensions/extJCRS/config/text_pt.properties
===================================================================
--- tags/Root_F2/extensions/extJCRS/config/text_pt.properties	(revision 0)
+++ tags/Root_F2/extensions/extJCRS/config/text_pt.properties	(revision 10155)
@@ -0,0 +1,165 @@
+#Translations for language [pt]
+#Tue Sep 19 14:57:24 CEST 2006
+a_new_view=
+abstract=Resumo
+add=Adicionar
+address=Adre\u00e7a
+advanced=
+advanced_settings=
+ancho_alto=Largura X altura
+anterior=Anterior
+apply=Aplicar
+bands=Bandas
+brillo=Brightness
+brillo_y_contraste=
+browse=
+cancel=Cancelar
+cannotReproject=N\u00e3o se pode reprojectar este sistema de coordenadas
+cant_reproject_from_any_of=
+capas=Capas
+city=
+clear=Limpar
+conectar=Conectar
+connect_error=Erro ao conectar
+contact_info=
+contact_organization=Organitzaci\u00f3
+contact_person=Nome
+contact_position=C\u00e0rrec
+contraste=Contrast
+coor_geograficas=Coordenadas geogr\u00e1ficas
+could_not_find_web_map_context_file=
+countries_of_the_world=Afghanistan;Albania;Algeria;American Samoa;Andorra;Angola;Anguilla;Antarctica;Antigua and Barbuda;Argentina;Armenia;Aruba;Ascension Island;Australia;Austria;Azerbaijan;Bahamas;Bahrain;Bangladesh;Barbados;Belarus;Belgium;Belize;Benin;Bermuda;Bhutan;Bolivia;Bosnia and Herzegovina;Botswana;Bouvet Island;Brazil;British Indian Ocean Territory;Brunei;Bulgaria;Burkina Faso;Burundi;Cambodia;Cameroon;Canada;Cape Verde;Cayman Islands;Central African Republic;Chad;Chile;China;Christmas Island;Cocos (Keeling) Islands;Colombia;Comoros;Congo (DRC);Congo;Cook Islands;Costa Rica;C\u00f4te d\u0092Ivoire;Croatia;Cuba;Cyprus;Czech Republic;Denmark;Djibouti;Dominica;Dominican Republic;Ecuador;Egypt;El Salvador;Equatorial Guinea;Eritrea;Estonia;Ethiopia;Falkland Islands (Islas Malvinas);Faroe Islands;Fiji Islands;Finland;France;French Guiana;French Polynesia;French Southern and Antarctic Lands;Gabon;Gambia, The;Georgia;Germany;Ghana;Gibraltar;Greece;Greenland;Grenada;Guadeloupe;Guam;Guatemala;Guernsey;Guinea;Guinea-Bissau;Guyana;Haiti;Heard Island and McDonald Islands;Honduras;Hong Kong SAR;Hungary;Iceland;India;Indonesia;Iran;Iraq;Ireland;Isle of Man;Israel;Italy;Jamaica;Japan;Jordan;Jersey;Kazakhstan;Kenya;Kiribati;Korea;Kuwait;Kyrgyzstan;Laos;Latvia;Lebanon;Lesotho;Liberia;Libya;Liechtenstein;Lithuania;Luxembourg;Macao SAR;Macedonia, Former Yugoslav Republic of;Madagascar;Malawi;Malaysia;Maldives;Mali;Malta;Marshall Islands;Martinique;Mauritania;Mauritius;Mayotte;Mexico;Micronesia;Moldova;Monaco;Mongolia;Montserrat;Morocco;Mozambique;Myanmar;Namibia;Nauru;Nepal;Netherlands Antilles;Netherlands, The;New Caledonia;New Zealand;Nicaragua;Niger;Nigeria;Niue;Norfolk Island;North Korea;Northern Mariana Islands;Norway;Oman;Pakistan;Palau;Palestinian Authority;Panama;Papua New Guinea;Paraguay;Peru;Philippines;Pitcairn Islands;Poland;Portugal;Puerto Rico;Qatar;Reunion;Romania;Russia;Rwanda;Samoa;San Marino;S\u00e3o Tom\u00e9 and Pr\u00edncipe;Saudi Arabia;Senegal;Serbia and Montenegro;Seychelles;Sierra Leone;Singapore;Slovakia;Slovenia;Solomon Islands;Somalia;South Africa;South Georgia and the South Sandwich Islands;Spain;Sri Lanka;St. Helena;St. Kitts and Nevis;St. Lucia;St. Pierre and Miquelon;St. Vincent and the Grenadines;Sudan;Suriname;Svalbard and Jan Mayen;Swaziland;Sweden;Switzerland;Syria;Taiwan;Tajikistan;Tanzania;Thailand;Timor-Leste;Togo;Tokelau;Tonga;Trinidad and Tobago;Tristan da Cunha;Tunisia;Turkey;Turkmenistan;Turks and Caicos Islands;Tuvalu;Uganda;Ukraine;United Arab Emirates;United Kingdom;United States of America;United States Minor Outlying Islands;Uruguay;Uzbekistan;Vanuatu;Vatican City;Venezuela;Vietnam;Virgin Islands;Virgin Islands, British;Wallis and Futuna;Yemen;Zambia;Zimbabwe
+country=
+covered_extension=Extens\u00e3o
+created_with=
+defined_by_view_extent=
+description=Descri\u00e7\u00e3o
+description_URL=
+dimension=Dimens\u00e3o
+dimensiones=Dimens\u00f5es
+disagregate_layers=
+e-mail=E-mail
+edit_layer_properties_to_fix_them=
+eliminar_extremos=Remover extremos
+error=Error
+error_writting_file=
+estilos=Estilos
+export=Exportar
+export_to_map_context=
+extents_no_coincidentes=A extens\u00e3o da imagem seleccionada n\u00e3o coincide com a imagem de origem.
+fax=Fax
+Fichero=Ficheiro
+fichero_existe=O ficheiro seleccionado j\u00e1 existe como banda da capa
+file_name=
+file_version=
+fit_WMS_layer=
+format=Formato
+formato=Formato
+formatos=Formatos
+georeferenciado=
+height=
+html_in_a_new_view=<HTML>Crea una vista nova al projecte. La nova vista contindr\u00e0 totes les capes definides pel fitxer.</HTML>
+html_in_other_view=
+html_in_the_current_view=<HTML>Afegeix les capes definides pel fitxer a la actual vista activa.</HTML>
+id=ID
+import=
+import_map_context=
+in=em
+info=Informa\u00e7\u00e3o
+Informacion=Informa\u00e7\u00e3o
+interval=Intervalo
+invalid_dimension_values=
+is_required=\u00e9s obligatori
+keywords=Paraules clau
+layer=Capa
+layer_abstract=Resumo
+layer_name=Nome da capa
+layer_title=Titulo da capa
+layers_in_other_view=
+layers_in_the_current_view=
+lineal_directo=Lineal direito
+logo_URL=URL logotip
+m/pixel=metros/pixel
+map_context_file_error=
+map_extent=Extens\u00e3o
+map_size_in_pixels=Tamany del mapa (p\u00edxels)
+metadatos=Metadatos
+move_layer_down=Mover para baixo
+move_layer_up=Mover para cima
+must_specify_a_file=
+name=Nome
+none_selected=Nenhum seleccionado
+not_available=N\u00e3o dispon\u00edvel
+num_bandas=N\u00famero de bandas
+ogc_mapcontext_file=OGC Web Map Context
+ok=Aceitar
+Ok=Aceitar
+opacidad=Opacidade
+open_layers_as=
+options=
+origen_de_datos=Origem de dados
+postcode=
+previsualizacion=
+problems_encountered_while_importing=
+properties=Propriedades
+propiedades_raster=Propiedades da cobertura
+Proyecciones=
+realce=Realce
+recorte_colas=Recorte de filas
+refresh_capabilities=Actualizar cache
+refresh_capabilities_tooltip=Marque esta op\u00e7\u00e3o para reescrever os dados anteriores.
+remove=Remover
+seleccionar_srs=Seleccionar SRS
+select_formats=Seleccionar formatos
+select_layers=Seleccionar capas
+selected_dimensions=Dimens\u00f5es seleccionadas
+selected_layers=Capas seleccionadas
+server=Servidor
+server_abstract=Sumario
+server_cant_render_layers=Este servidor n\u00e3o pode "renderizar" estas capas juntas. Tenta fazer peti\u00e7\u00f5es separadas para cada capa.
+server_timeout=Alcan\u00e7ado m\u00e1ximo tempo de espera de resposta do WMS
+server_title=Titulo
+server_type=Tipo de servidor
+service_info=Informa\u00e7\u00e3o do servi\u00e7o
+set=Establecer
+settings=
+settings_editor=Editor de ajustes
+show_layer_names=Mostrar nomes
+si=
+siguiente=Seguinte
+single_value=Valor simples
+state_or_province=
+style=Estilo
+tamano=Tamanho\:
+tamPixX=
+tamPixY=
+telephone=Tel\u00e8fon
+tipo_dato=Tipo de dado
+title=T\u00edtulo
+to=At\u00e9
+transparencia=Transpar\u00eancia
+unknown_response_format=
+unsupported_crs=
+unsupported_map_context_version=
+unsupported_version=Versi\u00f3 no suportada
+use_custom_size=
+use_full_extent=
+use_view_size=
+value=Valor
+version=Versi\u00f3
+version_conflict=Conflito de vers\u00f5es
+view=Vis\u00e3o
+Vista=Vista
+web_map_context=
+web_map_context_settings=
+width=Ampl\u00e0ria
+wms_cant_connect=N\u00e3o foi poss\u00edvel realizar a conex\u00e3o com WMS
+wms_not_queryable=Este servidor n\u00e3o aceita peti\u00e7\u00f5es deste tipo
+wms_properties=Propriedades WMS
+wms_server_error=Erro do servidor WMS
+wms_transparency=Transpar\u00eancia
+WMSLayer=Capa WMS
+xmax=X m\u00e1xima
+xmin=X m\u00ednima
+ymax=Y m\u00e1xima
+ymin=Y m\u00ednima

Property changes on: tags/Root_F2/extensions/extJCRS/config/text_pt.properties
___________________________________________________________________
Added: svn:keywords
   + Author Date Id Revision
Added: svn:eol-style
   + native

Index: tags/Root_F2/extensions/extJCRS/config/text_de.properties
===================================================================
--- tags/Root_F2/extensions/extJCRS/config/text_de.properties	(revision 0)
+++ tags/Root_F2/extensions/extJCRS/config/text_de.properties	(revision 10155)
@@ -0,0 +1,165 @@
+#Translations for language [de]
+#Tue Sep 19 14:57:24 CEST 2006
+a_new_view=
+abstract=Zusammenfassung
+add=Hinzuf\u00fcgen
+address=
+advanced=
+advanced_settings=
+ancho_alto=Breite x h\u00f6he
+anterior=Zur\u00fcck
+apply=Anwenden
+bands=Farbstreifen
+brillo=
+brillo_y_contraste=
+browse=
+cancel=Abbrechen
+cannotReproject=Dieses koordinatensystem kann nicht reprojektiert werden.
+cant_reproject_from_any_of=
+capas=Layer
+city=Ciutat
+clear=s\u00e4ubern
+conectar=Verbinden
+connect_error=Verbindungsfehler
+contact_info=
+contact_organization=Organitzaci\u00f3
+contact_person=Name
+contact_position=C\u00e0rrec
+contraste=Contrast
+coor_geograficas=Geografische koordinaten
+could_not_find_web_map_context_file=
+countries_of_the_world=Afghanistan;Albania;Algeria;American Samoa;Andorra;Angola;Anguilla;Antarctica;Antigua and Barbuda;Argentina;Armenia;Aruba;Ascension Island;Australia;Austria;Azerbaijan;Bahamas;Bahrain;Bangladesh;Barbados;Belarus;Belgium;Belize;Benin;Bermuda;Bhutan;Bolivia;Bosnia and Herzegovina;Botswana;Bouvet Island;Brazil;British Indian Ocean Territory;Brunei;Bulgaria;Burkina Faso;Burundi;Cambodia;Cameroon;Canada;Cape Verde;Cayman Islands;Central African Republic;Chad;Chile;China;Christmas Island;Cocos (Keeling) Islands;Colombia;Comoros;Congo (DRC);Congo;Cook Islands;Costa Rica;C\u00f4te d\u0092Ivoire;Croatia;Cuba;Cyprus;Czech Republic;Denmark;Djibouti;Dominica;Dominican Republic;Ecuador;Egypt;El Salvador;Equatorial Guinea;Eritrea;Estonia;Ethiopia;Falkland Islands (Islas Malvinas);Faroe Islands;Fiji Islands;Finland;France;French Guiana;French Polynesia;French Southern and Antarctic Lands;Gabon;Gambia, The;Georgia;Germany;Ghana;Gibraltar;Greece;Greenland;Grenada;Guadeloupe;Guam;Guatemala;Guernsey;Guinea;Guinea-Bissau;Guyana;Haiti;Heard Island and McDonald Islands;Honduras;Hong Kong SAR;Hungary;Iceland;India;Indonesia;Iran;Iraq;Ireland;Isle of Man;Israel;Italy;Jamaica;Japan;Jordan;Jersey;Kazakhstan;Kenya;Kiribati;Korea;Kuwait;Kyrgyzstan;Laos;Latvia;Lebanon;Lesotho;Liberia;Libya;Liechtenstein;Lithuania;Luxembourg;Macao SAR;Macedonia, Former Yugoslav Republic of;Madagascar;Malawi;Malaysia;Maldives;Mali;Malta;Marshall Islands;Martinique;Mauritania;Mauritius;Mayotte;Mexico;Micronesia;Moldova;Monaco;Mongolia;Montserrat;Morocco;Mozambique;Myanmar;Namibia;Nauru;Nepal;Netherlands Antilles;Netherlands, The;New Caledonia;New Zealand;Nicaragua;Niger;Nigeria;Niue;Norfolk Island;North Korea;Northern Mariana Islands;Norway;Oman;Pakistan;Palau;Palestinian Authority;Panama;Papua New Guinea;Paraguay;Peru;Philippines;Pitcairn Islands;Poland;Portugal;Puerto Rico;Qatar;Reunion;Romania;Russia;Rwanda;Samoa;San Marino;S\u00e3o Tom\u00e9 and Pr\u00edncipe;Saudi Arabia;Senegal;Serbia and Montenegro;Seychelles;Sierra Leone;Singapore;Slovakia;Slovenia;Solomon Islands;Somalia;South Africa;South Georgia and the South Sandwich Islands;Spain;Sri Lanka;St. Helena;St. Kitts and Nevis;St. Lucia;St. Pierre and Miquelon;St. Vincent and the Grenadines;Sudan;Suriname;Svalbard and Jan Mayen;Swaziland;Sweden;Switzerland;Syria;Taiwan;Tajikistan;Tanzania;Thailand;Timor-Leste;Togo;Tokelau;Tonga;Trinidad and Tobago;Tristan da Cunha;Tunisia;Turkey;Turkmenistan;Turks and Caicos Islands;Tuvalu;Uganda;Ukraine;United Arab Emirates;United Kingdom;United States of America;United States Minor Outlying Islands;Uruguay;Uzbekistan;Vanuatu;Vatican City;Venezuela;Vietnam;Virgin Islands;Virgin Islands, British;Wallis and Futuna;Yemen;Zambia;Zimbabwe
+country=
+covered_extension=Verl\u00e4ngerung
+created_with=
+defined_by_view_extent=
+description=Beschreibung
+description_URL=
+dimension=Dimension
+dimensiones=Dimensionen
+disagregate_layers=
+e-mail=E-mail
+edit_layer_properties_to_fix_them=
+eliminar_extremos=Extreme l\u00f6schen
+error=Error
+error_writting_file=
+estilos=Stile
+export=Exportieren
+export_to_map_context=
+extents_no_coincidentes=Die ausgew\u00e4hlte Bildgr\u00f6\u00dfe stimmt nicht mit dem Originalbild \u00fcberein.
+fax=Fax
+Fichero=Datei
+fichero_existe=Ausgew\u00e4hlte datei existiert schon als layergruppe.
+file_name=
+file_version=
+fit_WMS_layer=WMS-Karte anpassen
+format=Format
+formato=Format
+formatos=Formate
+georeferenciado=
+height=
+html_in_a_new_view=
+html_in_other_view=
+html_in_the_current_view=
+id=ID
+import=Importieren
+import_map_context=
+in=in
+info=Information
+Informacion=Information
+interval=Intervall
+invalid_dimension_values=
+is_required=
+keywords=
+layer=
+layer_abstract=Zusammenfassung
+layer_name=Name des Layers
+layer_title=Layertitel
+layers_in_other_view=
+layers_in_the_current_view=
+lineal_directo=Direktlineal
+logo_URL=URL logotip
+m/pixel=metros/pixel
+map_context_file_error=
+map_extent=Verl\u00e4ngerung
+map_size_in_pixels=
+metadatos=
+move_layer_down=Nach unten verschieben
+move_layer_up=Nach oben verschieben
+must_specify_a_file=
+name=Name
+none_selected=keiner ausgew\u00e4hlt
+not_available=Nicht verf\u00fcgbar
+num_bandas=Anzahl farbstreifen
+ogc_mapcontext_file=OGC Web Map Context
+ok=OK
+Ok=Ok
+opacidad=Lichtundurchl\u00e4ssigkeit
+open_layers_as=
+options=
+origen_de_datos=Herkunft der daten
+postcode=
+previsualizacion=
+problems_encountered_while_importing=
+properties=Eigenschaften
+propiedades_raster=Eigenschaften der rasterung
+Proyecciones=
+realce=Heraushebung
+recorte_colas=Zuschnitt der Randbereiche
+refresh_capabilities=Cache aktualisieren
+refresh_capabilities_tooltip=Markieren Sie dieses Feld, um die lokalen Daten zu \u00fcberschreiben.
+remove=Entfernen
+seleccionar_srs=SRS ausw\u00e4hlen
+select_formats=Formate ausw\u00e4hlen
+select_layers=Layer ausw\u00e4hlen
+selected_dimensions=Dimensionen ausw\u00e4hlen
+selected_layers=Ausgew\u00e4hlte layer
+server=Server
+server_abstract=Zusammenfasssung
+server_cant_render_layers=Dieser WMS-Server kann diese Layer nicht zusammen rendern. Versuchen Sie, die einzelnen Layer abzufragen.
+server_timeout=Der WMS-Server antwortet nicht\: Time out
+server_title=Titel
+server_type=Servertyp
+service_info=Service-Information
+set=Festlegen
+settings=Einstellungen
+settings_editor=Einstellungseditor
+show_layer_names=Namen anzeigen
+si=
+siguiente=Weiter
+single_value=einfacher Wert
+state_or_province=
+style=Stil
+tamano=Gr\u00f6\u00dfe\:
+tamPixX=
+tamPixY=
+telephone=Tel\u00e8fon
+tipo_dato=Datentyp
+title=Titel
+to=Bis
+transparencia=Transparenz
+unknown_response_format=Unbekanntes format der antwort
+unsupported_crs=
+unsupported_map_context_version=
+unsupported_version=
+use_custom_size=
+use_full_extent=
+use_view_size=
+value=Wert
+version=Versi\u00f3
+version_conflict=Versionenkonflikt
+view=Ansicht
+Vista=Ansicht
+web_map_context=
+web_map_context_settings=
+width=Ampl\u00e0ria
+wms_cant_connect=Es konnte keine Verbindung zum WMS hergestellt werden.
+wms_not_queryable=Dieser Server aktzeptiert keine Abfragen dieser Art.
+wms_properties=WMS-Eigenschaften
+wms_server_error=WMS-Serverfehler
+wms_transparency=Transparenz
+WMSLayer=WMS-Layer
+xmax=Maximalwert x
+xmin=Minimalwert x
+ymax=Maximalwert y
+ymin=Minimalwert y

Property changes on: tags/Root_F2/extensions/extJCRS/config/text_de.properties
___________________________________________________________________
Added: svn:keywords
   + Author Date Id Revision
Added: svn:eol-style
   + native

Index: tags/Root_F2/extensions/extJCRS/config/db_iau2000.script
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream

Property changes on: tags/Root_F2/extensions/extJCRS/config/db_iau2000.script
___________________________________________________________________
Added: svn:mime-type
   + application/octet-stream

Index: tags/Root_F2/extensions/extJCRS/images/teledeteccion.png
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream

Property changes on: tags/Root_F2/extensions/extJCRS/images/teledeteccion.png
___________________________________________________________________
Added: svn:mime-type
   + application/octet-stream

Index: tags/Root_F2/extensions/extJCRS/images/logoidr.png
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream

Property changes on: tags/Root_F2/extensions/extJCRS/images/logoidr.png
___________________________________________________________________
Added: svn:mime-type
   + application/octet-stream

Index: tags/Root_F2/extensions/extJCRS/build.number
===================================================================
--- tags/Root_F2/extensions/extJCRS/build.number	(revision 0)
+++ tags/Root_F2/extensions/extJCRS/build.number	(revision 10155)
@@ -0,0 +1,3 @@
+#Build Number for ANT. Do not edit!
+#Fri Jan 26 16:12:33 CET 2007
+build.number=1

Property changes on: tags/Root_F2/extensions/extJCRS/build.number
___________________________________________________________________
Added: svn:keywords
   + Author Date Id Revision
Added: svn:eol-style
   + native

Index: tags/Root_F2/extensions/extJCRS/lib/org.gvsig.crs.jar
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream

Property changes on: tags/Root_F2/extensions/extJCRS/lib/org.gvsig.crs.jar
___________________________________________________________________
Added: svn:mime-type
   + application/octet-stream

Index: tags/Root_F2/extensions/extJCRS/src/org/gvsig/crs/JCrsExtension.java
===================================================================
--- tags/Root_F2/extensions/extJCRS/src/org/gvsig/crs/JCrsExtension.java	(revision 0)
+++ tags/Root_F2/extensions/extJCRS/src/org/gvsig/crs/JCrsExtension.java	(revision 10155)
@@ -0,0 +1,102 @@
+/* gvSIG. Sistema de Información Geográfica de la Generalitat Valenciana
+ *
+ * Copyright (C) 2006 Instituto de Desarrollo Regional and Generalitat Valenciana.
+ *
+ * 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., 59 Temple Place - Suite 330, Boston, MA  02111-1307,USA.
+ *
+ * For more information, contact:
+ *
+ *  Generalitat Valenciana
+ *   Conselleria d'Infraestructures i Transport
+ *   Av. Blasco Ibáñez, 50
+ *   46010 VALENCIA
+ *   SPAIN
+ *
+ *      +34 963862235
+ *   gvsig@gva.es
+ *      www.gvsig.gva.es
+ *
+ *    or
+ *
+ *   Instituto de Desarrollo Regional (Universidad de Castilla La-Mancha
+ *   Campus Universitario s/n
+ *   02071 Alabacete
+ *   Spain
+ *
+ *   +34 967 599 200
+ */
+
+
+package org.gvsig.crs;
+
+import org.gvsig.crs.gui.panels.ProjChooserPanel;
+import org.gvsig.crs.persistence.RecentCRSsPersistence;
+import org.gvsig.crs.persistence.RecentTrsPersistence;
+
+import com.iver.andami.PluginServices;
+import com.iver.andami.plugins.Extension;
+import com.iver.cit.gvsig.About;
+import com.iver.cit.gvsig.fmap.crs.CRSFactory;
+import com.iver.cit.gvsig.gui.panels.CRSSelectPanel;
+import com.iver.cit.gvsig.gui.panels.FPanelAbout;
+import com.iver.cit.gvsig.project.Project;
+import com.iver.utiles.XMLEntity;
+
+public class JCrsExtension extends Extension {
+	
+	private static final String DEFAULT_PROJECTION_KEY_NAME = "DefaultProjection";
+	private static final String FACTORY_DEFAULT_PROJECTION = "EPSG:23030";
+
+	public void initialize() {
+		
+		CRSFactory.cp = new CrsFactory();
+		CRSSelectPanel.registerPanelClass(ProjChooserPanel.class);
+		
+		//	Default Projection
+		PluginServices ps = PluginServices.getPluginServices("com.iver.cit.gvsig");
+		XMLEntity xml = ps.getPersistentXML();
+		String projCode = null; 
+		if (xml.contains(DEFAULT_PROJECTION_KEY_NAME)) {
+			projCode = xml.getStringProperty(DEFAULT_PROJECTION_KEY_NAME);
+		} else {
+			projCode = FACTORY_DEFAULT_PROJECTION;
+		}
+		Project.setDefaultProjection(CRSFactory.getCRS(projCode));
+			
+		RecentCRSsPersistence.pluginClassInstance = this;
+		RecentTrsPersistence.pluginClassInstance = this;
+		
+		About about=(About)PluginServices.getExtension(About.class); 
+		FPanelAbout panelAbout=about.getAboutPanel(); 
+		java.net.URL aboutURL = this.getClass().getResource("/about.htm"); 
+		panelAbout.addAboutUrl("JCRS",aboutURL);
+	}
+
+	public void execute(String actionCommand) {
+	
+
+	}
+
+	public boolean isEnabled() {
+
+		return true;
+	}
+
+	public boolean isVisible() {
+
+		return false;
+	}
+
+}

Property changes on: tags/Root_F2/extensions/extJCRS/src/org/gvsig/crs/JCrsExtension.java
___________________________________________________________________
Added: svn:keywords
   + Author Date Id Revision
Added: svn:eol-style
   + native

Index: tags/Root_F2/extensions/extJCRS/data/sped2et.gsb
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream

Property changes on: tags/Root_F2/extensions/extJCRS/data/sped2et.gsb
___________________________________________________________________
Added: svn:mime-type
   + application/octet-stream

Index: tags/Root_F2/extensions/extJCRS/build.xml
===================================================================
--- tags/Root_F2/extensions/extJCRS/build.xml	(revision 0)
+++ tags/Root_F2/extensions/extJCRS/build.xml	(revision 10155)
@@ -0,0 +1,75 @@
+<project name="Generar extension en Andami" default="generate-without-source" basedir=".">
+    <description>
+        Instala el plugin de JCrs en Andami.
+    </description>
+  <!-- set global properties for this build -->
+  <property name="src" location="src"/>
+  <property name="build" location="bin"/>
+  <property name="dist"  location="dist"/>
+  <property name="plugin" value="org.gvsig.crs"/>
+  <property name="extension-dir" location="../_fwAndami/gvSIG/extensiones"/>
+  <property name="andami-dir" location="../_fwAndami"/>
+
+  <target name="init">
+    <!-- Create the time stamp -->
+    <tstamp/>
+    <!-- Create the build directory structure used by compile -->
+    <mkdir dir="${build}"/>
+    <mkdir dir="${dist}"/>
+  </target>
+  	
+  <target name="buildNumber">
+  	<buildnumber/> 
+  </target>
+	
+  <target name="distribution" depends="buildNumber, generate-without-source">
+  </target>
+
+  <target name="compile"
+          description="compile the source" >
+      <!-- Compile the Java code from ${src} to ${bin} -->
+      <javac      srcdir="${src}"
+                  destdir="${build}"
+	   			  classpath="${extension-dir}/com.iver.cit.gvsig/lib/fmap.jar:${extension-dir}/com.iver.cit.gvsig/lib/com.iver.cit.gvsig.jar:../FMap/lib/cms.jar:../Andami/lib/iver-utiles.jar:../FMap/lib/gdbms-0.8-SNAPSHOT.jar:../Andami/andami.jar"/>
+    </target>
+						
+  <target name="generate-without-source" description="generate the distribution without the source file" >
+    <!-- Create the distribution directory -->
+    <mkdir dir="${dist}"/>
+  	
+  	<copy file="config/about.htm" todir="${dist}" overwrite="yes"/>
+  	<loadproperties srcFile="build.number"/>
+  	<replace casesensitive="true"
+  	  		 file="${dist}/about.htm"
+  	  		 token="#build.number#"
+  	  		 value="${build.number}">
+  	 </replace>	
+
+    <!-- Put everything in ${build} into the MyProject-${DSTAMP}.jar file -->
+    <jar jarfile="${dist}/${plugin}.jar" basedir="${build}"/>
+  	
+  	<copy file="config/config.xml" todir="${dist}"/>
+  	<copy file="build.number" todir="${dist}"/>
+  	
+  	<copy file="${dist}/${plugin}.jar" todir="lib/"/>
+  	<copy todir="${dist}/images">
+  	  	    	<fileset dir="images/" includes="*"/>
+  	  	</copy>
+  	<copy todir="${dist}">
+    	<fileset dir="config" includes="text*.properties"/>
+  		<fileset dir="config" includes="db_epsg.*"/>
+  		<fileset dir="config" includes="db_iau2000.*"/>
+    </copy>  	
+    <move todir="${extension-dir}/${plugin}/">
+    	<fileset dir="${dist}" includes="**/**"/>
+    </move>
+  	
+  	<mkdir dir="${extension-dir}/${plugin}/data"/>
+  	<copy todir="${extension-dir}/${plugin}/data">
+  	    	<fileset dir="data" includes="**/**"/>
+  	</copy>  
+  	
+  </target>
+</project>
+
+

Property changes on: tags/Root_F2/extensions/extJCRS/build.xml
___________________________________________________________________
Added: svn:keywords
   + Author Date Id Revision
Added: svn:eol-style
   + native

Index: tags/Root_F2/extensions/extJCRS/.classpath
===================================================================
--- tags/Root_F2/extensions/extJCRS/.classpath	(revision 0)
+++ tags/Root_F2/extensions/extJCRS/.classpath	(revision 10155)
@@ -0,0 +1,12 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<classpath>
+	<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
+	<classpathentry combineaccessrules="false" kind="src" path="/appgvSIG"/>
+	<classpathentry combineaccessrules="false" kind="src" path="/libFMap"/>
+	<classpathentry combineaccessrules="false" kind="src" path="/_fwAndami"/>
+	<classpathentry kind="lib" path="/libFMap/lib/cms.jar" sourcepath="/jCMS"/>
+	<classpathentry kind="src" path="src"/>
+	<classpathentry kind="lib" path="/libFMap/lib/jcrs.jar" sourcepath="/libJCRS/src"/>
+	<classpathentry combineaccessrules="false" kind="src" path="/libIverUtiles"/>
+	<classpathentry kind="output" path="bin"/>
+</classpath>

Property changes on: tags/Root_F2/extensions/extJCRS/.classpath
___________________________________________________________________
Added: svn:eol-style
   + native
Added: svn:keywords
   + Author Date Id Revision

