Index: tags/v2_0_0_Build_2047/libraries/libProjection/resources-test/log4j.xml
===================================================================
--- tags/v2_0_0_Build_2047/libraries/libProjection/resources-test/log4j.xml	(revision 0)
+++ tags/v2_0_0_Build_2047/libraries/libProjection/resources-test/log4j.xml	(revision 38292)
@@ -0,0 +1,26 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<!DOCTYPE log4j:configuration SYSTEM "log4j.dtd">
+
+<log4j:configuration xmlns:log4j="http://jakarta.apache.org/log4j/">
+
+	<appender name="CONSOLE" class="org.apache.log4j.ConsoleAppender">
+		<layout class="org.apache.log4j.PatternLayout">
+			<param name="ConversionPattern" value="%d{HH:mm:ss,SSS} %-5p [%c{2}.%M()]\n  %m%n" />
+		</layout>
+	</appender>
+
+	<category name="org.gvsig.tools">
+		<priority value="DEBUG" />
+	</category>
+	<category name="org.cresques">
+		<priority value="DEBUG" /> 
+	</category>
+	<category name="org.gvsig.fmap.crs">
+		<priority value="DEBUG" /> 
+	</category>
+
+	<root>
+		<priority value="INFO" />
+		<appender-ref ref="CONSOLE" />
+	</root>
+</log4j:configuration>
\ No newline at end of file
Index: tags/v2_0_0_Build_2047/libraries/libProjection/src/org/cresques/coerce/CoerceToString.java
===================================================================
--- tags/v2_0_0_Build_2047/libraries/libProjection/src/org/cresques/coerce/CoerceToString.java	(revision 0)
+++ tags/v2_0_0_Build_2047/libraries/libProjection/src/org/cresques/coerce/CoerceToString.java	(revision 38292)
@@ -0,0 +1,68 @@
+/* gvSIG. Geographic Information System of the Valencian Government
+ *
+ * Copyright (C) 2007-2008 Infrastructures and Transports Department
+ * of the Valencian Government (CIT)
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
+ * MA  02110-1301, USA.
+ *
+ */
+package org.cresques.coerce;
+
+import org.cresques.cts.IProjection;
+import org.gvsig.tools.dataTypes.CoercionException;
+import org.gvsig.tools.dataTypes.DataTypesManager.Coercion;
+
+/**
+ * Convert a Projection to String.
+ * 
+ * Support convert:
+ * - Projection to String (do nothing)
+ * 
+ * @author gvSIG Team
+ * @version $Id$
+ * 
+ */
+public class CoerceToString implements Coercion {
+
+	Coercion previous = null;
+	
+	public CoerceToString() {
+		// Do nothing
+	}
+	
+	public CoerceToString(Coercion previous) {
+		this.previous = previous;
+	}
+	
+	
+	public Object coerce(Object value) throws CoercionException {
+		try {
+			if( value == null || value instanceof String ) {
+				return value;
+			}
+			if( value instanceof IProjection ) {
+				return ((IProjection)value).getFullCode();
+			}
+			if( previous != null ) {
+				return previous.coerce(value);
+			}
+		} catch (Exception e) {
+			throw new CoercionException(e);
+		}
+		throw new CoercionException();
+	}
+
+}

Property changes on: tags/v2_0_0_Build_2047/libraries/libProjection/src/org/cresques/coerce/CoerceToString.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: tags/v2_0_0_Build_2047/libraries/libProjection/src/org/cresques/coerce/CoerceToCRS.java
===================================================================
--- tags/v2_0_0_Build_2047/libraries/libProjection/src/org/cresques/coerce/CoerceToCRS.java	(revision 0)
+++ tags/v2_0_0_Build_2047/libraries/libProjection/src/org/cresques/coerce/CoerceToCRS.java	(revision 38292)
@@ -0,0 +1,54 @@
+/* gvSIG. Geographic Information System of the Valencian Government
+ *
+ * Copyright (C) 2007-2008 Infrastructures and Transports Department
+ * of the Valencian Government (CIT)
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
+ * MA  02110-1301, USA.
+ *
+ */
+package org.cresques.coerce;
+
+import org.cresques.cts.IProjection;
+import org.gvsig.fmap.crs.CRSFactory;
+import org.gvsig.tools.dataTypes.CoercionException;
+import org.gvsig.tools.dataTypes.DataTypesManager.Coercion;
+
+/**
+ * Convert a string value of projection code to IProjection
+ * 
+ * @author gvSIG Team
+ * @version $Id$
+ * 
+ */
+public class CoerceToCRS implements Coercion {
+
+	public Object coerce(Object value) throws CoercionException {
+		try {
+			if( value == null || value instanceof IProjection) {
+				return value;
+			}
+			Object proj = CRSFactory.getCRS(value.toString());
+			if( proj == null ) {
+				throw new CoercionException("Can't convert value '"+value.toString()+"' to Projection.");
+			}
+			return proj;
+		} catch (Exception e) {
+			throw new CoercionException(e);
+		}
+
+	}
+
+}

Property changes on: tags/v2_0_0_Build_2047/libraries/libProjection/src/org/cresques/coerce/CoerceToCRS.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: tags/v2_0_0_Build_2047/libraries/libProjection/src/org/cresques/ProjectionLibrary.java
===================================================================
--- tags/v2_0_0_Build_2047/libraries/libProjection/src/org/cresques/ProjectionLibrary.java	(revision 0)
+++ tags/v2_0_0_Build_2047/libraries/libProjection/src/org/cresques/ProjectionLibrary.java	(revision 38292)
@@ -0,0 +1,67 @@
+/* gvSIG. Geographic Information System of the Valencian Government
+*
+* Copyright (C) 2007-2008 Infrastructures and Transports Department
+* of the Valencian Government (CIT)
+*
+* This program is free software; you can redistribute it and/or
+* modify it under the terms of the GNU General Public License
+* as published by the Free Software Foundation; either version 2
+* of the License, or (at your option) any later version.
+*
+* This program is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+* GNU General Public License for more details.
+*
+* You should have received a copy of the GNU General Public License
+* along with this program; if not, write to the Free Software
+* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
+* MA  02110-1301, USA.
+*
+*/
+package org.cresques;
+
+import org.cresques.coerce.CoerceToCRS;
+import org.cresques.coerce.CoerceToString;
+import org.cresques.cts.IProjection;
+
+import org.gvsig.fmap.crs.CRSFactory;
+import org.gvsig.fmap.crs.persistence.CoordTransPersistenceFactory;
+import org.gvsig.fmap.crs.persistence.ProjectionPersistenceFactory;
+import org.gvsig.tools.ToolsLibrary;
+import org.gvsig.tools.ToolsLocator;
+import org.gvsig.tools.dataTypes.DataTypesManager;
+import org.gvsig.tools.library.AbstractLibrary;
+import org.gvsig.tools.library.LibraryException;
+
+public class ProjectionLibrary extends AbstractLibrary {
+
+    @Override
+    public void doRegistration() {
+        registerAsAPI(ProjectionLibrary.class);
+        require(ToolsLibrary.class);
+    }
+
+	protected void doInitialize() throws LibraryException {
+	}
+
+	protected void doPostInitialize() throws LibraryException {
+		if (CRSFactory.cp==null) {
+			throw new CRSFactoryNotRegisteredException();
+		}
+
+		DataTypesManager dataTypesManager = ToolsLocator.getDataTypesManager();
+        dataTypesManager.addtype(DataTypes.CRS, "CRS", "CRS",
+            IProjection.class, new CoerceToCRS());
+        dataTypesManager.setCoercion(DataTypes.STRING, new CoerceToString(
+            dataTypesManager.getCoercion(DataTypes.STRING)));
+
+		// Register the PersistenceFactory to be able to persist 
+		// IProjection objects
+		ToolsLocator.getPersistenceManager().registerFactory(
+				new ProjectionPersistenceFactory());
+		ToolsLocator.getPersistenceManager().registerFactory(
+            new CoordTransPersistenceFactory());
+	}
+
+}

Property changes on: tags/v2_0_0_Build_2047/libraries/libProjection/src/org/cresques/ProjectionLibrary.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: tags/v2_0_0_Build_2047/libraries/libProjection/src/org/cresques/impl/CresquesCtsLibrary.java
===================================================================
--- tags/v2_0_0_Build_2047/libraries/libProjection/src/org/cresques/impl/CresquesCtsLibrary.java	(revision 0)
+++ tags/v2_0_0_Build_2047/libraries/libProjection/src/org/cresques/impl/CresquesCtsLibrary.java	(revision 38292)
@@ -0,0 +1,45 @@
+/* gvSIG. Geographic Information System of the Valencian Government
+ *
+ * Copyright (C) 2007-2008 Infrastructures and Transports Department
+ * of the Valencian Government (CIT)
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
+ * MA  02110-1301, USA.
+ *
+ */
+package org.cresques.impl;
+
+import org.cresques.ProjectionLibrary;
+import org.cresques.impl.cts.ProjectionPool;
+
+import org.gvsig.fmap.crs.CRSFactory;
+import org.gvsig.tools.library.AbstractLibrary;
+import org.gvsig.tools.library.LibraryException;
+
+public class CresquesCtsLibrary extends AbstractLibrary {
+
+    @Override
+    public void doRegistration() {
+        registerAsImplementationOf(ProjectionLibrary.class);
+    }
+
+    protected void doInitialize() throws LibraryException {
+        CRSFactory.cp = new ProjectionPool();
+    }
+
+    protected void doPostInitialize() throws LibraryException {
+        // Nothing to do
+    }
+}

Property changes on: tags/v2_0_0_Build_2047/libraries/libProjection/src/org/cresques/impl/CresquesCtsLibrary.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: tags/v2_0_0_Build_2047/libraries/libProjection/src/org/cresques/impl/cts/gt2/CoordSys.java
===================================================================
--- tags/v2_0_0_Build_2047/libraries/libProjection/src/org/cresques/impl/cts/gt2/CoordSys.java	(revision 0)
+++ tags/v2_0_0_Build_2047/libraries/libProjection/src/org/cresques/impl/cts/gt2/CoordSys.java	(revision 38292)
@@ -0,0 +1,227 @@
+/*
+ * Cresques Mapping Suite. Graphic Library for constructing mapping applications.
+ *
+ * Copyright (C) 2004-6.
+ *
+ * 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:
+ *
+ * cresques@gmail.com
+ */
+package org.cresques.impl.cts.gt2;
+
+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.geotools.cs.CoordinateSystem;
+import org.geotools.cs.CoordinateSystemFactory;
+import org.geotools.cs.GeographicCoordinateSystem;
+import org.geotools.cs.ProjectedCoordinateSystem;
+import org.gvsig.fmap.crs.CRSFactory;
+import org.opengis.referencing.FactoryException;
+
+
+/**
+ * Sistema de Coordenadas (Proyección).
+ * @author "Luis W. Sevilla" <sevilla_lui@gva.es>
+ */
+public class CoordSys implements IProjection {
+    private static final Color basicGridColor = new Color(64, 64, 64, 128);
+    protected CoordinateSystemFactory csFactory = CoordinateSystemFactory.getDefault();
+    protected CSDatum datum = null;
+    protected GeographicCoordinateSystem geogCS = null;
+    protected ProjectedCoordinateSystem projCS = null;
+    protected String abrev = "";
+    Color gridColor = basicGridColor;
+
+    public CoordSys(CSDatum datum) {
+        this.datum = datum;
+        this.geogCS = new GeographicCoordinateSystem(datum.getName(null), datum.getDatum());
+	}
+
+    public CoordSys(String wkt) {
+    	try {
+        	//((GeographicCoordinateSystem)
+    		CoordinateSystem cs = CoordinateSystemFactory.getDefault().createFromWKT(wkt);
+//			 ).getHorizontalDatum();
+    		if (cs instanceof GeographicCoordinateSystem)
+    			geogCS = (GeographicCoordinateSystem) cs;
+    		if (cs instanceof ProjectedCoordinateSystem) {
+    			projCS = (ProjectedCoordinateSystem) cs;
+    			geogCS = projCS.getGeographicCoordinateSystem();
+    		}
+    		datum = new CSDatum(geogCS.getHorizontalDatum());
+    	} catch (FactoryException e) {
+			// TODO Auto-generated catch block
+			e.printStackTrace();
+		}
+    }
+
+    /**
+     * Crea un nuevo CoordSys geográfico a partir de uno proyectado.
+     * Si el actual es geográfico retorna el mismo.
+     * @return
+     */
+    public CoordSys toGeo() {
+        CoordSys coordSys = new CoordSys((CSDatum) getDatum());
+
+        if (geogCS != null) {
+            coordSys.geogCS = this.geogCS;
+        } else {
+            coordSys.geogCS = projCS.getGeographicCoordinateSystem();
+        }
+
+        return coordSys;
+    }
+
+    public IDatum getDatum() {
+        return datum;
+    }
+
+    public CoordinateSystem getCS() {
+        if (projCS != null) {
+            return projCS;
+        }
+
+        return geogCS;
+    }
+
+    public CoordinateSystem getGeogCS() {
+        if (geogCS != null) {
+            return geogCS;
+        }
+
+        return projCS.getGeographicCoordinateSystem();
+    }
+
+    /* (no Javadoc)
+     * @see org.cresques.cts.IProjection#createPoint(double, double)
+     */
+    public Point2D createPoint(double x, double y) {
+        return new Point2D.Double(x, y);
+    }
+
+    public String toString() {
+        if (projCS != null) {
+            return projCS.toString();
+        }
+
+        return geogCS.toString();
+    }
+
+    public void setAbrev(String abrev) {
+        this.abrev = abrev;
+    }
+
+    public String getAbrev() {
+        return abrev;
+    }
+
+    /* (no Javadoc)
+     * @see org.cresques.cts.IProjection#drawGrid(java.awt.Graphics2D, org.cresques.geo.ViewPortData)
+     */
+    public void drawGrid(Graphics2D g, ViewPortData vp) {
+        // TODO Apéndice de método generado automáticamente
+    }
+
+    public void setGridColor(Color c) {
+        gridColor = c;
+    }
+
+    public Color getGridColor() {
+        return gridColor;
+    }
+
+    /* (no Javadoc)
+     * @see org.cresques.cts.IProjection#toGeo(java.awt.geom.Point2D)
+     */
+    public Point2D toGeo(Point2D pt) {
+    //TODO VCN Esto si no lo comento no me trasforma el punto en coordenadas geográficas.
+//        if (getGeogCS() == geogCS) {
+//            return pt;
+//        } else {
+            CoordTrans ct = new CoordTrans(this, toGeo());
+
+            return ct.convert(pt, null);
+//        }
+    }
+
+    /* (no Javadoc)
+     * @see org.cresques.cts.IProjection#fromGeo(java.awt.geom.Point2D, java.awt.geom.Point2D)
+     */
+    public Point2D fromGeo(Point2D gPt, Point2D mPt) {
+        // TODO Apéndice de método generado automáticamente
+        return null;
+    }
+
+    public double getScale(double minX, double maxX, double w, double dpi) {
+        double scale = 0D;
+
+        if (projCS == null) { // 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
+                    w; // pixels
+        }
+
+        return scale;
+    }
+    public Rectangle2D getExtent(Rectangle2D extent,double scale,double wImage,double hImage,double mapUnits,double distanceUnits,double dpi) {
+    	double w =0;
+		double h =0;
+		double wExtent =0;
+		double hExtent =0;
+    	if (projCS!=null) {
+			w = ((wImage / dpi) * 2.54);
+			h = ((hImage / dpi) * 2.54);
+			wExtent =w * scale*distanceUnits/ mapUnits;
+			hExtent =h * scale*distanceUnits/ mapUnits;
+
+		}else {
+			w = ((wImage / dpi) * 2.54);
+			h = ((hImage / dpi) * 2.54);
+			wExtent =(w*scale*distanceUnits)/ (mapUnits*1852.0*60.0);
+			hExtent =(h*scale*distanceUnits)/ (mapUnits*1852.0*60.0);
+		}
+    	double xExtent = extent.getCenterX() - wExtent/2;
+		double yExtent = extent.getCenterY() - hExtent/2;
+		Rectangle2D rec=new Rectangle2D.Double(xExtent,yExtent,wExtent,hExtent);
+    	return  rec;
+    }
+    public boolean isProjected() {
+    	return projCS != null;
+    }
+
+	public ICoordTrans getCT(IProjection dest) {
+		return new CoordTrans(this, (CoordSys) dest);
+	}
+
+	public String getFullCode() {
+		return getAbrev();
+	}
+	
+	public Object clone() throws CloneNotSupportedException {
+	       return CRSFactory.getCRS( this.getFullCode() );
+	    }
+
+}

Property changes on: tags/v2_0_0_Build_2047/libraries/libProjection/src/org/cresques/impl/cts/gt2/CoordSys.java
___________________________________________________________________
Added: svn:eol-style
   + native

Index: tags/v2_0_0_Build_2047/libraries/libProjection/src/org/cresques/impl/cts/gt2/CSUTM.java
===================================================================
--- tags/v2_0_0_Build_2047/libraries/libProjection/src/org/cresques/impl/cts/gt2/CSUTM.java	(revision 0)
+++ tags/v2_0_0_Build_2047/libraries/libProjection/src/org/cresques/impl/cts/gt2/CSUTM.java	(revision 38292)
@@ -0,0 +1,102 @@
+/*
+ * Cresques Mapping Suite. Graphic Library for constructing mapping applications.
+ *
+ * Copyright (C) 2004-7.
+ *
+ * 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:
+ *
+ * cresques@gmail.com
+ */
+package org.cresques.impl.cts.gt2;
+
+import org.cresques.cts.UTM;
+import org.geotools.cs.AxisInfo;
+import org.geotools.cs.Projection;
+import org.geotools.units.Unit;
+import org.gvsig.fmap.crs.CRSFactory;
+import org.opengis.referencing.FactoryException;
+
+
+/**
+ * @author "Luis W. Sevilla" <sevilla_lui@gva.es>
+ */
+public class CSUTM extends CoordSys implements UTM {
+    public CSUTM(CSDatum datum, int zone) {
+        super(datum);
+        init(datum, zone, "N");
+    }
+    
+    public CSUTM(CSDatum datum, int zone, String ns) {
+        super(datum);
+        init(datum, zone, ns);
+    }
+ 
+    public void init(CSDatum datum, int zone, String ns) {
+        Unit linearUnit = Unit.METRE;
+
+        javax.media.jai.ParameterList params = csFactory.createProjectionParameterList("Transverse_Mercator");
+        params.setParameter("semi_major",
+                            datum.getDatum().getEllipsoid().getSemiMajorAxis());
+        params.setParameter("semi_minor",
+                            datum.getDatum().getEllipsoid().getSemiMinorAxis());
+        params.setParameter("central_meridian", (double) ((zone * 6) - 183));
+        params.setParameter("latitude_of_origin", 0.0);
+        params.setParameter("scale_factor", 0.9996);
+        params.setParameter("false_easting", 500000.0);
+        if (ns.toUpperCase().compareTo("S") == 0)
+        	params.setParameter("false_northing", 10000000.0);
+        else
+        	params.setParameter("false_northing", 0.0);
+
+        try {
+            Projection projection = csFactory.createProjection("UTM" + zone,
+                                                               "Transverse_Mercator",
+                                                               params);
+            projCS = csFactory.createProjectedCoordinateSystem(projection.getName()
+                                                                         .toString(),
+                                                               geogCS,
+                                                               projection,
+                                                               linearUnit,
+                                                               AxisInfo.X,
+                                                               AxisInfo.Y);
+        } catch (FactoryException e) {
+            // TODO Bloque catch generado automáticamente
+            e.printStackTrace();
+        }
+    }
+
+    public double getScale(double minX, double maxX, double w, double dpi) {
+        double scale = super.getScale(minX, maxX, w, dpi);
+
+        if (projCS != null) { // Es geográfico; calcula la escala.
+            scale = ((maxX - minX) * // metros
+                    (dpi / 2.54 * 100.0)) / // px / metro
+                    w; // pixels
+        }
+
+        return scale;
+    }
+
+    public String toString() {
+        return projCS.toString();
+    }
+    
+    public Object clone() throws CloneNotSupportedException {
+        return CRSFactory.getCRS( this.getFullCode() );
+     }
+
+}

Property changes on: tags/v2_0_0_Build_2047/libraries/libProjection/src/org/cresques/impl/cts/gt2/CSUTM.java
___________________________________________________________________
Added: svn:eol-style
   + native

Index: tags/v2_0_0_Build_2047/libraries/libProjection/src/org/cresques/impl/cts/gt2/CSGaussPt.java
===================================================================
--- tags/v2_0_0_Build_2047/libraries/libProjection/src/org/cresques/impl/cts/gt2/CSGaussPt.java	(revision 0)
+++ tags/v2_0_0_Build_2047/libraries/libProjection/src/org/cresques/impl/cts/gt2/CSGaussPt.java	(revision 38292)
@@ -0,0 +1,86 @@
+/*
+ * Cresques Mapping Suite. Graphic Library for constructing mapping applications.
+ *
+ * Copyright (C) 2004-5.
+ *
+ * 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:
+ *
+ * cresques@gmail.com
+ */
+package org.cresques.impl.cts.gt2;
+
+import org.geotools.cs.AxisInfo;
+import org.geotools.cs.GeographicCoordinateSystem;
+import org.geotools.cs.Projection;
+
+import org.geotools.measure.Angle;
+
+import org.geotools.units.Unit;
+
+import org.opengis.referencing.FactoryException;
+
+
+/**
+ * @author "Luis W. Sevilla" <sevilla_lui@gva.es>
+ *
+ */
+public class CSGaussPt extends CoordSys {
+    public static CSGaussPt hgd73 = new CSGaussPt(CSDatum.d73);
+
+    public CSGaussPt(CSDatum datum) {
+        super(datum);
+        geogCS = new GeographicCoordinateSystem(datum.getName(null),
+                                                datum.getDatum());
+
+        Unit linearUnit = Unit.METRE;
+
+        javax.media.jai.ParameterList params = csFactory.createProjectionParameterList("Oblique_Stereographic");
+        params.setParameter("semi_major",
+                            datum.getDatum().getEllipsoid().getSemiMajorAxis());
+        params.setParameter("semi_minor",
+                            datum.getDatum().getEllipsoid().getSemiMinorAxis());
+        params.setParameter("central_meridian",
+                            (new Angle("8°07'54.862\"W")).degrees());
+
+        //params.setParameter("longitude_of_origin", (new Angle("8º07'54.862\"")).degrees());
+        params.setParameter("latitude_of_origin",
+                            (new Angle("39°40'N")).degrees());
+        params.setParameter("scale_factor", 1.0);
+        params.setParameter("false_easting", 0D); //180598D);
+        params.setParameter("false_northing", 0D); //-86990D);
+
+        try {
+            Projection projection = csFactory.createProjection("GAUSS",
+                                                               "Oblique_Stereographic",
+                                                               params);
+            projCS = csFactory.createProjectedCoordinateSystem(projection.getName()
+                                                                         .toString(),
+                                                               geogCS,
+                                                               projection,
+                                                               linearUnit,
+                                                               AxisInfo.X,
+                                                               AxisInfo.Y);
+        } catch (FactoryException e) {
+            // TODO Bloque catch generado automáticamente
+            e.printStackTrace();
+        }
+    }
+
+    public String toString() {
+        return projCS.toString();
+    }
+}

Property changes on: tags/v2_0_0_Build_2047/libraries/libProjection/src/org/cresques/impl/cts/gt2/CSGaussPt.java
___________________________________________________________________
Added: svn:eol-style
   + native

Index: tags/v2_0_0_Build_2047/libraries/libProjection/src/org/cresques/impl/cts/gt2/CoordTrans.java
===================================================================
--- tags/v2_0_0_Build_2047/libraries/libProjection/src/org/cresques/impl/cts/gt2/CoordTrans.java	(revision 0)
+++ tags/v2_0_0_Build_2047/libraries/libProjection/src/org/cresques/impl/cts/gt2/CoordTrans.java	(revision 38292)
@@ -0,0 +1,177 @@
+/*
+ * Cresques Mapping Suite. Graphic Library for constructing mapping applications.
+ *
+ * Copyright (C) 2004-5.
+ *
+ * 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:
+ *
+ * cresques@gmail.com
+ */
+package org.cresques.impl.cts.gt2;
+
+import java.awt.geom.Point2D;
+import java.awt.geom.Rectangle2D;
+
+import org.cresques.cts.ICoordTrans;
+import org.cresques.cts.IProjection;
+import org.geotools.ct.CannotCreateTransformException;
+import org.geotools.ct.CoordinateTransformation;
+import org.geotools.ct.CoordinateTransformationFactory;
+import org.geotools.ct.MathTransform;
+import org.geotools.pt.CoordinatePoint;
+import org.opengis.referencing.operation.TransformException;
+
+
+//import org.geotools.pt.MismatchedDimensionException;
+
+/**
+ * Transforma coordenadas entre dos sistemas
+ * @see org.creques.cts.CoordSys
+ * @author "Luis W. Sevilla" <sevilla_lui@gva.es>
+ */
+class CoordTrans implements ICoordTrans {
+    private CoordinateTransformationFactory trFactory = CoordinateTransformationFactory.getDefault();
+    private CoordinateTransformation tr = null;
+    private MathTransform mt = null;
+    private MathTransform mt2 = null;
+    private MathTransform mt3 = null;
+    private MathTransform mtDatum = null;
+    private CoordSys from = null;
+    private CoordSys to = null;
+    
+    private ICoordTrans invertedCT = null;
+
+    public CoordTrans(CoordSys from, CoordSys to) {
+        this.from = from;
+        this.to = to;
+
+        // Si los dos CoordSys son proyectados, entonces hay
+        // que hacer dos transformaciones (pasar por geográficas)
+        // Si hay cambio de datum son 3 las transformaciones
+        try {
+            if (from.getDatum() != to.getDatum()) {
+                tr = trFactory.createFromCoordinateSystems(from.toGeo().getCS(),
+                                                           to.toGeo().getCS());
+                mtDatum = tr.getMathTransform();
+            }
+
+            if ((from.projCS != null) && (to.projCS != null)) {
+                CoordSys geogcs = from.toGeo();
+                tr = trFactory.createFromCoordinateSystems(from.getCS(),
+                                                           geogcs.getCS());
+                mt = tr.getMathTransform();
+
+                if (mtDatum != null) {
+                    mt2 = mtDatum;
+                }
+
+                geogcs = to.toGeo();
+                tr = trFactory.createFromCoordinateSystems(geogcs.getCS(),
+                                                           to.getCS());
+
+                if (mt2 == null) {
+                    mt2 = tr.getMathTransform();
+                } else {
+                    mt3 = tr.getMathTransform();
+                }
+            } else {
+                if (from.projCS == null) {
+                    mt = mtDatum;
+                }
+
+                tr = trFactory.createFromCoordinateSystems(from.getCS(),
+                                                           to.getCS());
+
+                if (mt == null) {
+                    mt = tr.getMathTransform();
+
+                    if (mtDatum != null) {
+                        mt2 = mtDatum;
+                    }
+                } else {
+                    mt2 = tr.getMathTransform();
+                }
+            }
+        } catch (CannotCreateTransformException e) {
+            // TODO Bloque catch generado automáticamente
+            e.printStackTrace();
+        }
+    }
+
+    public IProjection getPOrig() {
+        return from;
+    }
+
+    public IProjection getPDest() {
+        return to;
+    }
+
+    public ICoordTrans getInverted() {
+        if (invertedCT == null)
+            invertedCT = new CoordTrans(to, from);
+        return invertedCT;
+    }
+
+    public Point2D convert(Point2D ptOrig, Point2D ptDest) {
+        CoordinatePoint pt1 = new CoordinatePoint(ptOrig);
+        CoordinatePoint pt2 = new CoordinatePoint(0D, 0D);
+        ptDest = null;
+
+        try {
+            mt.transform(pt1, pt2);
+            ptDest = pt2.toPoint2D();
+
+            if (mt2 != null) {
+                mt2.transform(pt2, pt1);
+                ptDest = pt1.toPoint2D();
+
+                if (mt3 != null) {
+                    mt3.transform(pt1, pt2);
+                    ptDest = pt2.toPoint2D();
+                }
+            }
+
+            /*} catch (MismatchedDimensionException e) {
+                    // TODO Bloque catch generado automáticamente
+                    e.printStackTrace();
+            */
+        } catch (TransformException e) {
+            // TODO Bloque catch generado automáticamente
+            e.printStackTrace();
+        }
+
+        return ptDest;
+    }
+
+    public String toString() {
+        return tr.toString();
+    }
+
+    /* (non-Javadoc)
+     * @see org.cresques.cts.ICoordTrans#convert(java.awt.geom.Rectangle2D)
+     */
+    public Rectangle2D convert(Rectangle2D rect) {
+        Point2D pt1 = new Point2D.Double(rect.getMinX(), rect.getMinY());
+        Point2D pt2 = new Point2D.Double(rect.getMaxX(), rect.getMaxY());
+        pt1 = convert(pt1, null);
+        pt2 = convert(pt2, null);
+        rect = new Rectangle2D.Double();
+        rect.setFrameFromDiagonal(pt1, pt2);
+
+        return rect;
+    }
+}

Property changes on: tags/v2_0_0_Build_2047/libraries/libProjection/src/org/cresques/impl/cts/gt2/CoordTrans.java
___________________________________________________________________
Added: svn:eol-style
   + native

Index: tags/v2_0_0_Build_2047/libraries/libProjection/src/org/cresques/impl/cts/gt2/CSDatum.java
===================================================================
--- tags/v2_0_0_Build_2047/libraries/libProjection/src/org/cresques/impl/cts/gt2/CSDatum.java	(revision 0)
+++ tags/v2_0_0_Build_2047/libraries/libProjection/src/org/cresques/impl/cts/gt2/CSDatum.java	(revision 38292)
@@ -0,0 +1,217 @@
+/*
+ * Cresques Mapping Suite. Graphic Library for constructing mapping applications.
+ *
+ * Copyright (C) 2004-6.
+ *
+ * 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:
+ *
+ * cresques@gmail.com
+ */
+package org.cresques.impl.cts.gt2;
+
+import java.util.Locale;
+
+import org.cresques.cts.IDatum;
+import org.geotools.cs.CoordinateSystemFactory;
+import org.geotools.cs.GeographicCoordinateSystem;
+import org.geotools.cs.HorizontalDatum;
+import org.opengis.referencing.FactoryException;
+
+
+/**
+ * Datum (y Ellipsoid) de GeoTools2.
+ *
+ * @author "Luis W. Sevilla" <sevilla_lui@gva.es>
+ */
+public class CSDatum implements IDatum {
+    private static String line1 = "DATUM[\"WGS_1984\"," +
+                                  "SPHEROID[\"WGS 84\",6378137,298.257223563,AUTHORITY[\"EPSG\",\"7030\"]]," +
+                                  "TOWGS84[0,0,0,0,0,0,0],AUTHORITY[\"EPSG\",\"6326\"]]";
+    private static String line2 = "DATUM[\"European_Datum_1950\"," +
+                                  "SPHEROID[\"International 1924\",6378388,297,AUTHORITY[\"EPSG\",\"7022\"]]," +
+                                  "TOWGS84[-84,-107,-120,0,0,0,0],AUTHORITY[\"EPSG\",\"6230\"]]";
+    private static String line3 = "DATUM[\"Nouvelle_Triangulation_Francaise\"," +
+                                  "SPHEROID[\"Clarke 1880 (IGN)\",6378249.2,293.466021293627, AUTHORITY[\"EPSG\",\"7011\"]]," +
+                                  "TOWGS84[-168,-60,320,0,0,0,0],AUTHORITY[\"EPSG\",\"6275\"]]";
+    private static String line4 = "DATUM[\"Datum 73\"," +
+                                  "SPHEROID[\"International 1924\",6378388,297,AUTHORITY[\"EPSG\",\"7022\"]]," +
+                                  "TOWGS84[-87,-98,-121,0,0,0,0],AUTHORITY[\"EPSG\",\"4274\"]]";
+    private static String line5 = "DATUM[\"North_American_Datum_1927\"," +
+                                  "SPHEROID[\"Clarke 1866\",6378206.4,294.978698213901,AUTHORITY[\"EPSG\",\"7008\"]]," +
+                                  "TOWGS84[-3,142,183,0,0,0,0],AUTHORITY[\"EPSG\",\"6267\"]]";
+    private static String line6 = "DATUM[\"North_American_Datum_1983\"," +
+                                  "SPHEROID[\"GRS 1980\",6378137,298.257222101,AUTHORITY[\"EPSG\",\"7019\"]]," +
+                                  "TOWGS84[0,0,0,0,0,0,0],AUTHORITY[\"EPSG\",\"6269\"]]";
+
+    /*
+     * INSERT INTO epsg_coordinatereferencesystem VALUES (
+     * 4288, 'Loma Quintana', 1313, 'geographic 2D', 6422, 6288,
+     * Null, Null, Null, Null, 'Geodetic survey.',
+     * 'Superseded by La Canoa (code 4247).', '',
+     * 'EPSG', '2004/01/06', '2003.37', 1, 0 );
+     *
+     *  DX (m) = -270.933
+            DY (m) =  115.599
+            DZ (m) = -360.226
+
+            EX (") = -5.266
+            EY (") = -1.238
+              EZ (")  =  2.381
+            FE (ppm) = -5.109
+     */
+    private static String line7 = "DATUM[\"Loma Quintana\"," +
+                                  "SPHEROID[\"International 1924\",6378388,297,AUTHORITY[\"EPSG\",\"7022\"]]," +
+                                  "TOWGS84[0,0,0,0,0,0,0],AUTHORITY[\"EPSG\",\"6288\"]]";
+
+    /*
+    # La Canoa
+    <4247> +proj=longlat +ellps=intl +towgs84=-273.5,110.6,-357.9,0,0,0,0
+    no_defs <>
+    # PSAD56
+    <4248> +proj=longlat +ellps=intl +towgs84=-288,175,-376,0,0,0,0 no_defs <>
+     */
+    private static String line8 = "DATUM[\"La Canoa\"," +
+                                  "SPHEROID[\"International 1924\",6378388,297,AUTHORITY[\"EPSG\",\"7022\"]]," +
+                                  "TOWGS84[-270.933,115.599,-360.226,-5.266,-1.238,2.381,-5.109],AUTHORITY[\"EPSG\",\"6288\"]]";
+    private static String line9 = "GEOGCS[\"NTF (Paris)\","+
+    	"DATUM[\"Nouvelle_Triangulation_Francaise_Paris\"," +
+    	"SPHEROID[\"Clarke 1880 (IGN)\",6378249.2,293.4660212936269,AUTHORITY[\"EPSG\",\"7011\"]]," +
+    	"TOWGS84[-168,-60,320,0,0,0,0],AUTHORITY[\"EPSG\",\"8903\"]]"+
+        ",PRIMEM[\"Paris\",2.33722917,AUTHORITY[\"EPSG\",\"8903\"]]," +
+        "UNIT[\"grad\",0.01570796326794897,AUTHORITY[\"EPSG\",\"9105\"]]," +
+        "AXIS[\"Lat\",NORTH],AXIS[\"Long\",EAST]," +
+        "AUTHORITY[\"EPSG\",\"4807\"]]";
+    
+    private static String line10 = "GEOGCS[\"RGF93\"," +
+		"DATUM[\"Reseau Geodesique Francais 1993\"," +
+	    "SPHEROID[\"GRS 1980\",6378137,298.257222101,AUTHORITY[\"EPSG\",\"7019\"]]," +
+	    "TOWGS84[0,0,0,0,0,0,0],AUTHORITY[\"EPSG\",\"6171\"]],"+
+        "PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]]," +
+        "UNIT[\"DMSH\",0.0174532925199433,AUTHORITY[\"EPSG\",\"9108\"]]," +
+        "AXIS[\"Lat\",NORTH],AXIS[\"Long\",EAST]," +
+        "AUTHORITY[\"EPSG\",\"4171\"]]";
+    private static String line11 = "GEOGCS[\"ETRS89\","+
+        "DATUM[\"European_Terrestrial_Reference_System_1989\","+
+            "SPHEROID[\"GRS 1980\",6378137,298.257222101,"+
+                "AUTHORITY[\"EPSG\",\"7019\"]],"+
+            "AUTHORITY[\"EPSG\",\"6258\"]],"+
+        "PRIMEM[\"Greenwich\",0,"+
+            "AUTHORITY[\"EPSG\",\"8901\"]],"+
+        "UNIT[\"degree\",0.01745329251994328,"+
+            "AUTHORITY[\"EPSG\",\"9122\"]],"+
+        "AUTHORITY[\"EPSG\",\"4258\"]]";
+    //," +
+    //"TOWGS84[0,0,0,0,0,0,0]
+    private static String line12 =
+    	"GEOGCS[\"Mars 2000\","+
+	    	"DATUM[\"D_Mars_2000\","+
+	    		"SPHEROID[\"Mars_2000_IAU_IAG\",3396190.0, 169.89444722361179],"+
+	    	"TOWGS84[0,0,0,0,0,0,0]],"+
+		    "PRIMEM[\"Greenwich\",0],"+
+	    	"UNIT[\"Decimal_Degree\",0.0174532925199433]]";
+
+    public final static CSDatum wgs84 = new CSDatum(line1);
+    public final static CSDatum ed50 = new CSDatum(line2);
+    public final static CSDatum ntf = new CSDatum(line3);
+    public final static CSDatum d73 = new CSDatum(line4);
+    public final static CSDatum nad27 = new CSDatum(line5);
+    public final static CSDatum nad83 = new CSDatum(line6);
+    public final static CSDatum lomaQuintana = new CSDatum(line7);
+    public final static CSDatum laCanoa = new CSDatum(line8);
+    public static CSDatum etrs89 = null;
+    public static CSDatum ntfParis = null;
+    public static CSDatum posgar = null;
+    public static CSDatum rgf93 = null;
+    public static CSDatum mars = null;
+    public static CSDatum moon = null;
+    private String sGeo1 = "GEOGCS[\"WGS 84\",";
+    private String sGeo2 =
+        ",PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]]," +
+        "UNIT[\"DMSH\",0.0174532925199433,AUTHORITY[\"EPSG\",\"9108\"]]," +
+        "AXIS[\"Lat\",NORTH],AXIS[\"Long\",EAST]," +
+        "AUTHORITY[\"EPSG\",\"4326\"]]";
+    private HorizontalDatum datum = null;
+    static {
+    	try {
+			ntfParis =  new CSDatum().fromWKT(line9);
+			rgf93 =  new CSDatum().fromWKT(line10);
+			etrs89 = new CSDatum().fromWKT(line11);
+			posgar = new CSDatum().fromWKT(
+				"GEOGCS[\"POSGAR\","+
+				"DATUM[\"POSGAR\"," +
+                "SPHEROID[\"GRS 1980\",6378137,298.257222101,AUTHORITY[\"EPSG\",\"7019\"]]," +
+                "TOWGS84[0,0,0,0,0,0,0],AUTHORITY[\"EPSG\",\"6269\"]]"+
+                ",PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]]," +
+                "UNIT[\"DMSH\",0.0174532925199433,AUTHORITY[\"EPSG\",\"9108\"]]," +
+                "AXIS[\"Lat\",NORTH],AXIS[\"Long\",EAST]," +
+                "AUTHORITY[\"EPSG\",\"4172\"]]");
+			mars = new CSDatum().fromWKT(line12);
+			moon = new CSDatum().fromWKT(
+				"GEOGCS[\"Moon 2000\"," +
+				"DATUM[\"D_Moon_2000\"," +
+				"SPHEROID[\"Moon_2000_IAU_IAG\",1737400.0, 0.0]," +
+		    	"TOWGS84[0,0,0,0,0,0,0]],"+
+				"PRIMEM[\"Greenwich\",0]," +
+				"UNIT[\"Decimal_Degree\",0.0174532925199433]]");
+		} catch (FactoryException e) {
+			// TODO Auto-generated catch block
+			e.printStackTrace();
+		}
+    }
+
+    public CSDatum() {
+    }
+
+    public CSDatum(HorizontalDatum datum) {
+    	this.datum = datum;
+    }
+
+    public CSDatum(String sDatum) {
+        try {
+            fromWKT(sGeo1 + sDatum + sGeo2);
+        } catch (FactoryException e) {
+            // TODO Bloque catch generado automáticamente
+            e.printStackTrace();
+        }
+    }
+    
+    public CSDatum fromWKT(String s) throws FactoryException {
+        datum = ((GeographicCoordinateSystem) CoordinateSystemFactory.getDefault()
+                .createFromWKT(s)).getHorizontalDatum();
+        return this;
+    }
+
+    public String getName(Locale loc) {
+        return datum.getName().toString();
+    }
+
+    HorizontalDatum getDatum() {
+        return datum;
+    }
+
+    public double getESemiMajorAxis() {
+        return datum.getEllipsoid().getSemiMajorAxis();
+    }
+
+    public double getEIFlattening() {
+        return datum.getEllipsoid().getInverseFlattening();
+    }
+
+    public String toString() {
+        return datum.toString();
+    }
+}

Property changes on: tags/v2_0_0_Build_2047/libraries/libProjection/src/org/cresques/impl/cts/gt2/CSDatum.java
___________________________________________________________________
Added: svn:eol-style
   + native

Index: tags/v2_0_0_Build_2047/libraries/libProjection/src/org/cresques/impl/cts/gt2/gt2.dfPackage
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream

Property changes on: tags/v2_0_0_Build_2047/libraries/libProjection/src/org/cresques/impl/cts/gt2/gt2.dfPackage
___________________________________________________________________
Added: svn:mime-type
   + application/octet-stream

Index: tags/v2_0_0_Build_2047/libraries/libProjection/src/org/cresques/impl/cts/gt2/CSLambertCC.java
===================================================================
--- tags/v2_0_0_Build_2047/libraries/libProjection/src/org/cresques/impl/cts/gt2/CSLambertCC.java	(revision 0)
+++ tags/v2_0_0_Build_2047/libraries/libProjection/src/org/cresques/impl/cts/gt2/CSLambertCC.java	(revision 38292)
@@ -0,0 +1,130 @@
+/*
+ * Cresques Mapping Suite. Graphic Library for constructing mapping applications.
+ *
+ * Copyright (C) 2004-5.
+ *
+ * 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:
+ *
+ * cresques@gmail.com
+ */
+package org.cresques.impl.cts.gt2;
+
+import org.geotools.cs.AxisInfo;
+import org.geotools.cs.GeographicCoordinateSystem;
+import org.geotools.cs.Projection;
+
+import org.geotools.units.Unit;
+
+import org.opengis.referencing.FactoryException;
+
+
+/**
+ * @author "Luis W. Sevilla" <sevilla_lui@gva.es>
+ *
+ */
+public class CSLambertCC extends CoordSys {
+    public CSLambertCC(CSDatum datum, double meridian, double origin,
+                       double sp1, double sp2, double est, double nort) {
+        super(datum);
+
+        geogCS = new GeographicCoordinateSystem(datum.getName(null),
+                                                datum.getDatum());
+
+        Unit linearUnit = Unit.METRE;
+
+        javax.media.jai.ParameterList params = csFactory.createProjectionParameterList("Lambert_Conformal_Conic_2SP");
+        params.setParameter("semi_major",
+                            datum.getDatum().getEllipsoid().getSemiMajorAxis());
+        params.setParameter("semi_minor",
+                            datum.getDatum().getEllipsoid().getSemiMinorAxis());
+        params.setParameter("central_meridian", meridian);
+        params.setParameter("latitude_of_origin", origin);
+        params.setParameter("standard_parallel_1", sp1);
+        params.setParameter("standard_parallel_2", sp2);
+        params.setParameter("false_easting", est);
+        params.setParameter("false_northing", nort);
+
+        try {
+            Projection projection = csFactory.createProjection("Lambert",
+                                                               "Lambert_Conformal_Conic_2SP",
+                                                               params);
+            projCS = csFactory.createProjectedCoordinateSystem(projection.getName()
+                                                                         .toString(),
+                                                               geogCS,
+                                                               projection,
+                                                               linearUnit,
+                                                               AxisInfo.X,
+                                                               AxisInfo.Y);
+        } catch (FactoryException e) {
+            // TODO Bloque catch generado automáticamente
+            e.printStackTrace();
+        }
+    }
+
+    public CSLambertCC(CSDatum datum, double meridian, double origin,
+    		double sf, double est, double nort) {
+    	super(datum);
+    	
+    	geogCS = new GeographicCoordinateSystem(datum.getName(null),
+    			datum.getDatum());
+    	
+    	Unit linearUnit = Unit.METRE;
+    	
+    	javax.media.jai.ParameterList params = csFactory.createProjectionParameterList("Lambert_Conformal_Conic_1SP");
+    	params.setParameter("semi_major",
+    			datum.getDatum().getEllipsoid().getSemiMajorAxis());
+    	params.setParameter("semi_minor",
+    			datum.getDatum().getEllipsoid().getSemiMinorAxis());
+    	params.setParameter("central_meridian", meridian);
+    	params.setParameter("latitude_of_origin", origin);
+    	params.setParameter("scale_factor", sf);
+    	params.setParameter("false_easting", est);
+    	params.setParameter("false_northing", nort);
+    	
+    	try {
+    		Projection projection = csFactory.createProjection("Lambert",
+    				"Lambert_Conformal_Conic_1SP",
+					params);
+    		projCS = csFactory.createProjectedCoordinateSystem(projection.getName()
+    				.toString(),
+					geogCS,
+					projection,
+					linearUnit,
+					AxisInfo.X,
+					AxisInfo.Y);
+    	} catch (FactoryException e) {
+    		// TODO Bloque catch generado automáticamente
+    		e.printStackTrace();
+    	}
+    }
+    
+    public double getScale(double minX, double maxX, double w, double dpi) {
+        double scale = super.getScale(minX, maxX, w, dpi);
+
+        if (projCS != null) { // Es geográfico; calcula la escala.
+            scale = ((maxX - minX) * // metros
+                    (dpi / 2.54 * 100.0)) / // px / metro
+                    w; // pixels
+        }
+
+        return scale;
+    }
+    
+    public String toString() {
+        return projCS.toString();
+    }
+}

Property changes on: tags/v2_0_0_Build_2047/libraries/libProjection/src/org/cresques/impl/cts/gt2/CSLambertCC.java
___________________________________________________________________
Added: svn:eol-style
   + native

Index: tags/v2_0_0_Build_2047/libraries/libProjection/src/org/cresques/impl/cts/gt2/CSMercator.java
===================================================================
--- tags/v2_0_0_Build_2047/libraries/libProjection/src/org/cresques/impl/cts/gt2/CSMercator.java	(revision 0)
+++ tags/v2_0_0_Build_2047/libraries/libProjection/src/org/cresques/impl/cts/gt2/CSMercator.java	(revision 38292)
@@ -0,0 +1,89 @@
+/*
+ * Cresques Mapping Suite. Graphic Library for constructing mapping applications.
+ *
+ * Copyright (C) 2004-6.
+ *
+ * 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:
+ *
+ * cresques@gmail.com
+ */
+package org.cresques.impl.cts.gt2;
+
+import org.geotools.cs.AxisInfo;
+import org.geotools.cs.GeographicCoordinateSystem;
+import org.geotools.cs.Projection;
+
+import org.geotools.units.Unit;
+
+import org.opengis.referencing.FactoryException;
+
+
+/**
+ * @author "Luis W. Sevilla" <sevilla_lui@gva.es>
+ */
+public class CSMercator extends CoordSys {
+    public CSMercator(CSDatum datum) {
+        super(datum);
+        geogCS = new GeographicCoordinateSystem(datum.getName(null),
+                                                datum.getDatum());
+
+        Unit linearUnit = Unit.METRE;
+
+        javax.media.jai.ParameterList params = csFactory.createProjectionParameterList("Mercator");
+        params.setParameter("semi_major",
+                            datum.getDatum().getEllipsoid().getSemiMajorAxis());
+        params.setParameter("semi_minor",
+                            datum.getDatum().getEllipsoid().getSemiMinorAxis());
+        params.setParameter("central_meridian", 0D);
+        params.setParameter("latitude_of_origin", 0D);
+        params.setParameter("scale_factor", 1D);
+        params.setParameter("false_easting", 0D);
+        params.setParameter("false_northing", 0D);
+
+        try {
+            Projection projection = csFactory.createProjection("Mercator",
+                                                               "Mercator_1SP",
+                                                               params);
+            projCS = csFactory.createProjectedCoordinateSystem(projection.getName()
+                                                                         .toString(),
+                                                               geogCS,
+                                                               projection,
+                                                               linearUnit,
+                                                               AxisInfo.X,
+                                                               AxisInfo.Y);
+        } catch (FactoryException e) {
+            // TODO Bloque catch generado automáticamente
+            e.printStackTrace();
+        }
+    }
+
+    public double getScale(double minX, double maxX, double w, double dpi) {
+        double scale = super.getScale(minX, maxX, w, dpi);
+
+        if (projCS != null) { // Es geográfico; calcula la escala.
+            scale = ((maxX - minX) * // metros
+                    (dpi / 2.54 * 100.0)) / // px / metro
+                    w; // pixels
+        }
+
+        return scale;
+    }
+
+    public String toString() {
+        return projCS.toString();
+    }
+}

Property changes on: tags/v2_0_0_Build_2047/libraries/libProjection/src/org/cresques/impl/cts/gt2/CSMercator.java
___________________________________________________________________
Added: svn:eol-style
   + native

Index: tags/v2_0_0_Build_2047/libraries/libProjection/src/org/cresques/impl/cts/wkt/WKT.java
===================================================================
--- tags/v2_0_0_Build_2047/libraries/libProjection/src/org/cresques/impl/cts/wkt/WKT.java	(revision 0)
+++ tags/v2_0_0_Build_2047/libraries/libProjection/src/org/cresques/impl/cts/wkt/WKT.java	(revision 38292)
@@ -0,0 +1,365 @@
+package org.cresques.impl.cts.wkt;
+
+import java.util.ArrayList;
+
+/**
+ * Generates a WKT from CRS parameters.
+ * as, for example in
+ * "GEOGCS[\"ETRS89\","+
+        "DATUM[\"European_Terrestrial_Reference_System_1989\","+
+            "SPHEROID[\"GRS 1980\",6378137,298.257222101,"+
+                "AUTHORITY[\"EPSG\",\"7019\"]],"+
+            "AUTHORITY[\"EPSG\",\"6258\"]," +
+            "TOWGS84[0,0,0,0,0,0,0]],"+
+        "PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],"+
+        "UNIT[\"degree\",0.01745329251994328, AUTHORITY[\"EPSG\",\"9122\"]],"+
+        "AUTHORITY[\"EPSG\",\"4258\"]]";
+    
+ * @author Luis W. Sevilla <sevilla_lui@gva.es>
+ *
+ */
+public abstract class WKT {
+
+	static class Authority {
+		String name;
+		String code;
+		public Authority(String n, String c) {
+			name = n;
+			code = c;
+		}
+		public String toWKT() {
+			return "AUTHORITY[\""+name+"\",\""+code+"\"]";
+		}
+	}
+
+	static class Parameter {
+		protected String name;
+		private String value;
+		protected Authority authority; // optional
+		
+		public Parameter(String n) {
+			name = n;
+		}
+		
+		public Parameter(String n, String v) {
+			name = n;
+			value = v;
+		}
+		public Parameter(String n, Authority a) {
+			name = n;
+			authority = a;
+		}
+		
+		public String toWKT() {
+			String txt = "PARAMETER[\""+name+"\","+value;
+			if (authority != null)
+				txt += ","+authority.toWKT();
+			return txt + "]";
+		}
+	}
+
+	static class Spheroid {
+		String name;
+		double semiMajor;
+		double inverseFlattening;
+		Authority authority = null; // optional
+		
+		public Spheroid(String n, double s, double f) {
+			name = n;
+			semiMajor = s;
+			inverseFlattening = f;
+		}
+		public Spheroid(String n, double s, double f, Authority a) {
+			name = n;
+			semiMajor = s;
+			inverseFlattening = f;
+			authority = a;
+		}
+		public String toWKT() {
+			String txt = "SPHEROID[\""+name+"\","+
+				semiMajor+","+inverseFlattening;
+			if (authority != null)
+				txt += ","+authority.toWKT();
+			return txt + "]";
+		}
+	}
+
+	static class ToWGS84 {
+		double dx = 0;
+		double dy = 0;
+		double dz = 0;
+		double ex = 0;
+		double ey = 0;
+		double ez = 0;
+		double ppm = 0;
+		public ToWGS84() {
+		}
+		public ToWGS84(double dx, double dy, double dz, double ex, double ey, double ez, double ppm) {
+			this.dx = dx;
+			this.dy = dy;
+			this.dz = dz;
+			this.ex = ex;
+			this.ey = ey;
+			this.ez = ez;
+			this.ppm = ppm;
+		}
+		public String toWKT() {
+			return "TOWGS84["+dx+","+dy+","+dz+","+ex+","+ey+","+ez+","+ppm+"]";
+		}
+	}
+
+	static class Datum {
+		String name;
+		Spheroid spheroid;
+		ToWGS84 towgs84 = new ToWGS84(); // optional
+		Authority authority; // optional
+		public Datum(String n, Spheroid s) {
+			init (n, s, new ToWGS84(), null);
+		}
+		public Datum(String n, Spheroid s, ToWGS84 t) {
+			init (n, s, t, null);
+		}
+		public Datum(String n, Spheroid s, Authority a) {
+			init (n, s, new ToWGS84(), a);
+		}
+		public Datum(String n, Spheroid s, ToWGS84 t, Authority a) {
+			init (n, s, t, a);
+		}
+		private void init(String n, Spheroid s,
+			ToWGS84 t, Authority a) {
+			name = n;
+			spheroid = s;
+			towgs84 = t;
+			authority = a;
+		}
+		public String toWKT() {
+			String txt = "DATUM[\""+name+"\","+spheroid.toWKT();
+			if (towgs84 != null)
+				txt += ","+towgs84.toWKT();
+			if (authority != null)
+				txt += ","+authority.toWKT();
+			return txt+"]";
+		}
+	}
+
+	static class PrimeM {
+		String name;
+		double longitude;
+		Authority authority = null; // optional
+		
+		public PrimeM(String n, double l) {
+			name = n;
+			longitude = l;
+		}
+		
+		public PrimeM(String n, double l, Authority a) {
+			name = n;
+			longitude = l;
+			authority = a;
+		}
+		
+		public String toWKT() {
+			String txt = "PRIMEM[\""+name+"\","+longitude;
+			if (authority != null)
+				txt += ","+authority.toWKT();
+			return txt + "]";
+		}
+	}
+
+	static class Unit {
+		String name;
+		double conversionFactor;
+		Authority authority; // optional
+		
+		public Unit(String n, double l) {
+			name = n;
+			conversionFactor = l;
+		}
+		
+		public Unit(String n, double l, Authority a) {
+			name = n;
+			conversionFactor = l;
+			authority = a;
+		}
+		
+		public String toWKT() {
+			String txt = "UNIT[\""+name+"\","+conversionFactor;
+			if (authority != null)
+				txt += ","+authority.toWKT();
+			return txt + "]";
+		}
+	}
+	
+	static class Orientation {
+		public final static int NORTH = 0;
+		public final static int SOUTH = 1;
+		public final static int EAST = 2;
+		public final static int WEST = 3;
+		public final static int UP = 4;
+		public final static int DOWN = 5;
+		public final static int OTHER = 6;
+		protected final String [] txt = {
+			"NORTH","SOUTH","EAST","WEST","UP","DOWN","OTHER"
+		};
+		protected int to = -1;
+		
+		public Orientation(int to) {
+			this.to = to;
+		}
+	}
+	
+	static class Axis extends Orientation {
+		String name;
+		
+		public Axis(String name, int to) {
+			super(to);
+			this.name = name;
+		}
+		
+		public String toWKT() {
+			return "AXIS[\""+name+"\","+txt[to]+ "]";
+		}
+	}
+	
+	static class TwinAxes {
+		Axis axe1;
+		Axis axe2;
+		
+		public TwinAxes(Axis a1, Axis a2) {
+			axe1 = a1;
+			axe2 = a2;
+		}
+
+		public String toWKT() {
+			return axe1.toWKT()+","+axe2.toWKT();
+		}
+
+	}
+
+	static class GeogCS extends WKT {
+		String name;
+		Datum datum;
+		PrimeM primeMeridian;
+		Unit unit;
+		TwinAxes axes = null; // optional
+		Authority authority = null; // optional
+		
+		public GeogCS(String n, Datum d, PrimeM p, Unit u) {
+			init(n, d, p, u, null, null);
+		}
+		
+		public GeogCS(String n, Datum d, PrimeM p, Unit u,
+				Authority a) {
+			init(n, d, p, u, null, a);
+		}
+		
+		public GeogCS(String n, Datum d, PrimeM p, Unit u,
+				TwinAxes t) {
+			init(n, d, p, u, t, null);
+		}
+		
+		public GeogCS(String n, Datum d, PrimeM p, Unit u,
+				TwinAxes t, Authority a) {
+			init(n, d, p, u, t, a);
+		}
+		
+		private void init(String n, Datum d, PrimeM p, Unit u,
+			TwinAxes t, Authority a) {
+			name = n;
+			datum = d;
+			primeMeridian = p;
+			unit = u;
+			axes = t;
+			authority = a;
+		}
+		
+		public String toWKT() {
+			String txt = "GEOGCS[\""+name+"\","+datum.toWKT()+
+				","+primeMeridian.toWKT()+","+unit.toWKT();
+			if (axes != null)
+				txt += ","+axes.toWKT();
+			if (authority != null)
+				txt += ","+authority.toWKT();
+			return txt+"]";
+		}
+	}
+
+	static class Projection extends Parameter {
+		public Projection(String n) {
+			super(n);
+		}
+		
+		public Projection(String n, Authority a) {
+			super(n,a);
+		}
+		
+		public String toWKT() {
+			String txt = "PROJECTION[\""+name+"\"";
+			if (authority != null)
+				txt += ","+authority.toWKT();
+			return txt + "]";
+		}
+	}
+
+	static class ProjCS extends Parameter {
+		GeogCS geogcs;
+		Projection proj;
+		ArrayList params = new ArrayList();
+		Unit unit;
+		TwinAxes axes = null; // optional
+
+		public ProjCS(String n, GeogCS cs, Projection prj, Unit u ) {
+			super(n);
+			Parameter [] p = {};
+			init(n, cs, prj, p, u, null);
+		}
+		
+		public ProjCS(String n, GeogCS cs, Projection prj,
+				Parameter [] p, Unit u ) {
+			super(n);
+			init(n, cs, prj, p, u, null);
+		}
+		
+		public ProjCS(String n, GeogCS cs, Projection prj,
+				Unit u, TwinAxes t, Authority a ) {
+			super(n, a);
+			Parameter [] p = {};
+			init(n, cs, prj, p, u, t);
+		}
+		
+		public ProjCS(String n, GeogCS cs, Projection prj,
+				Parameter [] p, Unit u, TwinAxes t, Authority a ) {
+			super(n, a);
+			init(n, cs, prj, p, u, t);
+		}
+		
+		private void init(String n, GeogCS cs, Projection prj,
+			Parameter [] p, Unit u, TwinAxes t) {
+			geogcs = cs;
+			proj = prj;
+			for (int i=0; i<p.length; i++)
+				params.add(p[i]);
+			unit = u;
+			axes = t;
+		}
+
+		public void add(Parameter p) {
+			params.add(p);
+		}
+		
+		public String toWKT() {
+			String txt = "PROJCS[\""+name+"\","+geogcs.toWKT()+
+				","+proj.toWKT();
+			for (int i=0; i<params.size();i++)
+				txt += ","+((Parameter)params.get(i)).toWKT();
+			txt += ","+unit.toWKT();
+			if (axes != null)
+				txt += ","+axes.toWKT();
+			if (authority != null)
+				txt += ","+authority.toWKT();
+			return txt+"]";
+		}
+	}
+
+	abstract public String toWKT();
+}

Property changes on: tags/v2_0_0_Build_2047/libraries/libProjection/src/org/cresques/impl/cts/wkt/WKT.java
___________________________________________________________________
Added: svn:eol-style
   + native

Index: tags/v2_0_0_Build_2047/libraries/libProjection/src/org/cresques/impl/cts/ProjectionPool.java
===================================================================
--- tags/v2_0_0_Build_2047/libraries/libProjection/src/org/cresques/impl/cts/ProjectionPool.java	(revision 0)
+++ tags/v2_0_0_Build_2047/libraries/libProjection/src/org/cresques/impl/cts/ProjectionPool.java	(revision 38292)
@@ -0,0 +1,384 @@
+/*
+ * Cresques Mapping Suite. Graphic Library for constructing mapping applications.
+ *
+ * Copyright (C) 2004-5.
+ *
+ * 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:
+ *
+ * cresques@gmail.com
+ */
+package org.cresques.impl.cts;
+
+import java.util.ArrayList;
+import java.util.Iterator;
+import java.util.Map;
+import java.util.TreeMap;
+
+import org.cresques.cts.ICRSFactory;
+import org.cresques.cts.IProjection;
+import org.cresques.impl.cts.gt2.CSDatum;
+import org.cresques.impl.cts.gt2.CSGaussPt;
+import org.cresques.impl.cts.gt2.CSLambertCC;
+import org.cresques.impl.cts.gt2.CSMercator;
+import org.cresques.impl.cts.gt2.CSUTM;
+import org.cresques.impl.cts.gt2.CoordSys;
+
+
+/**
+ * Pool de proyeccions (cs+datum) conocidas.
+ * @author "Luis W. Sevilla" <sevilla_lui@gva.es>
+ */
+public class ProjectionPool implements ICRSFactory {
+    static TreeMap data = null;
+
+    static {
+        CoordSys cs = null;
+        data = new TreeMap();
+
+        cs = (new CSUTM(CSDatum.wgs84, 30)).toGeo();
+        cs.setAbrev("EPSG:4326"); // WGS84 (World Geodesic Datum)
+        data.put(cs.getAbrev(), cs);
+        data.put("CRS:84", cs); // CRS:84 = EPSG:4326
+
+        cs = (new CSUTM(CSDatum.ed50, 30)).toGeo();
+        cs.setAbrev("EPSG:4230"); // Datum Europeu Internacional ED50
+        data.put(cs.getAbrev(), cs);
+
+        cs = (new CSUTM(CSDatum.d73, 30)).toGeo();
+        cs.setAbrev("EPSG:4274"); // Datum 73 de Lisboa
+        data.put(cs.getAbrev(), cs);
+
+        cs = (new CSUTM(CSDatum.nad27, 30)).toGeo();
+        cs.setAbrev("EPSG:4267"); // NAD 27
+        data.put(cs.getAbrev(), cs);
+
+        cs = (new CSUTM(CSDatum.nad83, 30)).toGeo();
+        cs.setAbrev("EPSG:4269"); // NAD 83
+        data.put(cs.getAbrev(), cs);
+
+        cs = (new CSUTM(CSDatum.lomaQuintana, 30)).toGeo();
+        cs.setAbrev("EPSG:4288"); // PSAD 56 'Loma Quintana'
+        data.put(cs.getAbrev(), cs);
+
+        cs = (new CSUTM(CSDatum.laCanoa, 30)).toGeo();
+        cs.setAbrev("EPSG:4247"); // PSAD 56 'Loma Quintana'
+        data.put(cs.getAbrev(), cs);
+
+        cs = (new CSUTM(CSDatum.ntfParis, 30)).toGeo();
+        cs.setAbrev("EPSG:4807"); // NTF Paris
+        data.put(cs.getAbrev(), cs);
+
+        cs = (new CSUTM(CSDatum.etrs89, 30)).toGeo();
+        cs.setAbrev("EPSG:4258"); // ETRS 89
+        data.put(cs.getAbrev(), cs);
+        for (int i = 1; i <= 60; i++) {
+            String huso = Integer.toString(i);
+
+            if (i < 10) {
+                huso = "0" + huso;
+            }
+
+            cs = new CSUTM(CSDatum.wgs84, i);
+            cs.setAbrev("EPSG:326" + huso);
+            data.put(cs.getAbrev(), cs);
+
+            cs = new CSUTM(CSDatum.ed50, i);
+            cs.setAbrev("EPSG:230" + huso);
+            data.put(cs.getAbrev(), cs);
+            if (i>2 && i<=23) {
+                cs = new CSUTM(CSDatum.nad27, i);
+                cs.setAbrev("EPSG:267" + huso);
+                data.put(cs.getAbrev(), cs);
+
+                cs = new CSUTM(CSDatum.nad83, i);
+                cs.setAbrev("EPSG:269" + huso);
+                data.put(cs.getAbrev(), cs);
+            }
+            if (i>27 && i<39) {
+                cs = new CSUTM(CSDatum.etrs89, i);
+                cs.setAbrev("EPSG:258" + huso);
+                data.put(cs.getAbrev(), cs);
+            }
+        }
+
+        cs = CSGaussPt.hgd73;
+        cs.setAbrev("EPSG:27492"); // Projecção Gauss do Datum 73 de Lisboa (no EPSG found)
+        data.put(cs.getAbrev(), cs);
+
+        cs = new CSUTM(CSDatum.d73, 29);
+        cs.setAbrev("EPSG:27429"); // Projecção Gauss do Datum 73 de Lisboa (no EPSG found)
+        data.put(cs.getAbrev(), cs);
+
+        for (int i = 18; i <= 21; i++) {
+            String huso = Integer.toString(i);
+
+            if (i < 10) {
+                huso = "0" + huso;
+            }
+
+            cs = new CSUTM(CSDatum.laCanoa, i);
+            cs.setAbrev("EPSG:247" + huso);
+            data.put(cs.getAbrev(), cs);
+        }
+
+        for (int i = 16; i <= 22; i++) {
+            String huso = Integer.toString(i);
+            // Psad56 Ecuador
+            cs = new CSUTM(CSDatum.lomaQuintana, i);
+            cs.setAbrev("EPSG:288" + huso);
+            data.put(cs.getAbrev(), cs);
+            cs = new CSUTM(CSDatum.lomaQuintana, i, "S");
+            cs.setAbrev("EPSG:288" + (i+60) );
+            data.put(cs.getAbrev(), cs);
+        }
+
+        //		cs = new CSLambertCC(CSDatum.nad27, -105D, 49D, 49D, 77D, 0, 0);
+        //		cs.setAbrev("LCCCan");
+        //		data.put(cs.getAbrev(), cs);
+        /* Para el server WMS de canadá:
+         * EPSG:42101
+         * EPSG:42304
+         * EPSG:4269
+         */
+        /*
+         * 42101,PROJCS["WGS 84 / LCC Canada",
+         * GEOGCS["WGS 84",DATUM["WGS_1984",
+         * SPHEROID["WGS_1984",6378137,298.257223563]],
+         * PRIMEM["Greenwich",0],UNIT["Decimal_Degree",0.0174532925199433]],
+         *
+         * PROJECTION["Lambert_Conformal_Conic_2SP"],
+         * PARAMETER["central_meridian",-95.0],
+         * PARAMETER["latitude_of_origin",0],
+         * PARAMETER["standard_parallel_1",49.0],
+         * PARAMETER["standard_parallel_2",77.0],
+         * PARAMETER["false_easting",0.0],
+         * PARAMETER["false_northing",-8000000.0],
+         * UNIT["Meter",1],AUTHORITY["EPSG","42101"]]
+         */
+        cs = new CSLambertCC(CSDatum.wgs84, -95, 0, 49, 77, 0, -8000000.0);
+        cs.setAbrev("EPSG:42101");
+        data.put(cs.getAbrev(), cs);
+
+        /* 42304,PROJCS["NAD83 / NRCan LCC Canada",
+         * GEOGCS["NAD83",DATUM["North_American_Datum_1983",
+         * SPHEROID["GRS_1980",6378137,298.257222101]],
+         * PRIMEM["Greenwich",0],
+         * UNIT["Decimal_Degree",0.0174532925199433]],
+         *
+         * PROJECTION["Lambert_Conformal_Conic_2SP"],
+         * PARAMETER["central_meridian",-95.0],
+         * PARAMETER["latitude_of_origin",49.0],
+         * PARAMETER["standard_parallel_1",49.0],
+         * PARAMETER["standard_parallel_2",77.0],
+         * PARAMETER["false_easting",0.0],
+         * PARAMETER["false_northing",0.0],
+         * UNIT["Meter",1],AUTHORITY["EPSG","42304"]]
+         */
+        cs = new CSLambertCC(CSDatum.nad83, -95, 49, 49, 77, 0, 0);
+        cs.setAbrev("EPSG:42304");
+        data.put(cs.getAbrev(), cs);
+
+        /*
+         * EPSG:26915 - NAD83 / UTM zone 15N
+         * EPSG:31466 - Gauß-Krüger band 2
+         * EPSG:31467 - Gauß-Krüger band 3
+         * EPSG:4314  - DHDN
+         */
+        /*
+         * 27572=PROJCS["NTF (Paris) / Lambert zone II",
+             GEOGCS["NTF (Paris)",
+                    DATUM["Nouvelle_Triangulation_Francaise_Paris",
+                          SPHEROID["Clarke 1880 (IGN)",6378249.2,293.4660212936269,
+                                   AUTHORITY["EPSG","7011"]],
+                          TOWGS84[-168,-60,320,0,0,0,0],
+                          AUTHORITY["EPSG","6807"]],
+                    PRIMEM["Paris",2.33722917,AUTHORITY["EPSG","8903"]],
+                    UNIT["grad",0.01570796326794897,AUTHORITY["EPSG","9105"]],
+                    AUTHORITY["EPSG","4807"]],
+             PROJECTION["Lambert_Conformal_Conic_1SP"],
+                        PARAMETER["latitude_of_origin",52],
+                        PARAMETER["central_meridian",0],
+                        PARAMETER["scale_factor",0.99987742],
+                        PARAMETER["false_easting",600000],
+                        PARAMETER["false_northing",2200000],
+                        UNIT["metre",1,AUTHORITY["EPSG","9001"]],
+                        AUTHORITY["EPSG","27572"]]
+         */
+
+        cs = new CSLambertCC(CSDatum.ntfParis, 0, 46.79999999999995, 0.99987742, 600000, 2200000);
+        cs.setAbrev("EPSG:27572");
+        data.put(cs.getAbrev(), cs);
+        
+        cs = new CSLambertCC(CSDatum.ntfParis, 0, 52, 0.99987742, 600000, 2200000);
+        cs.setAbrev("EPSG:27582");
+        data.put(cs.getAbrev(), cs);
+        /*
+         * # RGF93
+         * <4171> +proj=longlat +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +no_defs  <>
+         * # RGF93 / Lambert-93
+         */
+        cs = (new CSUTM(CSDatum.rgf93, 30)).toGeo();
+        cs.setAbrev("EPSG:4171"); // NTF Paris
+        data.put(cs.getAbrev(), cs);
+        /*
+         *  <2154> +proj=lcc +lat_1=49 +lat_2=44 +lat_0=46.5 +lon_0=3
+         *  +x_0=700000 +y_0=6600000 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0
+         *  +units=m +no_defs  <>
+         */
+        cs = new CSLambertCC(CSDatum.rgf93, 3.0, 46.5, 49.0, 44.0, 700000.0, 6600000.0);
+        cs.setAbrev("EPSG:2154");
+        data.put(cs.getAbrev(), cs);
+
+        cs = new CSMercator(CSDatum.wgs84);
+        cs.setAbrev("EPSG:54004");
+        data.put(cs.getAbrev(), cs);
+        cs.setAbrev("EPSG:9804");
+        data.put(cs.getAbrev(), cs);
+        
+        // Lo que faltaba: ¡planetas!
+        cs = (new CSUTM(CSDatum.moon, 30)).toGeo();
+        cs.setAbrev("IAU2000:30100"); // Moon
+        data.put(cs.getAbrev(), cs);
+
+        cs = (new CSUTM(CSDatum.mars, 30)).toGeo();
+        cs.setAbrev("IAU2000:49900"); // Mars
+        data.put(cs.getAbrev(), cs);
+        
+        /*
+         * CRSs argentinos.
+         * coordenadas geograficas
+			PosGAr 4172 
+			PosGAr98 4190
+			
+			coordenadas proyectadas
+			POSGAR 94/Argentina 1 22191 
+			POSGAR 94/Argentina 2 22192
+			POSGAR 94/Argentina 3 22193
+			POSGAR 94/Argentina 4 22194
+			POSGAR 94/Argentina 5 22195
+			POSGAR 94/Argentina 6 22196
+			POSGAR 94/Argentina 7 22197
+			
+			POSGAR 98/Argentina 1 22181
+			POSGAR 98/Argentina 2 22182
+			POSGAR 98/Argentina 3 22183
+			POSGAR 98/Argentina 4 22184
+			POSGAR 98/Argentina 5 22185
+			POSGAR 98/Argentina 6 22186
+			POSGAR 98/Argentina 7 22187
+			
+			4221 GEOGCS["GCS_Campo_Inchauspe",DATUM["D_Campo_Inchauspe",SPHEROID["International_1924",6378388,297]],PRIMEM["Greenwich",0],UNIT["Degree",0.017453292519943295]]
+			
+			22191	EPSG	22191	PROJCS["Argentina_Zone_1",GEOGCS["GCS_Campo_Inchauspe",DATUM["D_Campo_Inchauspe",SPHEROID["International_1924",6378388,297]],PRIMEM["Greenwich",0],UNIT["Degree",0.017453292519943295]],PROJECTION["Transverse_Mercator"],PARAMETER["False_Easting",1500000],PARAMETER["False_Northing",0],PARAMETER["Central_Meridian",-72],PARAMETER["Scale_Factor",1],PARAMETER["Latitude_Of_Origin",-90],UNIT["Meter",1]]	+proj=tmerc +lat_0=-90 +lon_0=-72 +k=1.000000 +x_0=1500000 +y_0=0 +ellps=intl +units=m
+			22192	EPSG	22192	PROJCS["Argentina_Zone_2",GEOGCS["GCS_Campo_Inchauspe",DATUM["D_Campo_Inchauspe",SPHEROID["International_1924",6378388,297]],PRIMEM["Greenwich",0],UNIT["Degree",0.017453292519943295]],PROJECTION["Transverse_Mercator"],PARAMETER["False_Easting",2500000],PARAMETER["False_Northing",0],PARAMETER["Central_Meridian",-69],PARAMETER["Scale_Factor",1],PARAMETER["Latitude_Of_Origin",-90],UNIT["Meter",1]]	+proj=tmerc +lat_0=-90 +lon_0=-69 +k=1.000000 +x_0=2500000 +y_0=0 +ellps=intl +units=m
+			22193	EPSG	22193	PROJCS["Argentina_Zone_3",GEOGCS["GCS_Campo_Inchauspe",DATUM["D_Campo_Inchauspe",SPHEROID["International_1924",6378388,297]],PRIMEM["Greenwich",0],UNIT["Degree",0.017453292519943295]],PROJECTION["Transverse_Mercator"],PARAMETER["False_Easting",3500000],PARAMETER["False_Northing",0],PARAMETER["Central_Meridian",-66],PARAMETER["Scale_Factor",1],PARAMETER["Latitude_Of_Origin",-90],UNIT["Meter",1]]	+proj=tmerc +lat_0=-90 +lon_0=-66 +k=1.000000 +x_0=3500000 +y_0=0 +ellps=intl +units=m
+			22194	EPSG	22194	PROJCS["Argentina_Zone_4",GEOGCS["GCS_Campo_Inchauspe",DATUM["D_Campo_Inchauspe",SPHEROID["International_1924",6378388,297]],PRIMEM["Greenwich",0],UNIT["Degree",0.017453292519943295]],PROJECTION["Transverse_Mercator"],PARAMETER["False_Easting",4500000],PARAMETER["False_Northing",0],PARAMETER["Central_Meridian",-63],PARAMETER["Scale_Factor",1],PARAMETER["Latitude_Of_Origin",-90],UNIT["Meter",1]]	+proj=tmerc +lat_0=-90 +lon_0=-63 +k=1.000000 +x_0=4500000 +y_0=0 +ellps=intl +units=m
+			22195	EPSG	22195	PROJCS["Argentina_Zone_5",GEOGCS["GCS_Campo_Inchauspe",DATUM["D_Campo_Inchauspe",SPHEROID["International_1924",6378388,297]],PRIMEM["Greenwich",0],UNIT["Degree",0.017453292519943295]],PROJECTION["Transverse_Mercator"],PARAMETER["False_Easting",5500000],PARAMETER["False_Northing",0],PARAMETER["Central_Meridian",-60],PARAMETER["Scale_Factor",1],PARAMETER["Latitude_Of_Origin",-90],UNIT["Meter",1]]	+proj=tmerc +lat_0=-90 +lon_0=-60 +k=1.000000 +x_0=5500000 +y_0=0 +ellps=intl +units=m
+			22196	EPSG	22196	PROJCS["Argentina_Zone_6",GEOGCS["GCS_Campo_Inchauspe",DATUM["D_Campo_Inchauspe",SPHEROID["International_1924",6378388,297]],PRIMEM["Greenwich",0],UNIT["Degree",0.017453292519943295]],PROJECTION["Transverse_Mercator"],PARAMETER["False_Easting",6500000],PARAMETER["False_Northing",0],PARAMETER["Central_Meridian",-57],PARAMETER["Scale_Factor",1],PARAMETER["Latitude_Of_Origin",-90],UNIT["Meter",1]]	+proj=tmerc +lat_0=-90 +lon_0=-57 +k=1.000000 +x_0=6500000 +y_0=0 +ellps=intl +units=m
+			22197	EPSG	22197	PROJCS["Argentina_Zone_7",GEOGCS["GCS_Campo_Inchauspe",DATUM["D_Campo_Inchauspe",SPHEROID["International_1924",6378388,297]],PRIMEM["Greenwich",0],UNIT["Degree",0.017453292519943295]],PROJECTION["Transverse_Mercator"],PARAMETER["False_Easting",7500000],PARAMETER["False_Northing",0],PARAMETER["Central_Meridian",-54],PARAMETER["Scale_Factor",1],PARAMETER["Latitude_Of_Origin",-90],UNIT["Meter",1]]	+proj=tmerc +lat_0=-90 +lon_0=-54 +k=1.000000 +x_0=7500000 +y_0=0 +ellps=intl +units=m
+
+         */
+        cs = new CoordSys(CSDatum.posgar);
+        cs.setAbrev("EPSG:4172"); // Posgar
+        data.put(cs.getAbrev(), cs);
+        
+        cs = new CoordSys(
+			"GEOGCS[\"GCS_Campo_Inchauspe\"," +
+				"DATUM[\"D_Campo_Inchauspe\"," +
+					"SPHEROID[\"International_1924\",6378388,297],"+
+					"TOWGS84[0,0,0,0,0,0,0]]," +
+				"PRIMEM[\"Greenwich\",0]," +
+				"UNIT[\"Degree\",0.017453292519943295]]");
+        cs.setAbrev("EPSG:4221"); // Campo Inchauspe
+        data.put(cs.getAbrev(), cs);
+        
+       for (int i=1; i<=7; i++) {
+	        cs = new CoordSys(
+	        	"PROJCS[\"Argentina_Zone_"+i+"\"," +
+	        		"GEOGCS[\"GCS_Campo_Inchauspe\"," +
+	        			"DATUM[\"D_Campo_Inchauspe\"," +
+		        			"SPHEROID[\"International_1924\",6378388,297],"+
+		        			"TOWGS84[0,0,0,0,0,0,0]]," +
+		        		"PRIMEM[\"Greenwich\",0]," +
+		        		"UNIT[\"Degree\",0.017453292519943295]]," +
+		        	"PROJECTION[\"Transverse_Mercator\"]," +
+		        	"PARAMETER[\"False_Easting\",1500000]," +
+		        	"PARAMETER[\"False_Northing\",0]," +
+		        	"PARAMETER[\"Central_Meridian\","+(-75+3*i)+"]," +
+		        	"PARAMETER[\"Scale_Factor\",1]," +
+		        	"PARAMETER[\"Latitude_Of_Origin\",-90]," +
+		        	"UNIT[\"Meter\",1]]");
+	        cs.setAbrev("EPSG:2219"+i); // Posgar
+	        data.put(cs.getAbrev(), cs);
+        }
+       
+       /*
+        * pendiente de añadir:
+        * 
+        * EPSG 3003: Montemario / Italy Zone 1 - Pendiente de añadir
+      	* EPSG 4149: CH1903 - Pendiente de añadir
+      	* Ecuador:
+      	*   PSAD56, Geo, UTM 16/17S,16/17N
+      	*/
+    }
+
+    /**
+     * Mete una nueva proyeccion en la Pool.
+     * @param name abreviatura de la proyecccion (i.e. EPSG:23030)
+     * @param proj Proyeccion
+     */
+    public static void add(String name, IProjection proj) {
+        data.put(name, proj);
+    }
+
+    /**
+     * Devuelve una proyeccion a partir de una cadena.
+     * @param name abreviatura de la proyecccion (i.e. EPSG:23030)
+     * @return Proyeccion si existe
+     */
+    public IProjection get(String name) {
+        IProjection proj = null;
+
+        if (ProjectionPool.data.containsKey(name)) {
+            proj = (IProjection) ProjectionPool.data.get(name);
+        } else {
+        	// Consultation to remote EPSG database
+        	// if (right)
+        	//    buil new IProjection from GML
+        	// else
+            System.err.println("ProjectionPool: Key '" + name + "' not set.");
+        }
+
+        return proj;
+    }
+
+    public static Iterator iterator() {
+        ArrayList projs = new ArrayList();
+
+        Iterator iter = data.entrySet().iterator();
+
+        while (iter.hasNext()) {
+            projs.add(((Map.Entry) iter.next()).getValue());
+        }
+
+        return projs.iterator();
+    }
+
+	public boolean doesRigurousTransformations() {
+		return false;
+	}
+}

Property changes on: tags/v2_0_0_Build_2047/libraries/libProjection/src/org/cresques/impl/cts/ProjectionPool.java
___________________________________________________________________
Added: svn:eol-style
   + native

Index: tags/v2_0_0_Build_2047/libraries/libProjection/src/org/cresques/impl/geo/UtmZone.java
===================================================================
--- tags/v2_0_0_Build_2047/libraries/libProjection/src/org/cresques/impl/geo/UtmZone.java	(revision 0)
+++ tags/v2_0_0_Build_2047/libraries/libProjection/src/org/cresques/impl/geo/UtmZone.java	(revision 38292)
@@ -0,0 +1,404 @@
+/*
+ * Cresques Mapping Suite. Graphic Library for constructing mapping applications.
+ *
+ * Copyright (C) 2004-5.
+ *
+ * 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:
+ *
+ * cresques@gmail.com
+ */
+package org.cresques.impl.geo;
+
+import geojava.GeoUtm;
+import geojava.Ra2De;
+import geojava.UtmGeo;
+
+import org.cresques.cts.ICoordTrans;
+import org.cresques.cts.IDatum;
+import org.cresques.cts.IProjection;
+import org.cresques.geo.ViewPortData;
+
+import org.cresques.px.Extent;
+
+import java.awt.Graphics2D;
+import java.awt.geom.AffineTransform;
+import java.awt.geom.Point2D;
+import java.awt.geom.Rectangle2D;
+
+
+public class UtmZone extends Projection {
+    static String name = "UTM";
+    static String abrev = "UTM";
+    private final static UtmZone ed5028N = new UtmZone(Ellipsoid.ed50, 28, 0,
+                                                       0.0);
+    private final static UtmZone ed5029N = new UtmZone(Ellipsoid.ed50, 29, 0,
+                                                       0.0);
+    private final static UtmZone ed5030N = new UtmZone(Ellipsoid.ed50, 30, 0,
+                                                       0.0);
+    private final static UtmZone ed5031N = new UtmZone(Ellipsoid.ed50, 31, 0,
+                                                       0.0);
+    private final static UtmZone hayford28N = new UtmZone(Ellipsoid.hayford,
+                                                          28, 0, 0.0);
+    private final static UtmZone hayford29N = new UtmZone(Ellipsoid.hayford,
+                                                          29, 0, 0.0);
+    private final static UtmZone hayford30N = new UtmZone(Ellipsoid.hayford,
+                                                          30, 0, 0.0);
+    private final static UtmZone hayford31N = new UtmZone(Ellipsoid.hayford,
+                                                          31, 0, 0.0);
+    static GeoUtm geoutm = new GeoUtm();
+    static UtmGeo utmgeo = new UtmGeo();
+    public int Zone = 30;
+    public int Hemisphere = 0;
+    public double H = 0.0;
+
+    public UtmZone(Ellipsoid eli, int zone, int hemisphere, double h) {
+        super(eli);
+        Zone = zone;
+        Hemisphere = hemisphere;
+        H = h;
+        grid = new Graticule(this);
+    }
+
+    public String getAbrev() {
+        return abrev + Zone;
+    }
+
+    public static UtmZone getProjection(Ellipsoid eli, int zone, int hemisphere) {
+        if ((eli == Ellipsoid.hayford) && (hemisphere == 0)) {
+            switch (zone) {
+            case 28:
+                return hayford28N;
+
+            case 29:
+                return hayford29N;
+
+            case 30:
+                return hayford30N;
+
+            case 31:
+                return hayford31N;
+            }
+        } else if ((eli == Ellipsoid.ed50) && (hemisphere == 0)) {
+            switch (zone) {
+            case 28:
+                return ed5028N;
+
+            case 29:
+                return ed5029N;
+
+            case 30:
+                return ed5030N;
+
+            case 31:
+                return ed5031N;
+            }
+        }
+
+        System.err.println("UtmZone.getProjection(): new " + zone);
+
+        return new UtmZone(eli, zone, hemisphere, 0.0);
+    }
+
+    /**
+     *
+     */
+    public static IProjection getProjectionByName(IDatum eli, String name) {
+        int zone;
+        int hemisphere = NORTH;
+
+        if (name.indexOf("UTM") < 0) {
+            return null;
+        }
+
+        if (name.substring(0, 1).compareTo("S") == 0) {
+            hemisphere = SOUTH;
+        }
+
+        zone = Integer.parseInt(name.substring(name.length() - 2));
+
+        return getProjection((Ellipsoid) eli, zone, hemisphere);
+    }
+
+    /**
+     *
+     */
+    public Point2D createPoint(double x, double y) {
+        return new UtmPoint(this, x, y);
+    }
+
+    /**
+     *
+     * @param uPt
+     * @return
+     */
+    public Point2D toGeo(Point2D uPt) {
+        GeoPoint gPt = new GeoPoint();
+
+        return toGeo((UtmPoint) uPt, gPt);
+    }
+
+    /**
+     *
+     * @param uPt
+     * @param gPt
+     * @return
+     */
+    public GeoPoint toGeo(UtmPoint uPt, GeoPoint gPt) {
+        int[] ai = new int[3];
+        double[] ad = new double[3];
+        ai[1] = ((UtmZone) uPt.proj).Zone;
+        ai[2] = ((UtmZone) uPt.proj).Hemisphere;
+        ad[1] = uPt.X;
+        ad[2] = uPt.Y;
+
+        utmgeo.set(((Projection) uPt.proj).getElliPar(), ai, ad);
+        utmgeo.go();
+
+        gPt.Longitude = Ra2De.go(utmgeo.Ge[1]);
+        gPt.Latitude = Ra2De.go(utmgeo.Ge[2]);
+        gPt.proj = Geodetic.getProjection(((Projection) uPt.proj).eli);
+
+        return gPt;
+    }
+
+    /**
+     *
+     * @param gPt
+     * @param uPt
+     * @return
+     */
+    public Point2D fromGeo(Point2D gPt, Point2D uPt) {
+        int[] ai = { 0, 0, 2 };
+
+        return fromGeo((GeoPoint) gPt, (UtmPoint) uPt, ai);
+    }
+
+    /**
+     *
+     * @param gPt
+     * @param uPt
+     * @param proj
+     * @return
+     */
+    public UtmPoint fromGeo(GeoPoint gPt, UtmPoint uPt, UtmZone proj) {
+        int[] ai = { 0, proj.Zone, proj.Hemisphere };
+
+        return fromGeo(gPt, uPt, ai);
+    }
+
+    /**
+     *
+     * @param gPt
+     * @param uPt
+     * @param ai
+     * @return
+     */
+    public UtmPoint fromGeo(GeoPoint gPt, UtmPoint uPt, int[] ai) {
+        double[] ad = new double[4];
+        ad[1] = gPt.Longitude.ToRadians();
+        ad[2] = gPt.Latitude.ToRadians();
+        geoutm.set(((Projection) gPt.proj).getElliPar(), ai, ad);
+        geoutm.go();
+
+        if (geoutm.Ier != 0) {
+            return null;
+        }
+
+        uPt.setLocation(geoutm.Pr[1], geoutm.Pr[2]);
+
+        if ((((UtmZone) uPt.proj).Zone != geoutm.Iopar[1]) ||
+                (((UtmZone) uPt.proj).Hemisphere != geoutm.Iopar[2])) {
+            uPt.proj = UtmZone.getProjection(((Projection) uPt.proj).eli,
+                                             geoutm.Iopar[1], geoutm.Iopar[2]);
+        }
+
+        return uPt;
+    }
+
+    // Calcula el step en función del zoom
+    private void generateGrid(Graphics2D g, Extent extent, AffineTransform mat) {
+        // calculo del step en función del zoom
+        Point2D pt1 = extent.getMin();
+
+        double step = 1.0;
+        double x = (int) pt1.getX();
+        double dist = 0.0;
+
+        /*        GeoPoint gp1, gp2;
+                gp1 = (GeoPoint) createPoint( x, (int) pt1.getY());
+                mat.transform(gp1, gp1);
+                gp2 = (GeoPoint) createPoint(gp1.getX()+100, gp1.getY()-100);
+                try {
+                        mat.inverseTransform(gp2, gp2);
+                } catch (NoninvertibleTransformException e) {
+                        // TODO Auto-generated catch block
+                        e.printStackTrace();
+                }
+                dist = (gp2.getX()-x);
+                System.err.println("distX = " + dist);
+
+                if (dist > 30.0) {                         step = 30.0;
+                } else if (dist > 18.0) {         step = 18.0;
+                } else if (dist > 12.0) {        step = 12.0;
+                } else if (dist > 6.0) {        step = 6.0;
+                } else if (dist > 3.0) {        step = 3.0;
+                } else if (dist > 2.0) {        step = 2.0;
+                } else if (dist > 1.0) {        step = 1.0;
+                } else if (dist > .5) {                step =.5;
+                } else if (dist > .25) {        step =.25;
+                } else if (dist > 1.0/60*5.0) { step = 1.0/60*5.0;
+                } else {                                        step = 1.0/60*2.0;
+                }
+                        //step = 1.0;
+                */
+        generateGrid(g, extent, mat, step);
+    }
+
+    private void generateGrid(Graphics2D g, Extent extent, AffineTransform mat,
+                              double step) {
+        grid = new Graticule(this);
+
+        Point2D pt1 = extent.getMin();
+        Point2D pt2 = extent.getMax();
+        GeoPoint gp1;
+        GeoPoint gp2;
+        UtmPoint up1 = (UtmPoint) createPoint(0, 0);
+        UtmPoint up2 = (UtmPoint) createPoint(0, 0);
+        Point2D.Double mp1 = new Point2D.Double(0.0, 0.0);
+        Point2D.Double mp2 = new Point2D.Double(0.0, 0.0);
+        Geodetic geoProj = Geodetic.getProjection((Ellipsoid) getDatum());
+        boolean esUso = false;
+
+        System.err.println(name + ": ViewPort Extent = (" + pt1 + "," + pt2 +
+                           ")");
+        gp1 = (GeoPoint) toGeo(new UtmPoint(pt1.getX(), pt2.getY()));
+        gp2 = (GeoPoint) toGeo(new UtmPoint(pt2));
+
+        double xMin = (int) gp1.getX() - 1.0;
+        double xMax = (int) gp2.getX() + 1.0;
+        gp1 = (GeoPoint) toGeo(new UtmPoint(pt1.getX() +
+                                            ((pt2.getX() - pt1.getX()) / 2.0),
+                                            pt2.getY()));
+
+        double yMax = (int) gp1.getY() + 2.0;
+        gp1 = (GeoPoint) toGeo(new UtmPoint(pt1));
+
+        double yMin = (int) gp1.getY() - 1.0;
+        xMin = -30.0;
+        xMax = 30.0;
+        yMin = 20.0;
+        yMax = 60.0;
+
+        for (double x = xMin; x <= xMax; x += step) {
+            up1 = null;
+
+            if (Math.abs((x) % 6) < .001) {
+                esUso = true;
+            }
+
+            for (double y = yMin; y <= yMax; y += step) {
+                gp2 = (GeoPoint) geoProj.createPoint(x, y);
+                fromGeo(gp2, up2, this);
+
+                if ((up1 != null) && (extent.isAt(up1) || extent.isAt(up2))) {
+                    mat.transform(up2, mp2);
+
+                    if (up1 != null) {
+                        if (esUso) {
+                            grid.addLine(mp1, mp2, 1);
+                        } else {
+                            grid.addLine(mp1, mp2);
+                        }
+                    }
+                } else {
+                    mat.transform(up2, mp2);
+                }
+
+                up1 = (UtmPoint) up2.clone();
+                mp1 = (Point2D.Double) mp2.clone();
+            }
+
+            esUso = false;
+        }
+
+        for (double y = yMin; y <= yMax; y += step) {
+            up1 = null;
+
+            for (double x = xMin; x <= xMax; x += step) {
+                gp2 = (GeoPoint) geoProj.createPoint(x, y);
+                fromGeo(gp2, up2, this);
+
+                if ((up1 != null) && (extent.isAt(up1) || extent.isAt(up2))) {
+                    mat.transform(up2, mp2);
+
+                    if (up1 != null) {
+                        grid.addLine(mp1, mp2);
+                    }
+                } else {
+                    mat.transform(up2, mp2);
+                }
+
+                up1 = (UtmPoint) up2.clone();
+                mp1 = (Point2D.Double) mp2.clone();
+            }
+        }
+    }
+
+    public void drawGrid(Graphics2D g, ViewPortData vp) {
+        generateGrid(g, vp.getExtent(), vp.getMat());
+        grid.setColor(gridColor);
+        grid.draw(g, vp);
+    }
+
+    /* (non-Javadoc)
+     * @see org.cresques.cts.IProjection#getScale(double, double, double, double)
+     */
+    public double getScale(double minX, double maxX, double width, double dpi) {
+        double scale = ((maxX - minX) * // metros
+                       (dpi / 2.54 * 100.0)) / // px / metro
+                       width; // pixels
+
+        return scale;
+    }
+
+	public ICoordTrans getCT(IProjection dest) {
+		// TODO Auto-generated method stub
+		return null;
+	}
+
+	public Rectangle2D getExtent(Rectangle2D extent, double scale, double wImage, double hImage, double mapUnits,double distanceUnits, double dpi) {
+		double w =0;
+		double h =0;
+		double wExtent =0;
+		double hExtent =0;
+   		w = ((wImage / dpi) * 2.54);
+		h = ((hImage / dpi) * 2.54);
+		wExtent =w * scale * distanceUnits / mapUnits;
+		hExtent =h * scale * distanceUnits / mapUnits;
+		double xExtent = extent.getCenterX() - wExtent/2;
+		double yExtent = extent.getCenterY() - hExtent/2;
+		Rectangle2D rec=new Rectangle2D.Double(xExtent,yExtent,wExtent,hExtent);
+    	return  rec;
+	}
+
+	/* (non-Javadoc)
+	 * @see org.cresques.cts.IProjection#getFullCode()
+	 */
+	public String getFullCode() {
+		return getAbrev();
+	}
+}

Property changes on: tags/v2_0_0_Build_2047/libraries/libProjection/src/org/cresques/impl/geo/UtmZone.java
___________________________________________________________________
Added: svn:eol-style
   + native

Index: tags/v2_0_0_Build_2047/libraries/libProjection/src/org/cresques/impl/geo/Calc.java
===================================================================
--- tags/v2_0_0_Build_2047/libraries/libProjection/src/org/cresques/impl/geo/Calc.java	(revision 0)
+++ tags/v2_0_0_Build_2047/libraries/libProjection/src/org/cresques/impl/geo/Calc.java	(revision 38292)
@@ -0,0 +1,71 @@
+/*
+ * Cresques Mapping Suite. Graphic Library for constructing mapping applications.
+ *
+ * Copyright (C) 2004-5.
+ *
+ * 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:
+ *
+ * cresques@gmail.com
+ */
+package org.cresques.impl.geo;
+
+import geojava.EGeoUtmCom;
+
+import java.awt.Frame;
+import java.awt.geom.Point2D;
+
+
+public class Calc {
+    static int CATALA = 1;
+    static int CASTELLANO = 2;
+    static int ENGLISH = 3;
+
+    public static void ICCCalculator() {
+        Frame frame = new Frame("EGeoUtmCom");
+        int idioma = CASTELLANO;
+        EGeoUtmCom calcula = new EGeoUtmCom(false, idioma);
+        frame.add("Center", calcula);
+        frame.pack();
+        frame.show();
+    }
+
+    public static void prbUtmToGeo() {
+        UtmZone utmZone = UtmZone.getProjection(Ellipsoid.hayford, 30,
+                                                UtmZone.NORTH);
+
+        //		UtmPoint uPt = new UtmPoint(utmZone, 739027.0, 4468771.0); // 593 tl
+        UtmPoint uPt = new UtmPoint(utmZone, 773177.0, 4303195.0); // 823 tl
+        GeoPoint gPt = (GeoPoint) ((Projection) uPt.proj).toGeo(uPt);
+        GeoPoint.decimales = 1;
+        System.out.println("UTM to Geo : " + uPt.toString() + " == [" +
+                           gPt.toString() + "] (" + gPt.getX() + "," +
+                           gPt.getY() + ")");
+
+        UtmPoint uPt2 = utmZone.fromGeo(gPt, new UtmPoint(utmZone),
+                                        UtmZone.getProjection(Ellipsoid.hayford,
+                                                              29, UtmZone.NORTH));
+        System.out.println("Geo to Utm : " + uPt2.toString() + " == [" +
+                           gPt.toString() + "] (" + gPt.getX() + "," +
+                           gPt.getY() + ")");
+    }
+
+    public Point2D pointFactory(Projection proj, double x, double y) {
+        Point2D.Double pt = new Point2D.Double(x, y);
+
+        return pt;
+    }
+}

Property changes on: tags/v2_0_0_Build_2047/libraries/libProjection/src/org/cresques/impl/geo/Calc.java
___________________________________________________________________
Added: svn:eol-style
   + native

Index: tags/v2_0_0_Build_2047/libraries/libProjection/src/org/cresques/impl/geo/ReProjection.java
===================================================================
--- tags/v2_0_0_Build_2047/libraries/libProjection/src/org/cresques/impl/geo/ReProjection.java	(revision 0)
+++ tags/v2_0_0_Build_2047/libraries/libProjection/src/org/cresques/impl/geo/ReProjection.java	(revision 38292)
@@ -0,0 +1,109 @@
+/*
+ * Cresques Mapping Suite. Graphic Library for constructing mapping applications.
+ *
+ * Copyright (C) 2004-5.
+ *
+ * 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:
+ *
+ * cresques@gmail.com
+ */
+package org.cresques.impl.geo;
+
+import org.cresques.cts.ICoordTrans;
+import org.cresques.cts.IProjection;
+
+import java.awt.geom.Point2D;
+import java.awt.geom.Rectangle2D;
+
+
+/**
+ * Transformada para cambios de proyección
+ *
+ * @author "Luis W. Sevilla" <sevilla_lui@gva.es>
+ */
+public class ReProjection implements ICoordTrans {
+    Projection pOrig;
+    Projection pDest;
+
+    public ReProjection(Projection pOrig, Projection pDest) {
+        this.pOrig = pOrig;
+        this.pDest = pDest;
+    }
+
+    public ICoordTrans getInverted() {
+        return new ReProjection(pDest, pOrig);
+    }
+
+    public IProjection getPOrig() {
+        return pOrig;
+    }
+
+    public IProjection getPDest() {
+        return pDest;
+    }
+
+    public Point2D convert(Point2D ptOrig, Point2D ptDest) {
+        if (pOrig.getClass() == UtmZone.class) {
+            GeoPoint pt1 = null;
+            pt1 = (GeoPoint) ((UtmZone) pOrig).toGeo((UtmPoint) ptOrig);
+
+            if (pDest.getClass() == UtmZone.class) {
+                ((UtmZone) pDest).fromGeo(pt1, (UtmPoint) ptDest,
+                                          (UtmZone) pDest);
+            } else if (pDest.getClass() == Geodetic.class) {
+                ptDest.setLocation(pt1.getX(), pt1.getY());
+                ((GeoPoint) ptDest).proj = pt1.proj;
+            } else if (pDest.getClass() == Mercator.class) {
+                ((Mercator) pDest).fromGeo(pt1, (ProjPoint) ptDest);
+            }
+        } else if (pOrig.getClass() == Geodetic.class) {
+            if (pDest.getClass() == UtmZone.class) {
+                ((UtmZone) pDest).fromGeo((GeoPoint) ptOrig, (UtmPoint) ptDest,
+                                          (UtmZone) pDest);
+            } else if (pDest.getClass() == Mercator.class) {
+                ((Mercator) pDest).fromGeo((GeoPoint) ptOrig, (ProjPoint) ptDest);
+            }
+        } else if (pOrig.getClass() == Mercator.class) {
+            GeoPoint pt1 = null;
+            pt1 = (GeoPoint) ((Mercator) pOrig).toGeo((ProjPoint) ptOrig);
+
+            if (pDest.getClass() == UtmZone.class) {
+                ((UtmZone) pDest).fromGeo(pt1, (UtmPoint) ptDest,
+                                          (UtmZone) pDest);
+            } else if (pDest.getClass() == Geodetic.class) {
+                ptDest.setLocation(pt1.getX(), pt1.getY());
+                ((ProjPoint) ptDest).proj = pt1.proj;
+            }
+        }
+
+        return ptDest;
+    }
+
+    /* (non-Javadoc)
+     * @see org.cresques.cts.ICoordTrans#convert(java.awt.geom.Rectangle2D)
+     */
+    public Rectangle2D convert(Rectangle2D rect) {
+        Point2D pt1 = new Point2D.Double(rect.getMinX(), rect.getMinY());
+        Point2D pt2 = new Point2D.Double(rect.getMaxX(), rect.getMaxY());
+        pt1 = convert(pt1, null);
+        pt2 = convert(pt2, null);
+        rect = new Rectangle2D.Double();
+        rect.setFrameFromDiagonal(pt1, pt2);
+
+        return rect;
+    }
+}

Property changes on: tags/v2_0_0_Build_2047/libraries/libProjection/src/org/cresques/impl/geo/ReProjection.java
___________________________________________________________________
Added: svn:eol-style
   + native

Index: tags/v2_0_0_Build_2047/libraries/libProjection/src/org/cresques/impl/geo/Mercator.java
===================================================================
--- tags/v2_0_0_Build_2047/libraries/libProjection/src/org/cresques/impl/geo/Mercator.java	(revision 0)
+++ tags/v2_0_0_Build_2047/libraries/libProjection/src/org/cresques/impl/geo/Mercator.java	(revision 38292)
@@ -0,0 +1,393 @@
+/*
+ * Cresques Mapping Suite. Graphic Library for constructing mapping applications.
+ *
+ * Copyright (C) 2004-5.
+ *
+ * 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:
+ *
+ * cresques@gmail.com
+ */
+package org.cresques.impl.geo;
+
+import org.cresques.cts.ICoordTrans;
+import org.cresques.cts.IDatum;
+import org.cresques.cts.IProjection;
+import org.cresques.geo.ViewPortData;
+
+import org.cresques.px.Extent;
+
+import java.awt.FontMetrics;
+import java.awt.Graphics2D;
+import java.awt.geom.AffineTransform;
+import java.awt.geom.Point2D;
+import java.awt.geom.Rectangle2D;
+
+import java.util.TreeMap;
+
+
+/**
+ * Proyeccion Mercator
+ * @author "Luis W. Sevilla" <sevilla_lui@gva.es>* @author administrador
+ */
+public class Mercator extends Projection {
+    static String name = "Mercator";
+    static String abrev = "Mer";
+    private static TreeMap projPool = new TreeMap();
+    public static final Mercator hayford = new Mercator(Ellipsoid.hayford);
+    public static final Mercator wgs84 = new Mercator(Ellipsoid.wgs84);
+    private double a;
+    private double f;
+    private double b;
+    private double Eps2;
+    private double EE2;
+    private double EE3;
+    private double Epps2;
+
+    public Mercator(Ellipsoid eli) {
+        super(eli);
+        grid = new Graticule(this);
+
+        double[] p = eli.getParam();
+        a = p[1];
+        f = 1 / p[2];
+        b = p[3];
+
+        Eps2 = p[5];
+        EE2 = Eps2 * Eps2;
+        EE3 = EE2 * Eps2;
+        Epps2 = p[7];
+    }
+
+    public String getAbrev() {
+        return abrev;
+    }
+
+    public static Mercator getProjection(Ellipsoid eli) {
+        Mercator ret = null;
+
+        if (projPool.containsKey(eli.getName())) {
+            ret = (Mercator) Mercator.projPool.get(eli.getName());
+        } else {
+            if (eli == Ellipsoid.hayford) {
+                ret = hayford;
+            } else if (eli == Ellipsoid.wgs84) {
+                ret = wgs84;
+            } else {
+                ret = new Mercator(eli);
+            }
+
+            projPool.put(eli.getName(), ret);
+        }
+
+        return ret;
+    }
+
+    /**
+     *
+     */
+    public static IProjection getProjectionByName(IDatum eli, String name) {
+        if (name.indexOf("ME") < 0) {
+            return null;
+        }
+
+        return getProjection((Ellipsoid) eli);
+    }
+
+    /**
+     *
+     */
+    public Point2D createPoint(double x, double y) {
+        return new ProjPoint(this, x, y);
+    }
+
+    /**
+     *
+     * @param uPt
+     * @return
+     */
+    public Point2D toGeo(Point2D mPt) {
+        GeoPoint gPt = new GeoPoint();
+
+        return toGeo((ProjPoint) mPt, gPt);
+    }
+
+    /**
+     *
+     * @param mPt
+     * @param gPt
+     * @return
+     */
+    public GeoPoint toGeo(ProjPoint mPt, GeoPoint gPt) {
+        double t = Math.pow(Math.E, (-mPt.getY() / a));
+
+        double x1;
+        double x = ((Math.PI / 2) - (2 * Math.atan(t)));
+
+        do {
+            x1 = x;
+            x = (Math.PI / 2) -
+                (2 * Math.atan(t * (Math.pow((1 -
+                                             (Math.sqrt(Eps2) * Math.sin(x))) / (1 +
+                                             (Math.sqrt(Eps2) * Math.sin(x))),
+                                             (Math.sqrt(Eps2) / 2)))));
+        } while ((x - x1) > 0.0000000001);
+
+        double lat = (Math.PI / 2) -
+                     (2 * Math.atan(t * (Math.pow((1 -
+                                                  (Math.sqrt(Eps2) * Math.sin(x))) / (1 +
+                                                  (Math.sqrt(Eps2) * Math.sin(x))),
+                                                  (Math.sqrt(Eps2) / 2)))));
+
+        double lng = mPt.getX() / a;
+        gPt.setLocation((lng * 180.0) / Math.PI, (lat * 180.0) / Math.PI);
+        gPt.proj = Geodetic.getProjection(((Projection) mPt.proj).eli);
+
+        return gPt;
+    }
+
+    /**
+     *
+     * @param gPt
+     * @param uPt
+     * @return
+     */
+    public Point2D fromGeo(Point2D gPt, Point2D mPt) {
+        double sl = Math.sin(((GeoPoint) gPt).Latitude.ToRadians());
+        double cl = Math.cos(((GeoPoint) gPt).Latitude.ToRadians());
+        double tl = (1 + sl) / (1 - sl);
+
+        // Calcula Easting
+        double x = a * ((GeoPoint) gPt).Longitude.ToRadians();
+
+        // Calcula Northing
+        double y = Math.pow(((1 - (Math.sqrt(Eps2) * sl)) / (1 +
+                            (Math.sqrt(Eps2) * sl))), (Math.sqrt(Eps2)));
+        y = a / 2 * (Math.log(tl * y));
+        ((ProjPoint) mPt).setLocation(x, y);
+        ((ProjPoint) mPt).proj = this;
+
+        return mPt;
+    }
+
+    // Calcula el step en función del zoom
+    private void generateGrid(Graphics2D g, Extent extent, AffineTransform mat) {
+        // calculo del step en función del zoom
+        Point2D pt1 = extent.getMin();
+
+        double step = 3.0;
+        double x = pt1.getX();
+        double dist = 0.0;
+        ProjPoint ppt1;
+        ProjPoint ppt2;
+        GeoPoint gp1;
+        GeoPoint gp2;
+        ppt1 = (ProjPoint) createPoint(x, pt1.getY());
+        ppt2 = (ProjPoint) createPoint(x + 100, pt1.getY() - 100);
+        gp1 = (GeoPoint) ppt1.toGeo();
+        gp2 = (GeoPoint) ppt2.toGeo();
+
+        /*        GeoPoint gp1, gp2;
+                gp1 = (GeoPoint) createPoint( x, (int) pt1.getY());
+                mat.transform(gp1, gp1);
+                gp2 = (GeoPoint) createPoint(gp1.getX()+100, gp1.getY()-100);
+                try {
+                        mat.inverseTransform(gp2, gp2);
+                } catch (NoninvertibleTransformException e) {
+                        // TODO Auto-generated catch block
+                        e.printStackTrace();
+                }
+                dist = (gp2.getX()-x);
+                System.err.println("distX = " + dist);
+
+                if (dist > 30.0) {                         step = 30.0;
+                } else if (dist > 18.0) {         step = 18.0;
+                } else if (dist > 12.0) {        step = 12.0;
+                } else if (dist > 6.0) {        step = 6.0;
+                } else if (dist > 3.0) {        step = 3.0;
+                } else if (dist > 2.0) {        step = 2.0;
+                } else if (dist > 1.0) {        step = 1.0;
+                } else if (dist > .5) {                step =.5;
+                } else if (dist > .25) {        step =.25;
+                } else if (dist > 1.0/60*5.0) { step = 1.0/60*5.0;
+                } else {                                        step = 1.0/60*2.0;
+                }
+                        //step = 1.0;
+                */
+        generateGrid(g, extent, mat, step);
+    }
+
+    private void generateGrid(Graphics2D g, Extent extent, AffineTransform mat,
+                              double step) {
+        grid = new Graticule(this);
+
+        Point2D pt1 = extent.getMin();
+        Point2D pt2 = extent.getMax();
+        Point2D.Double ptx = new Point2D.Double(0.0, 0.0);
+        GeoPoint gp1;
+        GeoPoint gp2;
+        ProjPoint up1 = (ProjPoint) createPoint(0, 0);
+        ProjPoint up2 = (ProjPoint) createPoint(0, 0);
+        Geodetic geoProj = Geodetic.getProjection((Ellipsoid) getDatum());
+        double xAxis;
+        double yAxis;
+
+        // Calculos para el texto
+        FontMetrics fm = g.getFontMetrics();
+        int fmWidth = 0;
+        int fmHeight = fm.getAscent();
+        String tit = "";
+        String fmt = "%Gº%N";
+
+        if (step < 1.0) {
+            fmt = "%Gº%M'%N";
+        }
+
+        // Lineas Horzontales
+        gp1 = (GeoPoint) toGeo(new ProjPoint(pt1));
+        gp2 = (GeoPoint) toGeo(new ProjPoint(pt2));
+        xAxis = gp1.getX();
+        yAxis = gp2.getY();
+        System.err.println(name + ": ViewPort Extent = (" + gp1 + "," + gp2 +
+                           ")");
+
+        double xMin = (int) gp1.getX() - 1.0;
+        xMin -= (xMin % step);
+
+        double xMax = (int) gp2.getX() + 1.0;
+        double yMin = (int) gp1.getY() - 1.0;
+        yMin -= (yMin % step);
+
+        double yMax = (int) gp2.getY() + 1.0;
+
+        if (xMin < -180.0) {
+            xMin = -180.0;
+        }
+
+        if (xMax > 180.0) {
+            xMax = 180.0;
+        }
+
+        if (yMin < -80.0) {
+            yMin = -80.0;
+        }
+
+        if (yMax > 80.0) {
+            yMax = 80.0;
+        }
+
+        if (xAxis < -180.0) {
+            xAxis = -180.0;
+        }
+
+        if (yAxis > 80.0) {
+            yAxis = 80.0;
+        }
+
+        for (double y = yMin; y <= yMax; y += step) {
+            gp1 = (GeoPoint) geoProj.createPoint(xAxis, y);
+            gp2 = (GeoPoint) geoProj.createPoint(xMax, y);
+            fromGeo(gp1, up1);
+            fromGeo(gp2, up2);
+            mat.transform(up1, up1);
+            mat.transform(up2, up2);
+            grid.addLine(up1, up2);
+
+            tit = coordToString(y, fmt, true);
+
+            //fmWidth = fm.stringWidth(tit);
+            ptx.setLocation(up1.getX() + 3, up1.getY() - 2);
+            grid.addText(tit, ptx);
+        }
+
+        // Lineas Verticales
+        for (double x = xMin; x <= xMax; x += step) {
+            gp1 = (GeoPoint) geoProj.createPoint(x, yMin);
+            gp2 = (GeoPoint) geoProj.createPoint(x, yAxis);
+            fromGeo(gp1, up1);
+            fromGeo(gp2, up2);
+            mat.transform(up1, up1);
+            mat.transform(up2, up2);
+            grid.addLine(up1, up2);
+
+            tit = coordToString(x, fmt, false);
+
+            //fmWidth = fm.stringWidth(tit);
+            ptx.setLocation(up2.getX() + 3, up2.getY() + fmHeight);
+            grid.addText(tit, ptx);
+        }
+    }
+
+    public void drawGrid(Graphics2D g, ViewPortData vp) {
+        generateGrid(g, vp.getExtent(), vp.getMat());
+        grid.setColor(gridColor);
+        grid.draw(g, vp);
+    }
+
+    /* (non-Javadoc)
+     * @see org.cresques.cts.IProjection#getScale(double, double, double, double)
+     */
+    public double getScale(double minX, double maxX, double width, double dpi) {
+        Projection prj = Geodetic.getProjection((Ellipsoid) getDatum());
+        GeoPoint pt1 = (GeoPoint) prj.createPoint(1.0, 0.0);
+        GeoPoint pt2 = (GeoPoint) prj.createPoint(2.0, 0.0);
+        ProjPoint ppt1 = (ProjPoint) createPoint(0.0, 0.0);
+        ProjPoint ppt2 = (ProjPoint) createPoint(0.0, 0.0);
+        fromGeo(pt1, ppt1);
+        fromGeo(pt2, ppt2);
+
+        //scale = ppt2.getX()-ppt1.getX();
+        double scale = (((maxX - minX) / (ppt2.getX() - ppt1.getX())) *
+        //scale = ((extent.maxX()-extent.minX())/ getWidth());// *
+        (dpi / 2.54 * 100.0 * 1852.0 * 60.0)) / width;
+
+        return scale;
+    }
+
+	public ICoordTrans getCT(IProjection dest) {
+		// TODO Auto-generated method stub
+		return null;
+	}
+
+	public Rectangle2D getExtent(Rectangle2D extent, double scale, double wImage, double hImage, double mapUnits,double distanceUnits, double dpi) {
+		Projection prj = Geodetic.getProjection((Ellipsoid) getDatum());
+        GeoPoint pt1 = (GeoPoint) prj.createPoint(1.0, 0.0);
+        GeoPoint pt2 = (GeoPoint) prj.createPoint(2.0, 0.0);
+        ProjPoint ppt1 = (ProjPoint) createPoint(0.0, 0.0);
+        ProjPoint ppt2 = (ProjPoint) createPoint(0.0, 0.0);
+        fromGeo(pt1, ppt1);
+        fromGeo(pt2, ppt2);
+		double w =0;
+		double h =0;
+		double wExtent =0;
+		double hExtent =0;
+    	w = ((wImage / dpi) * 2.54);
+		h = ((hImage / dpi) * 2.54);
+		wExtent =((w*scale*distanceUnits)/ (ppt2.getX() - ppt1.getX()))/ (mapUnits*1852.0*60.0);
+		hExtent =((h*scale*distanceUnits)/ (ppt2.getX() - ppt1.getX()))/ (mapUnits*1852.0*60.0);
+		double xExtent = extent.getCenterX() - wExtent/2;
+		double yExtent = extent.getCenterY() - hExtent/2;
+		Rectangle2D rec=new Rectangle2D.Double(xExtent,yExtent,wExtent,hExtent);
+    	return  rec;
+	}
+
+	/* (non-Javadoc)
+	 * @see org.cresques.cts.IProjection#getFullCode()
+	 */
+	public String getFullCode() {
+		return getAbrev();
+	}
+}

Property changes on: tags/v2_0_0_Build_2047/libraries/libProjection/src/org/cresques/impl/geo/Mercator.java
___________________________________________________________________
Added: svn:eol-style
   + native

Index: tags/v2_0_0_Build_2047/libraries/libProjection/src/org/cresques/impl/geo/Projection.java
===================================================================
--- tags/v2_0_0_Build_2047/libraries/libProjection/src/org/cresques/impl/geo/Projection.java	(revision 0)
+++ tags/v2_0_0_Build_2047/libraries/libProjection/src/org/cresques/impl/geo/Projection.java	(revision 38292)
@@ -0,0 +1,174 @@
+/*
+ * Cresques Mapping Suite. Graphic Library for constructing mapping applications.
+ *
+ * Copyright (C) 2004-5.
+ *
+ * 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:
+ *
+ * cresques@gmail.com
+ */
+package org.cresques.impl.geo;
+
+import org.cresques.cts.IDatum;
+import org.cresques.cts.IProjection;
+import org.cresques.geo.ViewPortData;
+import org.gvsig.fmap.crs.CRSFactory;
+
+import java.awt.Color;
+import java.awt.Graphics2D;
+import java.awt.geom.Point2D;
+
+
+abstract public class Projection implements IProjection {
+    public static int NORTH = 0;
+    public static int SOUTH = 1;
+    static String name = "Sin Proyeccion";
+    static String abrev = "None";
+    private static final Color basicGridColor = new Color(64, 64, 64, 128);
+    Color gridColor = basicGridColor;
+    Ellipsoid eli = Ellipsoid.hayford;
+    Graticule grid;
+
+    public Projection() {
+        eli = Ellipsoid.hayford;
+    }
+
+    public Projection(Ellipsoid e) {
+        eli = e;
+    }
+
+    public String getName() {
+        return name;
+    }
+
+    abstract public String getAbrev();
+
+    public IDatum getDatum() {
+        return eli;
+    }
+
+    public double[] getElliPar() {
+        return eli.getParam();
+    }
+
+    abstract public Point2D createPoint(double x, double y);
+
+    public Point2D createPoint(Point2D pt) {
+        return createPoint(pt.getX(), pt.getY());
+    }
+
+    public static IProjection getProjectionByName(IDatum eli, String name) {
+        if (name.indexOf("UTM") >= 0) {
+            return UtmZone.getProjectionByName(eli, name);
+        }
+
+        if (name.indexOf("GEO") >= 0) {
+            return Geodetic.getProjectionByName(eli, name);
+        }
+
+        if (name.indexOf("MERC") >= 0) {
+            return Mercator.getProjectionByName(eli, name);
+        }
+
+        return null;
+    }
+
+    public ReProjection getReproyectionTo(Projection proj) {
+        ReProjection rp = new ReProjection(this, proj);
+
+        return rp;
+    }
+
+    abstract public Point2D toGeo(Point2D pt);
+
+    abstract public Point2D fromGeo(Point2D gPt, Point2D mPt);
+
+    public void setGridColor(Color c) {
+        gridColor = c;
+    }
+
+    public Color getGridColor() {
+        return gridColor;
+    }
+
+    public static String coordToString(double coord, String fmt, boolean isLat) {
+        String txt = fmt;
+        int donde;
+        donde = txt.indexOf("%G");
+
+        if (donde >= 0) {
+            int deg = (int) coord;
+
+            if ((fmt.indexOf("%N") >= 0) && (deg < 0)) {
+                deg = -deg;
+            }
+
+            txt = txt.substring(0, donde) + Integer.toString(deg) +
+                  txt.substring(donde + 2);
+        }
+
+        donde = txt.indexOf("%M");
+
+        if (donde >= 0) {
+            int min = (int) ((coord - (int) coord) * 60.0) % 60;
+
+            if ((fmt.indexOf("%N") >= 0) && (min < 0)) {
+                min = -min;
+            }
+
+            txt = txt.substring(0, donde) + Integer.toString(min) +
+                  txt.substring(donde + 2);
+            ;
+        }
+
+        donde = txt.indexOf("%N");
+
+        if (donde >= 0) {
+            String t = "";
+
+            if (isLat) {
+                if (coord > 0) {
+                    t = "N";
+                } else if (coord < 0) {
+                    t = "S";
+                }
+            } else {
+                if (coord > 0) {
+                    t = "E";
+                } else if (coord < 0) {
+                    t = "W";
+                }
+            }
+
+            txt = txt.substring(0, donde) + t + txt.substring(donde + 2);
+            ;
+        }
+
+        return txt;
+    }
+
+    abstract public void drawGrid(Graphics2D g, ViewPortData vp);
+    
+    public boolean isProjected() {
+    	return false;
+    }
+    
+    public Object clone() throws CloneNotSupportedException {
+        return CRSFactory.getCRS( this.getFullCode() );
+     }
+
+}

Property changes on: tags/v2_0_0_Build_2047/libraries/libProjection/src/org/cresques/impl/geo/Projection.java
___________________________________________________________________
Added: svn:eol-style
   + native

Index: tags/v2_0_0_Build_2047/libraries/libProjection/src/org/cresques/impl/geo/Polygon2D.java
===================================================================
--- tags/v2_0_0_Build_2047/libraries/libProjection/src/org/cresques/impl/geo/Polygon2D.java	(revision 0)
+++ tags/v2_0_0_Build_2047/libraries/libProjection/src/org/cresques/impl/geo/Polygon2D.java	(revision 38292)
@@ -0,0 +1,106 @@
+/*
+ * Cresques Mapping Suite. Graphic Library for constructing mapping applications.
+ *
+ * Copyright (C) 2004-5.
+ *
+ * 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:
+ *
+ * cresques@gmail.com
+ */
+package org.cresques.impl.geo;
+
+import java.awt.Graphics2D;
+import java.awt.geom.GeneralPath;
+import java.awt.geom.Point2D;
+
+import java.util.Iterator;
+import java.util.Vector;
+
+import org.cresques.geo.ViewPortData;
+
+
+/**
+ * Clase que representa un polígono 2D
+ * @author "Luis W. Sevilla" <sevilla_lui@gva.es>
+ */
+public class Polygon2D extends Vector {
+    GeneralPath gp = null;
+
+    public Polygon2D() {
+        super();
+        gp = null;
+    }
+
+    /**
+     * Añade un vertice al po?ígono
+     * @param pt        punto 2D que representa el vertice añadido
+     */
+    public void addPoint(Point2D pt) {
+        super.add(pt);
+    }
+
+    /**
+     * Dibuja el polígono
+     * @param g        Graphics sobre el que dibuja
+     * @param vp        ViewPort con la vista
+     */
+    public void draw(Graphics2D g, ViewPortData vp) {
+        newGP(vp);
+        g.draw(gp);
+
+        //g.draw(new Line2D.Double(pt,pt0));
+    }
+
+    /**
+     *
+     * @param g
+     * @param vp
+     */
+    public void fill(Graphics2D g, ViewPortData vp) {
+        newGP(vp);
+        g.fill(gp);
+    }
+
+    /**
+     *
+     * @param vp
+     */
+    private void newGP(ViewPortData vp) {
+        //if (gp != null) return;
+        gp = new GeneralPath();
+
+        Point2D pt0 = null;
+        Point2D pt = null;
+        Point2D pt1 = null;
+        Point2D.Double ptTmp = new Point2D.Double(0.0, 0.0);
+        Iterator iter = iterator();
+
+        while (iter.hasNext()) {
+            pt1 = (Point2D) iter.next();
+            vp.mat.transform(pt1, ptTmp);
+
+            if (pt0 == null) {
+                pt0 = ptTmp;
+                gp.moveTo((float) ptTmp.getX(), (float) ptTmp.getY());
+            } else {
+                gp.lineTo((float) ptTmp.getX(), (float) ptTmp.getY());
+            }
+        }
+
+        gp.closePath();
+    }
+}

Property changes on: tags/v2_0_0_Build_2047/libraries/libProjection/src/org/cresques/impl/geo/Polygon2D.java
___________________________________________________________________
Added: svn:eol-style
   + native

Index: tags/v2_0_0_Build_2047/libraries/libProjection/src/org/cresques/impl/geo/Graticule.java
===================================================================
--- tags/v2_0_0_Build_2047/libraries/libProjection/src/org/cresques/impl/geo/Graticule.java	(revision 0)
+++ tags/v2_0_0_Build_2047/libraries/libProjection/src/org/cresques/impl/geo/Graticule.java	(revision 38292)
@@ -0,0 +1,128 @@
+/*
+ * Cresques Mapping Suite. Graphic Library for constructing mapping applications.
+ *
+ * Copyright (C) 2004-5.
+ *
+ * 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:
+ *
+ * cresques@gmail.com
+ */
+package org.cresques.impl.geo;
+
+import java.awt.Color;
+import java.awt.Graphics2D;
+import java.awt.geom.GeneralPath;
+import java.awt.geom.Point2D;
+
+import java.util.Iterator;
+import java.util.Vector;
+
+import org.cresques.geo.ViewPortData;
+
+
+class Text2D extends Point2D {
+    private double x;
+    private double y;
+    private String txt;
+
+    public Text2D(String txt, Point2D pt) {
+        this.txt = txt;
+        setLocation(pt.getX(), pt.getY());
+    }
+
+    public double getX() {
+        return x;
+    }
+
+    public double getY() {
+        return y;
+    }
+
+    public void setLocation(double x, double y) {
+        this.x = x;
+        this.y = y;
+    }
+
+    public void draw(Graphics2D g, ViewPortData vp) {
+        g.drawString(txt, (int) x, (int) y);
+    }
+}
+
+
+/**
+ * @author "Luis W. Sevilla" <sevilla_lui@gva.es>
+ *
+ * TODO Añadir soporte para hasta 3 niveles de grid (3 colores y 3 GeneralPath
+ */
+public class Graticule {
+    static final Color color = new Color(128, 128, 128, 192);
+    Color pc = null;
+    Color tColor = null;
+    GeneralPath gp = null;
+    GeneralPath gp1 = null;
+    Vector vText = null;
+    Projection proj;
+
+    public Graticule(Projection proj) {
+        this.proj = proj;
+        gp = new GeneralPath();
+        gp1 = new GeneralPath();
+        vText = new Vector();
+        setColor(color);
+    }
+
+    public Color getColor() {
+        return pc;
+    }
+
+    public void setColor(Color color) {
+        pc = color;
+        tColor = new Color(pc.getRed(), pc.getGreen(), pc.getBlue(), 255);
+    }
+
+    public void addLine(Point2D pt1, Point2D pt2) {
+        gp.moveTo((float) pt1.getX(), (float) pt1.getY());
+        gp.lineTo((float) pt2.getX(), (float) pt2.getY());
+    }
+
+    public void addLine(Point2D pt1, Point2D pt2, int num) {
+        if (num == 0) {
+            gp.moveTo((float) pt1.getX(), (float) pt1.getY());
+            gp.lineTo((float) pt2.getX(), (float) pt2.getY());
+        } else if (num == 1) {
+            gp1.moveTo((float) pt1.getX(), (float) pt1.getY());
+            gp1.lineTo((float) pt2.getX(), (float) pt2.getY());
+        }
+    }
+
+    public void addText(String txt, Point2D pt) {
+        vText.add(new Text2D(txt, pt));
+    }
+
+    public void draw(Graphics2D g, ViewPortData vp) {
+        g.setColor(pc);
+        g.draw(gp);
+
+        g.setColor(tColor);
+        g.draw(gp1);
+
+        Iterator iter = vText.iterator();
+
+        while (iter.hasNext())
+            ((Text2D) iter.next()).draw(g, vp);
+    }
+}

Property changes on: tags/v2_0_0_Build_2047/libraries/libProjection/src/org/cresques/impl/geo/Graticule.java
___________________________________________________________________
Added: svn:eol-style
   + native

Index: tags/v2_0_0_Build_2047/libraries/libProjection/src/org/cresques/impl/geo/UtmPoint.java
===================================================================
--- tags/v2_0_0_Build_2047/libraries/libProjection/src/org/cresques/impl/geo/UtmPoint.java	(revision 0)
+++ tags/v2_0_0_Build_2047/libraries/libProjection/src/org/cresques/impl/geo/UtmPoint.java	(revision 38292)
@@ -0,0 +1,92 @@
+/*
+ * Cresques Mapping Suite. Graphic Library for constructing mapping applications.
+ *
+ * Copyright (C) 2004-5.
+ *
+ * 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:
+ *
+ * cresques@gmail.com
+ */
+package org.cresques.impl.geo;
+
+import org.cresques.cts.ICoordTrans;
+import org.cresques.cts.IProjection;
+
+import java.awt.geom.Point2D;
+
+
+public class UtmPoint extends ProjPoint {
+    public UtmPoint() {
+        proj = UtmZone.getProjection(Ellipsoid.hayford, 30, UtmZone.NORTH);
+        setLocation(0.0, 0.0);
+    }
+
+    public UtmPoint(double x, double y) {
+        proj = UtmZone.getProjection(Ellipsoid.hayford, 30, UtmZone.NORTH);
+        setLocation(x, y);
+    }
+
+    public UtmPoint(Point2D pt) {
+        proj = UtmZone.getProjection(Ellipsoid.hayford, 30, UtmZone.NORTH);
+        setLocation(pt.getX(), pt.getY());
+    }
+
+    public UtmPoint(UtmZone zone) {
+        setLocation(0.0, 0.0);
+        proj = zone;
+    }
+
+    public UtmPoint(UtmZone zone, double x, double y) {
+        setLocation(x, y);
+        proj = zone;
+    }
+
+    public UtmPoint(UtmZone zone, Point2D pt) {
+        setLocation(pt.getX(), pt.getY());
+        proj = zone;
+    }
+
+    public IProjection getProjection() {
+        return proj;
+    }
+
+    public void reProject(ICoordTrans rp) {
+        // TODO metodo reProject pendiente de implementar
+    }
+
+    public double getX() {
+        return X;
+    }
+
+    public double getY() {
+        return Y;
+    }
+
+    public void setLocation(double x, double y) {
+        X = x;
+        Y = y;
+    }
+
+    public String toString() {
+        return "(" + ((UtmZone) proj).Zone + ": " + getX() + "," + getY() +
+               ")";
+    }
+
+    public Point2D toGeo() {
+        return ((Projection) proj).toGeo(this);
+    }
+}

Property changes on: tags/v2_0_0_Build_2047/libraries/libProjection/src/org/cresques/impl/geo/UtmPoint.java
___________________________________________________________________
Added: svn:eol-style
   + native

Index: tags/v2_0_0_Build_2047/libraries/libProjection/src/org/cresques/impl/geo/Point3D.java
===================================================================
--- tags/v2_0_0_Build_2047/libraries/libProjection/src/org/cresques/impl/geo/Point3D.java	(revision 0)
+++ tags/v2_0_0_Build_2047/libraries/libProjection/src/org/cresques/impl/geo/Point3D.java	(revision 38292)
@@ -0,0 +1,84 @@
+/*
+ * Cresques Mapping Suite. Graphic Library for constructing mapping applications.
+ *
+ * Copyright (C) 2004-5.
+ *
+ * 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:
+ *
+ * cresques@gmail.com
+ */
+package org.cresques.impl.geo;
+
+import java.awt.geom.Point2D;
+
+
+/**
+ * @author "Luis W. Sevilla" <sevilla_lui@gva.es>
+ */
+public class Point3D extends Point2D {
+    public double X;
+    public double Y;
+    public double Z;
+
+    public Point3D() {
+        setLocation(0.0, 0.0);
+    }
+
+    public Point3D(double x, double y) {
+        setLocation(x, y);
+    }
+
+    public Point3D(double x, double y, double z) {
+        setLocation(x, y, z);
+    }
+
+    public Point3D(Point2D pt) {
+        setLocation(pt.getX(), pt.getY());
+    }
+
+    public Point3D(Point3D pt) {
+        setLocation(pt.getX(), pt.getY(), pt.getZ());
+    }
+
+    public double getX() {
+        return X;
+    }
+
+    public double getY() {
+        return Y;
+    }
+
+    public double getZ() {
+        return Z;
+    }
+
+    public void setLocation(double x, double y) {
+        X = x;
+        Y = y;
+        Z = 0D;
+    }
+
+    public void setLocation(double x, double y, double z) {
+        X = x;
+        Y = y;
+        Z = z;
+    }
+
+    public String toString() {
+        return "(" + getX() + "," + getY() + ")";
+    }
+}

Property changes on: tags/v2_0_0_Build_2047/libraries/libProjection/src/org/cresques/impl/geo/Point3D.java
___________________________________________________________________
Added: svn:eol-style
   + native

Index: tags/v2_0_0_Build_2047/libraries/libProjection/src/org/cresques/impl/geo/PointFactory.java
===================================================================
--- tags/v2_0_0_Build_2047/libraries/libProjection/src/org/cresques/impl/geo/PointFactory.java	(revision 0)
+++ tags/v2_0_0_Build_2047/libraries/libProjection/src/org/cresques/impl/geo/PointFactory.java	(revision 38292)
@@ -0,0 +1,30 @@
+/*
+ * Cresques Mapping Suite. Graphic Library for constructing mapping applications.
+ *
+ * Copyright (C) 2004-5.
+ *
+ * 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:
+ *
+ * cresques@gmail.com
+ */
+package org.cresques.impl.geo;
+
+public class PointFactory {
+    public static UtmPoint newUtmPoint(UtmZone zona, double x, double y) {
+        return new UtmPoint(zona, x, y);
+    }
+}

Property changes on: tags/v2_0_0_Build_2047/libraries/libProjection/src/org/cresques/impl/geo/PointFactory.java
___________________________________________________________________
Added: svn:eol-style
   + native

Index: tags/v2_0_0_Build_2047/libraries/libProjection/src/org/cresques/impl/geo/Gauss.java
===================================================================
--- tags/v2_0_0_Build_2047/libraries/libProjection/src/org/cresques/impl/geo/Gauss.java	(revision 0)
+++ tags/v2_0_0_Build_2047/libraries/libProjection/src/org/cresques/impl/geo/Gauss.java	(revision 38292)
@@ -0,0 +1,145 @@
+/*
+ * Cresques Mapping Suite. Graphic Library for constructing mapping applications.
+ *
+ * Copyright (C) 2004-5.
+ *
+ * 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:
+ *
+ * cresques@gmail.com
+ */
+package org.cresques.impl.geo;
+
+import org.cresques.cts.ICoordTrans;
+import org.cresques.cts.IDatum;
+import org.cresques.cts.IProjection;
+import org.cresques.geo.ViewPortData;
+
+import org.cresques.px.Extent;
+
+import java.awt.Graphics2D;
+import java.awt.geom.AffineTransform;
+import java.awt.geom.Point2D;
+import java.awt.geom.Rectangle2D;
+
+
+/**
+ * Proyeccion de Gauss (Mapa de Portugal)
+ * @author "Luis W. Sevilla" <sevilla_lui@gva.es>* @author administrador
+ */
+public class Gauss extends Projection {
+    static String name = "Gauss";
+    static String abrev = "Gau";
+
+    public Gauss(Ellipsoid eli) {
+        super(eli);
+        grid = new Graticule(this);
+    }
+
+    public String getAbrev() {
+        return abrev;
+    }
+
+    public static Gauss getProjection(Ellipsoid eli) {
+        return new Gauss(eli);
+    }
+
+    /**
+     *
+     */
+    public static IProjection getProjectionByName(IDatum eli, String name) {
+        if (name.indexOf("Ga") < 0) {
+            return null;
+        }
+
+        return getProjection((Ellipsoid) eli);
+    }
+
+    /**
+     *
+     */
+    public Point2D createPoint(double x, double y) {
+        return new Point2D.Double(x, y);
+    }
+
+    /**
+     *
+     * @param uPt
+     * @return
+     */
+    public Point2D toGeo(Point2D gaPt) {
+        GeoPoint gPt = new GeoPoint();
+
+        return toGeo(gaPt, gPt);
+    }
+
+    /**
+     *
+     * @param uPt
+     * @param gPt
+     * @return
+     */
+    public GeoPoint toGeo(Point2D gaPt, GeoPoint gPt) {
+        return gPt;
+    }
+
+    /**
+     *
+     * @param gPt
+     * @param uPt
+     * @return
+     */
+    public Point2D fromGeo(Point2D gPt, Point2D gaPt) {
+        return gaPt;
+    }
+
+    private void generateGrid(Graphics2D g, Extent extent, AffineTransform mat) {
+        grid = new Graticule(this);
+    }
+
+    public void drawGrid(Graphics2D g, ViewPortData vp) {
+        generateGrid(g, vp.getExtent(), vp.getMat());
+        grid.setColor(gridColor);
+        grid.draw(g, vp);
+    }
+
+    /* (non-Javadoc)
+     * @see org.cresques.cts.IProjection#getScale(double, double, double, double)
+     */
+    public double getScale(double minX, double maxX, double width, double dpi) {
+        // TODO Auto-generated method stub
+        return -1D;
+    }
+
+	public ICoordTrans getCT(IProjection dest) {
+		// TODO Auto-generated method stub
+		return null;
+	}
+
+	/* (non-Javadoc)
+	 * @see org.cresques.cts.IProjection#getExtent(java.awt.geom.Rectangle2D, double, double, double, double, double, double)
+	 */
+	public Rectangle2D getExtent(Rectangle2D extent, double scale, double wImage, double hImage, double mapUnits, double distanceUnits, double dpi) {
+		return null;
+	}
+
+	/* (non-Javadoc)
+	 * @see org.cresques.cts.IProjection#getFullCode()
+	 */
+	public String getFullCode() {
+		return getAbrev();
+	}
+}

Property changes on: tags/v2_0_0_Build_2047/libraries/libProjection/src/org/cresques/impl/geo/Gauss.java
___________________________________________________________________
Added: svn:eol-style
   + native

Index: tags/v2_0_0_Build_2047/libraries/libProjection/src/org/cresques/impl/geo/Geodetic.java
===================================================================
--- tags/v2_0_0_Build_2047/libraries/libProjection/src/org/cresques/impl/geo/Geodetic.java	(revision 0)
+++ tags/v2_0_0_Build_2047/libraries/libProjection/src/org/cresques/impl/geo/Geodetic.java	(revision 38292)
@@ -0,0 +1,318 @@
+/*
+ * Cresques Mapping Suite. Graphic Library for constructing mapping applications.
+ *
+ * Copyright (C) 2004-5.
+ *
+ * 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:
+ *
+ * cresques@gmail.com
+ */
+package org.cresques.impl.geo;
+
+import org.cresques.cts.ICoordTrans;
+import org.cresques.cts.IDatum;
+import org.cresques.cts.IProjection;
+import org.cresques.geo.ViewPortData;
+
+import org.cresques.px.Extent;
+
+import java.awt.FontMetrics;
+import java.awt.Graphics2D;
+import java.awt.geom.AffineTransform;
+import java.awt.geom.NoninvertibleTransformException;
+import java.awt.geom.Point2D;
+import java.awt.geom.Rectangle2D;
+
+import java.util.TreeMap;
+
+
+public class Geodetic extends Projection {
+    private static TreeMap projList = new TreeMap();
+    static String name = "Geodesica";
+    static String abrev = "Geo";
+    public static Geodetic hayford = new Geodetic(Ellipsoid.hayford);
+
+    public Geodetic() {
+        super();
+        grid = new Graticule(this);
+    }
+
+    public Geodetic(Ellipsoid eli) {
+        super(eli);
+        grid = new Graticule(this);
+    }
+
+    public String getAbrev() {
+        return abrev;
+    }
+
+    /**
+     *
+     */
+    public static IProjection getProjectionByName(IDatum eli, String name) {
+        if (name.indexOf("GEO") < 0) {
+            return null;
+        }
+
+        if (name.indexOf("WGS84") >= 0) {
+            return getProjection(Ellipsoid.wgs84);
+        }
+
+        if (name.indexOf("ED50") >= 0) {
+            return getProjection(Ellipsoid.wgs84);
+        }
+
+        return null;
+    }
+
+    public static Geodetic getProjection(Ellipsoid eli) {
+        Geodetic ret = null;
+        String key = eli.toString();
+
+        if (Geodetic.projList.containsKey(key)) {
+            ret = (Geodetic) Geodetic.projList.get(key);
+        } else {
+            if (eli == Ellipsoid.hayford) {
+                ret = hayford;
+            } else {
+                ret = new Geodetic(eli);
+            }
+
+            Geodetic.projList.put(key, ret);
+        }
+
+        return ret;
+    }
+
+    public Point2D createPoint(double x, double y) {
+        return new GeoPoint(this, x, y);
+    }
+
+    /**
+     *
+     * @param gPt Punto para pasar a GeoPoint
+     * @return
+     */
+    public Point2D toGeo(Point2D gPt) {
+        return (GeoPoint) gPt;
+    }
+
+    public Point2D fromGeo(Point2D gPt, Point2D pPt) {
+        return gPt;
+    }
+
+    // Calcula el step en función del zoom
+    private void generateGrid(Graphics2D g, Extent extent, AffineTransform mat) {
+        // calculo del step en función del zoom
+        Point2D pt1 = extent.getMin();
+
+        double step = 1.0;
+        double x = (int) pt1.getX();
+        double dist = 0.0;
+        GeoPoint gp1;
+        GeoPoint gp2;
+        gp1 = (GeoPoint) createPoint(x, (int) pt1.getY());
+        mat.transform(gp1, gp1);
+        gp2 = (GeoPoint) createPoint(gp1.getX() + 100, gp1.getY() - 100);
+
+        try {
+            mat.inverseTransform(gp2, gp2);
+        } catch (NoninvertibleTransformException e) {
+            // TODO Auto-generated catch block
+            e.printStackTrace();
+        }
+
+        dist = (gp2.getX() - x);
+        System.err.println("distX = " + dist);
+
+        if (dist > 30.0) {
+            step = 30.0;
+        } else if (dist > 15.0) {
+            step = 15.0;
+        } else if (dist > 10.0) {
+            step = 10.0;
+        } else if (dist > 5.0) {
+            step = 5.0;
+        } else if (dist > 3.0) {
+            step = 3.0;
+        } else if (dist > 2.0) {
+            step = 2.0;
+        } else if (dist > 1.0) {
+            step = 1.0;
+        } else if (dist > .5) {
+            step = .5;
+        } else if (dist > .25) {
+            step = .25;
+        } else if (dist > (1.0 / 60 * 5.0)) {
+            step = 1.0 / 60 * 5.0;
+        } else {
+            step = 1.0 / 60 * 2.0;
+        }
+
+        //step = 1.0;
+        generateGrid(g, extent, mat, step);
+    }
+
+    private void generateGrid(Graphics2D g, Extent extent, AffineTransform mat,
+                              double step) {
+        grid = new Graticule(this);
+
+        GeoPoint gp1;
+        GeoPoint gp2;
+        Point2D.Double ptx = new Point2D.Double(0.0, 0.0);
+
+        Point2D pt1 = extent.getMin();
+        Point2D pt2 = extent.getMax();
+        System.err.println(name + ": ViewPort Extent = (" + pt1 + "," + pt2 +
+                           ")");
+
+        // Calculos para el texto
+        FontMetrics fm = g.getFontMetrics();
+        int fmWidth = 0;
+        int fmHeight = fm.getAscent();
+        String tit = "";
+        String fmt = "%Gº%N";
+
+        if (step < 1.0) {
+            fmt = "%Gº%M'%N";
+        }
+
+        // Lineas Verticales
+        double y1 = pt1.getY();
+
+        // Lineas Verticales
+        double y2 = pt2.getY();
+        double xIni = (int) pt1.getX() - 1;
+        xIni -= (xIni % step);
+
+        double xFin = ((int) pt2.getX()) + 1;
+
+        if (y1 < -90.0) {
+            y1 = -90.0;
+        }
+
+        if (y2 > 90.0) {
+            y2 = 90.0;
+        }
+
+        if (xIni < -180.0) {
+            xIni = -180.0;
+        }
+
+        if (xFin > 180.0) {
+            xFin = 180.0;
+        }
+
+        for (double x = xIni; x <= xFin; x += step) {
+            gp1 = (GeoPoint) createPoint(x, y1);
+            gp2 = (GeoPoint) createPoint(x, y2);
+            mat.transform(gp1, gp1);
+            mat.transform(gp2, gp2);
+            grid.addLine(gp1, gp2);
+            tit = coordToString(x, fmt, false);
+
+            //fmWidth = fm.stringWidth(tit);
+            ptx.setLocation(gp2.getX() + 3, gp2.getY() + fmHeight);
+            grid.addText(tit, ptx);
+        }
+
+        // Lineas Horizontales
+        double x1 = pt1.getX();
+
+        // Lineas Horizontales
+        double x2 = pt2.getX();
+        double yIni = (int) pt1.getY() - 1;
+        yIni -= (yIni % step);
+
+        double yFin = ((int) pt2.getY()) + 1;
+
+        if (x1 < -180.0) {
+            x1 = -180.0;
+        }
+
+        if (x2 > 180.0) {
+            x2 = 180.0;
+        }
+
+        if (yIni < -90.0) {
+            yIni = -90.0;
+        }
+
+        if (yFin > 90.0) {
+            yFin = 90.0;
+        }
+
+        for (double y = yIni; y <= yFin; y += step) {
+            gp1 = (GeoPoint) createPoint(x1, y);
+            gp2 = (GeoPoint) createPoint(x2, y);
+            mat.transform(gp1, gp1);
+            mat.transform(gp2, gp2);
+            grid.addLine(gp1, gp2);
+            tit = coordToString(y, fmt, true);
+
+            //fmWidth = fm.stringWidth(tit);
+            ptx.setLocation(gp1.getX() + 3, gp1.getY() - 2);
+            grid.addText(tit, ptx);
+        }
+    }
+
+    public void drawGrid(Graphics2D g, ViewPortData vp) {
+        generateGrid(g, vp.getExtent(), vp.getMat());
+        grid.setColor(gridColor);
+        grid.draw(g, vp);
+    }
+
+    /* (non-Javadoc)
+     * @see org.cresques.cts.IProjection#getScale(double, double, double, double)
+     */
+    public double getScale(double minX, double maxX, double width, double dpi) {
+        double scale = ((maxX - minX) * // grados
+
+        // 1852.0 metros x minuto de meridiano
+        (dpi / 2.54 * 100.0 * 1852.0 * 60.0)) / // px / metro
+                       width; // pixels
+
+        return scale;
+    }
+
+	public ICoordTrans getCT(IProjection dest) {
+		// TODO Auto-generated method stub
+		return null;
+	}
+
+	public Rectangle2D getExtent(Rectangle2D extent, double scale, double wImage, double hImage, double mapUnits,double distanceUnits, double dpi) {
+		double w =0;
+		double h =0;
+		double wExtent =0;
+		double hExtent =0;
+    	w = ((wImage / dpi) * 2.54);
+		h = ((hImage / dpi) * 2.54);
+		wExtent =(w*scale*distanceUnits)/ (mapUnits*1852.0*60.0);
+		hExtent =(h*scale*distanceUnits)/ (mapUnits*1852.0*60.0);
+		double xExtent = extent.getCenterX() - wExtent/2;
+		double yExtent = extent.getCenterY() - hExtent/2;
+		Rectangle2D rec=new Rectangle2D.Double(xExtent,yExtent,wExtent,hExtent);
+    	return  rec;
+	}
+
+	/* (non-Javadoc)
+	 * @see org.cresques.cts.IProjection#getFullCode()
+	 */
+	public String getFullCode() {
+		return getAbrev();
+	}
+}

Property changes on: tags/v2_0_0_Build_2047/libraries/libProjection/src/org/cresques/impl/geo/Geodetic.java
___________________________________________________________________
Added: svn:eol-style
   + native

Index: tags/v2_0_0_Build_2047/libraries/libProjection/src/org/cresques/impl/geo/Ellipsoid.java
===================================================================
--- tags/v2_0_0_Build_2047/libraries/libProjection/src/org/cresques/impl/geo/Ellipsoid.java	(revision 0)
+++ tags/v2_0_0_Build_2047/libraries/libProjection/src/org/cresques/impl/geo/Ellipsoid.java	(revision 38292)
@@ -0,0 +1,129 @@
+/*
+ * Cresques Mapping Suite. Graphic Library for constructing mapping applications.
+ *
+ * Copyright (C) 2004-5.
+ *
+ * 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:
+ *
+ * cresques@gmail.com
+ */
+package org.cresques.impl.geo;
+
+import org.cresques.cts.IDatum;
+
+
+public class Ellipsoid implements IDatum {
+    //'WGS72':	(6378135.0, 298.26, 1972),
+    public static final Ellipsoid wgs72 = new Ellipsoid("WGS72", 6378135.0,
+                                                        298.26);
+
+    //'WGS84':	(6378137.0, 298.257223563, 1984),
+    public static final Ellipsoid wgs84 = new Ellipsoid("WGS84", 6378137.0,
+                                                        298.257223563);
+
+    //'GRS80':	(6378137.0, 298.257222101, 1980), // , 6356752.314
+    public static final Ellipsoid grs80 = new Ellipsoid("GRS80", 6378137.0,
+                                                        298.257222101);
+
+    //'Hayford':	(6378388.0, 297.0, 1909),
+    public static final Ellipsoid hayford = new Ellipsoid("Hayford", 6378388.0,
+                                                          297.0);
+
+    //'Struve':	(6378298.0, 299.73, 1860),
+    public static final Ellipsoid struve = new Ellipsoid("Struve", 6378298.0,
+                                                         299.73);
+
+    // ed50 ... ¿hayford?
+    public static final Ellipsoid ed50 = new Ellipsoid("ED50", 6378388.0, 297.0);
+
+    // Clarcke 1866	a = 6378206.4;	f = 294.9786982;
+    public static final Ellipsoid clarke66 = new Ellipsoid("CLARKE 1866",
+                                                           6378206.4,
+                                                           294.9786982);
+    private String pName = null;
+    private double pMajor = 0.0;
+    private double pFlat = 0.0;
+    public double a;
+    public double b;
+    public double f;
+    public double e;
+    public double e2;
+    public double ep;
+    public double ep2;
+
+    public Ellipsoid(String name, double major, double flat) {
+        pName = name;
+        pMajor = major;
+        pFlat = flat;
+        a = pMajor;
+        f = pFlat;
+        ainvto();
+    }
+
+    public String getName() {
+        return pName;
+    }
+
+    private void ainvto() {
+        b = (a * (pFlat - 1.0D)) / pFlat;
+        e2 = ((2D * pFlat) - 1.0D) / (pFlat * pFlat);
+        e = Math.sqrt(e2);
+        ep2 = e2 / (1.0D - e2);
+        ep = Math.sqrt(ep2);
+    }
+
+    private void abto() {
+        if (Math.abs(a - b) < 9.9999999999999995E-021D) {
+            pFlat = 0.0D;
+            e2 = 0.0D;
+        } else {
+            pFlat = a / (a - b);
+            e2 = ((2D * pFlat) - 1.0D) / (pFlat * pFlat);
+        }
+
+        e = Math.sqrt(e2);
+        ep2 = e2 / (1.0D - e2);
+        ep = Math.sqrt(ep2);
+    }
+
+    public double[] getParam() {
+        double[] elipar = new double[8];
+        elipar[1] = pMajor;
+        elipar[2] = pFlat;
+        elipar[3] = b;
+        elipar[4] = e;
+        elipar[5] = e2;
+        elipar[6] = ep;
+        elipar[7] = ep2;
+
+        return elipar;
+    }
+
+    /* (non-Javadoc)
+     * @see org.cresques.cts.IDatum#getSemiMajorAxis()
+     */
+    public double getESemiMajorAxis() {
+        return pMajor;
+    }
+
+    /* (non-Javadoc)
+     * @see org.cresques.cts.IDatum#getEIFlattening()
+     */
+    public double getEIFlattening() {
+        return pFlat;
+    }
+}

Property changes on: tags/v2_0_0_Build_2047/libraries/libProjection/src/org/cresques/impl/geo/Ellipsoid.java
___________________________________________________________________
Added: svn:eol-style
   + native

Index: tags/v2_0_0_Build_2047/libraries/libProjection/src/org/cresques/impl/geo/GeoPoint.java
===================================================================
--- tags/v2_0_0_Build_2047/libraries/libProjection/src/org/cresques/impl/geo/GeoPoint.java	(revision 0)
+++ tags/v2_0_0_Build_2047/libraries/libProjection/src/org/cresques/impl/geo/GeoPoint.java	(revision 38292)
@@ -0,0 +1,122 @@
+/*
+ * Cresques Mapping Suite. Graphic Library for constructing mapping applications.
+ *
+ * Copyright (C) 2004-5.
+ *
+ * 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:
+ *
+ * cresques@gmail.com
+ */
+package org.cresques.impl.geo;
+
+import geojava.Mutil;
+import geojava.SexaAngle;
+
+import org.cresques.cts.ICoordTrans;
+import org.cresques.cts.IProjection;
+import org.cresques.geo.Projected;
+
+import java.awt.geom.Point2D;
+
+
+public class GeoPoint extends Point2D implements Projected {
+    public static int decimales = 4;
+    IProjection proj = null;
+    public SexaAngle Longitude;
+    public SexaAngle Latitude;
+    public double h;
+
+    public GeoPoint(SexaAngle sexaangle, SexaAngle sexaangle1, double d) {
+        Longitude = sexaangle;
+        Latitude = sexaangle1;
+        h = d;
+    }
+
+    public GeoPoint() {
+        Longitude = new SexaAngle();
+        Latitude = new SexaAngle();
+        h = 0.0D;
+    }
+
+    public GeoPoint(double x, double y) {
+        setLocation(x, y);
+        h = 0.0D;
+    }
+
+    public GeoPoint(Projection proj, double x, double y) {
+        setLocation(x, y);
+        h = 0.0D;
+        ;
+        this.proj = proj;
+    }
+
+    public GeoPoint(Point2D pt) {
+        setLocation(pt.getX(), pt.getY());
+        h = 0.0D;
+    }
+
+    public GeoPoint(Projection proj, Point2D pt) {
+        setLocation(pt.getX(), pt.getY());
+        h = 0.0D;
+        ;
+        this.proj = proj;
+    }
+
+    public IProjection getProjection() {
+        return proj;
+    }
+
+    public void reProject(ICoordTrans rp) {
+        // TODO metodo reProject pendiente de implementar
+    }
+
+    public double getX() {
+        return Longitude.ToDecimal();
+    }
+
+    public double getY() {
+        return Latitude.ToDecimal();
+    }
+
+    public void setLocation(double x, double y) {
+        Longitude = SexaAngle.fromDecimal(x);
+        Latitude = SexaAngle.fromDecimal(y);
+    }
+
+    public String toString() {
+        String str = "";
+        String s = String.valueOf(Longitude.Deg);
+        String s1 = String.valueOf(Longitude.Min);
+        String s2 = String.valueOf(Mutil.double2String(Longitude.Sec, decimales));
+        SexaAngle sexaangle = new SexaAngle(s, s1, s2);
+        sexaangle.Normalize();
+        str += (String.valueOf(sexaangle.Deg) + "º");
+        str += (String.valueOf(sexaangle.Min) + "'");
+        str += (Mutil.double2String(sexaangle.Sec, decimales) + "\"");
+        str += " ";
+        s = String.valueOf(Latitude.Deg);
+        s1 = String.valueOf(Latitude.Min);
+        s2 = String.valueOf(Mutil.double2String(Latitude.Sec, decimales));
+        sexaangle = new SexaAngle(s, s1, s2);
+        sexaangle.Normalize();
+        str += (String.valueOf(sexaangle.Deg) + "º");
+        str += (String.valueOf(sexaangle.Min) + "'");
+        str += (Mutil.double2String(sexaangle.Sec, decimales) + "\"");
+
+        return str;
+    }
+}

Property changes on: tags/v2_0_0_Build_2047/libraries/libProjection/src/org/cresques/impl/geo/GeoPoint.java
___________________________________________________________________
Added: svn:eol-style
   + native

Index: tags/v2_0_0_Build_2047/libraries/libProjection/src/org/cresques/impl/geo/ProjPoint.java
===================================================================
--- tags/v2_0_0_Build_2047/libraries/libProjection/src/org/cresques/impl/geo/ProjPoint.java	(revision 0)
+++ tags/v2_0_0_Build_2047/libraries/libProjection/src/org/cresques/impl/geo/ProjPoint.java	(revision 38292)
@@ -0,0 +1,97 @@
+/*
+ * Cresques Mapping Suite. Graphic Library for constructing mapping applications.
+ *
+ * Copyright (C) 2004-5.
+ *
+ * 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:
+ *
+ * cresques@gmail.com
+ */
+package org.cresques.impl.geo;
+
+import org.cresques.cts.ICoordTrans;
+import org.cresques.cts.IProjection;
+import org.cresques.geo.Projected;
+
+import java.awt.geom.Point2D;
+
+
+/**
+ *
+ * @author "Luis W. Sevilla" <sevilla_lui@gva.es>*
+ */
+public class ProjPoint extends Point2D implements Projected {
+    IProjection proj = Mercator.getProjection(Ellipsoid.ed50);
+    public double X;
+    public double Y;
+
+    public ProjPoint() {
+        setLocation(0.0, 0.0);
+    }
+
+    public ProjPoint(Projection proj) {
+        setLocation(0.0, 0.0);
+        this.proj = proj;
+    }
+
+    public ProjPoint(double x, double y) {
+        setLocation(x, y);
+    }
+
+    public ProjPoint(Projection proj, double x, double y) {
+        setLocation(x, y);
+        this.proj = proj;
+    }
+
+    public ProjPoint(Point2D pt) {
+        setLocation(pt.getX(), pt.getY());
+    }
+
+    public ProjPoint(Projection proj, Point2D pt) {
+        setLocation(pt.getX(), pt.getY());
+        this.proj = proj;
+    }
+
+    public IProjection getProjection() {
+        return proj;
+    }
+
+    public void reProject(ICoordTrans rp) {
+        // TODO metodo reProject pendiente de implementar
+    }
+
+    public double getX() {
+        return X;
+    }
+
+    public double getY() {
+        return Y;
+    }
+
+    public void setLocation(double x, double y) {
+        X = x;
+        Y = y;
+    }
+
+    public String toString() {
+        return "(" + proj + ": " + getX() + "," + getY() + ")";
+    }
+
+    public Point2D toGeo() {
+        return ((Projection) proj).toGeo(this);
+    }
+}

Property changes on: tags/v2_0_0_Build_2047/libraries/libProjection/src/org/cresques/impl/geo/ProjPoint.java
___________________________________________________________________
Added: svn:eol-style
   + native

Index: tags/v2_0_0_Build_2047/libraries/libProjection/src/org/cresques/impl/geo/CCLambert.java
===================================================================
--- tags/v2_0_0_Build_2047/libraries/libProjection/src/org/cresques/impl/geo/CCLambert.java	(revision 0)
+++ tags/v2_0_0_Build_2047/libraries/libProjection/src/org/cresques/impl/geo/CCLambert.java	(revision 38292)
@@ -0,0 +1,145 @@
+/*
+ * Cresques Mapping Suite. Graphic Library for constructing mapping applications.
+ *
+ * Copyright (C) 2004-5.
+ *
+ * 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:
+ *
+ * cresques@gmail.com
+ */
+package org.cresques.impl.geo;
+
+import org.cresques.cts.ICoordTrans;
+import org.cresques.cts.IDatum;
+import org.cresques.cts.IProjection;
+import org.cresques.geo.ViewPortData;
+
+import org.cresques.px.Extent;
+
+import java.awt.Graphics2D;
+import java.awt.geom.AffineTransform;
+import java.awt.geom.Point2D;
+import java.awt.geom.Rectangle2D;
+
+
+/**
+ * Proyeccion de Conica Comforme Lambert
+ * @author "Luis W. Sevilla" <sevilla_lui@gva.es>* @author administrador
+ */
+public class CCLambert extends Projection {
+    static String name = "Conica Comforme Lambert";
+    static String abrev = "CCLam";
+
+    public CCLambert(Ellipsoid eli) {
+        super(eli);
+        grid = new Graticule(this);
+    }
+
+    public ICoordTrans getCT(IProjection dest) {
+		// TODO Auto-generated method stub
+		return null;
+	}
+
+	public String getAbrev() {
+        return abrev;
+    }
+
+    public static CCLambert getProjection(Ellipsoid eli) {
+        return new CCLambert(eli);
+    }
+
+    /**
+     *
+     */
+    public static IProjection getProjectionByName(IDatum eli, String name) {
+        if (name.indexOf("CCL") < 0) {
+            return null;
+        }
+
+        return getProjection((Ellipsoid) eli);
+    }
+
+    /**
+     *
+     */
+    public Point2D createPoint(double x, double y) {
+        return new Point2D.Double(x, y);
+    }
+
+    /**
+     *
+     * @param uPt
+     * @return
+     */
+    public Point2D toGeo(Point2D lPt) {
+        GeoPoint gPt = new GeoPoint();
+
+        return toGeo(lPt, gPt);
+    }
+
+    /**
+     *
+     * @param uPt
+     * @param gPt
+     * @return
+     */
+    public GeoPoint toGeo(Point2D lPt, GeoPoint gPt) {
+        return gPt;
+    }
+
+    /**
+     *
+     * @param gPt
+     * @param uPt
+     * @return
+     */
+    public Point2D fromGeo(Point2D gPt, Point2D lPt) {
+        return lPt;
+    }
+
+    private void generateGrid(Graphics2D g, Extent extent, AffineTransform mat) {
+        grid = new Graticule(this);
+    }
+
+    public void drawGrid(Graphics2D g, ViewPortData vp) {
+        generateGrid(g, vp.getExtent(), vp.getMat());
+        grid.setColor(gridColor);
+        grid.draw(g, vp);
+    }
+
+    /* (non-Javadoc)
+     * @see org.cresques.cts.IProjection#getScale(double, double, double, double)
+     */
+    public double getScale(double minX, double maxX, double width, double dpi) {
+        // TODO Auto-generated method stub
+        return -1D;
+    }
+
+	/* (non-Javadoc)
+	 * @see org.cresques.cts.IProjection#getExtent(java.awt.geom.Rectangle2D, double, double, double, double, double, double)
+	 */
+	public Rectangle2D getExtent(Rectangle2D extent, double scale, double wImage, double hImage, double mapUnits, double distanceUnits, double dpi) {
+		return null;
+	}
+
+	/* (non-Javadoc)
+	 * @see org.cresques.cts.IProjection#getFullCode()
+	 */
+	public String getFullCode() {
+		return getAbrev();
+	}
+}

Property changes on: tags/v2_0_0_Build_2047/libraries/libProjection/src/org/cresques/impl/geo/CCLambert.java
___________________________________________________________________
Added: svn:eol-style
   + native

Index: tags/v2_0_0_Build_2047/libraries/libProjection/src/org/cresques/impl/geo/cover/package.html
===================================================================
--- tags/v2_0_0_Build_2047/libraries/libProjection/src/org/cresques/impl/geo/cover/package.html	(revision 0)
+++ tags/v2_0_0_Build_2047/libraries/libProjection/src/org/cresques/impl/geo/cover/package.html	(revision 38292)
@@ -0,0 +1,4 @@
+<html>
+	<body>Clases relacionadas con coverturas espaciales.
+</body>
+</html>

Property changes on: tags/v2_0_0_Build_2047/libraries/libProjection/src/org/cresques/impl/geo/cover/package.html
___________________________________________________________________
Added: svn:eol-style
   + native

Index: tags/v2_0_0_Build_2047/libraries/libProjection/src/org/cresques/impl/geo/cover/Hoja.java
===================================================================
--- tags/v2_0_0_Build_2047/libraries/libProjection/src/org/cresques/impl/geo/cover/Hoja.java	(revision 0)
+++ tags/v2_0_0_Build_2047/libraries/libProjection/src/org/cresques/impl/geo/cover/Hoja.java	(revision 38292)
@@ -0,0 +1,195 @@
+/*
+ * Cresques Mapping Suite. Graphic Library for constructing mapping applications.
+ *
+ * Copyright (C) 2004-5.
+ *
+ * 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:
+ *
+ * cresques@gmail.com
+ */
+package org.cresques.impl.geo.cover;
+
+import org.cresques.cts.ICoordTrans;
+import org.cresques.cts.IProjection;
+
+import org.cresques.geo.Projected;
+
+import org.cresques.px.Extent;
+
+import java.awt.geom.Point2D;
+
+import java.io.InputStream;
+import java.io.OutputStream;
+
+import java.util.Vector;
+
+
+/**
+ * @author Luis W. Sevilla <sevilla_lui@gva.es>
+ */
+public class Hoja implements Projected {
+    IProjection proj;
+    String code = null;
+    String name = null;
+    Extent extent = null;
+    Point2D tl;
+    Point2D tr;
+    Point2D bl;
+    Point2D br;
+
+    public Hoja(IProjection proj, String code, String name) {
+        this.proj = proj;
+        this.code = code;
+        this.name = name;
+        tl = tr = bl = br = null;
+    }
+
+    public Hoja(String cod, Point2D p1, Point2D p2, Point2D p3, Point2D p4,
+                String name) {
+        code = cod;
+        tl = p1;
+        tr = p2;
+        bl = p3;
+        br = p4;
+
+        if (name != null) {
+            this.name = name;
+        }
+
+        setExtent();
+    }
+
+    public Hoja(String cod, Point2D[] pt, String name) {
+        code = cod;
+        tl = pt[0];
+        tr = pt[1];
+        br = pt[2];
+        bl = pt[3];
+
+        if (name != null) {
+            this.name = name;
+        }
+
+        setExtent();
+    }
+
+    public Hoja(String cod, Vector pt, String name) {
+        code = cod;
+        tl = (Point2D) pt.get(0);
+        tr = (Point2D) pt.get(1);
+        br = (Point2D) pt.get(2);
+        bl = (Point2D) pt.get(3);
+
+        if (name != null) {
+            this.name = name;
+        }
+
+        setExtent();
+    }
+
+    public Hoja(String cod, Hoja h, String name) {
+        code = cod;
+        tl = h.tl;
+        tr = h.tr;
+        br = h.br;
+        bl = h.bl;
+
+        if (name != null) {
+            this.name = name;
+        }
+
+        setExtent();
+    }
+
+    public IProjection getProjection() {
+        return proj;
+    }
+
+    public void setProjection(IProjection p) {
+        proj = p;
+    }
+
+    public void reProject(ICoordTrans rp) {
+        // TODO metodo reProject pendiente de implementar
+    }
+
+    public Point2D getTL() {
+        return tl;
+    }
+
+    public void setTL(Point2D pt) {
+        tl = pt;
+        extent.add(pt);
+    }
+
+    public Point2D getTR() {
+        return tr;
+    }
+
+    public void setTR(Point2D pt) {
+        tr = pt;
+        extent.add(pt);
+    }
+
+    public Point2D getBL() {
+        return bl;
+    }
+
+    public void setBL(Point2D pt) {
+        bl = pt;
+        extent.add(pt);
+    }
+
+    public Point2D getBR() {
+        return br;
+    }
+
+    public void setBR(Point2D pt) {
+        br = pt;
+        extent.add(pt);
+    }
+
+    public Extent getExtent() {
+        return extent;
+    }
+
+    private void setExtent() {
+        extent = new Extent(tl, br);
+        extent.add(tr);
+        extent.add(bl);
+    }
+
+    public String getCode() {
+        return code;
+    }
+
+    public String getName() {
+        return name;
+    }
+
+    public Point2D[] getVertex() {
+        Point2D[] v = { tl, tr, br, bl };
+
+        return v;
+    }
+
+    public void toXml(OutputStream os) {
+    }
+
+    public void fromXml(InputStream is) {
+    }
+}

Property changes on: tags/v2_0_0_Build_2047/libraries/libProjection/src/org/cresques/impl/geo/cover/Hoja.java
___________________________________________________________________
Added: svn:eol-style
   + native

Index: tags/v2_0_0_Build_2047/libraries/libProjection/src/org/cresques/Messages.java
===================================================================
--- tags/v2_0_0_Build_2047/libraries/libProjection/src/org/cresques/Messages.java	(revision 0)
+++ tags/v2_0_0_Build_2047/libraries/libProjection/src/org/cresques/Messages.java	(revision 38292)
@@ -0,0 +1,92 @@
+/* Cresques Mapping Suite. Graphic Library for constructing mapping applications.
+* Copyright (C) 2006 IVER T.I. 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
+*
+*   IVER T.I. S.A
+*   Salamanca 50
+*   46005 Valencia
+*   Spain
+*
+*   +34 963163400
+*   dac@iver.es
+*/
+
+
+package org.cresques;
+
+import java.util.Locale;
+
+/**
+* Bridge class to provide internationalization services to the library.
+* It uses the gvsig-i18n library as a backend, and includes its
+* necessary initialization.
+* 
+* @author Cesar Martinez Izquierdo
+*
+*/
+public class Messages {
+	/**
+	 * Whether the class has been initialized
+	 */
+	private static boolean isInitialized = false;
+	
+	/**
+	 * The name of the Java package containing this class
+	 */
+//	private static final String packageName = Messages.class.getName() ;
+	
+	/**
+	 * Loads the translations in the dictionary. It initializes the backend
+	 * gvsig-i18n library
+	 *
+	 */
+	private static void init() {
+		if (!org.gvsig.i18n.Messages.hasLocales()) {
+			org.gvsig.i18n.Messages.addLocale(Locale.getDefault());
+		}
+		org.gvsig.i18n.Messages.addResourceFamily("org.cresques.resources.i18n.text", Messages.class.getClassLoader(), Messages.class.getClass().getName());
+	}
+	
+	/**
+	 * Gets the translation associated with the provided translation key.
+	 * 
+	 * @param key The translation key which identifies the target text
+	 * @return The translation associated with the provided translation key.
+	 */
+	public static String getText(String key) {
+		if (isInitialized==false) {
+			init();
+			isInitialized = true;
+		}
+		return org.gvsig.i18n.Messages.getText(key, Messages.class.getName());
+	}
+
+}
+

Property changes on: tags/v2_0_0_Build_2047/libraries/libProjection/src/org/cresques/Messages.java
___________________________________________________________________
Added: svn:eol-style
   + native

Index: tags/v2_0_0_Build_2047/libraries/libProjection/src/org/cresques/px/Extent.java
===================================================================
--- tags/v2_0_0_Build_2047/libraries/libProjection/src/org/cresques/px/Extent.java	(revision 0)
+++ tags/v2_0_0_Build_2047/libraries/libProjection/src/org/cresques/px/Extent.java	(revision 38292)
@@ -0,0 +1,234 @@
+/*
+ * Cresques Mapping Suite. Graphic Library for constructing mapping applications.
+ *
+ * Copyright (C) 2004-5.
+ *
+ * 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:
+ *
+ * cresques@gmail.com
+ */
+package org.cresques.px;
+
+import java.awt.geom.Point2D;
+import java.awt.geom.Rectangle2D;
+
+import java.text.DecimalFormat;
+
+/**
+ *	Clase que getiona el extent de una imagen
+ *	
+ *  @author Luis W.Sevilla (sevilla_lui@gva.es)
+ */
+public class Extent {
+    Point2D min = null;
+    Point2D max = null;
+
+    /**
+     * Constructor sin parámetros
+     */
+    public Extent() {
+        min = new Point2D.Double(999999999.0, 999999999.0);
+        max = new Point2D.Double(-999999999.0, -999999999.0);
+    }
+
+    /**
+     * Constructor 
+     * @param pt1	punto que representa la esquina superior izquierda
+     * @param pt2	punto que representa la esquina inferior derecha
+     */
+    public Extent(Point2D pt1, Point2D pt2) {
+        newExtent(pt1.getX(), pt1.getY(), pt2.getX(), pt2.getY());
+    }
+
+    /**
+     * Contructor
+     * @param x1 punto que representa la coordenada X de la esquina superior izquierda
+     * @param y1 punto que representa la coordenada Y de la esquina superior izquierda
+     * @param x2 punto que representa la coordenada X de la esquina inferior derecha
+     * @param y2 punto que representa la coordenada Y de la esquina inferior derecha
+     */
+    public Extent(double x1, double y1, double x2, double y2) {
+        newExtent(x1, y1, x2, y2);
+    }
+
+    /**
+     * Constructor
+     * @param r	Rectangulo 2D
+     */
+    public Extent(Rectangle2D r) {
+        newExtent(r.getX(), r.getY(), r.getX() + r.getWidth(),
+                  r.getY() + r.getHeight());
+    }
+
+    /**
+     * Constructor de copia
+     * @param ext	Objeto Extent
+     */
+    public Extent(Extent ext) {
+        newExtent(ext.minX(), ext.minY(), ext.maxX(), ext.maxY());
+    }
+
+    /**
+     * Crea un objeto extent identico y lo retorna
+     * @return Objeto extent
+     */
+    public Object clone() {
+        Extent e = (Extent) clone();
+        e.min = (Point2D) min.clone();
+        e.max = (Point2D) max.clone();
+
+        return e;
+    }
+
+    private void newExtent(double x1, double y1, double x2, double y2) {
+        min = new Point2D.Double(Math.min(x1, x2), Math.min(y1, y2));
+        max = new Point2D.Double(Math.max(x1, x2), Math.max(y1, y2));
+    }
+
+    /**
+     * Obtiene la coordenada X mínima
+     * @return valor de la coordenada X mínima
+     */
+    public double minX() {
+        return min.getX();
+    }
+
+    /**
+     * Obtiene la coordenada Y mínima
+     * @return valor de la coordenada X mínima
+     */
+    public double minY() {
+        return min.getY();
+    }
+
+    /**
+     * Obtiene la coordenada X máxima
+     * @return valor de la coordenada X máxima
+     */
+    public double maxX() {
+        return max.getX();
+    }
+
+    /**
+     * Obtiene la coordenada Y máxima
+     * @return valor de la coordenada Y máxima
+     */
+    public double maxY() {
+        return max.getY();
+    }
+    
+    /**
+     * Obtiene el punto mínimo
+     * @return mínimo
+     */
+    public Point2D getMin() {
+        return min;
+    }
+
+    /**
+     * Obtiene el punto máximo
+     * @return máximo
+     */
+    public Point2D getMax() {
+        return max;
+    }
+
+    public boolean isAt(Point2D pt) {
+        if (pt.getX() < minX()) {
+            return false;
+        }
+
+        if (pt.getX() > maxX()) {
+            return false;
+        }
+
+        if (pt.getY() < minY()) {
+            return false;
+        }
+
+        if (pt.getY() > maxY()) {
+            return false;
+        }
+
+        return true;
+    }
+
+    public double width() {
+        return Math.abs(maxX() - minX());
+    }
+
+    public double height() {
+        return Math.abs(maxY() - minY());
+    }
+
+    /**
+     * Verifica un punto, y modifica el extent si no está incluido
+     */
+    public void add(Point2D pt) {
+        if (pt == null) {
+            return;
+        }
+
+        min.setLocation(Math.min(pt.getX(), minX()), Math.min(pt.getY(), minY()));
+        max.setLocation(Math.max(pt.getX(), maxX()), Math.max(pt.getY(), maxY()));
+    }
+
+    public void add(Extent ext) {
+        if (ext == null) {
+            return;
+        }
+
+        min.setLocation(Math.min(ext.minX(), minX()),
+                        Math.min(ext.minY(), minY()));
+        max.setLocation(Math.max(ext.maxX(), maxX()),
+                        Math.max(ext.maxY(), maxY()));
+    }
+
+    /**
+     * Obtiene la escala
+     * @param width	Ancho
+     * @param height	Alto
+     * @return
+     */
+    public double[] getScale(int width, int height) {
+        return getScale((double) width, (double) height);
+    }
+
+    public double[] getScale(double width, double height) {
+        double[] scale = new double[2];
+        scale[0] = ((float) width) / width();
+        scale[1] = ((float) height) / height();
+
+        return scale;
+    }
+
+    public Rectangle2D toRectangle2D() {
+        return new Rectangle2D.Double(minX(), minY(), width(), height());
+    }
+
+    public String toString() {
+        DecimalFormat format = new DecimalFormat("####.000");
+
+        return "Extent: (" + format.format(minX()) + "," +
+               format.format(minY()) + "), (" + format.format(maxX()) + "," +
+               format.format(maxY()) + ")";
+    }
+
+    public interface Has {
+        public Extent getExtent();
+    }
+}

Property changes on: tags/v2_0_0_Build_2047/libraries/libProjection/src/org/cresques/px/Extent.java
___________________________________________________________________
Added: svn:eol-style
   + native

Index: tags/v2_0_0_Build_2047/libraries/libProjection/src/org/cresques/px/.cvsignore
===================================================================
--- tags/v2_0_0_Build_2047/libraries/libProjection/src/org/cresques/px/.cvsignore	(revision 0)
+++ tags/v2_0_0_Build_2047/libraries/libProjection/src/org/cresques/px/.cvsignore	(revision 38292)
@@ -0,0 +1,2 @@
+*.dfPackage
+*.wmf

Property changes on: tags/v2_0_0_Build_2047/libraries/libProjection/src/org/cresques/px/.cvsignore
___________________________________________________________________
Added: svn:eol-style
   + native

Index: tags/v2_0_0_Build_2047/libraries/libProjection/src/org/cresques/px/package.html
===================================================================
--- tags/v2_0_0_Build_2047/libraries/libProjection/src/org/cresques/px/package.html	(revision 0)
+++ tags/v2_0_0_Build_2047/libraries/libProjection/src/org/cresques/px/package.html	(revision 38292)
@@ -0,0 +1,4 @@
+<html>
+	<body>Pixel: Clases para dibujar.
+</body>
+</html>

Property changes on: tags/v2_0_0_Build_2047/libraries/libProjection/src/org/cresques/px/package.html
___________________________________________________________________
Added: svn:eol-style
   + native


Property changes on: tags/v2_0_0_Build_2047/libraries/libProjection/src/org/cresques/px
___________________________________________________________________
Added: svn:ignore
   + *.dfPackage
*.wmf


Index: tags/v2_0_0_Build_2047/libraries/libProjection/src/org/cresques/cts/GeoCalc.java
===================================================================
--- tags/v2_0_0_Build_2047/libraries/libProjection/src/org/cresques/cts/GeoCalc.java	(revision 0)
+++ tags/v2_0_0_Build_2047/libraries/libProjection/src/org/cresques/cts/GeoCalc.java	(revision 38292)
@@ -0,0 +1,447 @@
+/*
+ * Cresques Mapping Suite. Graphic Library for constructing mapping applications.
+ *
+ * Copyright (C) 2004-5.
+ *
+ * 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:
+ *
+ * cresques@gmail.com
+ */
+package org.cresques.cts;
+
+import java.awt.geom.Point2D;
+
+
+/**
+ * Operaciones relacionadas con las proyecciones y sistemas
+ * de coordenadas.
+ *
+ * cmartinez: Esta clase no debería formar parte de una API, pero
+ * se deja hasta que se aborde el refactoring de libProjection.
+ *
+ * @author Luis W. Sevilla (sevilla_lui@gva.es)
+ */
+public class GeoCalc {
+    IProjection proj;
+
+    /**
+     *
+     * @param proj
+     */
+    public GeoCalc(IProjection proj) {
+        this.proj = proj;
+    }
+
+    /* (non-Javadoc)
+	 * @see org.cresques.impl.cts.GeoCalc#distanceGeo(java.awt.geom.Point2D, java.awt.geom.Point2D)
+	 */
+    public double distanceGeo(Point2D pt1, Point2D pt2) {
+        double R2 = Math.pow(proj.getDatum().getESemiMajorAxis(), 2);
+        double dLat = Math.toRadians(pt2.getY() - pt1.getY());
+        double dLong = Math.toRadians(pt2.getX() - pt1.getX());
+
+        double alfa = Math.toRadians(pt1.getY());
+        double alfa2 = Math.toRadians(pt2.getY());
+
+        if (Math.abs(alfa2) < Math.abs(alfa)) {
+            alfa = alfa2;
+        }
+
+        double ds2 = (R2 * dLat * dLat) +
+                     (R2 * Math.cos(alfa) * Math.cos(alfa) * dLong * dLong);
+
+        return Math.sqrt(ds2);
+    }
+
+    /* (non-Javadoc)
+	 * @see org.cresques.impl.cts.GeoCalc#distanceEli(java.awt.geom.Point2D, java.awt.geom.Point2D)
+	 */
+    public double distanceEli(Point2D pt1, Point2D pt2) {
+        double lat1 = Math.toRadians(pt1.getY());
+        double lon1 = -Math.toRadians(pt1.getX());
+        double lat2 = Math.toRadians(pt2.getY());
+        double lon2 = -Math.toRadians(pt2.getX());
+
+        double F = (lat1 + lat2) / 2D;
+        double G = (lat1 - lat2) / 2D;
+        double L = (lon1 - lon2) / 2D;
+
+        double sing = Math.sin(G);
+        double cosl = Math.cos(L);
+        double cosf = Math.cos(F);
+        double sinl = Math.sin(L);
+        double sinf = Math.sin(F);
+        double cosg = Math.cos(G);
+
+        double flat = 1D / proj.getDatum().getEIFlattening();
+
+        double S = (sing * sing * cosl * cosl) + (cosf * cosf * sinl * sinl);
+        double C = (cosg * cosg * cosl * cosl) + (sinf * sinf * sinl * sinl);
+        double W = Math.atan2(Math.sqrt(S), Math.sqrt(C));
+        double R = Math.sqrt((S * C)) / W;
+        double H1 = ((3D * R) - 1D) / (2D * C);
+        double H2 = ((3D * R) + 1D) / (2D * S);
+        double D = 2D * W * proj.getDatum().getESemiMajorAxis();
+
+        return (D * ((1D + (flat * H1 * sinf * sinf * cosg * cosg)) -
+               (flat * H2 * cosf * cosf * sing * sing)));
+    }
+
+    /**
+     * Algrothims from Geocentric Datum of Australia Technical Manual
+     *
+     * http://www.anzlic.org.au/icsm/gdatum/chapter4.html
+     *
+     * This page last updated 11 May 1999
+     *
+     * Computations on the Ellipsoid
+     *
+     * There are a number of formulae that are available
+     * to calculate accurate geodetic positions,
+     * azimuths and distances on the ellipsoid.
+     *
+     * Vincenty's formulae (Vincenty, 1975) may be used
+     * for lines ranging from a few cm to nearly 20,000 km,
+     * with millimetre accuracy.
+     * The formulae have been extensively tested
+     * for the Australian region, by comparison with results
+     * from other formulae (Rainsford, 1955 & Sodano, 1965).
+     *
+     * * Inverse problem: azimuth and distance from known
+     *                 latitudes and longitudes
+     * * Direct problem: Latitude and longitude from known
+     *                 position, azimuth and distance.
+     * * Sample data
+     * * Excel spreadsheet
+     *
+     * Vincenty's Inverse formulae
+     * Given: latitude and longitude of two points
+     *                 (phi1, lembda1 and phi2, lembda2),
+     * Calculate: the ellipsoidal distance (s) and
+     * forward and reverse azimuths between the points (alpha12, alpha21).
+     */
+    /* (non-Javadoc)
+	 * @see org.cresques.impl.cts.GeoCalc#distanceVincenty(java.awt.geom.Point2D, java.awt.geom.Point2D)
+	 */
+    public double distanceVincenty(Point2D pt1, Point2D pt2) {
+        return distanceAzimutVincenty(pt1, pt2).dist;
+    }
+
+    /**
+     * Returns the distance between two geographic points on the ellipsoid
+     *        and the forward and reverse azimuths between these points.
+     *       lats, longs and azimuths are in decimal degrees, distance in metres
+     *        Returns ( s, alpha12,  alpha21 ) as a tuple
+     * @param pt1
+     * @param pt2
+     * @return
+     */
+    protected GeoData distanceAzimutVincenty(Point2D pt1, Point2D pt2) {
+        GeoData gd = new GeoData(0, 0);
+        double f = 1D / proj.getDatum().getEIFlattening();
+        double a = proj.getDatum().getESemiMajorAxis();
+        double phi1 = pt1.getY();
+        double lembda1 = pt1.getX();
+        double phi2 = pt2.getY();
+        double lembda2 = pt2.getX();
+
+        if ((Math.abs(phi2 - phi1) < 1e-8) &&
+                (Math.abs(lembda2 - lembda1) < 1e-8)) {
+            return gd;
+        }
+
+        double piD4 = Math.atan(1.0);
+        double two_pi = piD4 * 8.0;
+
+        phi1 = (phi1 * piD4) / 45.0;
+        lembda1 = (lembda1 * piD4) / 45.0; // unfortunately lambda is a key word!
+        phi2 = (phi2 * piD4) / 45.0;
+        lembda2 = (lembda2 * piD4) / 45.0;
+
+        double b = a * (1.0 - f);
+
+        double TanU1 = (1 - f) * Math.tan(phi1);
+        double TanU2 = (1 - f) * Math.tan(phi2);
+
+        double U1 = Math.atan(TanU1);
+        double U2 = Math.atan(TanU2);
+
+        double lembda = lembda2 - lembda1;
+        double last_lembda = -4000000.0; // an impossibe value
+        double omega = lembda;
+
+        // Iterate the following equations,
+        //  until there is no significant change in lembda
+        double Sin_sigma = 0;
+
+        // Iterate the following equations,
+        //  until there is no significant change in lembda
+        double Cos_sigma = 0;
+        double Cos2sigma_m = 0;
+        double alpha = 0;
+        double sigma = 0;
+        double sqr_sin_sigma = 0;
+
+        while ((last_lembda < -3000000.0) ||
+                   ((lembda != 0) &&
+                   (Math.abs((last_lembda - lembda) / lembda) > 1.0e-9))) {
+            sqr_sin_sigma = Math.pow(Math.cos(U2) * Math.sin(lembda), 2) +
+                            Math.pow(((Math.cos(U1) * Math.sin(U2)) -
+                                     (Math.sin(U1) * Math.cos(U2) * Math.cos(lembda))),
+                                     2);
+
+            Sin_sigma = Math.sqrt(sqr_sin_sigma);
+
+            Cos_sigma = (Math.sin(U1) * Math.sin(U2)) +
+                        (Math.cos(U1) * Math.cos(U2) * Math.cos(lembda));
+
+            sigma = Math.atan2(Sin_sigma, Cos_sigma);
+
+            double Sin_alpha = (Math.cos(U1) * Math.cos(U2) * Math.sin(lembda)) / Math.sin(sigma);
+            alpha = Math.asin(Sin_alpha);
+
+            Cos2sigma_m = Math.cos(sigma) -
+                          ((2 * Math.sin(U1) * Math.sin(U2)) / Math.pow(Math.cos(alpha),
+                                                                        2));
+
+            double C = (f / 16) * Math.pow(Math.cos(alpha), 2) * (4 +
+                       (f * (4 - (3 * Math.pow(Math.cos(alpha), 2)))));
+
+            last_lembda = lembda;
+
+            lembda = omega +
+                     ((1 - C) * f * Math.sin(alpha) * (sigma +
+                     (C * Math.sin(sigma) * (Cos2sigma_m +
+                     (C * Math.cos(sigma) * (-1 +
+                     (2 * Math.pow(Cos2sigma_m, 2))))))));
+        }
+
+        double u2 = (Math.pow(Math.cos(alpha), 2) * ((a * a) - (b * b))) / (b * b);
+
+        double A = 1 +
+                   ((u2 / 16384) * (4096 +
+                   (u2 * (-768 + (u2 * (320 - (175 * u2)))))));
+
+        double B = (u2 / 1024) * (256 +
+                   (u2 * (-128 + (u2 * (74 - (47 * u2))))));
+
+        double delta_sigma = B * Sin_sigma * (Cos2sigma_m +
+                             ((B / 4) * ((Cos_sigma * (-1 +
+                             (2 * Math.pow(Cos2sigma_m, 2)))) -
+                             ((B / 6) * Cos2sigma_m * (-3 +
+                             (4 * sqr_sin_sigma)) * (-3 +
+                             (4 * Math.pow(Cos2sigma_m, 2)))))));
+
+        double s = b * A * (sigma - delta_sigma);
+
+        double alpha12 = Math.atan2((Math.cos(U2) * Math.sin(lembda)),
+                                    ((Math.cos(U1) * Math.sin(U2)) -
+                                    (Math.sin(U1) * Math.cos(U2) * Math.cos(lembda))));
+
+        double alpha21 = Math.atan2((Math.cos(U1) * Math.sin(lembda)),
+                                    ((-Math.sin(U1) * Math.cos(U2)) +
+                                    (Math.cos(U1) * Math.sin(U2) * Math.cos(lembda))));
+
+        if (alpha12 < 0.0) {
+            alpha12 = alpha12 + two_pi;
+        }
+
+        if (alpha12 > two_pi) {
+            alpha12 = alpha12 - two_pi;
+        }
+
+        alpha21 = alpha21 + (two_pi / 2.0);
+
+        if (alpha21 < 0.0) {
+            alpha21 = alpha21 + two_pi;
+        }
+
+        if (alpha21 > two_pi) {
+            alpha21 = alpha21 - two_pi;
+        }
+
+        alpha12 = (alpha12 * 45.0) / piD4;
+        alpha21 = (alpha21 * 45.0) / piD4;
+
+        return new GeoData(0, 0, s, alpha12, alpha21);
+    }
+
+    /**
+     * Vincenty's Direct formulae
+     * Given: latitude and longitude of a point (phi1, lembda1) and
+     * the geodetic azimuth (alpha12)
+     * and ellipsoidal distance in metres (s) to a second point,
+     *
+     * Calculate: the latitude and longitude of the second point (phi2, lembda2)
+     * and the reverse azimuth (alpha21).
+     */
+	/**
+	 * Returns the lat and long of projected point and reverse azimuth
+	 *        given a reference point and a distance and azimuth to project.
+	 *  lats, longs and azimuths are passed in decimal degrees.
+	 * Returns ( phi2,  lambda2,  alpha21 ) as a tuple
+	 * @param pt
+	 * @param azimut
+	 * @param dist
+	 * @return
+	 */
+    protected GeoData getPointVincenty(Point2D pt, double azimut, double dist) {
+        GeoData ret = new GeoData(0, 0);
+        double f = 1D / proj.getDatum().getEIFlattening();
+        double a = proj.getDatum().getESemiMajorAxis();
+        double phi1 = pt.getY();
+        double lembda1 = pt.getX();
+        double alpha12 = azimut;
+        double s = dist;
+
+        double piD4 = Math.atan(1.0);
+        double two_pi = piD4 * 8.0;
+
+        phi1 = (phi1 * piD4) / 45.0;
+        lembda1 = (lembda1 * piD4) / 45.0;
+        alpha12 = (alpha12 * piD4) / 45.0;
+
+        if (alpha12 < 0.0) {
+            alpha12 = alpha12 + two_pi;
+        }
+
+        if (alpha12 > two_pi) {
+            alpha12 = alpha12 - two_pi;
+        }
+
+        double b = a * (1.0 - f);
+
+        double TanU1 = (1 - f) * Math.tan(phi1);
+        double U1 = Math.atan(TanU1);
+        double sigma1 = Math.atan2(TanU1, Math.cos(alpha12));
+        double Sinalpha = Math.cos(U1) * Math.sin(alpha12);
+        double cosalpha_sq = 1.0 - (Sinalpha * Sinalpha);
+
+        double u2 = (cosalpha_sq * ((a * a) - (b * b))) / (b * b);
+        double A = 1.0 +
+                   ((u2 / 16384) * (4096 +
+                   (u2 * (-768 + (u2 * (320 - (175 * u2)))))));
+        double B = (u2 / 1024) * (256 +
+                   (u2 * (-128 + (u2 * (74 - (47 * u2))))));
+
+        // Starting with the approximation
+        double sigma = (s / (b * A));
+
+        double last_sigma = (2.0 * sigma) + 2.0; // something impossible
+
+        // Iterate the following three equations
+        //  until there is no significant change in sigma
+        // two_sigma_m , delta_sigma
+        double two_sigma_m = 0;
+
+        while (Math.abs((last_sigma - sigma) / sigma) > 1.0e-9) {
+            two_sigma_m = (2 * sigma1) + sigma;
+
+            double delta_sigma = B * Math.sin(sigma) * (Math.cos(two_sigma_m) +
+                                 ((B / 4) * (Math.cos(sigma) * ((-1 +
+                                 (2 * Math.pow(Math.cos(two_sigma_m), 2))) -
+                                 ((B / 6) * Math.cos(two_sigma_m) * (-3 +
+                                 (4 * Math.pow(Math.sin(sigma), 2))) * (-3 +
+                                 (4 * Math.pow(Math.cos(two_sigma_m), 2))))))));
+
+            last_sigma = sigma;
+            sigma = (s / (b * A)) + delta_sigma;
+        }
+
+        double phi2 = Math.atan2(((Math.sin(U1) * Math.cos(sigma)) +
+                                 (Math.cos(U1) * Math.sin(sigma) * Math.cos(alpha12))),
+                                 ((1 - f) * Math.sqrt(Math.pow(Sinalpha, 2) +
+                                                      Math.pow((Math.sin(U1) * Math.sin(sigma)) -
+                                                               (Math.cos(U1) * Math.cos(sigma) * Math.cos(alpha12)),
+                                                               2))));
+
+        double lembda = Math.atan2((Math.sin(sigma) * Math.sin(alpha12)),
+                                   ((Math.cos(U1) * Math.cos(sigma)) -
+                                   (Math.sin(U1) * Math.sin(sigma) * Math.cos(alpha12))));
+
+        double C = (f / 16) * cosalpha_sq * (4 + (f * (4 - (3 * cosalpha_sq))));
+
+        double omega = lembda -
+                       ((1 - C) * f * Sinalpha * (sigma +
+                       (C * Math.sin(sigma) * (Math.cos(two_sigma_m) +
+                       (C * Math.cos(sigma) * (-1 +
+                       (2 * Math.pow(Math.cos(two_sigma_m), 2))))))));
+
+        double lembda2 = lembda1 + omega;
+
+        double alpha21 = Math.atan2(Sinalpha,
+                                    ((-Math.sin(U1) * Math.sin(sigma)) +
+                                    (Math.cos(U1) * Math.cos(sigma) * Math.cos(alpha12))));
+
+        alpha21 = alpha21 + (two_pi / 2.0);
+
+        if (alpha21 < 0.0) {
+            alpha21 = alpha21 + two_pi;
+        }
+
+        if (alpha21 > two_pi) {
+            alpha21 = alpha21 - two_pi;
+        }
+
+        phi2 = (phi2 * 45.0) / piD4;
+        lembda2 = (lembda2 * 45.0) / piD4;
+        alpha21 = (alpha21 * 45.0) / piD4;
+
+        ret.pt = new Point2D.Double(lembda2, phi2);
+        ret.azimut = alpha21;
+
+        return ret;
+    }
+
+    /* (non-Javadoc)
+	 * @see org.cresques.impl.cts.GeoCalc#surfaceSphere(java.awt.geom.Point2D, java.awt.geom.Point2D, java.awt.geom.Point2D)
+	 */
+    public double surfaceSphere(Point2D pt1, Point2D pt2, Point2D pt3) {
+        double sup = -1;
+        double A = distanceGeo(pt1, pt2);
+        double B = distanceGeo(pt2, pt3);
+        double C = distanceGeo(pt3, pt1);
+        sup = (((A + B + C) - Math.toRadians(180D)) * Math.PI * proj.getDatum()
+                                                                    .getESemiMajorAxis()) / Math.toRadians(180D);
+
+        return sup;
+    }
+
+    /*
+     * Fórmulas de Vincenty's.
+     * (pasadas de http://wegener.mechanik.tu-darmstadt.de/GMT-Help/Archiv/att-8710/Geodetic_py
+     * http://www.icsm.gov.au/icsm/gda/gdatm/index.html
+     */
+    protected class GeoData {
+        Point2D pt;
+        double azimut;
+        double revAzimut;
+        double dist;
+
+        public GeoData(double x, double y) {
+            pt = new Point2D.Double(x, y);
+            azimut = revAzimut = dist = 0;
+        }
+
+        public GeoData(double x, double y, double dist, double azi, double rAzi) {
+            pt = new Point2D.Double(x, y);
+            azimut = azi;
+            revAzimut = rAzi;
+            this.dist = dist;
+        }
+    }
+}

Property changes on: tags/v2_0_0_Build_2047/libraries/libProjection/src/org/cresques/cts/GeoCalc.java
___________________________________________________________________
Added: svn:eol-style
   + native

Index: tags/v2_0_0_Build_2047/libraries/libProjection/src/org/cresques/cts/cts.dfPackage
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream

Property changes on: tags/v2_0_0_Build_2047/libraries/libProjection/src/org/cresques/cts/cts.dfPackage
___________________________________________________________________
Added: svn:mime-type
   + application/octet-stream

Index: tags/v2_0_0_Build_2047/libraries/libProjection/src/org/cresques/cts/package.html
===================================================================
--- tags/v2_0_0_Build_2047/libraries/libProjection/src/org/cresques/cts/package.html	(revision 0)
+++ tags/v2_0_0_Build_2047/libraries/libProjection/src/org/cresques/cts/package.html	(revision 38292)
@@ -0,0 +1,4 @@
+<html>
+	<body>Clases relacionadas con el manejo de proyecciones.
+</body>
+</html>

Property changes on: tags/v2_0_0_Build_2047/libraries/libProjection/src/org/cresques/cts/package.html
___________________________________________________________________
Added: svn:eol-style
   + native

Index: tags/v2_0_0_Build_2047/libraries/libProjection/src/org/cresques/cts/IDatum.java
===================================================================
--- tags/v2_0_0_Build_2047/libraries/libProjection/src/org/cresques/cts/IDatum.java	(revision 0)
+++ tags/v2_0_0_Build_2047/libraries/libProjection/src/org/cresques/cts/IDatum.java	(revision 38292)
@@ -0,0 +1,42 @@
+/*
+ * Cresques Mapping Suite. Graphic Library for constructing mapping applications.
+ *
+ * Copyright (C) 2004-5.
+ *
+ * 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:
+ *
+ * cresques@gmail.com
+ */
+package org.cresques.cts;
+
+
+/**
+ * @author "Luis W. Sevilla" (sevilla_lui@gva.es)
+ */
+public interface IDatum {
+    /**
+     * Semieje Mayor del elipsoide.
+     * @return
+     */
+    public double getESemiMajorAxis();
+
+    /**
+     * Aplanamiento del elipsoide.
+     * @return
+     */
+    public double getEIFlattening();
+}

Property changes on: tags/v2_0_0_Build_2047/libraries/libProjection/src/org/cresques/cts/IDatum.java
___________________________________________________________________
Added: svn:eol-style
   + native

Index: tags/v2_0_0_Build_2047/libraries/libProjection/src/org/cresques/cts/IProjection.java
===================================================================
--- tags/v2_0_0_Build_2047/libraries/libProjection/src/org/cresques/cts/IProjection.java	(revision 0)
+++ tags/v2_0_0_Build_2047/libraries/libProjection/src/org/cresques/cts/IProjection.java	(revision 38292)
@@ -0,0 +1,79 @@
+/*
+ * Cresques Mapping Suite. Graphic Library for constructing mapping applications.
+ *
+ * Copyright (C) 2004-5.
+ *
+ * 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:
+ *
+ * cresques@gmail.com
+ */
+package org.cresques.cts;
+
+import org.cresques.geo.ViewPortData;
+
+import java.awt.Color;
+import java.awt.Graphics2D;
+import java.awt.geom.Point2D;
+import java.awt.geom.Rectangle2D;
+
+import org.gvsig.tools.lang.Cloneable;
+
+/**
+ *
+ * @author "Luis W. Sevilla" (sevilla_lui@gva.es)
+ */
+public interface IProjection extends Cloneable{
+
+    public IDatum getDatum();
+
+    public Point2D createPoint(double x, double y);
+
+    // TODO Quitar si no son necesarias.
+    public String getAbrev();
+    
+    /**
+     * Devuelve getAbrev() mas los parametros de transformacion si los hay
+     * ej.: (EPSG:23030:proj@+proj...@...)
+     * 
+     * @return getAbrev() o getAbrev()+parametros
+     */
+    public String getFullCode();
+
+    public void drawGrid(Graphics2D g, ViewPortData vp);
+
+    public void setGridColor(Color c);
+
+    public Color getGridColor();
+
+    /**
+     * Crea un ICoordTrans para transformar coordenadas
+     * desde el IProjection actual al dest.
+     * @param dest
+     * @return
+     */
+
+    public ICoordTrans getCT(IProjection dest);
+
+    public Point2D toGeo(Point2D pt);
+
+    public Point2D fromGeo(Point2D gPt, Point2D mPt);
+
+    public boolean isProjected();
+
+    public double getScale(double minX, double maxX, double width, double dpi);
+    public Rectangle2D getExtent(Rectangle2D extent,double scale,double wImage,double hImage,double mapUnits,double distanceUnits,double dpi);
+}

Property changes on: tags/v2_0_0_Build_2047/libraries/libProjection/src/org/cresques/cts/IProjection.java
___________________________________________________________________
Added: svn:eol-style
   + native

Index: tags/v2_0_0_Build_2047/libraries/libProjection/src/org/cresques/cts/UTM.java
===================================================================
--- tags/v2_0_0_Build_2047/libraries/libProjection/src/org/cresques/cts/UTM.java	(revision 0)
+++ tags/v2_0_0_Build_2047/libraries/libProjection/src/org/cresques/cts/UTM.java	(revision 38292)
@@ -0,0 +1,5 @@
+package org.cresques.cts;
+
+public interface UTM extends IProjection {
+
+}

Property changes on: tags/v2_0_0_Build_2047/libraries/libProjection/src/org/cresques/cts/UTM.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: tags/v2_0_0_Build_2047/libraries/libProjection/src/org/cresques/cts/ICoordTrans.java
===================================================================
--- tags/v2_0_0_Build_2047/libraries/libProjection/src/org/cresques/cts/ICoordTrans.java	(revision 0)
+++ tags/v2_0_0_Build_2047/libraries/libProjection/src/org/cresques/cts/ICoordTrans.java	(revision 38292)
@@ -0,0 +1,43 @@
+/*
+ * Cresques Mapping Suite. Graphic Library for constructing mapping applications.
+ *
+ * Copyright (C) 2004-5.
+ *
+ * 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:
+ *
+ * cresques@gmail.com
+ */
+package org.cresques.cts;
+
+import java.awt.geom.Point2D;
+import java.awt.geom.Rectangle2D;
+
+
+/**
+ * @author "Luis W. Sevilla" (sevilla_lui@gva.es)
+ */
+public interface ICoordTrans {
+    public IProjection getPOrig();
+
+    public IProjection getPDest();
+
+    public Point2D convert(Point2D ptOrig, Point2D ptDest);
+
+    public Rectangle2D convert(Rectangle2D rect);
+
+    public ICoordTrans getInverted();
+}

Property changes on: tags/v2_0_0_Build_2047/libraries/libProjection/src/org/cresques/cts/ICoordTrans.java
___________________________________________________________________
Added: svn:eol-style
   + native

Index: tags/v2_0_0_Build_2047/libraries/libProjection/src/org/cresques/cts/ICRSFactory.java
===================================================================
--- tags/v2_0_0_Build_2047/libraries/libProjection/src/org/cresques/cts/ICRSFactory.java	(revision 0)
+++ tags/v2_0_0_Build_2047/libraries/libProjection/src/org/cresques/cts/ICRSFactory.java	(revision 38292)
@@ -0,0 +1,13 @@
+package org.cresques.cts;
+
+public interface ICRSFactory {
+	
+	public boolean doesRigurousTransformations();
+	
+    /**
+     * Devuelve una proyeccion a partir de una cadena.
+     * @param name abreviatura de la proyecccion (i.e. EPSG:23030)
+     * @return Proyeccion si existe
+     */
+    public IProjection get(String name);
+}

Property changes on: tags/v2_0_0_Build_2047/libraries/libProjection/src/org/cresques/cts/ICRSFactory.java
___________________________________________________________________
Added: svn:eol-style
   + native

Index: tags/v2_0_0_Build_2047/libraries/libProjection/src/org/cresques/geo/ViewPortData.java
===================================================================
--- tags/v2_0_0_Build_2047/libraries/libProjection/src/org/cresques/geo/ViewPortData.java	(revision 0)
+++ tags/v2_0_0_Build_2047/libraries/libProjection/src/org/cresques/geo/ViewPortData.java	(revision 38292)
@@ -0,0 +1,330 @@
+/*
+ * Cresques Mapping Suite. Graphic Library for constructing mapping applications.
+ *
+ * Copyright (C) 2004-5.
+ *
+ * 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:
+ *
+ * cresques@gmail.com
+ */
+package org.cresques.geo;
+
+import java.awt.Dimension;
+import java.awt.geom.AffineTransform;
+import java.awt.geom.Point2D;
+import java.text.DecimalFormat;
+
+import org.cresques.cts.ICoordTrans;
+import org.cresques.cts.IProjection;
+import org.cresques.px.Extent;
+
+
+/**
+ * Datos de vista sobre las capas.
+ *
+ * Mantiene un conjunto de datos necesarios, que describen el modo de
+ * ver las capas actual.
+ *
+ * cmartinez: Esta clase no debería formar parte de una API, pero
+ * se deja hasta que se aborde el refactoring de libProjection.
+ *
+ * @author "Luis W. Sevilla" <sevilla_lui@gva.es>
+ */
+public class ViewPortData implements Projected {
+    /**
+     * Tipo de proyección de la vista.
+     */
+    IProjection proj = null;
+
+    /**
+     * Sistema de coordenadas de la vista.
+     */
+    IProjection cs = null;
+
+    /**
+     * Amplitud de la vista, en coordenadas proyectadas.
+     */
+    Extent extent = null;
+
+    /**
+     * Tamaño de la vista, en coordenadas de dispositivo.
+     */
+    Dimension size = null;
+
+    /**
+     * Transformación afín usada en la vista actual.
+     */
+    public AffineTransform mat = null;
+
+    /**
+     * Resolución (Puntos por pulgada) de la vista actual.
+     * Se necesita para los cálculos de escala geográfica.
+     */
+    int dpi = java.awt.Toolkit.getDefaultToolkit().getScreenResolution();
+
+    public ViewPortData() {
+    }
+
+    public ViewPortData(IProjection proj, Extent extent, Dimension size) {
+        this.proj = proj;
+        this.extent = extent;
+        this.size = size;
+        mat = new AffineTransform();
+        mat.scale(1.0, -1.0);
+    }
+
+    public IProjection getProjection() {
+        return proj;
+    }
+
+    public void setProjection(IProjection proj) {
+        this.proj = proj;
+    }
+
+    public void reProject(ICoordTrans rp) {
+        // TODO metodo reProject pendiente de implementar
+    }
+
+    public void setCoordSys(IProjection cs) {
+        this.cs = cs;
+    }
+
+    //public void setCoordTrans(ICoordTrans ct) { this.ct = ct; }
+    public AffineTransform getMat() {
+        return mat;
+    }
+
+    public void setMat(AffineTransform mat) {
+        this.mat = mat;
+    }
+
+    public Object clone() {
+        ViewPortData vp = new ViewPortData();
+
+        if (mat != null) {
+            vp.mat = new AffineTransform(mat);
+        }
+
+        if (extent != null) {
+            vp.extent = new Extent(extent);
+        }
+
+        vp.proj = proj;
+        vp.size = size;
+        vp.dpi = dpi;
+
+        return vp;
+    }
+
+    public double getWidth() {
+        return size.width;
+    }
+
+    public double getHeight() {
+        return size.height;
+    }
+
+    /**
+     *
+     */
+    public Dimension getSize() {
+        return size;
+    }
+
+    public void setSize(double w, double h) {
+        setSize(new Dimension((int) w, (int) h));
+    }
+
+    public void setSize(Dimension sz) {
+        size = sz;
+        reExtent();
+    }
+
+    public Extent getExtent() {
+        return extent;
+    }
+
+    public void setExtent(Dimension sz) {
+        Point2D.Double pt0 = new Point2D.Double(0, 0);
+        Point2D.Double ptSz = new Point2D.Double(sz.width, sz.height);
+
+        try {
+            mat.inverseTransform(pt0, pt0);
+            mat.inverseTransform(ptSz, ptSz);
+        } catch (Exception e) {
+            e.printStackTrace();
+        }
+
+        extent = new Extent(pt0, ptSz);
+    }
+
+    public void reExtent() {
+        setExtent(size);
+    }
+
+    public void setDPI(int dpi) {
+        this.dpi = dpi;
+    }
+
+    public int getDPI() {
+        return this.dpi;
+    }
+
+    /**
+     * zoom a un marco.
+     *
+     * @param extent
+     */
+    public void zoom(Extent extent) {
+        double[] scale = extent.getScale(getWidth(), getHeight());
+        double escala = Math.min(scale[0], scale[1]);
+
+        mat.setToIdentity();
+        mat.scale(escala, -escala);
+        mat.translate(-extent.minX(), -extent.maxY());
+        this.extent = extent;
+        reExtent();
+    }
+
+    /**
+     * zoom centrado en un punto.
+     *
+     * @param zoom
+     * @param pt
+     */
+    public void zoom(double zoom, Point2D pt) {
+        zoom(zoom, zoom, pt);
+    }
+
+    public void zoom(double zx, double zy, Point2D pt) {
+        centerAt(pt);
+        mat.scale(zx, zy);
+        centerAt(pt);
+        reExtent();
+    }
+
+    /**
+     * Zoom a una escala (geográfica);
+     *
+     * @param scale
+     */
+    public void zoomToGeoScale(double scale) {
+        double actual = getGeoScale();
+        double f = actual / scale;
+        zoomToCenter(f);
+    }
+
+    /**
+     * Zoom a una escala (geográfica);
+     *
+     * @param scale
+     */
+    public void zoomToCenter(double f) {
+        Point2D.Double ptCenter = new Point2D.Double(getWidth() / 2.0,
+                                                     getHeight() / 2.0);
+
+        try {
+            mat.inverseTransform(ptCenter, ptCenter);
+        } catch (Exception e) {
+            e.printStackTrace();
+        }
+
+        zoom(f, ptCenter);
+    }
+
+    /**
+     * Centrar en un punto.
+     *
+     * @param pt
+     */
+    public void centerAt(Point2D pt) {
+        Point2D.Double ptCenter = new Point2D.Double(getWidth() / 2.0,
+                                                     getHeight() / 2.0);
+
+        try {
+            mat.inverseTransform(ptCenter, ptCenter);
+            mat.translate(ptCenter.x - pt.getX(), ptCenter.y - pt.getY());
+        } catch (Exception e) {
+            e.printStackTrace();
+        }
+
+        reExtent();
+    }
+
+    /**
+     * Desplaza la vista actual.
+     *
+     * @param pt
+     */
+    public void pan(Point2D ptIni, Point2D ptFin) {
+        mat.translate(ptFin.getX() - ptIni.getX(), ptFin.getY() - ptIni.getY());
+        reExtent();
+    }
+
+    public Point2D getCenter() {
+        Point2D.Double ptCenter = new Point2D.Double(getWidth() / 2.0,
+                                                     getHeight() / 2.0);
+
+        try {
+            mat.inverseTransform(ptCenter, ptCenter);
+        } catch (Exception e) {
+            e.printStackTrace();
+        }
+
+        return ptCenter;
+    }
+
+    /**
+     * Escala Geográfica.
+     *
+     * @param dpi resolucion en puntos por pulgada
+     */
+    public double getGeoScale() {
+        /* // TODO Actulizarlo para Geotools2
+        double scale = 0.0;
+        if (proj.getClass() == UtmZone.class) { // UTM;
+                scale = (extent.maxX()-extent.minX())*        // metros
+                        (dpi / 2.54 * 100.0)/                                // px / metro
+                        getWidth();                                                        // pixels
+        } else if (proj.getClass() == Geodetic.class) { // Geodetic
+                scale = (extent.maxX()-extent.minX())*                // grados
+                        // 1852.0 metros x minuto de meridiano
+                        (dpi / 2.54 * 100.0 * 1852.0 * 60.0)/        // px / metro
+                        getWidth();                                                                // pixels
+        } else if (proj.getClass() == Mercator.class) { // Mercator
+                Projection prj = Geodetic.getProjection((Ellipsoid) proj.getDatum());
+                GeoPoint pt1 = (GeoPoint) prj.createPoint(1.0,0.0);
+                GeoPoint pt2 = (GeoPoint) prj.createPoint(2.0,0.0);
+                ProjPoint ppt1 = (ProjPoint) proj.createPoint(0.0, 0.0);
+                ProjPoint ppt2 = (ProjPoint) proj.createPoint(0.0, 0.0);
+                ((Mercator) proj).fromGeo(pt1, ppt1);
+                ((Mercator) proj).fromGeo(pt2, ppt2);
+                //scale = ppt2.getX()-ppt1.getX();
+                scale =  ((extent.maxX()-extent.minX())/ (ppt2.getX()-ppt1.getX()) ) *
+                //scale = ((extent.maxX()-extent.minX())/ getWidth());// *
+                        (dpi / 2.54 * 100.0 * 1852.0 * 60.0) /
+                        getWidth();
+        } */
+        return proj.getScale(extent.minX(), extent.maxX(), getWidth(), dpi);
+    }
+
+    public String getGeoScaleAsString(String fmt) {
+        DecimalFormat format = new DecimalFormat(fmt);
+
+        return "1:" + format.format(getGeoScale());
+    }
+}

Property changes on: tags/v2_0_0_Build_2047/libraries/libProjection/src/org/cresques/geo/ViewPortData.java
___________________________________________________________________
Added: svn:eol-style
   + native

Index: tags/v2_0_0_Build_2047/libraries/libProjection/src/org/cresques/geo/.cvsignore
===================================================================
--- tags/v2_0_0_Build_2047/libraries/libProjection/src/org/cresques/geo/.cvsignore	(revision 0)
+++ tags/v2_0_0_Build_2047/libraries/libProjection/src/org/cresques/geo/.cvsignore	(revision 38292)
@@ -0,0 +1,2 @@
+*.dfPackage
+*.wmf

Property changes on: tags/v2_0_0_Build_2047/libraries/libProjection/src/org/cresques/geo/.cvsignore
___________________________________________________________________
Added: svn:eol-style
   + native

Index: tags/v2_0_0_Build_2047/libraries/libProjection/src/org/cresques/geo/cover/.cvsignore
===================================================================
--- tags/v2_0_0_Build_2047/libraries/libProjection/src/org/cresques/geo/cover/.cvsignore	(revision 0)
+++ tags/v2_0_0_Build_2047/libraries/libProjection/src/org/cresques/geo/cover/.cvsignore	(revision 38292)
@@ -0,0 +1,2 @@
+*.dfPackage
+*.wmf

Property changes on: tags/v2_0_0_Build_2047/libraries/libProjection/src/org/cresques/geo/cover/.cvsignore
___________________________________________________________________
Added: svn:eol-style
   + native


Property changes on: tags/v2_0_0_Build_2047/libraries/libProjection/src/org/cresques/geo/cover
___________________________________________________________________
Added: svn:ignore
   + *.dfPackage
*.wmf


Index: tags/v2_0_0_Build_2047/libraries/libProjection/src/org/cresques/geo/package.html
===================================================================
--- tags/v2_0_0_Build_2047/libraries/libProjection/src/org/cresques/geo/package.html	(revision 0)
+++ tags/v2_0_0_Build_2047/libraries/libProjection/src/org/cresques/geo/package.html	(revision 38292)
@@ -0,0 +1,4 @@
+<html>
+	<body>Pixel: Clases base relacionadas con geometria.
+</body>
+</html>

Property changes on: tags/v2_0_0_Build_2047/libraries/libProjection/src/org/cresques/geo/package.html
___________________________________________________________________
Added: svn:eol-style
   + native

Index: tags/v2_0_0_Build_2047/libraries/libProjection/src/org/cresques/geo/Projected.java
===================================================================
--- tags/v2_0_0_Build_2047/libraries/libProjection/src/org/cresques/geo/Projected.java	(revision 0)
+++ tags/v2_0_0_Build_2047/libraries/libProjection/src/org/cresques/geo/Projected.java	(revision 38292)
@@ -0,0 +1,53 @@
+/*
+ * Cresques Mapping Suite. Graphic Library for constructing mapping applications.
+ *
+ * Copyright (C) 2004-5.
+ *
+ * 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:
+ *
+ * cresques@gmail.com
+ */
+package org.cresques.geo;
+
+import org.cresques.cts.ICoordTrans;
+import org.cresques.cts.IProjection;
+
+
+/**
+ * <p><code>Projected</code> should be implement by all objects that can be re-projected.</p>
+ *
+ * @author "Luis W. Sevilla" <sevilla_lui@gva.es>*
+ */
+public interface Projected {
+	/**
+	 * <p>Returns the current projection.<p>
+	 * 
+	 * @return current projection
+	 * 
+	 * @see #reProject(ICoordTrans)
+	 */
+    public IProjection getProjection();
+
+    /**
+     * <p>Changes projection of the graphical information of this object.</p>
+     * 
+     * @param ct transformation coordinates for obtaining the new projection
+     * 
+     * @see #getProjection()
+     */
+    public void reProject(ICoordTrans ct);
+}

Property changes on: tags/v2_0_0_Build_2047/libraries/libProjection/src/org/cresques/geo/Projected.java
___________________________________________________________________
Added: svn:eol-style
   + native


Property changes on: tags/v2_0_0_Build_2047/libraries/libProjection/src/org/cresques/geo
___________________________________________________________________
Added: svn:ignore
   + *.dfPackage
*.wmf


Index: tags/v2_0_0_Build_2047/libraries/libProjection/src/org/cresques/CRSFactoryNotRegisteredException.java
===================================================================
--- tags/v2_0_0_Build_2047/libraries/libProjection/src/org/cresques/CRSFactoryNotRegisteredException.java	(revision 0)
+++ tags/v2_0_0_Build_2047/libraries/libProjection/src/org/cresques/CRSFactoryNotRegisteredException.java	(revision 38292)
@@ -0,0 +1,48 @@
+/* gvSIG. Geographic Information System of the Valencian Government
+ *
+ * Copyright (C) 2007-2008 Infrastructures and Transports Department
+ * of the Valencian Government (CIT)
+ * 
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ * 
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ * 
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, 
+ * MA  02110-1301, USA.
+ * 
+ */
+
+/*
+ * AUTHORS (In addition to CIT):
+ * 2008 {DiSiD Technologies}   {Create a base Locator implementation}
+ */
+package org.cresques;
+
+import org.gvsig.tools.exception.BaseRuntimeException;
+
+/**
+ * Exception for errors related to the initialization of a Library.
+ * 
+ * @author <a href="mailto:cordin@disid.com">Cèsar Ordiñana</a>
+ */
+public class CRSFactoryNotRegisteredException extends BaseRuntimeException {
+
+	private static final long serialVersionUID = 7354573543115812224L;
+
+	private static final String KEY = "_CRSFactoryNotRegisteredException";
+
+    private static final String MESSAGE = "An instance of ICRSFactory has not " +
+    		"been registered in the CRSFactory";
+
+    public CRSFactoryNotRegisteredException() {
+        super(MESSAGE, KEY, serialVersionUID);
+    }
+}
\ No newline at end of file
Index: tags/v2_0_0_Build_2047/libraries/libProjection/src/org/cresques/ui/LoadableComboBox.java
===================================================================
--- tags/v2_0_0_Build_2047/libraries/libProjection/src/org/cresques/ui/LoadableComboBox.java	(revision 0)
+++ tags/v2_0_0_Build_2047/libraries/libProjection/src/org/cresques/ui/LoadableComboBox.java	(revision 38292)
@@ -0,0 +1,50 @@
+/*
+ * Cresques Mapping Suite. Graphic Library for constructing mapping applications.
+ *
+ * Copyright (C) 2004-5.
+ *
+ * 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:
+ *
+ * cresques@gmail.com
+ */
+package org.cresques.ui;
+
+import javax.swing.JComboBox;
+
+/**
+ * @author "Luis W. Sevilla" (sevilla_lui@gva.es)
+ */
+public class LoadableComboBox extends JComboBox {
+
+    final private static long serialVersionUID = -3370601314380922368L;
+
+    /**
+     * Carga el vector de strings data con los valores pasados por parámetro
+     * 
+     * @param data
+     *            vector de strings con los valores
+     */
+    public void loadData(String[] data) {
+        if (data == null) {
+            return;
+        }
+
+        for (int i = 0; i < data.length; i++) {
+            addItem(data[i]);
+        }
+    }
+}

Property changes on: tags/v2_0_0_Build_2047/libraries/libProjection/src/org/cresques/ui/LoadableComboBox.java
___________________________________________________________________
Added: svn:eol-style
   + native

Index: tags/v2_0_0_Build_2047/libraries/libProjection/src/org/cresques/ui/.cvsignore
===================================================================
--- tags/v2_0_0_Build_2047/libraries/libProjection/src/org/cresques/ui/.cvsignore	(revision 0)
+++ tags/v2_0_0_Build_2047/libraries/libProjection/src/org/cresques/ui/.cvsignore	(revision 38292)
@@ -0,0 +1,2 @@
+*.dfPackage
+*.wmf

Property changes on: tags/v2_0_0_Build_2047/libraries/libProjection/src/org/cresques/ui/.cvsignore
___________________________________________________________________
Added: svn:eol-style
   + native

Index: tags/v2_0_0_Build_2047/libraries/libProjection/src/org/cresques/ui/package.html
===================================================================
--- tags/v2_0_0_Build_2047/libraries/libProjection/src/org/cresques/ui/package.html	(revision 0)
+++ tags/v2_0_0_Build_2047/libraries/libProjection/src/org/cresques/ui/package.html	(revision 38292)
@@ -0,0 +1,4 @@
+<html>
+	<body>User Interface: Clases para interface de usuario.
+</body>
+</html>

Property changes on: tags/v2_0_0_Build_2047/libraries/libProjection/src/org/cresques/ui/package.html
___________________________________________________________________
Added: svn:eol-style
   + native

Index: tags/v2_0_0_Build_2047/libraries/libProjection/src/org/cresques/ui/DefaultDialogPanel.java
===================================================================
--- tags/v2_0_0_Build_2047/libraries/libProjection/src/org/cresques/ui/DefaultDialogPanel.java	(revision 0)
+++ tags/v2_0_0_Build_2047/libraries/libProjection/src/org/cresques/ui/DefaultDialogPanel.java	(revision 38292)
@@ -0,0 +1,187 @@
+/*
+ * Cresques Mapping Suite. Graphic Library for constructing mapping applications.
+ *
+ * Copyright (C) 2004-5.
+ *
+ * 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:
+ *
+ * cresques@gmail.com
+ */
+package org.cresques.ui;
+
+import java.awt.FlowLayout;
+import java.awt.GridBagConstraints;
+import java.awt.GridBagLayout;
+
+import javax.swing.JButton;
+import javax.swing.JPanel;
+
+import org.cresques.Messages;
+
+
+/**
+ * @author Luis W. Sevilla (sevilla_lui@gva.es)
+ */
+public class DefaultDialogPanel extends JPanel { // implements
+                                                 // ComponentListener{
+    final private static long serialVersionUID = -3370601314380922368L;
+    protected JPanel contentPane = null;
+    private JPanel tabPane = null;
+    protected JPanel buttonPane = null;
+    private JButton acceptButton = null;
+    private JButton cancelButton = null;
+    protected int cWidth = 0, difWidth = 0;
+    protected int cHeight = 0, difHeight = 0;
+	protected JPanel pButton = null;
+
+    /**
+     * Constructor
+     * @param init
+     */
+    public DefaultDialogPanel(boolean init){
+    	if(init)
+    		initialize();
+    }
+
+    /**
+     * Constructor
+     */
+    public DefaultDialogPanel() {
+        super();
+        this.initialize();
+    }
+
+    /**
+     * This method initializes this
+     *
+     * @return void
+     */
+    public void initialize() {
+        GridBagConstraints gridBagConstraints11 = new GridBagConstraints();
+        gridBagConstraints11.gridx = 0;
+        gridBagConstraints11.insets = new java.awt.Insets(4,0,0,0);
+        gridBagConstraints11.gridy = 1;
+        GridBagConstraints gridBagConstraints = new GridBagConstraints();
+        gridBagConstraints.insets = new java.awt.Insets(5,0,2,0);
+        gridBagConstraints.gridy = 0;
+        gridBagConstraints.gridx = 0;
+        setLayout(new GridBagLayout());
+        setBorder(javax.swing.BorderFactory.createEmptyBorder(5, 5, 5, 5));
+
+        this.add(getTabPanel(), gridBagConstraints);
+        this.add(getPButton(), gridBagConstraints11);
+    }
+
+    /**
+     * Obtiene el panel general
+     * @return
+     */
+    protected JPanel getContentPanel() {
+        if (contentPane == null) {
+            contentPane = new JPanel();
+            contentPane.setLayout(new GridBagLayout());
+        }
+
+        return contentPane;
+    }
+
+    public JPanel getTabPanel() {
+        if (tabPane == null) {
+            GridBagConstraints gridBagConstraints2 = new GridBagConstraints();
+            gridBagConstraints2.insets = new java.awt.Insets(5,0,0,0);
+            gridBagConstraints2.gridy = 0;
+            gridBagConstraints2.gridx = 0;
+            tabPane = new JPanel();
+            tabPane.setLayout(new GridBagLayout());
+
+            tabPane.setBorder(new javax.swing.border.SoftBevelBorder(javax.swing.border.SoftBevelBorder.RAISED));
+            tabPane.add(getContentPanel(), gridBagConstraints2);
+        }
+
+        return tabPane;
+    }
+
+    /**
+	 * This method initializes jPanel
+	 *
+	 * @return javax.swing.JPanel
+	 */
+	private JPanel getPButton() {
+		if (pButton == null) {
+			FlowLayout flowLayout1 = new FlowLayout();
+			flowLayout1.setAlignment(java.awt.FlowLayout.RIGHT);
+			flowLayout1.setHgap(0);
+			flowLayout1.setVgap(0);
+			pButton = new JPanel();
+			pButton.setLayout(flowLayout1);
+			pButton.add(getButtonPanel(), null);
+		}
+		return pButton;
+	}
+
+
+    /**
+     * Obtiene el panel que contiene los botones de Aceptar, Cancelar y Aplicar
+     * @return
+     */
+    protected JPanel getButtonPanel() {
+        if (buttonPane == null) {
+            GridBagConstraints gridBagConstraints3 = new GridBagConstraints();
+            gridBagConstraints3.gridx = 1;
+            gridBagConstraints3.insets = new java.awt.Insets(0,3,0,3);
+            gridBagConstraints3.gridy = 0;
+            GridBagConstraints gridBagConstraints1 = new GridBagConstraints();
+            gridBagConstraints1.insets = new java.awt.Insets(0,0,0,3);
+            gridBagConstraints1.gridy = 0;
+            gridBagConstraints1.gridx = 0;
+            buttonPane = new JPanel();
+            buttonPane.setLayout(new GridBagLayout());
+            buttonPane.add(getAcceptButton(), gridBagConstraints1);
+            buttonPane.add(getCancelButton(), gridBagConstraints3);
+        }
+
+        return buttonPane;
+    }
+
+    /**
+     * This method initializes Accept button
+     *
+     * @return javax.swing.JButton
+     */
+    public JButton getAcceptButton() {
+        if (acceptButton == null) {
+            acceptButton = new JButton("Aceptar");
+            acceptButton.setText(Messages.getText("Aceptar"));
+        }
+
+        return acceptButton;
+    }
+
+    /**
+     * This method initializes Cancel Button
+     *
+     * @return javax.swing.JButton
+     */
+    public JButton getCancelButton() {
+        if (cancelButton == null) {
+            cancelButton = new JButton("Cancelar");
+            cancelButton.setText(Messages.getText("Cancelar"));
+        }
+
+        return cancelButton;
+    }
+}

Property changes on: tags/v2_0_0_Build_2047/libraries/libProjection/src/org/cresques/ui/DefaultDialogPanel.java
___________________________________________________________________
Added: svn:eol-style
   + native

Index: tags/v2_0_0_Build_2047/libraries/libProjection/src/org/cresques/ui/cts/CSSelectionDialogPanel.java
===================================================================
--- tags/v2_0_0_Build_2047/libraries/libProjection/src/org/cresques/ui/cts/CSSelectionDialogPanel.java	(revision 0)
+++ tags/v2_0_0_Build_2047/libraries/libProjection/src/org/cresques/ui/cts/CSSelectionDialogPanel.java	(revision 38292)
@@ -0,0 +1,56 @@
+/*
+ * Cresques Mapping Suite. Graphic Library for constructing mapping applications.
+ *
+ * Copyright (C) 2004-5.
+ *
+ * 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:
+ *
+ * cresques@gmail.com
+ */
+package org.cresques.ui.cts;
+
+import javax.swing.JPanel;
+
+import org.cresques.Messages;
+import org.cresques.impl.cts.ProjectionPool;
+import org.cresques.ui.DefaultDialogPanel;
+
+/**
+ * Dialogo para abrir fichero.
+ * 
+ * @author "Luis W. Sevilla" <sevilla_lui@gva.es>
+ */
+public class CSSelectionDialogPanel extends DefaultDialogPanel {
+
+    final private static long serialVersionUID = -3370601314380922368L;
+
+    public CSSelectionPanel getProjPanel() {
+        return (CSSelectionPanel) getContentPanel();
+    }
+
+    protected JPanel getContentPanel() {
+        if (contentPane == null) {
+            contentPane =
+                new CSSelectionPanel(Messages.getText("reference_system"));
+
+            ((CSSelectionPanel) contentPane).setProjection(new ProjectionPool()
+                .get("EPSG:32619"));
+        }
+
+        return contentPane;
+    }
+}

Property changes on: tags/v2_0_0_Build_2047/libraries/libProjection/src/org/cresques/ui/cts/CSSelectionDialogPanel.java
___________________________________________________________________
Added: svn:eol-style
   + native

Index: tags/v2_0_0_Build_2047/libraries/libProjection/src/org/cresques/ui/cts/CSSelectionPanel.java
===================================================================
--- tags/v2_0_0_Build_2047/libraries/libProjection/src/org/cresques/ui/cts/CSSelectionPanel.java	(revision 0)
+++ tags/v2_0_0_Build_2047/libraries/libProjection/src/org/cresques/ui/cts/CSSelectionPanel.java	(revision 38292)
@@ -0,0 +1,244 @@
+/*
+ * Cresques Mapping Suite. Graphic Library for constructing mapping applications.
+ *
+ * Copyright (C) 2004-5.
+ *
+ * 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:
+ *
+ * cresques@gmail.com
+ */
+package org.cresques.ui.cts;
+
+import java.awt.GridBagConstraints;
+import java.awt.GridBagLayout;
+import java.awt.Insets;
+
+import javax.swing.BorderFactory;
+import javax.swing.JComponent;
+import javax.swing.JLabel;
+import javax.swing.JPanel;
+import javax.swing.border.TitledBorder;
+
+import org.cresques.Messages;
+import org.cresques.cts.IProjection;
+import org.cresques.ui.LoadableComboBox;
+
+//import es.gva.cit.geoexplorer.ui.LoadableComboBox;
+
+/**
+ * Panel de edición de Sistemas de referencia
+ * 
+ * @author "Luis W. Sevilla" <sevilla_lui@gva.es>
+ */
+public class CSSelectionPanel extends JPanel {
+
+    final private static long serialVersionUID = -3370601314380922368L;
+    private LoadableComboBox datumComboBox = null;
+    private LoadableComboBox projComboBox = null;
+    private LoadableComboBox huseComboBox = null;
+    private JLabel jLabel = null;
+    private JLabel jLabel1 = null;
+    private JLabel jLabel2 = null;
+    private String tit;
+    private CSSelectionModel model;
+
+    /**
+     * Constructor de la clase.
+     */
+    public CSSelectionPanel(String tit) {
+        super();
+
+        if (tit == null) {
+            tit = Messages.getText("reference_system");
+            if (tit == null)
+                tit = "Reference System";
+        }
+
+        this.tit = tit;
+        setModel(new CSSelectionModel());
+        initialize();
+    }
+
+    /**
+     * Inicializa el panel.
+     * 
+     * @return javax.swing.JPanel
+     */
+    private void initialize() {
+        setLayout(new GridBagLayout());
+        GridBagConstraints c = new GridBagConstraints();
+        c.insets = new Insets(2, 5, 2, 5);
+        c.gridy = -1;
+
+        setBorder(BorderFactory.createCompoundBorder(null, BorderFactory
+            .createTitledBorder(null, Messages.getText("reference_system"),
+                TitledBorder.DEFAULT_JUSTIFICATION,
+                TitledBorder.DEFAULT_POSITION, null, null)));
+
+        jLabel = new JLabel(Messages.getText("datum") + ":");
+        addRow(c, jLabel, getDatumComboBox());
+
+        jLabel1 = new JLabel(Messages.getText("projection") + ":");
+        addRow(c, jLabel1, getProjComboBox());
+
+        jLabel2 = new JLabel(Messages.getText("zone") + ":");
+        addRow(c, jLabel2, getHuseComboBox());
+
+        setHuseComboBoxEnabled(false);
+    }
+
+    public void setModel(CSSelectionModel model) {
+        this.model = model;
+
+        getHuseComboBox().loadData(model.getZoneList());
+        getDatumComboBox().loadData(model.getDatumList());
+        getProjComboBox().loadData(model.getProjectionList());
+    }
+
+    private void setHuseComboBoxEnabled(boolean enabled) {
+        if (jLabel2 != null) {
+            jLabel2.setEnabled(enabled);
+        }
+
+        getHuseComboBox().setEnabled(enabled);
+    }
+
+    private void setDatumComboBoxEnabled(boolean enabled) {
+        if (jLabel != null) {
+            jLabel.setEnabled(enabled);
+        }
+
+        getDatumComboBox().setEnabled(enabled);
+    }
+
+    public void setProjection(IProjection proj) {
+        model.setProjection(proj);
+
+        setDatumComboBoxEnabled(true);
+        getDatumComboBox().setSelectedIndex(model.getSelectedDatum());
+
+        getProjComboBox().removeAllItems();
+        getProjComboBox().loadData(model.getProjectionList());
+
+        model.setProjection(proj);
+        getProjComboBox().setSelectedIndex(model.getSelectedProj());
+        model.setProjection(proj);
+
+        if (model.getSelectedZone() >= 0) {
+            setHuseComboBoxEnabled(true);
+            getHuseComboBox().removeAllItems();
+            getHuseComboBox().loadData(model.getZoneList());
+
+            model.setProjection(proj);
+            getHuseComboBox().setSelectedIndex(model.getSelectedZone());
+        } else {
+            setHuseComboBoxEnabled(false);
+            getHuseComboBox().setSelectedIndex(0);
+        }
+    }
+
+    /**
+     * Inicializa datumComboBox
+     * 
+     * @return javax.swing.JComboBox
+     */
+    private LoadableComboBox getDatumComboBox() {
+        if (datumComboBox == null) {
+            datumComboBox = new LoadableComboBox();
+
+            datumComboBox.addItemListener(new java.awt.event.ItemListener() {
+
+                public void itemStateChanged(java.awt.event.ItemEvent e) {
+                    model.setSelectedDatum(e.getItem());
+                    getProjComboBox().removeAllItems();
+                    getProjComboBox().loadData(model.getProjectionList());
+                }
+            });
+        }
+
+        return datumComboBox;
+    }
+
+    /**
+     * Inicializa projComboBox
+     * 
+     * @return javax.swing.JComboBox
+     */
+    private LoadableComboBox getProjComboBox() {
+        if (projComboBox == null) {
+            projComboBox = new LoadableComboBox();
+            // projComboBox.setBounds(14, 80, 250, 23);
+            projComboBox.addItemListener(new java.awt.event.ItemListener() {
+
+                public void itemStateChanged(java.awt.event.ItemEvent e) {
+                    model.setSelectedProj(e.getItem());
+
+                    if (model.getSelectedProjType() == CSSelectionModel.TRANSVERSAL) {
+                        setHuseComboBoxEnabled(true);
+                        getHuseComboBox().removeAllItems();
+                        getHuseComboBox().loadData(model.getZoneList());
+
+                    } else {
+                        setHuseComboBoxEnabled(false);
+                    }
+
+                }
+            });
+        }
+
+        return projComboBox;
+    }
+
+    /**
+     * Inicializa usoComboBox
+     * 
+     * @return javax.swing.JComboBox
+     */
+    private LoadableComboBox getHuseComboBox() {
+        if (huseComboBox == null) {
+            huseComboBox = new LoadableComboBox();
+            huseComboBox.addItemListener(new java.awt.event.ItemListener() {
+
+                public void itemStateChanged(java.awt.event.ItemEvent e) {
+                    model.setSelectedZone(e.getItem());
+                }
+            });
+        }
+
+        return huseComboBox;
+    }
+
+    /**
+     * @return
+     */
+    public IProjection getProjection() {
+        return model.getProjection();
+    }
+
+    private void addRow(GridBagConstraints c, JComponent label, JComponent text) {
+        c.anchor = GridBagConstraints.WEST;
+        c.weightx = 0.0d;
+        c.gridx = 0;
+        c.gridy++;
+        add(label, c);
+
+        c.fill = GridBagConstraints.HORIZONTAL;
+        c.weightx = 1.0d;
+        c.gridx = 1;
+        add(text, c);
+    }
+}

Property changes on: tags/v2_0_0_Build_2047/libraries/libProjection/src/org/cresques/ui/cts/CSSelectionPanel.java
___________________________________________________________________
Added: svn:eol-style
   + native

Index: tags/v2_0_0_Build_2047/libraries/libProjection/src/org/cresques/ui/cts/CSSelectionModel.java
===================================================================
--- tags/v2_0_0_Build_2047/libraries/libProjection/src/org/cresques/ui/cts/CSSelectionModel.java	(revision 0)
+++ tags/v2_0_0_Build_2047/libraries/libProjection/src/org/cresques/ui/cts/CSSelectionModel.java	(revision 38292)
@@ -0,0 +1,478 @@
+/*
+ * Cresques Mapping Suite. Graphic Library for constructing mapping applications.
+ *
+ * Copyright (C) 2004-5.
+ *
+ * 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:
+ *
+ * cresques@gmail.com
+ */
+package org.cresques.ui.cts;
+
+import org.cresques.cts.IProjection;
+import org.cresques.impl.cts.ProjectionPool;
+
+
+/**
+ * @author Luis W. Sevilla (sevilla_lui@gva.es)
+ */
+public class CSSelectionModel {
+    public static int NONE = 0x01;
+    public static int GEODETIC = 0x02;
+    public static int TRANSVERSAL = 0x03;
+    public String[] datumList = {
+	    "WGS 84", "European 1950", "Datum 73",
+	    "North American Datum 1927",
+	    "North American Datum 1983",
+	    "La Canoa",
+	    "NTF (Paris)",
+	    "ETRS 89",
+	    "Moon (IAU 2000)",
+	    "Mars (IAU 2000)",
+	    "Campo_Inchauspe",
+	    "RGF93"
+    };
+    /*private String[] projList = {
+        "Geodesica",
+        "(UTM) Universal Transversal Mercator",
+        "Datum 73 / Modified Portuguese Grid",
+        "WGS 84 / LCC Canada",
+        "NAD83 / NRCan LCC Canada",
+        "Lambert Etendu",
+        "RGF93 / Lambert-93",
+        "WGS 84 / Mercator",
+        "Campo Inchauspe / Zonas 1-7"
+    };*/
+    private String[][] projList = {
+        	{"Geodesica", "(UTM) Universal Transversal Mercator",
+        		"LCC Canada", "Mercator"}, // WGS84
+        	{"Geodesica", "(UTM) Universal Transversal Mercator"}, // ED50
+        	{"Geodesica", "Modified Portuguese Grid"}, //Datum 73
+        	{"Geodesica", "(UTM) Universal Transversal Mercator"}, // NAD27
+        	{"Geodesica", "(UTM) Universal Transversal Mercator", "NRCan LCC Canada"}, // NAD83
+        	{"Geodesica", "(UTM) Universal Transversal Mercator"}, // La Canoa
+        	{"Geodesica", "Lambert Etendu"}, // NTF (Paris)
+        	{"Geodesica", "(UTM) Universal Transversal Mercator"}, // ETRS89
+        	{"Geodesica"}, // Moon
+        	{"Geodesica"}, // Mars
+        	{"Geodesica", "Zonas 1-7"}, // CampoInchauspe
+        	{"Geodesica", "Lambert-93"} // RFG93
+        };
+
+    private int[][] projType = {
+    	{GEODETIC, TRANSVERSAL, NONE, NONE},
+    	{GEODETIC, TRANSVERSAL},
+    	{GEODETIC, NONE},
+    	{GEODETIC, TRANSVERSAL},
+    	{GEODETIC, TRANSVERSAL, NONE},
+    	{GEODETIC, TRANSVERSAL},
+    	{GEODETIC, NONE},
+    	{GEODETIC, TRANSVERSAL},
+    	{GEODETIC},
+    	{GEODETIC},
+    	{GEODETIC, TRANSVERSAL},
+    	{GEODETIC, NONE}
+    };
+    
+    private int [][] zoneRange = {
+    	{1,60},
+    	{1,60},
+    	{0,0},
+    	{3,23},
+    	{3,23},
+    	{18,21},
+    	{0,0},
+    	{28,38},
+    	{0,0},
+    	{0,0},
+    	{1,7},
+    	{0,0}
+    };
+    private String[] zoneList = {  };
+    private int selectedDatum = 0;
+    private int selectedProj = 0;
+    private int selectedZone = 0;
+
+    /**
+     *
+     */
+    public CSSelectionModel() {
+        super();
+        zoneList = new String[60];
+
+        for (int i = 1; i <= 60; i++)
+            zoneList[i - 1] = "Huso " + Integer.toString(i);
+    }
+    
+
+    public String[] getDatumList() {
+        return datumList;
+    }
+
+    public String[] getProjectionList() {
+        return projList[getSelectedDatum()];
+    }
+
+    public String[] getZoneList() {
+    	int [] r = zoneRange[getSelectedDatum()];
+        return getZoneList(r[0],r[1]);
+    }
+
+    public String[] getZoneList(int from, int to) {
+        zoneList = new String[to-from+1];
+
+        for (int i = from; i <= to; i++)
+        	zoneList[i - from] = "Huso " + Integer.toString(i);
+        return zoneList;
+    }
+    public void setSelectedDatum(int opNr) {
+        selectedDatum = opNr;
+    }
+
+    public void setSelectedDatum(Object item) {
+        String[] list = datumList;
+
+        for (int i = 0; i < list.length; i++)
+            if (list[i].compareTo((String) item) == 0) {
+                selectedDatum = i;
+                break;
+            }
+    }
+
+    public int getSelectedDatum() {
+        return selectedDatum;
+    }
+
+    public void setSelectedProj(int opNr) {
+        selectedProj = opNr;
+    }
+
+    public void setSelectedProj(Object item) {
+        String[] list = projList[getSelectedDatum()];
+
+        for (int i = 0; i < list.length; i++)
+            if (list[i].compareTo((String) item) == 0) {
+                selectedProj = i;
+                break;
+            }
+    }
+
+    public int getSelectedProj() {
+        return selectedProj;
+    }
+
+    public int getSelectedProjType() {
+        return projType[getSelectedDatum()][selectedProj];
+    }
+
+    public void setSelectedZone(int opNr) {
+        selectedZone = opNr;
+    }
+
+    public void setSelectedZone(Object item) {
+        String[] list = zoneList;
+
+        for (int i = 0; i < list.length; i++)
+            if (list[i].compareTo((String) item) == 0) {
+                selectedZone = i;
+                break;
+            }
+    }
+
+    public int getSelectedZone() {
+        return selectedZone;
+    }
+
+    public void setProjection(IProjection proj) {
+    	if (proj!=null){
+    		String key = proj.getAbrev();
+    		// Para usos posteriores.
+    		// String db = key.split(":")[0];
+    		key = key.split(":")[1];
+
+    		setSelectedProj(0);
+    		setSelectedZone(-1);
+
+    		if (key.endsWith("4326")) {
+    			setSelectedDatum(0);
+    		} else if (key.endsWith("4230")) {
+    			setSelectedDatum(1);
+    		} else if (key.endsWith("4274")) {
+    			setSelectedDatum(2);
+    		} else if (key.endsWith("4267")) {
+    			setSelectedDatum(3);
+    		} else if (key.endsWith("4269")) {
+    			setSelectedDatum(4);
+    		} else if (key.endsWith("4247")) {
+    			setSelectedDatum(5);
+    		} else if (key.endsWith("4807")) {
+    			setSelectedDatum(6);
+    		} else if (key.endsWith("4258")) {
+    			setSelectedDatum(7);
+    		} else if (key.endsWith("30100")) {
+    			setSelectedDatum(8);
+    		} else if (key.endsWith("49900")) {
+    			setSelectedDatum(9);
+    		} else if (key.endsWith("4221")) {
+    			setSelectedDatum(10);
+    		} else if (key.endsWith("4171")) {
+    			setSelectedDatum(11);
+    		} else if (key.startsWith("326")) {
+    			setSelectedDatum(0);
+    			setSelectedProj(1);
+    			setSelectedZone("Huso "+ Integer.parseInt(key.substring(3)));            		
+    		} else if (key.startsWith("230")) {
+    			setSelectedDatum(1);
+    			setSelectedProj(1);
+    			setSelectedZone("Huso "+ Integer.parseInt(key.substring(3)));
+    		} else if (key.startsWith("267")) {
+    			setSelectedDatum(3);
+    			setSelectedProj(1);
+    			setSelectedZone("Huso "+ Integer.parseInt(key.substring(3)));
+    		} else if (key.startsWith("269")) {
+    			setSelectedDatum(4);
+    			setSelectedProj(1);
+    			setSelectedZone("Huso "+ Integer.parseInt(key.substring(3)));
+    		} else if (key.startsWith("247")) {
+    			setSelectedDatum(5);
+    			setSelectedProj(1);
+    			setSelectedZone("Huso "+ Integer.parseInt(key.substring(3)));
+    		} else if (key.startsWith("258")) {
+    			setSelectedDatum(7);
+    			setSelectedProj(1);
+    			setSelectedZone("Huso "+ Integer.parseInt(key.substring(3)));
+    		} else if (key.startsWith("221")) {
+    			setSelectedDatum(10);
+    			setSelectedProj(1);
+    			setSelectedZone("Huso "+ Integer.parseInt(key.substring(4)));
+    		} else if (key.endsWith("27492")) { // Datum 73 / Modified Portuguese Grid
+    			setSelectedDatum(2);
+    			setSelectedProj(1);
+    			setSelectedZone(-1);
+    		} else if (key.endsWith("42101")) { // WGS 84 / LCC Canada
+    			setSelectedDatum(0);
+    			setSelectedProj(2);
+    			setSelectedZone(-1);
+    		} else if (key.endsWith("9804")) { // WGS 84 / Mercator
+    			setSelectedDatum(0);
+    			setSelectedProj(3);
+    			setSelectedZone(-1);
+    		} else if (key.endsWith("30100")) { // Moon
+    			setSelectedDatum(8);
+    			setSelectedProj(0);
+    			setSelectedZone(-1);
+    		} else if (key.endsWith("49900")) { // Mars
+    			setSelectedDatum(9);
+    			setSelectedProj(0);
+    			setSelectedZone(-1);
+    		} else if (key.endsWith("42304")) { // NAD83 /  / LCC Canada
+    			setSelectedDatum(4);
+    			setSelectedProj(2);
+    			setSelectedZone(-1);
+    		} else if (key.endsWith("27582")) { // NTFParis /  / Lambert Etendu
+    			setSelectedDatum(6);
+    			setSelectedProj(1);
+    			setSelectedZone(-1);
+    		} else if (key.equals("2154")) { // RGF93 /  / Lambert 93
+    			setSelectedDatum(11);
+    			setSelectedProj(1);
+    			setSelectedZone(-1);         
+    		} else  {
+    			System.err.println("CAGADA EN EL PARSING DE LA PROYECCION: " + key);
+    		}
+    	} else {
+    	    selectedDatum = 0;
+    	    selectedProj = 0;
+    	    selectedZone = 0;
+    	}
+    }
+
+    public IProjection getProjection() {
+        IProjection proj = null;
+        String datum = "326";
+
+        if (selectedDatum == 0) {
+            datum = "326";
+            if (selectedProj == 0)
+                return new ProjectionPool().get("EPSG:4"+datum);
+            else if (selectedProj == 1) {
+                String zone = Integer.toString(selectedZone + 1);
+                if (selectedZone < 9) zone = "0" + zone;
+                return new ProjectionPool().get("EPSG:" + datum + zone);
+            } else if (selectedProj == 2)
+                return new ProjectionPool().get("EPSG:42101");
+            else if (selectedProj == 3)
+                return new ProjectionPool().get("EPSG:9804");
+            
+        } else if (selectedDatum == 1) {
+            datum = "230";
+            if (selectedProj == 0)
+                return new ProjectionPool().get("EPSG:4"+datum);
+            else if (selectedProj == 1) {
+                String zone = Integer.toString(selectedZone + 1);
+                if (selectedZone < 9) zone = "0" + zone;
+                return new ProjectionPool().get("EPSG:" + datum + zone);
+            } 
+            
+        } else if (selectedDatum == 2) { // Lisboa 73
+            datum = "274";
+            if (selectedProj == 0)
+                return new ProjectionPool().get("EPSG:4"+datum);
+            else if (selectedProj == 1)
+                return new ProjectionPool().get("EPSG:"+datum+"92");
+            
+       } else if (selectedDatum == 3) {
+            datum = "267";
+            if (selectedProj == 0)
+                return new ProjectionPool().get("EPSG:4"+datum);
+            else if (selectedProj == 1) {
+                String zone = Integer.toString(selectedZone + 3);
+                if (selectedZone+3 <= 9) zone = "0" + zone;
+                return new ProjectionPool().get("EPSG:" + datum + zone);
+            }
+            
+        } else if (selectedDatum == 4) {
+            datum = "269";
+            if (selectedProj == 0)
+                return new ProjectionPool().get("EPSG:4"+datum);
+            else if (selectedProj == 1) {
+                String zone = Integer.toString(selectedZone + 3);
+                if (selectedZone+3 <= 9) zone = "0" + zone;
+                return new ProjectionPool().get("EPSG:" + datum + zone);
+            } else if (selectedProj == 2)
+                return new ProjectionPool().get("EPSG:42304");
+            
+        } else if (selectedDatum == 5) {
+            datum = "247";
+            if (selectedProj == 0)
+                return new ProjectionPool().get("EPSG:4"+datum);
+            else if (selectedProj == 1) {
+                String zone = Integer.toString(selectedZone + 18);
+                return new ProjectionPool().get("EPSG:" + datum + zone);
+            }
+            
+        } else if (selectedDatum == 6) {
+            datum = "807";
+            if (selectedProj == 0)
+                return new ProjectionPool().get("EPSG:4"+datum);
+            else if (selectedProj == 1)
+            	return new ProjectionPool().get("EPSG:27582");
+            
+        } else if (selectedDatum == 7) {
+            datum = "258";
+            if (selectedProj == 0)
+                return new ProjectionPool().get("EPSG:4"+datum);
+            else if (selectedProj == 1) {
+                String zone = Integer.toString(selectedZone + 28);
+                return new ProjectionPool().get("EPSG:" + datum + zone);
+            }
+            
+        } else if (selectedDatum == 8) {
+            datum = "30100";
+            return new ProjectionPool().get("IAU2000:" + datum);
+            
+        } else if (selectedDatum == 9) {
+            datum = "49900";
+            return new ProjectionPool().get("IAU2000:" + datum);
+            
+        } else if (selectedDatum == 10) {
+            datum = "221";
+            if (selectedProj == 0)
+                return new ProjectionPool().get("EPSG:4"+datum);
+            else if (selectedProj == 1) {
+                String zone = Integer.toString(selectedZone + 1);
+                return new ProjectionPool().get("EPSG:" + datum + "9"+ zone);
+            } 
+            
+        } else if (selectedDatum == 11) {
+        	if (selectedProj == 0)
+                return new ProjectionPool().get("EPSG:4171");
+            else if (selectedProj == 1)
+                return new ProjectionPool().get("EPSG:2154");
+        }
+
+        if (selectedProj == 2) {
+            return new ProjectionPool().get("EPSG:27492");
+        } else if (selectedProj == 3) {
+            return new ProjectionPool().get("EPSG:42101");
+        } else if (selectedProj == 4) {
+            return new ProjectionPool().get("EPSG:42304");
+        } else if (selectedProj == 5) {
+            return new ProjectionPool().get("EPSG:27582");
+        } else if (selectedProj == 6) {
+            return new ProjectionPool().get("EPSG:2154");
+        } else if (selectedProj == 7) {
+            return new ProjectionPool().get("EPSG:9804");
+        } else if (selectedProj == 8) {
+        	datum = "221";
+      	   String zone = "9";
+            //if (selectedDatum == 10) {
+                 if (selectedZone < 1) {
+                     zone += "1";
+                 } else if (selectedZone > 7) {
+                     zone += "7";
+                 } else
+                 	zone += (selectedZone+1)+"";
+            // }
+             return new ProjectionPool().get("EPSG:" + datum + zone);
+         }
+
+
+        if (selectedProj == 0) {
+            return new ProjectionPool().get("EPSG:4" + datum);
+        } else if (selectedProj == 1) {
+            String Zone = Integer.toString(selectedZone + 1);
+
+            if (selectedZone < 9) {
+                Zone = "0" + Zone;
+            }
+
+            if ((selectedDatum == 2) || (selectedDatum == 3)) {
+                if (selectedZone < 3) {
+                    Zone = "03";
+                }
+
+                if (selectedZone > 23) {
+                    Zone = "23";
+                }
+            }
+
+            if (selectedDatum == 5) {
+                if (selectedZone < 18) {
+                    Zone = "18";
+                }
+
+                if (selectedZone > 22) {
+                    Zone = "22";
+                }
+            }
+
+            if (selectedDatum == 7) {
+                if (selectedZone < 28) {
+                    Zone = "28";
+                }
+
+                if (selectedZone > 38) {
+                    Zone = "38";
+                }
+            }
+            return new ProjectionPool().get("EPSG:" + datum + Zone);
+        } 
+
+        return proj;
+    }
+}

Property changes on: tags/v2_0_0_Build_2047/libraries/libProjection/src/org/cresques/ui/cts/CSSelectionModel.java
___________________________________________________________________
Added: svn:eol-style
   + native

Index: tags/v2_0_0_Build_2047/libraries/libProjection/src/org/cresques/ui/cts/package.html
===================================================================
--- tags/v2_0_0_Build_2047/libraries/libProjection/src/org/cresques/ui/cts/package.html	(revision 0)
+++ tags/v2_0_0_Build_2047/libraries/libProjection/src/org/cresques/ui/cts/package.html	(revision 38292)
@@ -0,0 +1,4 @@
+<html>
+	<body>Interfaces gráficas relacionadas con el manejo de proyecciones.
+</body>
+</html>

Property changes on: tags/v2_0_0_Build_2047/libraries/libProjection/src/org/cresques/ui/cts/package.html
___________________________________________________________________
Added: svn:eol-style
   + native


Property changes on: tags/v2_0_0_Build_2047/libraries/libProjection/src/org/cresques/ui
___________________________________________________________________
Added: svn:ignore
   + *.dfPackage
*.wmf


Index: tags/v2_0_0_Build_2047/libraries/libProjection/src/org/cresques/DataTypes.java
===================================================================
--- tags/v2_0_0_Build_2047/libraries/libProjection/src/org/cresques/DataTypes.java	(revision 0)
+++ tags/v2_0_0_Build_2047/libraries/libProjection/src/org/cresques/DataTypes.java	(revision 38292)
@@ -0,0 +1,35 @@
+/* gvSIG. Geographic Information System of the Valencian Government
+ *
+ * Copyright (C) 2007-2008 Infrastructures and Transports Department
+ * of the Valencian Government (CIT)
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
+ * MA  02110-1301, USA.
+ *
+ */
+package org.cresques;
+
+/**
+ * @author gvSIG Team
+ * @version $Id$
+ * 
+ */
+public interface DataTypes extends org.gvsig.tools.dataTypes.DataTypes {
+
+    /*
+	 * 
+	 */
+    public static final int CRS = OBJECT + 1;
+}

Property changes on: tags/v2_0_0_Build_2047/libraries/libProjection/src/org/cresques/DataTypes.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: tags/v2_0_0_Build_2047/libraries/libProjection/src/org/gvsig/fmap/crs/CRSFactory.java
===================================================================
--- tags/v2_0_0_Build_2047/libraries/libProjection/src/org/gvsig/fmap/crs/CRSFactory.java	(revision 0)
+++ tags/v2_0_0_Build_2047/libraries/libProjection/src/org/gvsig/fmap/crs/CRSFactory.java	(revision 38292)
@@ -0,0 +1,18 @@
+package org.gvsig.fmap.crs;
+
+import org.cresques.cts.ICRSFactory;
+import org.cresques.cts.IProjection;
+
+/**
+ * Fabrica de CRS.
+ * Centraliza las peticiones de creación de objetos CRS de todo fmap.
+ * @author luisw
+ *
+ */
+public class CRSFactory {
+	public static ICRSFactory cp = null;
+
+	public static IProjection getCRS(String code) {
+		return cp.get(code);
+	}
+}

Property changes on: tags/v2_0_0_Build_2047/libraries/libProjection/src/org/gvsig/fmap/crs/CRSFactory.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: tags/v2_0_0_Build_2047/libraries/libProjection/src/org/gvsig/fmap/crs/persistence/ProjectionPersistenceFactory.java
===================================================================
--- tags/v2_0_0_Build_2047/libraries/libProjection/src/org/gvsig/fmap/crs/persistence/ProjectionPersistenceFactory.java	(revision 0)
+++ tags/v2_0_0_Build_2047/libraries/libProjection/src/org/gvsig/fmap/crs/persistence/ProjectionPersistenceFactory.java	(revision 38292)
@@ -0,0 +1,85 @@
+/* gvSIG. Geographic Information System of the Valencian Government
+ *
+ * Copyright (C) 2007-2008 Infrastructures and Transports Department
+ * of the Valencian Government (CIT)
+ * 
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ * 
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ * 
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, 
+ * MA  02110-1301, USA.
+ * 
+ */
+
+/*
+ * AUTHORS (In addition to CIT):
+ * 2009 {DiSiD Technologies}  {{Task}}
+ */
+package org.gvsig.fmap.crs.persistence;
+
+import org.cresques.cts.IProjection;
+import org.gvsig.fmap.crs.CRSFactory;
+import org.gvsig.tools.dataTypes.DataTypes;
+import org.gvsig.tools.dynobject.DynStruct;
+import org.gvsig.tools.persistence.AbstractSinglePersistenceFactory;
+import org.gvsig.tools.persistence.PersistenceManager;
+import org.gvsig.tools.persistence.PersistentState;
+import org.gvsig.tools.persistence.exception.PersistenceException;
+
+/**
+ * Factory to persist {@link IProjection} objects. The information about the
+ * {@link IProjection} which will be persisted is its full code, containing all
+ * required information to be able to reconstruct the {@link IProjection} object
+ * through the {@link CRSFactory#getCRS(String)} method.
+ * <p>
+ * <strong>NOTE:</strong>To activate this factory, it must be instanced and
+ * registered in the {@link PersistenceManager}. This will be usually performed
+ * from the project Library.
+ * </p>
+ * 
+ * @author 2009- <a href="cordinyana@gvsig.org">César Ordiñana</a> - gvSIG team
+ * @author 2010- <a href="jjdelcerro@gvsig.org">Joaquin Jose del Cerro</a> -
+ *         gvSIG team
+ */
+public class ProjectionPersistenceFactory extends
+		AbstractSinglePersistenceFactory {
+
+	private static final String FIELD_FULLCODE = "fullcode";
+	private static final String DESCRIPTION_FULLCODE = "Projection abbreviature";
+
+	private static final String DYNCLASS_NAME = "Projection";
+	private static final String DYNCLASS_DESCRIPTION = "Projection";
+
+	/**
+	 * Creates a new {@link ProjectionPersistenceFactory}.
+	 */
+	public ProjectionPersistenceFactory() {
+		super(IProjection.class, DYNCLASS_NAME, DYNCLASS_DESCRIPTION, null,
+				null);
+
+		DynStruct definition = this.getDefinition();
+
+		definition.addDynField(FIELD_FULLCODE).setDescription(
+				DESCRIPTION_FULLCODE).setMandatory(true).setType(
+				DataTypes.STRING);
+	}
+
+	public Object createFromState(PersistentState state)
+			throws PersistenceException {
+		return CRSFactory.getCRS(state.getString(FIELD_FULLCODE));
+	}
+
+	public void saveToState(PersistentState state, Object obj)
+			throws PersistenceException {
+		state.set(FIELD_FULLCODE, ((IProjection) obj).getFullCode());
+	}
+}
\ No newline at end of file
Index: tags/v2_0_0_Build_2047/libraries/libProjection/src/org/gvsig/fmap/crs/persistence/CoordTransPersistenceFactory.java
===================================================================
--- tags/v2_0_0_Build_2047/libraries/libProjection/src/org/gvsig/fmap/crs/persistence/CoordTransPersistenceFactory.java	(revision 0)
+++ tags/v2_0_0_Build_2047/libraries/libProjection/src/org/gvsig/fmap/crs/persistence/CoordTransPersistenceFactory.java	(revision 38292)
@@ -0,0 +1,79 @@
+/* gvSIG. Geographic Information System of the Valencian Government
+ *
+ * Copyright (C) 2007-2008 Infrastructures and Transports Department
+ * of the Valencian Government (CIT)
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
+ * MA  02110-1301, USA.
+ *
+ */
+package org.gvsig.fmap.crs.persistence;
+
+import org.cresques.DataTypes;
+import org.cresques.cts.ICoordTrans;
+import org.cresques.cts.IProjection;
+
+import org.gvsig.tools.dynobject.DynStruct;
+import org.gvsig.tools.persistence.AbstractSinglePersistenceFactory;
+import org.gvsig.tools.persistence.PersistentState;
+import org.gvsig.tools.persistence.exception.PersistenceException;
+
+
+/**
+ * @author gvSIG Team
+ * @version $Id$
+ *
+ */
+public class CoordTransPersistenceFactory extends AbstractSinglePersistenceFactory {
+
+    private static final String FIELD_SOURCE_PROJECTION = "source";
+    private static final String DESCRIPTION_SOURCE_PROJECTION  = "Source projection";
+    
+    private static final String FIELD_DESTINATION_PROJECTION = "destination";
+    private static final String DESCRIPTION_DESTINATION_PROJECTION = "Destination Projection";
+
+    private static final String DYNCLASS_NAME = "CoordTrans";
+    private static final String DYNCLASS_DESCRIPTION = "Coordinates Transformation";
+
+    /**
+     * Creates a new {@link CoordTransPersistenceFactory}.
+     */
+    public CoordTransPersistenceFactory() {
+        super(ICoordTrans.class, DYNCLASS_NAME, DYNCLASS_DESCRIPTION, null, null);
+
+        DynStruct definition = this.getDefinition();
+
+        definition.addDynField(FIELD_SOURCE_PROJECTION).setDescription(
+            DESCRIPTION_SOURCE_PROJECTION).setMandatory(true).setType(
+                DataTypes.CRS);
+        
+        definition.addDynField(FIELD_DESTINATION_PROJECTION).setDescription(
+            DESCRIPTION_DESTINATION_PROJECTION).setMandatory(true).setType(
+                DataTypes.CRS);
+    }
+
+    public Object createFromState(PersistentState state)
+            throws PersistenceException {
+        IProjection sourceProjection = (IProjection)state.get(FIELD_SOURCE_PROJECTION);
+        IProjection destinationProjection = (IProjection)state.get(FIELD_DESTINATION_PROJECTION);      
+        return sourceProjection.getCT(destinationProjection);
+    }
+
+    public void saveToState(PersistentState state, Object obj)
+            throws PersistenceException {
+        state.set(FIELD_SOURCE_PROJECTION, ((ICoordTrans) obj).getPOrig());
+        state.set(FIELD_DESTINATION_PROJECTION, ((ICoordTrans) obj).getPDest());
+    }
+}

Property changes on: tags/v2_0_0_Build_2047/libraries/libProjection/src/org/gvsig/fmap/crs/persistence/CoordTransPersistenceFactory.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: tags/v2_0_0_Build_2047/libraries/libProjection/pom.xml
===================================================================
--- tags/v2_0_0_Build_2047/libraries/libProjection/pom.xml	(revision 0)
+++ tags/v2_0_0_Build_2047/libraries/libProjection/pom.xml	(revision 38292)
@@ -0,0 +1,333 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+    xsi:schemaLocation="http://maven.apache.org/POM/4.0.0
+                      http://maven.apache.org/xsd/maven-4.0.0.xsd">
+    <modelVersion>4.0.0</modelVersion>
+    <artifactId>org.gvsig.projection</artifactId>
+    <packaging>jar</packaging>
+    <version>2.0-SNAPSHOT</version>
+    <name>libProjection</name>
+    <parent>
+        <groupId>org.gvsig</groupId>
+        <artifactId>gvsig-base-library-pom</artifactId>
+        <version>2.0-SNAPSHOT</version>
+    </parent>
+    <properties>
+        <build-dir>${basedir}/../build</build-dir>
+        <eclipse.project.name>libProjection</eclipse.project.name>
+    </properties>
+    <dependencies>
+        <dependency>
+            <groupId>org.gvsig</groupId>
+            <artifactId>org.gvsig.tools.lib</artifactId>
+            <scope>compile</scope>
+        </dependency>
+        <dependency>
+            <groupId>org.gvsig</groupId>
+            <artifactId>org.gvsig.i18n</artifactId>
+            <scope>compile</scope>
+        </dependency>
+        <dependency>
+            <groupId>org.opengis</groupId>
+            <artifactId>geoapi</artifactId>
+            <scope>compile</scope>
+        </dependency>
+        <dependency>
+            <groupId>org.geotools</groupId>
+            <artifactId>gt2-legacy</artifactId>
+            <scope>compile</scope>
+        </dependency>
+        <dependency>
+            <groupId>org.geotools</groupId>
+            <artifactId>gt2-main</artifactId>
+            <scope>compile</scope>
+        </dependency>
+        <dependency>
+            <groupId>org.geotools</groupId>
+            <artifactId>gt2-referencing</artifactId>
+            <scope>compile</scope>
+        </dependency>
+        <dependency>
+            <groupId>geojava</groupId>
+            <artifactId>geojava</artifactId>
+            <scope>compile</scope>
+        </dependency>
+        <dependency>
+            <groupId>javax.media</groupId>
+            <artifactId>jai_core</artifactId>
+            <scope>compile</scope>
+        </dependency>
+        <dependency>
+            <groupId>javax.media</groupId>
+            <artifactId>jai_codec</artifactId>
+        </dependency>
+    </dependencies>
+
+    <build>
+        <sourceDirectory>src</sourceDirectory>
+        <testSourceDirectory>src-test</testSourceDirectory>
+        <plugins>
+            <!-- TODO: MAKE TESTS WORK AND REMOVE THIS OPTION -->
+            <plugin>
+                <groupId>org.apache.maven.plugins</groupId>
+                <artifactId>maven-surefire-plugin</artifactId>
+                <configuration>
+                    <skipTests>true</skipTests>
+                </configuration>
+            </plugin>
+        </plugins>
+    </build>
+
+    <profiles>
+        <profile>
+            <id>se</id>
+            <activation>
+                <activeByDefault>true</activeByDefault>
+            </activation>
+            <build>
+                <resources>
+                    <resource>
+                        <directory>config</directory>
+                    </resource>
+                    <resource>
+                        <directory>images</directory>
+                    </resource>
+                </resources>
+                <plugins>
+                    <plugin>
+                        <groupId>org.apache.maven.plugins</groupId>
+                        <artifactId>maven-jar-plugin</artifactId>
+                        <configuration>
+                            <excludes>
+                                <exclude>**/org/cresques/impl/**</exclude>
+                                <exclude>**/org/cresques/ui/**</exclude>
+                                <exclude>**/org/cresques/resources/**</exclude>
+                                <exclude>*.gif</exclude>
+                            </excludes>
+                        </configuration>
+                        <executions>
+                            <execution>
+                                <id>cresques-ui</id>
+                                <phase>package</phase>
+                                <goals>
+                                    <goal>jar</goal>
+                                </goals>
+                                <configuration>
+                                    <classifier>cresques-ui</classifier>
+                                    <excludes>
+                                        <exclude>NONE</exclude>
+                                    </excludes>
+                                    <includes>
+                                        <include>**/org/cresques/ui/**</include>
+                                        <include>**/org/cresques/resources/**</include>
+                                        <include>*.gif</include>
+                                    </includes>
+                                    <!-- <finalName>org.cresques.ui</finalName> -->
+                                </configuration>
+                            </execution>
+                            <execution>
+                                <id>cresques-cts-impl</id>
+                                <phase>package</phase>
+                                <goals>
+                                    <goal>jar</goal>
+                                </goals>
+                                <configuration>
+                                    <classifier>cresques-impl</classifier>
+                                    <excludes>
+                                        <exclude>**/org/cresques/resources/**</exclude>
+                                        <exclude>*.gif</exclude>
+                                    </excludes>
+                                    <includes>
+                                        <include>**/org/cresques/impl/**</include>
+                                    </includes>
+                                    <!-- <finalName>org.cresques.cts</finalName> -->
+                                </configuration>
+                            </execution>
+                        </executions>
+                    </plugin>
+                    <plugin>
+                        <artifactId>maven-antrun-plugin</artifactId>
+                        <executions>
+                            <execution>
+                                <id>services</id>
+                                <phase>package</phase>
+                                <goals>
+                                    <goal>run</goal>
+                                </goals>
+                                <configuration>
+                                    <tasks>
+                                        <jar
+                                            destfile="${project.build.directory}/${project.build.finalName}.jar"
+                                            update="true">
+                                            <fileset dir="${basedir}/resources/api" />
+                                        </jar>
+                                        <jar
+                                            destfile="${project.build.directory}/${project.build.finalName}-cresques-impl.jar"
+                                            update="true">
+                                            <fileset
+                                                dir="${basedir}/resources/cresques" />
+                                        </jar>
+                                    </tasks>
+                                </configuration>
+                            </execution>
+                        </executions>
+                    </plugin>
+                    <plugin>
+                        <groupId>org.apache.maven.plugins</groupId>
+                        <artifactId>maven-surefire-plugin</artifactId>
+                        <configuration>
+                            <additionalClasspathElements>
+                                <additionalClasspathElement>${basedir}/resources/api</additionalClasspathElement>
+                                <additionalClasspathElement>${basedir}/resources/cresques</additionalClasspathElement>
+                            </additionalClasspathElements>
+                        </configuration>
+                    </plugin>
+                </plugins>
+            </build>
+        </profile>
+
+        <profile>
+            <id>cdc</id>
+            <activation>
+                <activeByDefault>false</activeByDefault>
+            </activation>
+
+            <build>
+                <plugins>
+                    <plugin>
+                        <groupId>org.apache.maven.plugins</groupId>
+                        <artifactId>maven-compiler-plugin</artifactId>
+                        <configuration>
+                            <excludes>
+                                <exclude>**/org/cresques/impl/**</exclude>
+                                <exclude>**/org/cresques/ui/**</exclude>
+                            </excludes>
+                            <testExcludes>
+                                <exclude>**/org/cresques/impl/**</exclude>
+                                <exclude>**/org/cresques/ui/**</exclude>
+                            </testExcludes>
+                        </configuration>
+                    </plugin>
+                    <plugin>
+                        <groupId>org.apache.maven.plugins</groupId>
+                        <artifactId>maven-jar-plugin</artifactId>
+                        <configuration>
+                            <excludes>
+                                <exclude>**/org/cresques/impl/**</exclude>
+                                <exclude>**/org/cresques/ui/**</exclude>
+                            </excludes>
+                        </configuration>
+                    </plugin>
+                    <plugin>
+                        <artifactId>maven-antrun-plugin</artifactId>
+                        <executions>
+                            <execution>
+                                <id>services</id>
+                                <phase>package</phase>
+                                <goals>
+                                    <goal>run</goal>
+                                </goals>
+                                <configuration>
+                                    <tasks>
+                                        <jar
+                                            destfile="${project.build.directory}/${project.build.finalName}.jar"
+                                            update="true">
+                                            <fileset dir="${basedir}/resources/api" />
+                                        </jar>
+                                    </tasks>
+                                </configuration>
+                            </execution>
+                        </executions>
+                    </plugin>
+                    <plugin>
+                        <groupId>org.apache.maven.plugins</groupId>
+                        <artifactId>maven-surefire-plugin</artifactId>
+                        <configuration>
+                            <additionalClasspathElements>
+                                <additionalClasspathElement>${basedir}/resources/api</additionalClasspathElement>
+                            </additionalClasspathElements>
+                        </configuration>
+                    </plugin>
+                </plugins>
+            </build>
+
+        </profile>
+
+        <profile>
+            <id>eclipse-project</id>
+            <build>
+                <defaultGoal>antrun:run</defaultGoal>
+                <plugins>
+                    <plugin>
+                        <artifactId>maven-antrun-plugin</artifactId>
+                        <configuration>
+                            <tasks>
+                                <ant antfile="${build-dir}/ant-tasks/eclipse-tasks.xml"
+                                    target="eclipse.all" />
+                            </tasks>
+                        </configuration>
+                    </plugin>
+                </plugins>
+            </build>
+        </profile>
+    </profiles>
+
+    <reporting>
+        <plugins>
+            <plugin>
+                <groupId>org.apache.maven.plugins</groupId>
+                <artifactId>maven-javadoc-plugin</artifactId>
+                <reportSets>
+                    <reportSet>
+                        <id>api</id>
+                        <configuration>
+                            <excludePackageNames>org.cresques.ui:org.cresques.impl</excludePackageNames>
+                            <name>Javadoc: API</name>
+                            <destDir>apidoc</destDir>
+                            <windowtitle>API Documentation</windowtitle>
+                        </configuration>
+                        <reports>
+                            <report>javadoc</report>
+                        </reports>
+                    </reportSet>
+                    <reportSet>
+                        <id>ui</id>
+                        <configuration>
+                            <doctitle>${project.name} ${project.version} User
+                                interface</doctitle>
+                            <subpackages>org.cresques.ui</subpackages>
+                            <name>Javadoc: UI</name>
+                            <destDir>uidoc</destDir>
+                            <windowtitle>User interface Documentation</windowtitle>
+                            <links>
+                                <link>../apidoc/</link>
+                            </links>
+                        </configuration>
+                        <reports>
+                            <report>javadoc</report>
+                        </reports>
+                    </reportSet>
+                    <reportSet>
+                        <id>cresques-impl</id>
+                        <configuration>
+                            <doctitle>${project.name} ${project.version}
+                                Cresques implementation</doctitle>
+                            <subpackages>org.cresques.impl</subpackages>
+                            <name>Javadoc: Cresques impl</name>
+                            <destDir>cresquesdoc</destDir>
+                            <windowtitle>Cresques implementation Documentation</windowtitle>
+                            <links>
+                                <link>../apidoc/</link>
+                            </links>
+                        </configuration>
+                        <reports>
+                            <report>javadoc</report>
+                        </reports>
+                    </reportSet>
+                </reportSets>
+            </plugin>
+        </plugins>
+    </reporting>
+
+</project>

Property changes on: tags/v2_0_0_Build_2047/libraries/libProjection/pom.xml
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: tags/v2_0_0_Build_2047/libraries/libProjection/resources/api/META-INF/services/org.gvsig.tools.library.Library
===================================================================
--- tags/v2_0_0_Build_2047/libraries/libProjection/resources/api/META-INF/services/org.gvsig.tools.library.Library	(revision 0)
+++ tags/v2_0_0_Build_2047/libraries/libProjection/resources/api/META-INF/services/org.gvsig.tools.library.Library	(revision 38292)
@@ -0,0 +1 @@
+org.cresques.ProjectionLibrary
\ No newline at end of file
Index: tags/v2_0_0_Build_2047/libraries/libProjection/resources/cresques/META-INF/services/org.gvsig.tools.library.Library
===================================================================
--- tags/v2_0_0_Build_2047/libraries/libProjection/resources/cresques/META-INF/services/org.gvsig.tools.library.Library	(revision 0)
+++ tags/v2_0_0_Build_2047/libraries/libProjection/resources/cresques/META-INF/services/org.gvsig.tools.library.Library	(revision 38292)
@@ -0,0 +1 @@
+org.cresques.impl.CresquesCtsLibrary
\ No newline at end of file
Index: tags/v2_0_0_Build_2047/libraries/libProjection/.cvsignore
===================================================================
--- tags/v2_0_0_Build_2047/libraries/libProjection/.cvsignore	(revision 0)
+++ tags/v2_0_0_Build_2047/libraries/libProjection/.cvsignore	(revision 38292)
@@ -0,0 +1,2 @@
+bin
+bin-test

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

Index: tags/v2_0_0_Build_2047/libraries/libProjection/src-test/org/cresques/cts/AllTests.java
===================================================================
--- tags/v2_0_0_Build_2047/libraries/libProjection/src-test/org/cresques/cts/AllTests.java	(revision 0)
+++ tags/v2_0_0_Build_2047/libraries/libProjection/src-test/org/cresques/cts/AllTests.java	(revision 38292)
@@ -0,0 +1,16 @@
+package org.cresques.cts;
+
+import junit.framework.Test;
+import junit.framework.TestSuite;
+
+public class AllTests {
+
+	public static Test suite() {
+		TestSuite suite = new TestSuite("Test for org.cresques.cts");
+		//$JUnit-BEGIN$
+
+		//$JUnit-END$
+		return suite;
+	}
+
+}

Property changes on: tags/v2_0_0_Build_2047/libraries/libProjection/src-test/org/cresques/cts/AllTests.java
___________________________________________________________________
Added: svn:keywords
   + Author Date Id Revision
Added: svn:eol-style
   + native

Index: tags/v2_0_0_Build_2047/libraries/libProjection/config/org/cresques/resources/i18n/text_it.properties
===================================================================
--- tags/v2_0_0_Build_2047/libraries/libProjection/config/org/cresques/resources/i18n/text_it.properties	(revision 0)
+++ tags/v2_0_0_Build_2047/libraries/libProjection/config/org/cresques/resources/i18n/text_it.properties	(revision 38292)
@@ -0,0 +1,15 @@
+#Translations for language [it]
+#Tue Nov 07 12:30:01 CET 2006
+Aceptar=Accetta
+Aplicar=Applica
+Block_Size_=Dimensioni blocco\:
+Cancelar=Cancella
+Compression_=Compressione
+datum=Datum
+Generate_Tfw_=Genera Tfw\:
+Interleave_=Interlacciato\:
+Photometric_=Fotometrica\:
+Progressive_=Progressivo\:
+projection=Proiezione
+reference_system=Sistema di riferimento
+zone=Fuso

Property changes on: tags/v2_0_0_Build_2047/libraries/libProjection/config/org/cresques/resources/i18n/text_it.properties
___________________________________________________________________
Added: svn:eol-style
   + native

Index: tags/v2_0_0_Build_2047/libraries/libProjection/config/org/cresques/resources/i18n/text.properties
===================================================================
--- tags/v2_0_0_Build_2047/libraries/libProjection/config/org/cresques/resources/i18n/text.properties	(revision 0)
+++ tags/v2_0_0_Build_2047/libraries/libProjection/config/org/cresques/resources/i18n/text.properties	(revision 38292)
@@ -0,0 +1,15 @@
+#Translations for language [es]
+#Mon Oct 30 09:38:21 CET 2006
+Aceptar=Aceptar
+Aplicar=Aplicar
+Block_Size_=Tama\u00f1o de bloque\:
+Cancelar=Cancelar
+Compression_=Compresi\u00f3n\:
+datum=Datum
+Generate_Tfw_=Generar Tfw\:
+Interleave_=Entrelazado\:
+Photometric_=Fotom\u00e9trica\:
+Progressive_=Progresivo\:
+projection=Proyecci\u00f3n
+reference_system=Sistema de Referencia
+zone=Huso

Property changes on: tags/v2_0_0_Build_2047/libraries/libProjection/config/org/cresques/resources/i18n/text.properties
___________________________________________________________________
Added: svn:eol-style
   + native

Index: tags/v2_0_0_Build_2047/libraries/libProjection/config/org/cresques/resources/i18n/text_en.properties
===================================================================
--- tags/v2_0_0_Build_2047/libraries/libProjection/config/org/cresques/resources/i18n/text_en.properties	(revision 0)
+++ tags/v2_0_0_Build_2047/libraries/libProjection/config/org/cresques/resources/i18n/text_en.properties	(revision 38292)
@@ -0,0 +1,15 @@
+#Translations for language [en]
+#Mon Oct 30 09:38:21 CET 2006
+Aceptar=Accept
+Aplicar=Apply
+Block_Size_=Block Size\:
+Cancelar=Cancel
+Compression_=Compression\:
+datum=Datum
+Generate_Tfw_=Generate Tfw\:
+Interleave_=Interleave\:
+Photometric_=Photometric\:
+Progressive_=Progressive\:
+projection=Projection
+reference_system=Reference System
+zone=Zone

Property changes on: tags/v2_0_0_Build_2047/libraries/libProjection/config/org/cresques/resources/i18n/text_en.properties
___________________________________________________________________
Added: svn:eol-style
   + native

Index: tags/v2_0_0_Build_2047/libraries/libProjection/config/org/cresques/resources/i18n/text_gl.properties
===================================================================
--- tags/v2_0_0_Build_2047/libraries/libProjection/config/org/cresques/resources/i18n/text_gl.properties	(revision 0)
+++ tags/v2_0_0_Build_2047/libraries/libProjection/config/org/cresques/resources/i18n/text_gl.properties	(revision 38292)
@@ -0,0 +1,15 @@
+#Translations for language [gl]
+#Mon Oct 30 09:38:21 CET 2006
+Aceptar=Aceptar
+Aplicar=Aplicar
+Block_Size_=
+Cancelar=Cancelar
+Compression_=
+datum=
+Generate_Tfw_=
+Interleave_=
+Photometric_=
+Progressive_=
+projection=
+reference_system=
+zone=

Property changes on: tags/v2_0_0_Build_2047/libraries/libProjection/config/org/cresques/resources/i18n/text_gl.properties
___________________________________________________________________
Added: svn:eol-style
   + native

Index: tags/v2_0_0_Build_2047/libraries/libProjection/config/org/cresques/resources/i18n/text_ca.properties
===================================================================
--- tags/v2_0_0_Build_2047/libraries/libProjection/config/org/cresques/resources/i18n/text_ca.properties	(revision 0)
+++ tags/v2_0_0_Build_2047/libraries/libProjection/config/org/cresques/resources/i18n/text_ca.properties	(revision 38292)
@@ -0,0 +1,15 @@
+#Translations for language [ca]
+#Mon Oct 30 09:38:21 CET 2006
+Aceptar=Acceptar
+Aplicar=Aplicar
+Block_Size_=
+Cancelar=Cancel\u00b7lar
+Compression_=
+datum=
+Generate_Tfw_=
+Interleave_=
+Photometric_=
+Progressive_=
+projection=Projecci\u00f3
+reference_system=Sistema de refer\u00e8ncia
+zone=

Property changes on: tags/v2_0_0_Build_2047/libraries/libProjection/config/org/cresques/resources/i18n/text_ca.properties
___________________________________________________________________
Added: svn:eol-style
   + native

Index: tags/v2_0_0_Build_2047/libraries/libProjection/config/org/cresques/resources/i18n/text_pt.properties
===================================================================
--- tags/v2_0_0_Build_2047/libraries/libProjection/config/org/cresques/resources/i18n/text_pt.properties	(revision 0)
+++ tags/v2_0_0_Build_2047/libraries/libProjection/config/org/cresques/resources/i18n/text_pt.properties	(revision 38292)
@@ -0,0 +1,15 @@
+#Translations for language [pt]
+#Mon Oct 30 09:38:21 CET 2006
+Aceptar=Aceitar
+Aplicar=Aplicar
+Block_Size_=
+Cancelar=Cancelar
+Compression_=
+datum=
+Generate_Tfw_=
+Interleave_=
+Photometric_=
+Progressive_=
+projection=
+reference_system=
+zone=

Property changes on: tags/v2_0_0_Build_2047/libraries/libProjection/config/org/cresques/resources/i18n/text_pt.properties
___________________________________________________________________
Added: svn:eol-style
   + native

Index: tags/v2_0_0_Build_2047/libraries/libProjection/config/org/cresques/resources/i18n/text_cs.properties
===================================================================
--- tags/v2_0_0_Build_2047/libraries/libProjection/config/org/cresques/resources/i18n/text_cs.properties	(revision 0)
+++ tags/v2_0_0_Build_2047/libraries/libProjection/config/org/cresques/resources/i18n/text_cs.properties	(revision 38292)
@@ -0,0 +1,15 @@
+#Translations for language [cs]
+#Mon Nov 06 09:04:31 CET 2006
+Aceptar=Budi\u017e
+Aplicar=Pou\u017e\u00edt
+Block_Size_=
+Cancelar=Zru\u0161it
+Compression_=
+datum=Datum
+Generate_Tfw_=
+Interleave_=
+Photometric_=
+Progressive_=
+projection=Projekce
+reference_system=Prostorov\u00fd referen\u010dn\u00ed syst\u00e9m
+zone=Z\u00f3na

Property changes on: tags/v2_0_0_Build_2047/libraries/libProjection/config/org/cresques/resources/i18n/text_cs.properties
___________________________________________________________________
Added: svn:eol-style
   + native

Index: tags/v2_0_0_Build_2047/libraries/libProjection/config/org/cresques/resources/i18n/text_fr.properties
===================================================================
--- tags/v2_0_0_Build_2047/libraries/libProjection/config/org/cresques/resources/i18n/text_fr.properties	(revision 0)
+++ tags/v2_0_0_Build_2047/libraries/libProjection/config/org/cresques/resources/i18n/text_fr.properties	(revision 38292)
@@ -0,0 +1,15 @@
+#Translations for language [fr]
+#Mon Oct 30 09:38:21 CET 2006
+Aceptar=Accepter
+Aplicar=Appliquer
+Block_Size_=
+Cancelar=Annuler
+Compression_=
+datum=
+Generate_Tfw_=
+Interleave_=
+Photometric_=
+Progressive_=
+projection=
+reference_system=
+zone=

Property changes on: tags/v2_0_0_Build_2047/libraries/libProjection/config/org/cresques/resources/i18n/text_fr.properties
___________________________________________________________________
Added: svn:eol-style
   + native

Index: tags/v2_0_0_Build_2047/libraries/libProjection/config/org/cresques/resources/i18n/text_de.properties
===================================================================
--- tags/v2_0_0_Build_2047/libraries/libProjection/config/org/cresques/resources/i18n/text_de.properties	(revision 0)
+++ tags/v2_0_0_Build_2047/libraries/libProjection/config/org/cresques/resources/i18n/text_de.properties	(revision 38292)
@@ -0,0 +1,15 @@
+#Translations for language [de]
+#Mon Oct 30 09:38:21 CET 2006
+Aceptar=OK
+Aplicar=Anwenden
+Block_Size_=
+Cancelar=Abbrechen
+Compression_=
+datum=
+Generate_Tfw_=
+Interleave_=
+Photometric_=
+Progressive_=
+projection=
+reference_system=
+zone=

Property changes on: tags/v2_0_0_Build_2047/libraries/libProjection/config/org/cresques/resources/i18n/text_de.properties
___________________________________________________________________
Added: svn:eol-style
   + native

Index: tags/v2_0_0_Build_2047/libraries/libProjection/config/org/cresques/resources/i18n/text_eu.properties
===================================================================
--- tags/v2_0_0_Build_2047/libraries/libProjection/config/org/cresques/resources/i18n/text_eu.properties	(revision 0)
+++ tags/v2_0_0_Build_2047/libraries/libProjection/config/org/cresques/resources/i18n/text_eu.properties	(revision 38292)
@@ -0,0 +1,15 @@
+#Translations for language [eu]
+#Mon Oct 30 09:38:21 CET 2006
+Aceptar=Ados
+Aplicar=Aplikatu
+Block_Size_=
+Cancelar=Utzi
+Compression_=
+datum=
+Generate_Tfw_=
+Interleave_=
+Photometric_=
+Progressive_=
+projection=
+reference_system=
+zone=

Property changes on: tags/v2_0_0_Build_2047/libraries/libProjection/config/org/cresques/resources/i18n/text_eu.properties
___________________________________________________________________
Added: svn:eol-style
   + native

Index: tags/v2_0_0_Build_2047/libraries/libProjection/images/info_cur.gif
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream

Property changes on: tags/v2_0_0_Build_2047/libraries/libProjection/images/info_cur.gif
___________________________________________________________________
Added: svn:mime-type
   + application/octet-stream

Index: tags/v2_0_0_Build_2047/libraries/libProjection/images/lineal.gif
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream

Property changes on: tags/v2_0_0_Build_2047/libraries/libProjection/images/lineal.gif
___________________________________________________________________
Added: svn:mime-type
   + application/octet-stream

Index: tags/v2_0_0_Build_2047/libraries/libProjection/images/fileXPecw.gif
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream

Property changes on: tags/v2_0_0_Build_2047/libraries/libProjection/images/fileXPecw.gif
___________________________________________________________________
Added: svn:mime-type
   + application/octet-stream

Index: tags/v2_0_0_Build_2047/libraries/libProjection/images/fileXP.gif
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream

Property changes on: tags/v2_0_0_Build_2047/libraries/libProjection/images/fileXP.gif
___________________________________________________________________
Added: svn:mime-type
   + application/octet-stream

Index: tags/v2_0_0_Build_2047/libraries/libProjection/images/fileXPgml.gif
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream

Property changes on: tags/v2_0_0_Build_2047/libraries/libProjection/images/fileXPgml.gif
___________________________________________________________________
Added: svn:mime-type
   + application/octet-stream

Index: tags/v2_0_0_Build_2047/libraries/libProjection/images/pan_cur.gif
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream

Property changes on: tags/v2_0_0_Build_2047/libraries/libProjection/images/pan_cur.gif
___________________________________________________________________
Added: svn:mime-type
   + application/octet-stream

Index: tags/v2_0_0_Build_2047/libraries/libProjection/images/select_cur.gif
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream

Property changes on: tags/v2_0_0_Build_2047/libraries/libProjection/images/select_cur.gif
___________________________________________________________________
Added: svn:mime-type
   + application/octet-stream

Index: tags/v2_0_0_Build_2047/libraries/libProjection/images/fileXPdxf.gif
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream

Property changes on: tags/v2_0_0_Build_2047/libraries/libProjection/images/fileXPdxf.gif
___________________________________________________________________
Added: svn:mime-type
   + application/octet-stream

Index: tags/v2_0_0_Build_2047/libraries/libProjection/images/fileXPtif.gif
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream

Property changes on: tags/v2_0_0_Build_2047/libraries/libProjection/images/fileXPtif.gif
___________________________________________________________________
Added: svn:mime-type
   + application/octet-stream

Index: tags/v2_0_0_Build_2047/libraries/libProjection/images/folder.gif
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream

Property changes on: tags/v2_0_0_Build_2047/libraries/libProjection/images/folder.gif
___________________________________________________________________
Added: svn:mime-type
   + application/octet-stream

Index: tags/v2_0_0_Build_2047/libraries/libProjection/images/zi_cur.gif
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream

Property changes on: tags/v2_0_0_Build_2047/libraries/libProjection/images/zi_cur.gif
___________________________________________________________________
Added: svn:mime-type
   + application/octet-stream

Index: tags/v2_0_0_Build_2047/libraries/libProjection/images/notAvailable.gif
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream

Property changes on: tags/v2_0_0_Build_2047/libraries/libProjection/images/notAvailable.gif
___________________________________________________________________
Added: svn:mime-type
   + application/octet-stream

Index: tags/v2_0_0_Build_2047/libraries/libProjection/images/zo_cur.gif
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream

Property changes on: tags/v2_0_0_Build_2047/libraries/libProjection/images/zo_cur.gif
___________________________________________________________________
Added: svn:mime-type
   + application/octet-stream

Index: tags/v2_0_0_Build_2047/libraries/libProjection/images/folderXP.gif
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream

Property changes on: tags/v2_0_0_Build_2047/libraries/libProjection/images/folderXP.gif
___________________________________________________________________
Added: svn:mime-type
   + application/octet-stream


Property changes on: tags/v2_0_0_Build_2047/libraries/libProjection
___________________________________________________________________
Added: svn:ignore
   + .classpath 
.project 
.settings 
maven-eclipse.xml
target
bin
hs_err_pid*
.externalToolBuilders
.settings
.classpath
.project


