Index: trunk/org.gvsig.desktop/org.gvsig.desktop.compat.cdc/org.gvsig.fmap.dal/org.gvsig.fmap.dal.file/org.gvsig.fmap.dal.file.csv/src/main/java/org/gvsig/fmap/dal/store/csv/CSVStoreProvider.java
===================================================================
--- trunk/org.gvsig.desktop/org.gvsig.desktop.compat.cdc/org.gvsig.fmap.dal/org.gvsig.fmap.dal.file/org.gvsig.fmap.dal.file.csv/src/main/java/org/gvsig/fmap/dal/store/csv/CSVStoreProvider.java	(revision 43509)
+++ trunk/org.gvsig.desktop/org.gvsig.desktop.compat.cdc/org.gvsig.fmap.dal/org.gvsig.fmap.dal.file/org.gvsig.fmap.dal.file.csv/src/main/java/org/gvsig/fmap/dal/store/csv/CSVStoreProvider.java	(revision 43510)
@@ -622,9 +622,9 @@
                         if (this.type == DataTypes.GEOMETRY) {
                             String s = ss[2].trim();
                             if (s.equalsIgnoreCase("line") || s.equalsIgnoreCase("linestring") || s.equalsIgnoreCase("curve")) {
-                                this.geometryType = Geometry.TYPES.CURVE;
+                                this.geometryType = Geometry.TYPES.LINE;
                             } else if (s.equalsIgnoreCase("multiline") || s.equalsIgnoreCase("multilinestring") || s.equalsIgnoreCase("multicurve")) {
-                                this.geometryType = Geometry.TYPES.MULTICURVE;
+                                this.geometryType = Geometry.TYPES.MULTILINE;
                             } else if (s.equalsIgnoreCase("point")) {
                                 this.geometryType = Geometry.TYPES.POINT;
                             } else if (s.equalsIgnoreCase("multipoint")) {
@@ -632,7 +632,7 @@
                             } else if (s.equalsIgnoreCase("polygon") || s.equalsIgnoreCase("surface")) {
                                 this.geometryType = Geometry.TYPES.POLYGON;
                             } else if (s.equalsIgnoreCase("multipolygon") || s.equalsIgnoreCase("multisurface")) {
-                                this.geometryType = Geometry.TYPES.MULTISURFACE;
+                                this.geometryType = Geometry.TYPES.MULTIPOLYGON;
                             }
                             this.size = 1;
                         } else {
Index: trunk/org.gvsig.desktop/org.gvsig.desktop.compat.cdc/org.gvsig.fmap.mapcontext/pom.xml
===================================================================
--- trunk/org.gvsig.desktop/org.gvsig.desktop.compat.cdc/org.gvsig.fmap.mapcontext/pom.xml	(revision 43509)
+++ trunk/org.gvsig.desktop/org.gvsig.desktop.compat.cdc/org.gvsig.fmap.mapcontext/pom.xml	(revision 43510)
@@ -14,7 +14,9 @@
   <modules>
       <module>org.gvsig.fmap.mapcontext.api</module>
       <module>org.gvsig.fmap.mapcontext.impl</module>
+      <!--
       <module>org.gvsig.fmap.mapcontext.operation</module>
+      -->
   </modules>
 
   <description>This project contains the core of the map drawer of gvSIG.</description>
Index: trunk/org.gvsig.desktop/org.gvsig.desktop.plugin/org.gvsig.app/org.gvsig.app.mainplugin/src/main/java/org/gvsig/app/extension/clipboard/PasteFeaturesFromClipboardExtension.java
===================================================================
--- trunk/org.gvsig.desktop/org.gvsig.desktop.plugin/org.gvsig.app/org.gvsig.app.mainplugin/src/main/java/org/gvsig/app/extension/clipboard/PasteFeaturesFromClipboardExtension.java	(revision 43509)
+++ trunk/org.gvsig.desktop/org.gvsig.desktop.plugin/org.gvsig.app/org.gvsig.app.mainplugin/src/main/java/org/gvsig/app/extension/clipboard/PasteFeaturesFromClipboardExtension.java	(revision 43510)
@@ -259,16 +259,17 @@
 
 	private boolean simpleTypeOf(GeometryType simplet, GeometryType multit) {
 
-		return (multit.getType() == Geometry.TYPES.MULTISURFACE
-				&& simplet.isTypeOf(Geometry.TYPES.SURFACE))
-				||
-				(multit.getType() == Geometry.TYPES.MULTICURVE
-				&& simplet.isTypeOf(Geometry.TYPES.CURVE))
-				||
-				(multit.getType() == Geometry.TYPES.MULTIPOINT
-				&& simplet.getType() == Geometry.TYPES.POINT);
+        return (multit.isTypeOf(Geometry.TYPES.MULTISURFACE) && 
+                simplet.isTypeOf(Geometry.TYPES.SURFACE))
+               ||
+               (multit.isTypeOf(Geometry.TYPES.MULTICURVE) && 
+                simplet.isTypeOf(Geometry.TYPES.CURVE))
+               ||
+               (multit.isTypeOf(Geometry.TYPES.MULTIPOINT) && 
+                simplet.isTypeOf(Geometry.TYPES.POINT));
 	}
 
+    @Override
 	public boolean isEnabled() {
 
 		/*
Index: trunk/org.gvsig.desktop/org.gvsig.desktop.plugin/org.gvsig.app/org.gvsig.app.mainplugin/pom.xml
===================================================================
--- trunk/org.gvsig.desktop/org.gvsig.desktop.plugin/org.gvsig.app/org.gvsig.app.mainplugin/pom.xml	(revision 43509)
+++ trunk/org.gvsig.desktop/org.gvsig.desktop.plugin/org.gvsig.app/org.gvsig.app.mainplugin/pom.xml	(revision 43510)
@@ -265,11 +265,11 @@
           <artifactId>org.gvsig.fmap.mapcontext.impl</artifactId>
           <scope>runtime</scope>
       </dependency>
-      <dependency>
+<!--      <dependency>
           <groupId>org.gvsig</groupId>
           <artifactId>org.gvsig.fmap.mapcontext.operation</artifactId>
           <scope>runtime</scope>
-      </dependency>
+      </dependency>-->
       <dependency>
           <groupId>org.gvsig</groupId>
           <artifactId>org.gvsig.metadata.lib.basic.impl</artifactId>
Index: trunk/org.gvsig.desktop/org.gvsig.desktop.plugin/org.gvsig.selectiontools.app/org.gvsig.selectiontools.app.mainplugin/src/main/java/org/gvsig/selectiontools/app/extension/tools/buffer/process/BufferSelectionProcess.java
===================================================================
--- trunk/org.gvsig.desktop/org.gvsig.desktop.plugin/org.gvsig.selectiontools.app/org.gvsig.selectiontools.app.mainplugin/src/main/java/org/gvsig/selectiontools/app/extension/tools/buffer/process/BufferSelectionProcess.java	(revision 43509)
+++ trunk/org.gvsig.desktop/org.gvsig.desktop.plugin/org.gvsig.selectiontools.app/org.gvsig.selectiontools.app.mainplugin/src/main/java/org/gvsig/selectiontools/app/extension/tools/buffer/process/BufferSelectionProcess.java	(revision 43510)
@@ -23,28 +23,6 @@
  */
 package org.gvsig.selectiontools.app.extension.tools.buffer.process;
 
-/* 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.
- * 
- */
-
 import java.awt.event.MouseAdapter;
 import java.awt.event.MouseEvent;
 import java.util.ArrayList;
@@ -58,14 +36,13 @@
 import org.gvsig.andami.messages.NotificationManager;
 import org.gvsig.andami.ui.mdiManager.IWindow;
 import org.gvsig.app.project.documents.view.gui.IView;
-import org.gvsig.fmap.dal.DataSet;
 import org.gvsig.fmap.dal.feature.Feature;
 import org.gvsig.fmap.dal.feature.FeatureSelection;
 import org.gvsig.fmap.dal.feature.FeatureSet;
 import org.gvsig.fmap.dal.feature.FeatureStore;
 import org.gvsig.fmap.geom.Geometry;
-import org.gvsig.fmap.geom.GeometryException;
-import org.gvsig.fmap.geom.operation.GeometryOperationException;
+import org.gvsig.fmap.geom.GeometryLocator;
+import org.gvsig.fmap.geom.GeometryManager;
 import org.gvsig.fmap.mapcontext.MapContext;
 import org.gvsig.fmap.mapcontext.layers.vectorial.FLyrVect;
 import org.gvsig.fmap.mapcontrol.MapControl;
@@ -75,11 +52,6 @@
 import org.gvsig.selectiontools.app.extension.tools.buffer.gui.BufferConfigurationPanel;
 import org.gvsig.tools.dispose.DisposableIterator;
 
-/**
- * 
- * 
- * @author Pablo Piqueras Bartolom� (pablo.piqueras@iver.es)
- */
 public class BufferSelectionProcess extends IncrementableProcess {
 
     // private boolean layerWasBeingEdited = false;
@@ -313,23 +285,25 @@
                         + " \""
                         + layer.getName() + "\"");
 
-                    switch (layer.getShapeType()) {
-                    case Geometry.TYPES.POINT:
+                    GeometryManager geomManager = GeometryLocator.getGeometryManager();
+                    if( geomManager.isSubtype(Geometry.TYPES.POINT, layer.getShapeType()) ) {
                         side = point_side;
-                        break;
-                    case Geometry.TYPES.CURVE:
-                    case Geometry.TYPES.MULTICURVE:
+                        
+                    } else if( geomManager.isSubtype(Geometry.TYPES.CURVE, layer.getShapeType()) ) {
                         side = line_side;
-                        break;
-                    case Geometry.TYPES.SURFACE:
-                    case Geometry.TYPES.MULTISURFACE:
+                        
+                    } else if( geomManager.isSubtype(Geometry.TYPES.SURFACE, layer.getShapeType()) ) {
                         side = pol_side;
-                        break;
-                    case Geometry.TYPES.MULTIPOINT:
+
+                    } else if( geomManager.isSubtype(Geometry.TYPES.MULTIPOINT, layer.getShapeType()) ) {
                         side = multi_point_side;
-                        break;
-                    default: // UNDEFINED
-                        // UNSUPPORTED
+                        
+                    } else if( geomManager.isSubtype(Geometry.TYPES.MULTICURVE, layer.getShapeType()) ) {
+                        side = line_side;
+                        
+                    } else if( geomManager.isSubtype(Geometry.TYPES.MULTISURFACE, layer.getShapeType()) ) {
+                        side = pol_side;
+                    } else {
                         log.addLine(PluginServices.getText(null,
                             "Layer_with_unsupported_geometries_type"));
                         percentage += inc;
Index: trunk/org.gvsig.desktop/org.gvsig.desktop.plugin/org.gvsig.labeling.app/org.gvsig.labeling.app.mainplugin/src/main/java/org/gvsig/labeling/placements/MultiShapePlacement.java
===================================================================
--- trunk/org.gvsig.desktop/org.gvsig.desktop.plugin/org.gvsig.labeling.app/org.gvsig.labeling.app.mainplugin/src/main/java/org/gvsig/labeling/placements/MultiShapePlacement.java	(revision 43509)
+++ trunk/org.gvsig.desktop/org.gvsig.desktop.plugin/org.gvsig.labeling.app/org.gvsig.labeling.app.mainplugin/src/main/java/org/gvsig/labeling/placements/MultiShapePlacement.java	(revision 43510)
@@ -1,10 +1,11 @@
-/* gvSIG. Sistema de Informaci�n Geogr�fica de la Generalitat Valenciana
+/**
+ * gvSIG. Desktop Geographic Information System.
  *
- * Copyright (C) 2005 IVER T.I. and Generalitat Valenciana.
+ * Copyright (C) 2007-2013 gvSIG Association.
  *
  * This program is free software; you can redistribute it and/or
  * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
+ * as published by the Free Software Foundation; either version 3
  * of the License, or (at your option) any later version.
  *
  * This program is distributed in the hope that it will be useful,
@@ -14,29 +15,11 @@
  *
  * 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.
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
+ * MA  02110-1301, 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
+ * For any additional information, do not hesitate to contact us
+ * at info AT gvsig.com, or visit our website www.gvsig.com.
  */
 package org.gvsig.labeling.placements;
 
@@ -51,18 +34,10 @@
 import org.gvsig.symbology.fmap.mapcontext.rendering.legend.styling.LabelLocationMetrics;
 import org.gvsig.tools.task.Cancellable;
 
-/**
- *
- * MultiShapePlacementConstraints.java
- *
- *
- * @author jaume dominguez faus - jaume.dominguez@iver.es Apr 1, 2008
- *
- */
 public class MultiShapePlacement implements ILabelPlacement {
-	private ILabelPlacement pointPlacement;
-	private ILabelPlacement linePlacement;
-	private ILabelPlacement polygonPlacement;
+	private final ILabelPlacement pointPlacement;
+	private final ILabelPlacement linePlacement;
+	private final ILabelPlacement polygonPlacement;
 
 
 	/**
@@ -85,6 +60,7 @@
 	}
 
 
+    @Override
 	public ArrayList<LabelLocationMetrics> guess(
 			ILabelClass lc,
 			Geometry geom,
@@ -116,6 +92,7 @@
 		return CannotPlaceLabel.NO_PLACES;
 	}
 
+    @Override
 	public boolean isSuitableFor(
 			IPlacementConstraints placementConstraints,
 			int shapeType) {
Index: trunk/org.gvsig.desktop/org.gvsig.desktop.plugin/org.gvsig.labeling.app/org.gvsig.labeling.app.mainplugin/src/main/java/org/gvsig/labeling/placements/AbstractLinePlacement.java
===================================================================
--- trunk/org.gvsig.desktop/org.gvsig.desktop.plugin/org.gvsig.labeling.app/org.gvsig.labeling.app.mainplugin/src/main/java/org/gvsig/labeling/placements/AbstractLinePlacement.java	(revision 43509)
+++ trunk/org.gvsig.desktop/org.gvsig.desktop.plugin/org.gvsig.labeling.app/org.gvsig.labeling.app.mainplugin/src/main/java/org/gvsig/labeling/placements/AbstractLinePlacement.java	(revision 43510)
@@ -1,10 +1,11 @@
-/* gvSIG. Sistema de Informaci�n Geogr�fica de la Generalitat Valenciana
+/**
+ * gvSIG. Desktop Geographic Information System.
  *
- * Copyright (C) 2005 IVER T.I. and Generalitat Valenciana.
+ * Copyright (C) 2007-2013 gvSIG Association.
  *
  * This program is free software; you can redistribute it and/or
  * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
+ * as published by the Free Software Foundation; either version 3
  * of the License, or (at your option) any later version.
  *
  * This program is distributed in the hope that it will be useful,
@@ -14,29 +15,11 @@
  *
  * 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.
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
+ * MA  02110-1301, 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
+ * For any additional information, do not hesitate to contact us
+ * at info AT gvsig.com, or visit our website www.gvsig.com.
  */
 package org.gvsig.labeling.placements;
 
@@ -52,22 +35,15 @@
 import org.gvsig.symbology.fmap.mapcontext.rendering.legend.styling.LabelLocationMetrics;
 import org.gvsig.tools.task.Cancellable;
 
-/**
- *
- * AbstractLinePlacement.java
- *
- *
- * @author jaume dominguez faus - jaume.dominguez@iver.es Dec 17, 2007
- *
- */
 public abstract class AbstractLinePlacement implements ILabelPlacement {
 	public static final double PI = Math.PI;
 	public static final double HALF_PI = PI * 0.5;
-	private ArrayList<LabelLocationMetrics> guessed =
-			new ArrayList<LabelLocationMetrics>();
+	private final ArrayList<LabelLocationMetrics> guessed =
+			new ArrayList<>();
 	private static final double TOLERANCE = 1E-2;
 
 
+    @Override
 	public ArrayList<LabelLocationMetrics> guess(ILabelClass lc, Geometry geom,
 			IPlacementConstraints pc, double cartographicSymbolSize,
 			Cancellable cancel, ViewPort vp) {
@@ -81,7 +57,9 @@
 
 		LabelLocationMetrics initial = initialLocation(lc, pc, pathLen, cancel);
 
-		if (cancel.isCanceled()) return CannotPlaceLabel.NO_PLACES;
+		if (cancel.isCanceled()) {
+            return CannotPlaceLabel.NO_PLACES;
+        }
 
 		double theta = initial.getRotation();
 
Index: trunk/org.gvsig.desktop/org.gvsig.desktop.plugin/org.gvsig.labeling.app/org.gvsig.labeling.app.mainplugin/src/main/java/org/gvsig/labeling/placements/PolygonPlacementOnCentroid.java
===================================================================
--- trunk/org.gvsig.desktop/org.gvsig.desktop.plugin/org.gvsig.labeling.app/org.gvsig.labeling.app.mainplugin/src/main/java/org/gvsig/labeling/placements/PolygonPlacementOnCentroid.java	(revision 43509)
+++ trunk/org.gvsig.desktop/org.gvsig.desktop.plugin/org.gvsig.labeling.app/org.gvsig.labeling.app.mainplugin/src/main/java/org/gvsig/labeling/placements/PolygonPlacementOnCentroid.java	(revision 43510)
@@ -1,10 +1,11 @@
-/* gvSIG. Sistema de Informaci�n Geogr�fica de la Generalitat Valenciana
+/**
+ * gvSIG. Desktop Geographic Information System.
  *
- * Copyright (C) 2005 IVER T.I. and Generalitat Valenciana.
+ * Copyright (C) 2007-2013 gvSIG Association.
  *
  * This program is free software; you can redistribute it and/or
  * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
+ * as published by the Free Software Foundation; either version 3
  * of the License, or (at your option) any later version.
  *
  * This program is distributed in the hope that it will be useful,
@@ -14,29 +15,11 @@
  *
  * 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.
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
+ * MA  02110-1301, 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
+ * For any additional information, do not hesitate to contact us
+ * at info AT gvsig.com, or visit our website www.gvsig.com.
  */
 package org.gvsig.labeling.placements;
 
@@ -45,11 +28,10 @@
 import java.util.ArrayList;
 
 import org.gvsig.fmap.geom.Geometry;
-import org.gvsig.fmap.geom.Geometry.SUBTYPES;
 import org.gvsig.fmap.geom.Geometry.TYPES;
 import org.gvsig.fmap.geom.GeometryLocator;
+import org.gvsig.fmap.geom.GeometryManager;
 import org.gvsig.fmap.geom.primitive.Point;
-import org.gvsig.fmap.geom.type.GeometryType;
 import org.gvsig.fmap.mapcontext.ViewPort;
 import org.gvsig.fmap.mapcontext.rendering.legend.styling.ILabelClass;
 import org.gvsig.fmap.mapcontext.rendering.legend.styling.IPlacementConstraints;
@@ -58,33 +40,27 @@
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
-/**
- *
- * PolygonPlacementOnCentroid.java
- *
- *
- * @author jaume dominguez faus - jaume.dominguez@iver.es Apr 1, 2008
- *
- */
-//public class PolygonPlacementOnCentroid extends MarkerCenteredAtPoint implements ILabelPlacement {
 public class PolygonPlacementOnCentroid extends MarkerPlacementOnPoint
 implements ILabelPlacement {
 	
 	private static final Logger logger = LoggerFactory.getLogger(
 			PolygonPlacementOnCentroid.class);
 
+    @Override
 	public ArrayList<LabelLocationMetrics> guess(
 			ILabelClass lc, Geometry geom,
 			IPlacementConstraints placementConstraints,
 			double cartographicSymbolSize, Cancellable cancel, ViewPort vp) {
 
-		if (cancel.isCanceled()) return CannotPlaceLabel.NO_PLACES;
+		if (cancel.isCanceled()) {
+            return CannotPlaceLabel.NO_PLACES;
+        }
 
 		Point cen = null;
 		try {
 			cen = geom.centroid();
 		} catch (Exception e) {
-			logger.error("While getting centroid.", e);
+			logger.warn("Can't get centroid of geometry.", e);
 		}
 		return super.guess(
 				lc,
@@ -93,12 +69,15 @@
 				cartographicSymbolSize, cancel,vp);
 	}
 
+    @Override
 	public ArrayList<LabelLocationMetrics> guess(
 			ILabelClass lc, Geometry geom,
 			IPlacementConstraints placementConstraints,
 			double cartographicSymbolSize, Cancellable cancel) {
 
-		if (cancel.isCanceled()) return CannotPlaceLabel.NO_PLACES;
+		if (cancel.isCanceled()) {
+            return CannotPlaceLabel.NO_PLACES;
+        }
 
 		ArrayList<LabelLocationMetrics> guessed =
 				new ArrayList<LabelLocationMetrics>();
@@ -107,7 +86,7 @@
 		try {
 			cen = geom.centroid();
 		} catch (Exception e) {
-			logger.error("While getting centroid.", e);
+			logger.warn("While getting centroid.", e);
 		}
 		Point2D p = new Point2D.Double(cen.getX(), cen.getY());
 		Rectangle2D bounds = lc.getBounds();
@@ -118,21 +97,16 @@
 		return guessed;
 	}
 
+    @Override
 	public boolean isSuitableFor(
 			IPlacementConstraints placementConstraints,
 			int shapeType) {
 		
-		GeometryType gt = null;
-		try {
-			gt = GeometryLocator.getGeometryManager().getGeometryType(
-					shapeType, SUBTYPES.GEOM2D);
-		} catch (Exception e) {
-			logger.error("While getting geo type.", e);
-		}
-		
-		if (gt.isTypeOf(TYPES.SURFACE) || shapeType == TYPES.MULTISURFACE) {
-			return (placementConstraints.isHorizontal()
-					&&
+        GeometryManager geomManager = GeometryLocator.getGeometryManager();
+        if( geomManager.isSubtype(TYPES.SURFACE, shapeType) ||
+            geomManager.isSubtype(TYPES.MULTISURFACE, shapeType) ) {
+			return placementConstraints != null && 
+                    (placementConstraints.isHorizontal() &&
 					!placementConstraints.isFitInsidePolygon());
 		}
 		return false;
Index: trunk/org.gvsig.desktop/org.gvsig.desktop.plugin/org.gvsig.labeling.app/org.gvsig.labeling.app.mainplugin/src/main/java/org/gvsig/labeling/placements/PolygonPlacementInside.java
===================================================================
--- trunk/org.gvsig.desktop/org.gvsig.desktop.plugin/org.gvsig.labeling.app/org.gvsig.labeling.app.mainplugin/src/main/java/org/gvsig/labeling/placements/PolygonPlacementInside.java	(revision 43509)
+++ trunk/org.gvsig.desktop/org.gvsig.desktop.plugin/org.gvsig.labeling.app/org.gvsig.labeling.app.mainplugin/src/main/java/org/gvsig/labeling/placements/PolygonPlacementInside.java	(revision 43510)
@@ -1,10 +1,11 @@
-/* gvSIG. Sistema de Informaci�n Geogr�fica de la Generalitat Valenciana
+/**
+ * gvSIG. Desktop Geographic Information System.
  *
- * Copyright (C) 2005 IVER T.I. and Generalitat Valenciana.
+ * Copyright (C) 2007-2013 gvSIG Association.
  *
  * This program is free software; you can redistribute it and/or
  * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
+ * as published by the Free Software Foundation; either version 3
  * of the License, or (at your option) any later version.
  *
  * This program is distributed in the hope that it will be useful,
@@ -14,29 +15,11 @@
  *
  * 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.
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
+ * MA  02110-1301, 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
+ * For any additional information, do not hesitate to contact us
+ * at info AT gvsig.com, or visit our website www.gvsig.com.
  */
 package org.gvsig.labeling.placements;
 
@@ -45,11 +28,10 @@
 import java.util.ArrayList;
 
 import org.gvsig.fmap.geom.Geometry;
-import org.gvsig.fmap.geom.Geometry.SUBTYPES;
 import org.gvsig.fmap.geom.Geometry.TYPES;
 import org.gvsig.fmap.geom.GeometryLocator;
+import org.gvsig.fmap.geom.GeometryManager;
 import org.gvsig.fmap.geom.primitive.Point;
-import org.gvsig.fmap.geom.type.GeometryType;
 import org.gvsig.fmap.mapcontext.ViewPort;
 import org.gvsig.fmap.mapcontext.rendering.legend.styling.ILabelClass;
 import org.gvsig.fmap.mapcontext.rendering.legend.styling.IPlacementConstraints;
@@ -58,25 +40,20 @@
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
-/**
- *
- * PolygonPlacementInside.java
- *
- *
- * @author
- *
- */
 public class PolygonPlacementInside extends MarkerPlacementOnPoint implements ILabelPlacement {
 
 	private static final Logger logger =
 			LoggerFactory.getLogger(PolygonPlacementInside.class);
 	
+    @Override
 	public ArrayList<LabelLocationMetrics> guess(
 			ILabelClass lc, Geometry geom,
 			IPlacementConstraints placementConstraints,
 			double cartographicSymbolSize, Cancellable cancel, ViewPort vp) {
 
-		if (cancel.isCanceled()) return CannotPlaceLabel.NO_PLACES;
+		if (cancel.isCanceled()) {
+            return CannotPlaceLabel.NO_PLACES;
+        }
 
 		Point int_po = null;
 		
@@ -96,6 +73,7 @@
 				placementConstraints, cartographicSymbolSize, cancel,vp);
 	}
 
+    @Override
 	public ArrayList<LabelLocationMetrics> guess(
 			ILabelClass lc, Geometry geom,
 			IPlacementConstraints placementConstraints,
@@ -119,19 +97,15 @@
 		return guessed;
 	}
 
+    @Override
 	public boolean isSuitableFor(IPlacementConstraints placementConstraints,
 			int shapeType) {
 		
-		GeometryType gt = null;
-		try {
-			gt = GeometryLocator.getGeometryManager().getGeometryType(
-					shapeType, SUBTYPES.GEOM2D);
-		} catch (Exception e) {
-			logger.error("While getting geo type.", e);
-		}
-		
-		if (gt.isTypeOf(TYPES.SURFACE) || shapeType == TYPES.MULTISURFACE) {
-			return (placementConstraints.isFitInsidePolygon() && !placementConstraints.isParallel());
+        GeometryManager geomManager = GeometryLocator.getGeometryManager();
+        if( geomManager.isSubtype(TYPES.SURFACE, shapeType) ||
+            geomManager.isSubtype(TYPES.MULTISURFACE, shapeType) ) {
+            return placementConstraints != null && 
+                (placementConstraints.isFitInsidePolygon() && !placementConstraints.isParallel());
 		} else {
 			return false;
 		}
Index: trunk/org.gvsig.desktop/org.gvsig.desktop.plugin/org.gvsig.labeling.app/org.gvsig.labeling.app.mainplugin/src/main/java/org/gvsig/labeling/placements/CompoundLabelPlacement.java
===================================================================
--- trunk/org.gvsig.desktop/org.gvsig.desktop.plugin/org.gvsig.labeling.app/org.gvsig.labeling.app.mainplugin/src/main/java/org/gvsig/labeling/placements/CompoundLabelPlacement.java	(revision 43509)
+++ trunk/org.gvsig.desktop/org.gvsig.desktop.plugin/org.gvsig.labeling.app/org.gvsig.labeling.app.mainplugin/src/main/java/org/gvsig/labeling/placements/CompoundLabelPlacement.java	(revision 43510)
@@ -1,10 +1,11 @@
-/* gvSIG. Sistema de Informaci�n Geogr�fica de la Generalitat Valenciana
+/**
+ * gvSIG. Desktop Geographic Information System.
  *
- * Copyright (C) 2005 IVER T.I. and Generalitat Valenciana.
+ * Copyright (C) 2007-2013 gvSIG Association.
  *
  * This program is free software; you can redistribute it and/or
  * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
+ * as published by the Free Software Foundation; either version 3
  * of the License, or (at your option) any later version.
  *
  * This program is distributed in the hope that it will be useful,
@@ -14,29 +15,11 @@
  *
  * 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.
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
+ * MA  02110-1301, 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
+ * For any additional information, do not hesitate to contact us
+ * at info AT gvsig.com, or visit our website www.gvsig.com.
  */
 package org.gvsig.labeling.placements;
 
@@ -49,27 +32,21 @@
 import org.gvsig.symbology.fmap.mapcontext.rendering.legend.styling.LabelLocationMetrics;
 import org.gvsig.tools.task.Cancellable;
 
-/**
- *
- * CompoundLabelPlacement.java
- *
- *
- * @author jaume dominguez faus - jaume.dominguez@iver.es Dec 17, 2007
- *
- */
 public class CompoundLabelPlacement implements ILabelPlacement {
-	private ILabelPlacement[] placements;
+	private final ILabelPlacement[] placements;
 
 	public CompoundLabelPlacement(ILabelPlacement[] suitablePlacements) {
 		this.placements = suitablePlacements;
 	}
 
+    @Override
 	public boolean isSuitableFor(IPlacementConstraints placementConstraints,
 			int shapeType) {
 		return true;
 	}
 
 
+    @Override
 	public ArrayList<LabelLocationMetrics> guess(
 			ILabelClass lc,
 			Geometry geom,
@@ -78,7 +55,7 @@
 			Cancellable cancel,
 			ViewPort vp) {
 		
-		ArrayList<LabelLocationMetrics> guessed = new ArrayList<LabelLocationMetrics>();
+		ArrayList<LabelLocationMetrics> guessed = new ArrayList<>();
 		for (int i = 0; cancel != null && !cancel.isCanceled() && i < placements.length; i++) {
 			guessed.addAll(placements[i].guess(lc, geom, constraints, cartographicSymbolSize, cancel,vp));
 		}
Index: trunk/org.gvsig.desktop/org.gvsig.desktop.plugin/org.gvsig.labeling.app/org.gvsig.labeling.app.mainplugin/src/main/java/org/gvsig/labeling/placements/ILabelPlacement.java
===================================================================
--- trunk/org.gvsig.desktop/org.gvsig.desktop.plugin/org.gvsig.labeling.app/org.gvsig.labeling.app.mainplugin/src/main/java/org/gvsig/labeling/placements/ILabelPlacement.java	(revision 43509)
+++ trunk/org.gvsig.desktop/org.gvsig.desktop.plugin/org.gvsig.labeling.app/org.gvsig.labeling.app.mainplugin/src/main/java/org/gvsig/labeling/placements/ILabelPlacement.java	(revision 43510)
@@ -1,10 +1,11 @@
-/* gvSIG. Sistema de Informaci�n Geogr�fica de la Generalitat Valenciana
+/**
+ * gvSIG. Desktop Geographic Information System.
  *
- * Copyright (C) 2005 IVER T.I. and Generalitat Valenciana.
+ * Copyright (C) 2007-2013 gvSIG Association.
  *
  * This program is free software; you can redistribute it and/or
  * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
+ * as published by the Free Software Foundation; either version 3
  * of the License, or (at your option) any later version.
  *
  * This program is distributed in the hope that it will be useful,
@@ -14,29 +15,11 @@
  *
  * 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.
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
+ * MA  02110-1301, 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
+ * For any additional information, do not hesitate to contact us
+ * at info AT gvsig.com, or visit our website www.gvsig.com.
  */
 package org.gvsig.labeling.placements;
 
@@ -50,14 +33,6 @@
 import org.gvsig.tools.task.Cancellable;
 
 
-/**
- *
- * ILabelPlacement.java
- *
- *
- * @author jaume dominguez faus - jaume.dominguez@iver.es Dec 17, 2007
- *
- */
 public interface ILabelPlacement {
 
 	boolean isSuitableFor(IPlacementConstraints placementConstraints, int shapeType);
Index: trunk/org.gvsig.desktop/org.gvsig.desktop.plugin/org.gvsig.labeling.app/org.gvsig.labeling.app.mainplugin/src/main/java/org/gvsig/labeling/placements/MarkerPlacementOnPoint.java
===================================================================
--- trunk/org.gvsig.desktop/org.gvsig.desktop.plugin/org.gvsig.labeling.app/org.gvsig.labeling.app.mainplugin/src/main/java/org/gvsig/labeling/placements/MarkerPlacementOnPoint.java	(revision 43509)
+++ trunk/org.gvsig.desktop/org.gvsig.desktop.plugin/org.gvsig.labeling.app/org.gvsig.labeling.app.mainplugin/src/main/java/org/gvsig/labeling/placements/MarkerPlacementOnPoint.java	(revision 43510)
@@ -1,10 +1,11 @@
-/* gvSIG. Sistema de Informaci�n Geogr�fica de la Generalitat Valenciana
+/**
+ * gvSIG. Desktop Geographic Information System.
  *
- * Copyright (C) 2005 IVER T.I. and Generalitat Valenciana.
+ * Copyright (C) 2007-2013 gvSIG Association.
  *
  * This program is free software; you can redistribute it and/or
  * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
+ * as published by the Free Software Foundation; either version 3
  * of the License, or (at your option) any later version.
  *
  * This program is distributed in the hope that it will be useful,
@@ -14,29 +15,11 @@
  *
  * 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.
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
+ * MA  02110-1301, 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
+ * For any additional information, do not hesitate to contact us
+ * at info AT gvsig.com, or visit our website www.gvsig.com.
  */
 package org.gvsig.labeling.placements;
 
@@ -46,6 +29,8 @@
 
 import org.gvsig.fmap.geom.Geometry;
 import org.gvsig.fmap.geom.Geometry.TYPES;
+import org.gvsig.fmap.geom.GeometryLocator;
+import org.gvsig.fmap.geom.GeometryManager;
 import org.gvsig.fmap.geom.primitive.Point;
 import org.gvsig.fmap.mapcontext.ViewPort;
 import org.gvsig.fmap.mapcontext.rendering.legend.styling.ILabelClass;
@@ -66,7 +51,9 @@
 			IPlacementConstraints placementConstraints,
 			double cartographicSymbolSize, Cancellable cancel) {
 
-		if (cancel.isCanceled()) return CannotPlaceLabel.NO_PLACES;
+		if (cancel.isCanceled()) {
+            return CannotPlaceLabel.NO_PLACES;
+        }
 
 		ArrayList<LabelLocationMetrics> guessed = new ArrayList<LabelLocationMetrics>();
 		
@@ -89,6 +76,7 @@
 	}
 
 
+    @Override
 	public ArrayList<LabelLocationMetrics> guess(
 			ILabelClass lc,
 			Geometry geom,
@@ -121,13 +109,13 @@
 		return guessed;
 	}
 
+    @Override
 	public boolean isSuitableFor(
 			IPlacementConstraints placementConstraints,
 			int shapeType) {
-		
-		
-		if (shapeType == TYPES.POINT) {
-			return placementConstraints.isOnTopOfThePoint();
+        GeometryManager geomManager = GeometryLocator.getGeometryManager();
+        if( geomManager.isSubtype(TYPES.POINT, shapeType) ) {
+			return placementConstraints != null && placementConstraints.isOnTopOfThePoint();
 		} else{
 			return false;
 		}
Index: trunk/org.gvsig.desktop/org.gvsig.desktop.plugin/org.gvsig.labeling.app/org.gvsig.labeling.app.mainplugin/src/main/java/org/gvsig/labeling/placements/LinePlacementAtBest.java
===================================================================
--- trunk/org.gvsig.desktop/org.gvsig.desktop.plugin/org.gvsig.labeling.app/org.gvsig.labeling.app.mainplugin/src/main/java/org/gvsig/labeling/placements/LinePlacementAtBest.java	(revision 43509)
+++ trunk/org.gvsig.desktop/org.gvsig.desktop.plugin/org.gvsig.labeling.app/org.gvsig.labeling.app.mainplugin/src/main/java/org/gvsig/labeling/placements/LinePlacementAtBest.java	(revision 43510)
@@ -1,10 +1,11 @@
-/* gvSIG. Sistema de Informaci�n Geogr�fica de la Generalitat Valenciana
+/**
+ * gvSIG. Desktop Geographic Information System.
  *
- * Copyright (C) 2005 IVER T.I. and Generalitat Valenciana.
+ * Copyright (C) 2007-2013 gvSIG Association.
  *
  * This program is free software; you can redistribute it and/or
  * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
+ * as published by the Free Software Foundation; either version 3
  * of the License, or (at your option) any later version.
  *
  * This program is distributed in the hope that it will be useful,
@@ -14,29 +15,11 @@
  *
  * 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.
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
+ * MA  02110-1301, 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
+ * For any additional information, do not hesitate to contact us
+ * at info AT gvsig.com, or visit our website www.gvsig.com.
  */
 package org.gvsig.labeling.placements;
 
@@ -45,7 +28,7 @@
 import org.gvsig.fmap.geom.Geometry;
 import org.gvsig.fmap.geom.Geometry.TYPES;
 import org.gvsig.fmap.geom.GeometryLocator;
-import org.gvsig.fmap.geom.type.GeometryType;
+import org.gvsig.fmap.geom.GeometryManager;
 import org.gvsig.fmap.mapcontext.ViewPort;
 import org.gvsig.fmap.mapcontext.rendering.legend.styling.ILabelClass;
 import org.gvsig.fmap.mapcontext.rendering.legend.styling.IPlacementConstraints;
@@ -54,14 +37,6 @@
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
-/**
- *
- * LinePlacementAtBest.java
- *
- *
- * @author jaume dominguez faus - jaume.dominguez@iver.es Dec 17, 2007
- *
- */
 public class LinePlacementAtBest extends CompoundLabelPlacement {
 	
 	private static Logger logger = LoggerFactory.getLogger(LinePlacementAtBest.class);
@@ -80,7 +55,9 @@
 			Geometry geom, IPlacementConstraints constraints,
 			double cartographicSymbolSize, Cancellable cancel, ViewPort vp) {
 		
-		if (cancel.isCanceled()) return CannotPlaceLabel.NO_PLACES;
+		if (cancel.isCanceled()) {
+            return CannotPlaceLabel.NO_PLACES;
+        }
 
 		ArrayList<LabelLocationMetrics> llc = super.guess(lc, geom, constraints, cartographicSymbolSize, cancel,vp);
 		if (constraints instanceof AbstractPlacementConstraints) {
@@ -98,21 +75,14 @@
 		}
 		return llc;
 	}
+    @Override
 	public boolean isSuitableFor(
 			IPlacementConstraints placementConstraints,
 			int shapeType) {
 		
-		GeometryType gt = null;
-		
-		try {
-			gt = GeometryLocator.getGeometryManager().getGeometryType(
-					shapeType, Geometry.SUBTYPES.GEOM2D);
-		} catch (Exception e) {
-			logger.error("While getting aux geo type.", e);
-		}
-		
-		if (gt.isTypeOf(TYPES.CURVE)
-				|| shapeType == TYPES.MULTICURVE) {
+        GeometryManager geomManager = GeometryLocator.getGeometryManager();
+        if( geomManager.isSubtype(TYPES.CURVE, shapeType) ||
+            geomManager.isSubtype(TYPES.MULTICURVE, shapeType) ) {
 			return placementConstraints != null && placementConstraints.isAtBestOfLine();
 		} else {
 			return false;
Index: trunk/org.gvsig.desktop/org.gvsig.desktop.plugin/org.gvsig.labeling.app/org.gvsig.labeling.app.mainplugin/src/main/java/org/gvsig/labeling/placements/AbstractPlacementConstraints.java
===================================================================
--- trunk/org.gvsig.desktop/org.gvsig.desktop.plugin/org.gvsig.labeling.app/org.gvsig.labeling.app.mainplugin/src/main/java/org/gvsig/labeling/placements/AbstractPlacementConstraints.java	(revision 43509)
+++ trunk/org.gvsig.desktop/org.gvsig.desktop.plugin/org.gvsig.labeling.app/org.gvsig.labeling.app.mainplugin/src/main/java/org/gvsig/labeling/placements/AbstractPlacementConstraints.java	(revision 43510)
@@ -1,3 +1,26 @@
+/**
+ * gvSIG. Desktop Geographic Information System.
+ *
+ * Copyright (C) 2007-2013 gvSIG Association.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 3
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
+ * MA  02110-1301, USA.
+ *
+ * For any additional information, do not hesitate to contact us
+ * at info AT gvsig.com, or visit our website www.gvsig.com.
+ */
 package org.gvsig.labeling.placements;
 
 import org.gvsig.fmap.mapcontext.rendering.legend.styling.IPlacementConstraints;
@@ -8,9 +31,6 @@
 import org.gvsig.tools.persistence.exception.PersistenceException;
 
 
-/**
- * @author  jaume dominguez faus - jaume.dominguez@iver.es
- */
 public abstract class AbstractPlacementConstraints implements
 Cloneable, IPlacementConstraints {
 	
Index: trunk/org.gvsig.desktop/org.gvsig.desktop.plugin/org.gvsig.labeling.app/org.gvsig.labeling.app.mainplugin/src/main/java/org/gvsig/labeling/placements/CannotPlaceLabel.java
===================================================================
--- trunk/org.gvsig.desktop/org.gvsig.desktop.plugin/org.gvsig.labeling.app/org.gvsig.labeling.app.mainplugin/src/main/java/org/gvsig/labeling/placements/CannotPlaceLabel.java	(revision 43509)
+++ trunk/org.gvsig.desktop/org.gvsig.desktop.plugin/org.gvsig.labeling.app/org.gvsig.labeling.app.mainplugin/src/main/java/org/gvsig/labeling/placements/CannotPlaceLabel.java	(revision 43510)
@@ -1,10 +1,11 @@
-/* gvSIG. Sistema de Informaci�n Geogr�fica de la Generalitat Valenciana
+/**
+ * gvSIG. Desktop Geographic Information System.
  *
- * Copyright (C) 2005 IVER T.I. and Generalitat Valenciana.
+ * Copyright (C) 2007-2013 gvSIG Association.
  *
  * This program is free software; you can redistribute it and/or
  * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
+ * as published by the Free Software Foundation; either version 3
  * of the License, or (at your option) any later version.
  *
  * This program is distributed in the hope that it will be useful,
@@ -14,29 +15,11 @@
  *
  * 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.
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
+ * MA  02110-1301, 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
+ * For any additional information, do not hesitate to contact us
+ * at info AT gvsig.com, or visit our website www.gvsig.com.
  */
 package org.gvsig.labeling.placements;
 
@@ -49,22 +32,16 @@
 import org.gvsig.symbology.fmap.mapcontext.rendering.legend.styling.LabelLocationMetrics;
 import org.gvsig.tools.task.Cancellable;
 
-/**
- *
- * CannotPlaceLabel.java
- *
- *
- * @author jaume dominguez faus - jaume.dominguez@iver.es Dec 17, 2007
- *
- */
 public class CannotPlaceLabel implements ILabelPlacement {
 	public static final ArrayList<LabelLocationMetrics> NO_PLACES = new ArrayList<LabelLocationMetrics>();
 
+    @Override
 	public boolean isSuitableFor(IPlacementConstraints placementConstraints,
 			int shapeType) {
 		return true;
 	}
 
+    @Override
 	public ArrayList<LabelLocationMetrics> guess(
 			ILabelClass lc,
 			Geometry geom,
Index: trunk/org.gvsig.desktop/org.gvsig.desktop.plugin/org.gvsig.labeling.app/org.gvsig.labeling.app.mainplugin/src/main/java/org/gvsig/labeling/placements/LinePlacementInTheMiddle.java
===================================================================
--- trunk/org.gvsig.desktop/org.gvsig.desktop.plugin/org.gvsig.labeling.app/org.gvsig.labeling.app.mainplugin/src/main/java/org/gvsig/labeling/placements/LinePlacementInTheMiddle.java	(revision 43509)
+++ trunk/org.gvsig.desktop/org.gvsig.desktop.plugin/org.gvsig.labeling.app/org.gvsig.labeling.app.mainplugin/src/main/java/org/gvsig/labeling/placements/LinePlacementInTheMiddle.java	(revision 43510)
@@ -1,10 +1,11 @@
-/* gvSIG. Sistema de Informaci�n Geogr�fica de la Generalitat Valenciana
+/**
+ * gvSIG. Desktop Geographic Information System.
  *
- * Copyright (C) 2005 IVER T.I. and Generalitat Valenciana.
+ * Copyright (C) 2007-2013 gvSIG Association.
  *
  * This program is free software; you can redistribute it and/or
  * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
+ * as published by the Free Software Foundation; either version 3
  * of the License, or (at your option) any later version.
  *
  * This program is distributed in the hope that it will be useful,
@@ -14,39 +15,20 @@
  *
  * 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.
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
+ * MA  02110-1301, 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
+ * For any additional information, do not hesitate to contact us
+ * at info AT gvsig.com, or visit our website www.gvsig.com.
  */
 package org.gvsig.labeling.placements;
 
 import java.awt.geom.Point2D;
 
 import org.apache.batik.ext.awt.geom.PathLength;
-import org.gvsig.fmap.geom.Geometry;
 import org.gvsig.fmap.geom.Geometry.TYPES;
 import org.gvsig.fmap.geom.GeometryLocator;
-import org.gvsig.fmap.geom.type.GeometryType;
+import org.gvsig.fmap.geom.GeometryManager;
 import org.gvsig.fmap.mapcontext.rendering.legend.styling.ILabelClass;
 import org.gvsig.fmap.mapcontext.rendering.legend.styling.IPlacementConstraints;
 import org.gvsig.symbology.fmap.mapcontext.rendering.legend.styling.LabelLocationMetrics;
@@ -54,35 +36,19 @@
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
-/**
- *
- * LinePlacementInTheMiddle.java
- *
- *
- * @author jaume dominguez faus - jaume.dominguez@iver.es Dec 17, 2007
- *
- */
 public class LinePlacementInTheMiddle extends AbstractLinePlacement {
 
 	private static Logger logger =
 			LoggerFactory.getLogger(LinePlacementInTheMiddle.class);
 					
+    @Override
 	public boolean isSuitableFor(
 			IPlacementConstraints placementConstraints,
 			int shapeType) {
 		
-		GeometryType gt = null;
-		
-		try {
-			gt = GeometryLocator.getGeometryManager().getGeometryType(
-					shapeType, Geometry.SUBTYPES.GEOM2D);
-		} catch (Exception e) {
-			logger.error("While getting aux geo type.", e);
-		}
-		
-		if (gt.isTypeOf(TYPES.CURVE)
-				|| shapeType == TYPES.MULTICURVE) {
-			
+        GeometryManager geomManager = GeometryLocator.getGeometryManager();
+        if( geomManager.isSubtype(TYPES.CURVE, shapeType) ||
+            geomManager.isSubtype(TYPES.MULTICURVE, shapeType) ) {
 			return placementConstraints != null &&
 			   placementConstraints.isInTheMiddleOfLine()
 			  /* && !placementConstraints.isFollowingLine()*/;
@@ -92,10 +58,13 @@
 		
 	}
 
+    @Override
 	public LabelLocationMetrics initialLocation(ILabelClass lc,
 			IPlacementConstraints pc, PathLength pathLen, Cancellable cancel) {
 		
-		if (cancel.isCanceled()) return null;
+		if (cancel.isCanceled()) {
+            return null;
+        }
 
 		float length = pathLen.lengthOfPath();
 		float distance = (float) (length * 0.5);
Index: trunk/org.gvsig.desktop/org.gvsig.desktop.plugin/org.gvsig.labeling.app/org.gvsig.labeling.app.mainplugin/src/main/java/org/gvsig/labeling/placements/LinePlacementAtExtremities.java
===================================================================
--- trunk/org.gvsig.desktop/org.gvsig.desktop.plugin/org.gvsig.labeling.app/org.gvsig.labeling.app.mainplugin/src/main/java/org/gvsig/labeling/placements/LinePlacementAtExtremities.java	(revision 43509)
+++ trunk/org.gvsig.desktop/org.gvsig.desktop.plugin/org.gvsig.labeling.app/org.gvsig.labeling.app.mainplugin/src/main/java/org/gvsig/labeling/placements/LinePlacementAtExtremities.java	(revision 43510)
@@ -1,10 +1,11 @@
-/* gvSIG. Sistema de Informaci�n Geogr�fica de la Generalitat Valenciana
+/**
+ * gvSIG. Desktop Geographic Information System.
  *
- * Copyright (C) 2005 IVER T.I. and Generalitat Valenciana.
+ * Copyright (C) 2007-2013 gvSIG Association.
  *
  * This program is free software; you can redistribute it and/or
  * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
+ * as published by the Free Software Foundation; either version 3
  * of the License, or (at your option) any later version.
  *
  * This program is distributed in the hope that it will be useful,
@@ -14,39 +15,20 @@
  *
  * 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.
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
+ * MA  02110-1301, 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
+ * For any additional information, do not hesitate to contact us
+ * at info AT gvsig.com, or visit our website www.gvsig.com.
  */
 package org.gvsig.labeling.placements;
 
 import java.awt.geom.Point2D;
 
 import org.apache.batik.ext.awt.geom.PathLength;
-import org.gvsig.fmap.geom.Geometry;
 import org.gvsig.fmap.geom.Geometry.TYPES;
 import org.gvsig.fmap.geom.GeometryLocator;
-import org.gvsig.fmap.geom.type.GeometryType;
+import org.gvsig.fmap.geom.GeometryManager;
 import org.gvsig.fmap.mapcontext.rendering.legend.styling.ILabelClass;
 import org.gvsig.fmap.mapcontext.rendering.legend.styling.IPlacementConstraints;
 import org.gvsig.symbology.fmap.mapcontext.rendering.legend.styling.LabelLocationMetrics;
@@ -54,14 +36,6 @@
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
-/**
- *
- * LinePlacementAtExtremities.java
- *
- *
- * @author jaume dominguez faus - jaume.dominguez@iver.es Dec 17, 2007
- *
- */
 public class LinePlacementAtExtremities extends AbstractLinePlacement {
 
 	private static Logger logger =
@@ -120,21 +94,13 @@
 				true);
 	}
 
+    @Override
 	public boolean isSuitableFor(IPlacementConstraints placementConstraints,
 			int shapeType) {
 		
-		GeometryType gt = null;
-		
-		try {
-			gt = GeometryLocator.getGeometryManager().getGeometryType(
-					shapeType, Geometry.SUBTYPES.GEOM2D);
-		} catch (Exception e) {
-			logger.error("While getting aux geo type.", e);
-		}
-		
-		if (gt.isTypeOf(TYPES.CURVE)
-				|| shapeType == TYPES.MULTICURVE) {
-			
+        GeometryManager geomManager = GeometryLocator.getGeometryManager();
+        if( geomManager.isSubtype(TYPES.CURVE, shapeType) ||
+            geomManager.isSubtype(TYPES.MULTICURVE, shapeType) ) {
 			return placementConstraints != null
 					/* && !placementConstraints.isFollowingLine()*/
 					&& (placementConstraints.isAtTheBeginingOfLine()
Index: trunk/org.gvsig.desktop/org.gvsig.desktop.plugin/org.gvsig.labeling.app/org.gvsig.labeling.app.mainplugin/src/main/java/org/gvsig/labeling/placements/MarkerCenteredAtPoint.java
===================================================================
--- trunk/org.gvsig.desktop/org.gvsig.desktop.plugin/org.gvsig.labeling.app/org.gvsig.labeling.app.mainplugin/src/main/java/org/gvsig/labeling/placements/MarkerCenteredAtPoint.java	(revision 43509)
+++ trunk/org.gvsig.desktop/org.gvsig.desktop.plugin/org.gvsig.labeling.app/org.gvsig.labeling.app.mainplugin/src/main/java/org/gvsig/labeling/placements/MarkerCenteredAtPoint.java	(revision 43510)
@@ -1,10 +1,11 @@
-/* gvSIG. Sistema de Informaci�n Geogr�fica de la Generalitat Valenciana
+/**
+ * gvSIG. Desktop Geographic Information System.
  *
- * Copyright (C) 2005 IVER T.I. and Generalitat Valenciana.
+ * Copyright (C) 2007-2013 gvSIG Association.
  *
  * This program is free software; you can redistribute it and/or
  * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
+ * as published by the Free Software Foundation; either version 3
  * of the License, or (at your option) any later version.
  *
  * This program is distributed in the hope that it will be useful,
@@ -14,29 +15,11 @@
  *
  * 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.
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
+ * MA  02110-1301, 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
+ * For any additional information, do not hesitate to contact us
+ * at info AT gvsig.com, or visit our website www.gvsig.com.
  */
 package org.gvsig.labeling.placements;
 
@@ -59,12 +42,15 @@
 	private static Logger logger =
 			LoggerFactory.getLogger(MarkerCenteredAtPoint.class);
 
+    @Override
 	public ArrayList<LabelLocationMetrics> guess(
 			ILabelClass lc, Geometry geom,
 			IPlacementConstraints placementConstraints,
 			double cartographicSymbolSize, Cancellable cancel, ViewPort vp) {
 
-		if (cancel.isCanceled()) return CannotPlaceLabel.NO_PLACES;
+		if (cancel.isCanceled()) {
+            return CannotPlaceLabel.NO_PLACES;
+        }
 
 		Geometry shp = geom.cloneGeometry();
 		shp.transform(vp.getAffineTransform());
@@ -76,7 +62,7 @@
 		try {
 			cen = shp.centroid();
 		} catch (Exception e) {
-			logger.error("While gentting centroid.", e);
+			logger.warn("While gentting centroid.", e);
 		}
 		Point2D p = new Point2D.Double(cen.getX(), cen.getY());
 
@@ -87,6 +73,7 @@
 		return guessed;
 	}
 
+    @Override
 	public boolean isSuitableFor(IPlacementConstraints placementConstraints,
 			int shapeType) {
 		return false;
Index: trunk/org.gvsig.desktop/org.gvsig.desktop.plugin/org.gvsig.labeling.app/org.gvsig.labeling.app.mainplugin/src/main/java/org/gvsig/labeling/placements/PolygonPlacementParallel.java
===================================================================
--- trunk/org.gvsig.desktop/org.gvsig.desktop.plugin/org.gvsig.labeling.app/org.gvsig.labeling.app.mainplugin/src/main/java/org/gvsig/labeling/placements/PolygonPlacementParallel.java	(revision 43509)
+++ trunk/org.gvsig.desktop/org.gvsig.desktop.plugin/org.gvsig.labeling.app/org.gvsig.labeling.app.mainplugin/src/main/java/org/gvsig/labeling/placements/PolygonPlacementParallel.java	(revision 43510)
@@ -1,10 +1,11 @@
-/* gvSIG. Sistema de Informaci�n Geogr�fica de la Generalitat Valenciana
+/**
+ * gvSIG. Desktop Geographic Information System.
  *
- * Copyright (C) 2005 IVER T.I. and Generalitat Valenciana.
+ * Copyright (C) 2007-2013 gvSIG Association.
  *
  * This program is free software; you can redistribute it and/or
  * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
+ * as published by the Free Software Foundation; either version 3
  * of the License, or (at your option) any later version.
  *
  * This program is distributed in the hope that it will be useful,
@@ -14,29 +15,11 @@
  *
  * 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.
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
+ * MA  02110-1301, 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
+ * For any additional information, do not hesitate to contact us
+ * at info AT gvsig.com, or visit our website www.gvsig.com.
  */
 package org.gvsig.labeling.placements;
 
@@ -50,8 +33,8 @@
 import org.gvsig.fmap.geom.Geometry.SUBTYPES;
 import org.gvsig.fmap.geom.Geometry.TYPES;
 import org.gvsig.fmap.geom.GeometryLocator;
+import org.gvsig.fmap.geom.GeometryManager;
 import org.gvsig.fmap.geom.primitive.Point;
-import org.gvsig.fmap.geom.type.GeometryType;
 import org.gvsig.fmap.mapcontext.ViewPort;
 import org.gvsig.fmap.mapcontext.rendering.legend.styling.ILabelClass;
 import org.gvsig.fmap.mapcontext.rendering.legend.styling.IPlacementConstraints;
@@ -65,12 +48,15 @@
 	private static final Logger logger = LoggerFactory.getLogger(
 			PolygonPlacementParallel.class);
 	
+    @Override
 	public ArrayList<LabelLocationMetrics> guess(
 			ILabelClass lc, Geometry geom,
 			IPlacementConstraints placementConstraints,
 			double cartographicSymbolSize, Cancellable cancel, ViewPort vp) {
 
-		if (cancel.isCanceled()) return CannotPlaceLabel.NO_PLACES;
+		if (cancel.isCanceled()) {
+            return CannotPlaceLabel.NO_PLACES;
+        }
 		
 		double theta = 0;
 		Point start_po = null;
@@ -82,7 +68,7 @@
 				start_po = geom.centroid();
 			}
 		} catch (Exception exc) {
-			logger.error("While getting centroid/interior point.", exc);
+			logger.warn("While getting centroid/interior point.", exc);
 		}
 
 		Point2D startingPoint = new Point2D.Double(start_po.getX(), start_po.getY());
@@ -166,7 +152,7 @@
 			auxp = GeometryLocator.getGeometryManager().createPoint(
 					startingPoint.getX(),startingPoint.getY(), SUBTYPES.GEOM2D);
 		} catch (Exception e) {
-			logger.error("While creating point.", e);
+			logger.warn("While creating point.", e);
 		}
 		
 		auxp.transform(vp.getAffineTransform());
@@ -174,20 +160,16 @@
 				new Point2D.Double(auxp.getX(),auxp.getY()), -theta, true));
 		return guessed;
 	}
+    
+    @Override
 	public boolean isSuitableFor(IPlacementConstraints placementConstraints,
 			int shapeType) {
 		
-		GeometryType gt = null;
-		try {
-			gt = GeometryLocator.getGeometryManager().getGeometryType(
-					shapeType, SUBTYPES.GEOM2D);
-		} catch (Exception e) {
-			logger.error("While getting geo type.", e);
+        GeometryManager geomManager = GeometryLocator.getGeometryManager();
+        if( geomManager.isSubtype(TYPES.SURFACE, shapeType) ||
+            geomManager.isSubtype(TYPES.MULTISURFACE, shapeType) ) {
+			return placementConstraints != null && placementConstraints.isParallel();
 		}
-		
-		if (gt.isTypeOf(TYPES.SURFACE) || shapeType == TYPES.MULTISURFACE) {
-			return placementConstraints.isParallel();
-		}
 		return false;
 	}
 
Index: trunk/org.gvsig.desktop/org.gvsig.desktop.plugin/org.gvsig.labeling.app/org.gvsig.labeling.app.mainplugin/src/main/java/org/gvsig/labeling/placements/MarkerPlacementAroundPoint.java
===================================================================
--- trunk/org.gvsig.desktop/org.gvsig.desktop.plugin/org.gvsig.labeling.app/org.gvsig.labeling.app.mainplugin/src/main/java/org/gvsig/labeling/placements/MarkerPlacementAroundPoint.java	(revision 43509)
+++ trunk/org.gvsig.desktop/org.gvsig.desktop.plugin/org.gvsig.labeling.app/org.gvsig.labeling.app.mainplugin/src/main/java/org/gvsig/labeling/placements/MarkerPlacementAroundPoint.java	(revision 43510)
@@ -1,10 +1,11 @@
-/* gvSIG. Sistema de Informaci�n Geogr�fica de la Generalitat Valenciana
+/**
+ * gvSIG. Desktop Geographic Information System.
  *
- * Copyright (C) 2005 IVER T.I. and Generalitat Valenciana.
+ * Copyright (C) 2007-2013 gvSIG Association.
  *
  * This program is free software; you can redistribute it and/or
  * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
+ * as published by the Free Software Foundation; either version 3
  * of the License, or (at your option) any later version.
  *
  * This program is distributed in the hope that it will be useful,
@@ -14,29 +15,11 @@
  *
  * 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.
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
+ * MA  02110-1301, 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
+ * For any additional information, do not hesitate to contact us
+ * at info AT gvsig.com, or visit our website www.gvsig.com.
  */
 package org.gvsig.labeling.placements;
 
@@ -46,6 +29,8 @@
 
 import org.gvsig.fmap.geom.Geometry;
 import org.gvsig.fmap.geom.Geometry.TYPES;
+import org.gvsig.fmap.geom.GeometryLocator;
+import org.gvsig.fmap.geom.GeometryManager;
 import org.gvsig.fmap.geom.primitive.Point;
 import org.gvsig.fmap.mapcontext.ViewPort;
 import org.gvsig.fmap.mapcontext.rendering.legend.styling.ILabelClass;
@@ -61,13 +46,16 @@
 			LoggerFactory.getLogger(MarkerPlacementAroundPoint.class);
 	private static final MarkerPlacementOnPoint pos = new MarkerPlacementOnPoint();
 
+    @Override
 	public ArrayList<LabelLocationMetrics> guess(
 			ILabelClass lc,
 			Geometry geom,
 			IPlacementConstraints placementConstraints,
 			double cartographicSymbolSize, Cancellable cancel, ViewPort vp) {
 		
-	if (cancel.isCanceled()) return CannotPlaceLabel.NO_PLACES;
+	if (cancel.isCanceled()) {
+        return CannotPlaceLabel.NO_PLACES;
+    }
 
 	Geometry shp = geom.cloneGeometry();
 	shp.transform(vp.getAffineTransform());
@@ -218,13 +206,15 @@
 
 
 
+    @Override
 	public boolean isSuitableFor(IPlacementConstraints placementConstraints,
 			int shapeType) {
 		
-		if (shapeType == TYPES.POINT
-				|| shapeType == TYPES.MULTIPOINT) {
+        GeometryManager geomManager = GeometryLocator.getGeometryManager();
+        if( geomManager.isSubtype(TYPES.POINT, shapeType) ||
+            geomManager.isSubtype(TYPES.MULTIPOINT, shapeType) ) {
 			// TODO (09/01/08) is this correct? if not fix it also in PlacementManager, PlacementProperties
-			return placementConstraints.isAroundThePoint();
+			return placementConstraints != null && placementConstraints.isAroundThePoint();
 		} else {
 			return false;
 		}
Index: trunk/org.gvsig.desktop/org.gvsig.desktop.plugin/org.gvsig.labeling.app/org.gvsig.labeling.app.mainplugin/src/main/java/org/gvsig/labeling/label/GeneralLabelingStrategy.java
===================================================================
--- trunk/org.gvsig.desktop/org.gvsig.desktop.plugin/org.gvsig.labeling.app/org.gvsig.labeling.app.mainplugin/src/main/java/org/gvsig/labeling/label/GeneralLabelingStrategy.java	(revision 43509)
+++ trunk/org.gvsig.desktop/org.gvsig.desktop.plugin/org.gvsig.labeling.app/org.gvsig.labeling.app.mainplugin/src/main/java/org/gvsig/labeling/label/GeneralLabelingStrategy.java	(revision 43510)
@@ -1,110 +1,3 @@
-/* gvSIG. Sistema de Informaci�n Geogr�fica de la Generalitat Valenciana
- *
- * Copyright (C) 2005 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
- */
-
-/* CVS MESSAGES:
- *
- * $Id: GeneralLabelingStrategy.java 13749 2007-09-17 14:16:11Z jaume $
- * $Log$
- * Revision 1.2  2007-09-17 14:16:11  jaume
- * multilayer symbols sizing bug fixed
- *
- * Revision 1.1  2007/05/22 12:17:41  jaume
- * *** empty log message ***
- *
- * Revision 1.1  2007/05/22 10:05:31  jaume
- * *** empty log message ***
- *
- * Revision 1.10  2007/05/17 09:32:06  jaume
- * *** empty log message ***
- *
- * Revision 1.9  2007/05/09 11:04:58  jaume
- * refactored legend hierarchy
- *
- * Revision 1.8  2007/04/13 11:59:30  jaume
- * *** empty log message ***
- *
- * Revision 1.7  2007/04/12 14:28:43  jaume
- * basic labeling support for lines
- *
- * Revision 1.6  2007/04/11 16:01:08  jaume
- * maybe a label placer refactor
- *
- * Revision 1.5  2007/04/10 16:34:01  jaume
- * towards a styled labeling
- *
- * Revision 1.4  2007/04/02 16:34:56  jaume
- * Styled labeling (start commiting)
- *
- * Revision 1.3  2007/03/28 16:48:01  jaume
- * *** empty log message ***
- *
- * Revision 1.2  2007/03/26 14:40:38  jaume
- * added print method (BUT UNIMPLEMENTED)
- *
- * Revision 1.1  2007/03/20 16:16:20  jaume
- * refactored to use ISymbol instead of FSymbol
- *
- * Revision 1.2  2007/03/09 11:20:57  jaume
- * Advanced symbology (start committing)
- *
- * Revision 1.1  2007/03/09 08:33:43  jaume
- * *** empty log message ***
- *
- * Revision 1.1.2.5  2007/02/21 07:34:08  jaume
- * labeling starts working
- *
- * Revision 1.1.2.4  2007/02/15 16:23:44  jaume
- * *** empty log message ***
- *
- * Revision 1.1.2.3  2007/02/09 07:47:05  jaume
- * Isymbol moved
- *
- * Revision 1.1.2.2  2007/02/02 16:21:24  jaume
- * start commiting labeling stuff
- *
- * Revision 1.1.2.1  2007/02/01 17:46:49  jaume
- * *** empty log message ***
- *
- *
- */
 package org.gvsig.labeling.label;
 
 import java.awt.Graphics2D;
@@ -115,6 +8,7 @@
 import java.util.List;
 import java.util.TreeMap;
 import java.util.TreeSet;
+import org.cresques.cts.ICoordTrans;
 
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
@@ -167,14 +61,6 @@
 import org.gvsig.tools.persistence.exception.PersistenceException;
 import org.gvsig.tools.task.Cancellable;
 
-/**
- *
- * GeneralLabelingStrategy.java
- *
- *
- * @author jaume dominguez faus - jaume.dominguez@iver.es Jan 4, 2008
- *
- */
 public class GeneralLabelingStrategy implements ILabelingStrategy, Cloneable,
 		CartographicSupport {
 
@@ -369,8 +255,10 @@
                     if (geome == null || geome.getType() == Geometry.TYPES.NULL) {
                         continue;
                     }
-                    geome.reProject(layer.getCoordTrans());
-
+                    ICoordTrans ct = layer.getCoordTrans();
+                    if( ct!=null ) {
+                        geome.reProject(ct);
+                    }
                     if (!setupLabel(featu, lc, cancel, usedFields, viewPort, dpi, duplicateMode)) {
                         continue;
                     }
Index: trunk/org.gvsig.desktop/pom.xml
===================================================================
--- trunk/org.gvsig.desktop/pom.xml	(revision 43509)
+++ trunk/org.gvsig.desktop/pom.xml	(revision 43510)
@@ -982,11 +982,15 @@
                 <groupId>org.gvsig</groupId>
                 <artifactId>org.gvsig.fmap.mapcontext.impl</artifactId>
                 <version>2.0.204-SNAPSHOT</version>
-            </dependency>
+            </dependency>            
             <dependency>
+                <!-- 
+                Eliminado el proyecto asi que le pongo una version "chunga" 
+                para que falle al resolverla si alguien lo usa
+                -->
                 <groupId>org.gvsig</groupId>
                 <artifactId>org.gvsig.fmap.mapcontext.operation</artifactId>
-                <version>2.0.204-SNAPSHOT</version>
+                <version>ERROR</version> 
             </dependency>
             <dependency>
                 <groupId>org.gvsig</groupId>
Index: trunk/org.gvsig.desktop/org.gvsig.desktop.library/org.gvsig.fmap.control/src/main/java/org/gvsig/fmap/mapcontrol/tools/Behavior/PolylineBehavior.java
===================================================================
--- trunk/org.gvsig.desktop/org.gvsig.desktop.library/org.gvsig.fmap.control/src/main/java/org/gvsig/fmap/mapcontrol/tools/Behavior/PolylineBehavior.java	(revision 43509)
+++ trunk/org.gvsig.desktop/org.gvsig.desktop.library/org.gvsig.fmap.control/src/main/java/org/gvsig/fmap/mapcontrol/tools/Behavior/PolylineBehavior.java	(revision 43510)
@@ -27,8 +27,12 @@
 import java.awt.event.MouseEvent;
 import java.awt.geom.Point2D;
 import java.util.ArrayList;
+import java.util.List;
+import org.gvsig.fmap.geom.Geometry;
+import org.gvsig.fmap.geom.GeometryLocator;
+import org.gvsig.fmap.geom.exception.CreateGeometryException;
 
-import org.gvsig.fmap.geom.primitive.GeneralPathX;
+import org.gvsig.fmap.geom.primitive.Line;
 import org.gvsig.fmap.mapcontrol.MapControlDrawer;
 import org.gvsig.fmap.mapcontrol.tools.BehaviorException;
 import org.gvsig.fmap.mapcontrol.tools.Events.MeasureEvent;
@@ -48,12 +52,12 @@
 	/**
 	 * The abscissa coordinate of all vertexes of the polyline.
 	 */
-	protected ArrayList arrayX = new ArrayList(); //<Double>
+	protected List<Double> arrayX = new ArrayList<>(); 
 
 	/**
 	 * The ordinate coordinate of all vertexes of the polyline.
 	 */
-	protected ArrayList arrayY = new ArrayList(); //<Double>
+	protected List<Double> arrayY = new ArrayList<>();
 
 	/**
 	 * Determines if user is setting the vertexes (with one click of the button 1 of the mouse), or not.
@@ -159,16 +163,24 @@
          * @param mapControlDrawer
 	 */
 	protected void drawPolyLine(MapControlDrawer mapControlDrawer) {
-		GeneralPathX polyline = new GeneralPathX(GeneralPathX.WIND_EVEN_ODD, arrayX.size());
-
-		polyline.moveTo(((Double) arrayX.get(0)).doubleValue(),
-				((Double) arrayY.get(0)).doubleValue());
-
-		for (int index = 0; index < arrayX.size(); index++) {
-		    polyline.lineTo(((Double) arrayX.get(index)).doubleValue(),((Double) arrayY.get(index)).doubleValue());
-		}
-
-		mapControlDrawer.draw(createLineString(polyline));
+        
+//		GeneralPathX polyline = new GeneralPathX(GeneralPathX.WIND_EVEN_ODD, arrayX.size());
+//
+//		polyline.moveTo(((Double) arrayX.get(0)).doubleValue(),
+//				((Double) arrayY.get(0)).doubleValue());
+//
+//		for (int index = 0; index < arrayX.size(); index++) {
+//		    polyline.lineTo(((Double) arrayX.get(index)).doubleValue(),((Double) arrayY.get(index)).doubleValue());
+//		}
+        try {
+            Line line = geomManager.createLine(Geometry.SUBTYPES.GEOM2D);
+            for (int index = 0; index < arrayX.size(); index++) {
+                line.addVertex(arrayX.get(index),arrayY.get(index));
+            }
+            mapControlDrawer.draw(line);
+        } catch (Exception ex) {
+            LOG.warn("Can't draw polyline",ex);
+        }
 	}
 
 	/**
Index: trunk/org.gvsig.desktop/org.gvsig.desktop.library/org.gvsig.fmap.control/src/main/java/org/gvsig/fmap/mapcontrol/tools/Behavior/Behavior.java
===================================================================
--- trunk/org.gvsig.desktop/org.gvsig.desktop.library/org.gvsig.fmap.control/src/main/java/org/gvsig/fmap/mapcontrol/tools/Behavior/Behavior.java	(revision 43509)
+++ trunk/org.gvsig.desktop/org.gvsig.desktop.library/org.gvsig.fmap.control/src/main/java/org/gvsig/fmap/mapcontrol/tools/Behavior/Behavior.java	(revision 43510)
@@ -37,8 +37,6 @@
 import org.gvsig.fmap.geom.GeometryManager;
 import org.gvsig.fmap.geom.primitive.Arc;
 import org.gvsig.fmap.geom.primitive.Circle;
-import org.gvsig.fmap.geom.primitive.Curve;
-import org.gvsig.fmap.geom.primitive.GeneralPathX;
 import org.gvsig.fmap.geom.primitive.Point;
 import org.gvsig.fmap.mapcontrol.MapControl;
 import org.gvsig.fmap.mapcontrol.MapControlDrawer;
@@ -83,10 +81,10 @@
      */
     private MapControl mapControl;
 
-    private static final Logger LOG = LoggerFactory.getLogger(Behavior.class);
+    protected static final Logger LOG = LoggerFactory.getLogger(Behavior.class);
 
-    protected GeometryManager geomManager = GeometryLocator
-        .getGeometryManager();
+    protected GeometryManager geomManager = GeometryLocator.getGeometryManager();
+    
 
     private int mouseButton = BUTTON_LEFT;
     private boolean isMyButton = false;
@@ -384,27 +382,27 @@
         return circle;
     }
 
-    /**
-     * Create a lineString from a GeneralPath. If there is an
-     * error return <code>null</code> and add the error
-     * to the log
-     *
-     * @param gpx
-     *            The GeneralPath
-     * @return
-     *         The LineString
-     */
-    protected Curve createLineString(GeneralPathX gpx) {
-        Curve curve = null;
-        try {
-            curve = (Curve) geomManager.create(TYPES.CURVE, SUBTYPES.GEOM2D);
-            curve.setGeneralPath(gpx);
-        } catch (org.gvsig.fmap.geom.exception.CreateGeometryException e) {
-            LOG.error("Error creating lineString with GeneralPathX=" + gpx,
-                new CreateGeometryException(TYPES.CURVE, SUBTYPES.GEOM2D, e));
-        }
-        return curve;
-    }
+//    /**
+//     * Create a lineString from a GeneralPath. If there is an
+//     * error return <code>null</code> and add the error
+//     * to the log
+//     *
+//     * @param gpx
+//     *            The GeneralPath
+//     * @return
+//     *         The LineString
+//     */
+//    protected Curve createLineString(GeneralPathX gpx) {
+//        Curve curve = null;
+//        try {
+//            curve = (Curve) geomManager.create(TYPES.CURVE, SUBTYPES.GEOM2D);
+//            curve.setGeneralPath(gpx);
+//        } catch (org.gvsig.fmap.geom.exception.CreateGeometryException e) {
+//            LOG.error("Error creating lineString with GeneralPathX=" + gpx,
+//                new CreateGeometryException(TYPES.CURVE, SUBTYPES.GEOM2D, e));
+//        }
+//        return curve;
+//    }
 
     public void resetMyButton() {
         this.isMyButton = false;
Index: trunk/org.gvsig.desktop/org.gvsig.desktop.library/org.gvsig.fmap.control/src/main/java/org/gvsig/fmap/mapcontrol/impl/MapControlDrawer2D.java
===================================================================
--- trunk/org.gvsig.desktop/org.gvsig.desktop.library/org.gvsig.fmap.control/src/main/java/org/gvsig/fmap/mapcontrol/impl/MapControlDrawer2D.java	(revision 43509)
+++ trunk/org.gvsig.desktop/org.gvsig.desktop.library/org.gvsig.fmap.control/src/main/java/org/gvsig/fmap/mapcontrol/impl/MapControlDrawer2D.java	(revision 43510)
@@ -42,11 +42,8 @@
 import org.gvsig.fmap.geom.GeometryLocator;
 import org.gvsig.fmap.geom.GeometryManager;
 import org.gvsig.fmap.geom.handler.Handler;
-import org.gvsig.fmap.geom.operation.Draw;
-import org.gvsig.fmap.geom.operation.DrawOperationContext;
-import org.gvsig.fmap.geom.operation.GeometryOperationException;
-import org.gvsig.fmap.geom.operation.GeometryOperationNotSupportedException;
-import org.gvsig.fmap.geom.primitive.Curve;
+
+import org.gvsig.fmap.geom.primitive.Line;
 import org.gvsig.fmap.mapcontext.MapContextLocator;
 import org.gvsig.fmap.mapcontext.ViewPort;
 import org.gvsig.fmap.mapcontext.rendering.symbols.ISymbol;
@@ -114,25 +111,17 @@
 		}
 	}
 
-	/* (non-Javadoc)
-	 * @see org.gvsig.fmap.mapcontrol.tools.renderer.Renderer#drawLine(java.awt.geom.Point2D, java.awt.geom.Point2D, org.gvsig.fmap.mapcontext.rendering.symbols.ISymbol)
-	 */
+    @Override
 	public void drawLine(Point2D firstPoint, Point2D endPoint, ISymbol symbol) {
-		DrawOperationContext doc = new DrawOperationContext();
-		doc.setGraphics(graphics);
-		doc.setViewPort(viewPort);
-		doc.setSymbol(symbol);
 		try {
-			Curve curve = (Curve)geomManager.create(Geometry.TYPES.CURVE, Geometry.SUBTYPES.GEOM2D);
-			curve.addVertex(geomManager.createPoint(firstPoint.getX(), firstPoint.getY(), Geometry.SUBTYPES.GEOM2D) );
-			curve.addVertex(geomManager.createPoint(endPoint.getX(), endPoint.getY(), Geometry.SUBTYPES.GEOM2D) );
-			curve.invokeOperation(Draw.CODE, doc);
-		} catch (GeometryOperationNotSupportedException e) {
-			e.printStackTrace();
-		} catch (GeometryOperationException e) {
-			e.printStackTrace();
-		} catch (org.gvsig.fmap.geom.exception.CreateGeometryException e) {
-			e.printStackTrace();
+			Line line = geomManager.createLine(Geometry.SUBTYPES.GEOM2D);
+			line.addVertex(firstPoint.getX(), firstPoint.getY());
+			line.addVertex(endPoint.getX(), endPoint.getY());
+            
+    		AffineTransform at = viewPort.getAffineTransform();		
+            symbol.draw(graphics, at, line, null, null);
+		} catch (Exception e) {
+			LOG.warn("Cant draw line.", e);
 		}
 	}
 
Index: trunk/org.gvsig.desktop/org.gvsig.desktop.library/org.gvsig.fmap.control/pom.xml
===================================================================
--- trunk/org.gvsig.desktop/org.gvsig.desktop.library/org.gvsig.fmap.control/pom.xml	(revision 43509)
+++ trunk/org.gvsig.desktop/org.gvsig.desktop.library/org.gvsig.fmap.control/pom.xml	(revision 43510)
@@ -85,11 +85,11 @@
       <artifactId>org.gvsig.fmap.mapcontext.api</artifactId>
       <scope>compile</scope>
     </dependency>
-    <dependency>
+<!--    <dependency>
       <groupId>org.gvsig</groupId>
       <artifactId>org.gvsig.fmap.mapcontext.operation</artifactId>
       <scope>compile</scope>
-    </dependency>
+    </dependency>-->
     <dependency>
         <groupId>org.gvsig</groupId>
         <artifactId>org.gvsig.i18n</artifactId>
Index: trunk/org.gvsig.desktop/org.gvsig.desktop.library/org.gvsig.symbology/org.gvsig.symbology.lib/org.gvsig.symbology.lib.impl/src/test/java/org/gvsig/symbology/fmap/mapcontext/rendering/legend/TestAbstractIntervalLegend.java
===================================================================
--- trunk/org.gvsig.desktop/org.gvsig.desktop.library/org.gvsig.symbology/org.gvsig.symbology.lib/org.gvsig.symbology.lib.impl/src/test/java/org/gvsig/symbology/fmap/mapcontext/rendering/legend/TestAbstractIntervalLegend.java	(revision 43509)
+++ trunk/org.gvsig.desktop/org.gvsig.desktop.library/org.gvsig.symbology/org.gvsig.symbology.lib/org.gvsig.symbology.lib.impl/src/test/java/org/gvsig/symbology/fmap/mapcontext/rendering/legend/TestAbstractIntervalLegend.java	(revision 43510)
@@ -31,11 +31,10 @@
 import org.gvsig.fmap.dal.feature.DummyFetureStore;
 import org.gvsig.fmap.dal.feature.Feature;
 import org.gvsig.fmap.geom.Geometry.SUBTYPES;
-import org.gvsig.fmap.geom.Geometry.TYPES;
 import org.gvsig.fmap.geom.GeometryLocator;
 import org.gvsig.fmap.geom.GeometryManager;
-import org.gvsig.fmap.geom.primitive.Curve;
 import org.gvsig.fmap.geom.primitive.GeneralPathX;
+import org.gvsig.fmap.geom.primitive.Line;
 import org.gvsig.fmap.mapcontext.rendering.legend.IClassifiedVectorLegend;
 import org.gvsig.fmap.mapcontext.rendering.legend.ILegend;
 import org.gvsig.fmap.mapcontext.rendering.symbols.ISymbol;
@@ -131,8 +130,8 @@
 			Rectangle aShape = new Rectangle(i * size, i * size, d.width,
 					d.height);
 			GeometryManager geomManager = GeometryLocator.getGeometryManager();
-			Curve curve = (Curve)geomManager.create(TYPES.CURVE, SUBTYPES.GEOM2D);
-			curve.setGeneralPath(new GeneralPathX(aShape.getPathIterator(null)));
+			Line line = geomManager.createLine(SUBTYPES.GEOM2D);
+			line.setGeneralPath(new GeneralPathX(aShape.getPathIterator(null)));
 
 			/*
 			 * create a full-featured Feature with randomed values at its fields
Index: trunk/org.gvsig.desktop/org.gvsig.desktop.library/org.gvsig.symbology/org.gvsig.symbology.lib/org.gvsig.symbology.lib.impl/src/test/java/org/gvsig/symbology/fmap/mapcontext/rendering/legend/TestIClassifiedLegend.java
===================================================================
--- trunk/org.gvsig.desktop/org.gvsig.desktop.library/org.gvsig.symbology/org.gvsig.symbology.lib/org.gvsig.symbology.lib.impl/src/test/java/org/gvsig/symbology/fmap/mapcontext/rendering/legend/TestIClassifiedLegend.java	(revision 43509)
+++ trunk/org.gvsig.desktop/org.gvsig.desktop.library/org.gvsig.symbology/org.gvsig.symbology.lib/org.gvsig.symbology.lib.impl/src/test/java/org/gvsig/symbology/fmap/mapcontext/rendering/legend/TestIClassifiedLegend.java	(revision 43510)
@@ -26,63 +26,21 @@
 import java.awt.Dimension;
 import java.awt.Rectangle;
 import java.util.ArrayList;
-import java.util.Collection;
 import java.util.Hashtable;
-import java.util.Iterator;
-import java.util.List;
-import java.util.Set;
-
-import org.cresques.cts.IProjection;
-
-import org.gvsig.fmap.dal.DataQuery;
-import org.gvsig.fmap.dal.DataServerExplorer;
-import org.gvsig.fmap.dal.DataSet;
-import org.gvsig.fmap.dal.DataStoreParameters;
-import org.gvsig.fmap.dal.exception.DataException;
 import org.gvsig.fmap.dal.exception.ReadException;
-import org.gvsig.fmap.dal.feature.DummyFetureStore;
-import org.gvsig.fmap.dal.feature.EditableFeature;
-import org.gvsig.fmap.dal.feature.EditableFeatureType;
 import org.gvsig.fmap.dal.feature.Feature;
-import org.gvsig.fmap.dal.feature.FeatureCache;
-import org.gvsig.fmap.dal.feature.FeatureIndex;
-import org.gvsig.fmap.dal.feature.FeatureIndexes;
-import org.gvsig.fmap.dal.feature.FeatureLocks;
-import org.gvsig.fmap.dal.feature.FeatureQuery;
-import org.gvsig.fmap.dal.feature.FeatureReference;
-import org.gvsig.fmap.dal.feature.FeatureSelection;
-import org.gvsig.fmap.dal.feature.FeatureSet;
-import org.gvsig.fmap.dal.feature.FeatureStore;
-import org.gvsig.fmap.dal.feature.FeatureStoreTransforms;
-import org.gvsig.fmap.dal.feature.FeatureType;
-import org.gvsig.fmap.dal.feature.NewFeatureStoreParameters;
-import org.gvsig.fmap.dal.feature.exception.NeedEditingModeException;
 import org.gvsig.fmap.geom.Geometry.SUBTYPES;
-import org.gvsig.fmap.geom.Geometry.TYPES;
 import org.gvsig.fmap.geom.GeometryLocator;
 import org.gvsig.fmap.geom.GeometryManager;
-import org.gvsig.fmap.geom.primitive.Curve;
-import org.gvsig.fmap.geom.primitive.Envelope;
 import org.gvsig.fmap.geom.primitive.GeneralPathX;
+import org.gvsig.fmap.geom.primitive.Line;
 import org.gvsig.fmap.mapcontext.rendering.legend.IClassifiedLegend;
 import org.gvsig.fmap.mapcontext.rendering.legend.IClassifiedVectorLegend;
 import org.gvsig.fmap.mapcontext.rendering.legend.ILegend;
 import org.gvsig.fmap.mapcontext.rendering.symbols.ISymbol;
 import org.gvsig.symbology.fmap.mapcontext.rendering.legend.impl.AbstractIntervalLegend;
 import org.gvsig.symbology.fmap.mapcontext.rendering.symbol.TestISymbol;
-import org.gvsig.timesupport.Interval;
-import org.gvsig.tools.dynobject.DynClass;
-import org.gvsig.tools.dynobject.DynObject;
-import org.gvsig.tools.dynobject.exception.DynFieldNotFoundException;
-import org.gvsig.tools.dynobject.exception.DynMethodException;
-import org.gvsig.tools.exception.BaseException;
 import org.gvsig.tools.junit.AbstractLibraryAutoInitTestCase;
-import org.gvsig.tools.observer.Observer;
-import org.gvsig.tools.persistence.PersistentState;
-import org.gvsig.tools.persistence.exception.PersistenceException;
-import org.gvsig.tools.undo.RedoException;
-import org.gvsig.tools.undo.UndoException;
-import org.gvsig.tools.visitor.Visitor;
 
 
 /**
@@ -179,8 +137,8 @@
 			Rectangle aShape = new Rectangle(i * size, i * size, d.width,
 					d.height);
 			GeometryManager geomManager = GeometryLocator.getGeometryManager();
-			Curve curve = (Curve)geomManager.create(TYPES.CURVE, SUBTYPES.GEOM2D);
-			curve.setGeneralPath(new GeneralPathX(aShape.getPathIterator(null)));
+			Line line =  geomManager.createLine(SUBTYPES.GEOM2D);
+			line.setGeneralPath(new GeneralPathX(aShape.getPathIterator(null)));
 
 			/*
 			 * create a full-featured Feature with randomed values at its fields
Index: trunk/org.gvsig.desktop/org.gvsig.desktop.library/org.gvsig.symbology/org.gvsig.symbology.lib/org.gvsig.symbology.lib.impl/src/test/java/org/gvsig/symbology/fmap/mapcontext/rendering/symbol/TestISymbol.java
===================================================================
--- trunk/org.gvsig.desktop/org.gvsig.desktop.library/org.gvsig.symbology/org.gvsig.symbology.lib/org.gvsig.symbology.lib.impl/src/test/java/org/gvsig/symbology/fmap/mapcontext/rendering/symbol/TestISymbol.java	(revision 43509)
+++ trunk/org.gvsig.desktop/org.gvsig.desktop.library/org.gvsig.symbology/org.gvsig.symbology.lib/org.gvsig.symbology.lib.impl/src/test/java/org/gvsig/symbology/fmap/mapcontext/rendering/symbol/TestISymbol.java	(revision 43510)
@@ -36,8 +36,8 @@
 import org.gvsig.fmap.geom.Geometry.SUBTYPES;
 import org.gvsig.fmap.geom.Geometry.TYPES;
 import org.gvsig.fmap.geom.exception.CreateGeometryException;
-import org.gvsig.fmap.geom.primitive.Curve;
 import org.gvsig.fmap.geom.primitive.GeneralPathX;
+import org.gvsig.fmap.geom.primitive.Line;
 import org.gvsig.fmap.geom.primitive.Point;
 import org.gvsig.fmap.geom.primitive.Surface;
 import org.gvsig.fmap.mapcontext.rendering.symbols.ISymbol;
@@ -120,9 +120,9 @@
 
     public void testLineSuitability() throws InstantiationException, IllegalAccessException, CreateGeometryException {
     	GeometryManager geomManager = GeometryLocator.getGeometryManager();
-    	Curve curve = (Curve)geomManager.create(TYPES.CURVE, SUBTYPES.GEOM2D);
-		curve.setGeneralPath(new GeneralPathX());
-    	final Geometry dummyLineGeom = curve;
+    	Line line = geomManager.createLine(SUBTYPES.GEOM2D);
+		line.setGeneralPath(new GeneralPathX());
+    	final Geometry dummyLineGeom = line;
         for (int i = 0; i < symbols.length; i++) {
             // text symbols are suitable for everything
             if (symbols[i] instanceof ITextSymbol) {
Index: trunk/org.gvsig.desktop/org.gvsig.desktop.library/org.gvsig.symbology/org.gvsig.symbology.lib/org.gvsig.symbology.lib.impl/src/main/java/org/gvsig/symbology/fmap/mapcontext/rendering/legend/impl/AbstractVectorialLegend.java
===================================================================
--- trunk/org.gvsig.desktop/org.gvsig.desktop.library/org.gvsig.symbology/org.gvsig.symbology.lib/org.gvsig.symbology.lib.impl/src/main/java/org/gvsig/symbology/fmap/mapcontext/rendering/legend/impl/AbstractVectorialLegend.java	(revision 43509)
+++ trunk/org.gvsig.desktop/org.gvsig.desktop.library/org.gvsig.symbology/org.gvsig.symbology.lib/org.gvsig.symbology.lib.impl/src/main/java/org/gvsig/symbology/fmap/mapcontext/rendering/legend/impl/AbstractVectorialLegend.java	(revision 43510)
@@ -55,8 +55,6 @@
 import org.gvsig.fmap.geom.aggregate.Aggregate;
 import org.gvsig.fmap.geom.exception.CreateGeometryException;
 import org.gvsig.fmap.geom.exception.ReprojectionRuntimeException;
-import org.gvsig.fmap.geom.operation.DrawInts;
-import org.gvsig.fmap.geom.operation.DrawOperationContext;
 import org.gvsig.fmap.geom.primitive.Envelope;
 import org.gvsig.fmap.mapcontext.MapContext;
 import org.gvsig.fmap.mapcontext.MapContextException;
@@ -174,6 +172,7 @@
         FeatureSet featureSet = null;
         DisposableIterator it = null;
         try {
+            GeometryManager geomManager = GeometryLocator.getGeometryManager();
             ZSort zSort = getZSort();
             boolean useZSort = false;
             int mapLevelCount = 1;
@@ -289,23 +288,18 @@
                         int symbolType = sym.getSymbolType();
 
                         if (symbolType == Geometry.TYPES.POINT
-                            || symbolType == Geometry.TYPES.CURVE
+                            ||  geomManager.isSubtype(symbolType, Geometry.TYPES.CURVE)
                             || sym instanceof CartographicSupport) {
 
                             csSym = (CartographicSupport) sym;
                         }
 
-                        DrawOperationContext doc = new DrawOperationContext();
-                        doc.setGraphics(g);
-                        doc.setViewPort(viewPort);
                         if (csSym == null) {
-                            doc.setSymbol(sym);
+                            DrawUtils.drawInts(g, viewPort, sym, feat, geom);
                         } else {
-                            doc.setDPI(dpi);
-                            doc.setCancellable(cancel);
-                            doc.setSymbol((ISymbol) csSym);
+                            DrawUtils.drawInts(g, viewPort, cancel, dpi, sym, feat, geom);
                         }
-                        geom.invokeOperation(DrawInts.CODE, doc);
+                        
                     } catch(Exception ex) {
                         FeatureReference ref = null;
                         if( feat!=null ) {
Index: trunk/org.gvsig.desktop/org.gvsig.desktop.library/org.gvsig.symbology/org.gvsig.symbology.lib/org.gvsig.symbology.lib.impl/src/main/java/org/gvsig/symbology/fmap/mapcontext/rendering/legend/impl/DrawUtils.java
===================================================================
--- trunk/org.gvsig.desktop/org.gvsig.desktop.library/org.gvsig.symbology/org.gvsig.symbology.lib/org.gvsig.symbology.lib.impl/src/main/java/org/gvsig/symbology/fmap/mapcontext/rendering/legend/impl/DrawUtils.java	(revision 0)
+++ trunk/org.gvsig.desktop/org.gvsig.desktop.library/org.gvsig.symbology/org.gvsig.symbology.lib/org.gvsig.symbology.lib.impl/src/main/java/org/gvsig/symbology/fmap/mapcontext/rendering/legend/impl/DrawUtils.java	(revision 43510)
@@ -0,0 +1,192 @@
+package org.gvsig.symbology.fmap.mapcontext.rendering.legend.impl;
+
+import java.awt.Graphics2D;
+import java.awt.geom.AffineTransform;
+import java.awt.geom.PathIterator;
+import org.gvsig.fmap.dal.feature.Feature;
+import org.gvsig.fmap.geom.Geometry;
+import org.gvsig.fmap.geom.GeometryException;
+import org.gvsig.fmap.geom.GeometryLocator;
+import org.gvsig.fmap.geom.GeometryManager;
+import org.gvsig.fmap.geom.aggregate.Aggregate;
+import org.gvsig.fmap.geom.aggregate.MultiLine;
+import org.gvsig.fmap.geom.aggregate.MultiPolygon;
+import org.gvsig.fmap.geom.aggregate.MultiSurface;
+import org.gvsig.fmap.geom.exception.CreateGeometryException;
+import org.gvsig.fmap.geom.operation.GeometryOperationException;
+import org.gvsig.fmap.geom.primitive.Curve;
+import org.gvsig.fmap.geom.primitive.GeneralPathX;
+import org.gvsig.fmap.geom.primitive.Surface;
+import org.gvsig.fmap.geom.type.GeometryType;
+import org.gvsig.fmap.mapcontext.ViewPort;
+import org.gvsig.fmap.mapcontext.rendering.symbols.CartographicSupport;
+import org.gvsig.fmap.mapcontext.rendering.symbols.ISymbol;
+import org.gvsig.tools.task.Cancellable;
+
+public class DrawUtils {
+
+    private static GeometryManager geometryManager = null;
+
+    private static GeometryManager getGeometryManager() {
+        if( geometryManager == null ) {
+            geometryManager = GeometryLocator.getGeometryManager();
+        }
+        return geometryManager;
+    }
+
+    public static void drawInts(Graphics2D g, ViewPort viewPort, Cancellable cancel, double dpi, ISymbol symbol, Feature feature, Geometry geom) throws GeometryOperationException {
+
+        try {
+            if( geom instanceof Aggregate ) {
+                for( Geometry prim : (Aggregate) geom ) {
+                    drawInts(g, viewPort, cancel, dpi, symbol, feature, prim);
+                }
+                return;
+            }
+
+            double previousSize = ((CartographicSupport) symbol).toCartographicSize(viewPort, dpi, geom);
+            // draw it as normally
+            Geometry transformedGeometry;
+            transformedGeometry = transformGeometry(geom.cloneGeometry(), viewPort.getAffineTransform());
+
+            // the AffineTransform has to be null because the transformToInts method reprojects the geometry
+            symbol.draw(g, null, transformedGeometry, feature, cancel);
+
+            // restore previous size
+            ((CartographicSupport) symbol).setCartographicSize(previousSize, geom);
+        } catch (GeometryException e) {
+            throw new GeometryOperationException(e);
+        }
+    }
+
+    public static void drawInts(Graphics2D g, ViewPort viewPort, ISymbol symbol, Feature feature, Geometry geom) throws GeometryOperationException {
+
+        try {
+            if( geom instanceof Aggregate ) {
+                for( Geometry prim : (Aggregate) geom ) {
+                    drawInts(g, viewPort, symbol, feature, prim);
+                }
+                return;
+            }
+            Geometry transformedGeometry = transformGeometry(geom.cloneGeometry(), viewPort.getAffineTransform());
+            symbol.draw(g, viewPort.getAffineTransform(), transformedGeometry, feature, null);
+
+        } catch (GeometryException e) {
+            throw new GeometryOperationException(e);
+        }
+    }
+
+    /**
+     * @param geom
+     * @param affineTransform
+     * @return
+     * @throws GeometryException
+     */
+    private static Geometry transformGeometry(Geometry geom, AffineTransform affineTransform) throws GeometryException {
+        if( geom.canBeTransformed(affineTransform) ) {
+            geom.transform(affineTransform);
+            return geom;
+        }
+        if( geom instanceof Curve || geom instanceof Curve ) {
+            MultiLine lines = geom.toLines();
+            lines.transform(affineTransform);
+            return lines;
+        }
+        if( geom instanceof Surface || geom instanceof MultiSurface ) {
+            MultiPolygon polygons = geom.toPolygons();
+            polygons.transform(affineTransform);
+            return polygons;
+        }
+        return null;
+    }
+
+    private static Geometry transformToInts(Geometry gp, AffineTransform at) throws CreateGeometryException {
+        GeneralPathX newGp = new GeneralPathX();
+        double[] theData = new double[6];
+        double[] aux = new double[6];
+
+        // newGp.reset();
+        PathIterator theIterator;
+        int theType;
+        int numParts = 0;
+
+        java.awt.geom.Point2D ptDst = new java.awt.geom.Point2D.Double();
+        java.awt.geom.Point2D ptSrc = new java.awt.geom.Point2D.Double();
+        boolean bFirst = true;
+        int xInt, yInt, antX = -1, antY = -1;
+
+        theIterator = gp.getPathIterator(null); //, flatness);
+        int numSegmentsAdded = 0;
+        while( !theIterator.isDone() ) {
+            theType = theIterator.currentSegment(theData);
+
+            switch( theType ) {
+            case PathIterator.SEG_MOVETO:
+                numParts++;
+                ptSrc.setLocation(theData[0], theData[1]);
+                at.transform(ptSrc, ptDst);
+                antX = (int) ptDst.getX();
+                antY = (int) ptDst.getY();
+                newGp.moveTo(antX, antY);
+                numSegmentsAdded++;
+                bFirst = true;
+                break;
+
+            case PathIterator.SEG_LINETO:
+                ptSrc.setLocation(theData[0], theData[1]);
+                at.transform(ptSrc, ptDst);
+                xInt = (int) ptDst.getX();
+                yInt = (int) ptDst.getY();
+                if( (bFirst) || ((xInt != antX) || (yInt != antY)) ) {
+                    newGp.lineTo(xInt, yInt);
+                    antX = xInt;
+                    antY = yInt;
+                    bFirst = false;
+                    numSegmentsAdded++;
+                }
+                break;
+
+            case PathIterator.SEG_QUADTO:
+                at.transform(theData, 0, aux, 0, 2);
+                newGp.quadTo(aux[0], aux[1], aux[2], aux[3]);
+                numSegmentsAdded++;
+                break;
+
+            case PathIterator.SEG_CUBICTO:
+                at.transform(theData, 0, aux, 0, 3);
+                newGp.curveTo(aux[0], aux[1], aux[2], aux[3], aux[4], aux[5]);
+                numSegmentsAdded++;
+                break;
+
+            case PathIterator.SEG_CLOSE:
+                if( numSegmentsAdded < 3 ) {
+                    newGp.lineTo(antX, antY);
+                }
+                newGp.closePath();
+
+                break;
+            } //end switch
+
+            theIterator.next();
+        } //end while loop
+
+        Geometry geom = null;
+        GeometryType geometryType = gp.getGeometryType();
+
+        if( geometryType.isTypeOf(Geometry.TYPES.POINT) ) {
+            geom = getGeometryManager().createPoint(ptDst.getX(), ptDst.getY(), Geometry.SUBTYPES.GEOM2D);
+        } else if( geometryType.isTypeOf(Geometry.TYPES.MULTIPOINT) ) {
+            geom = getGeometryManager().createMultiPoint(newGp, Geometry.SUBTYPES.GEOM2D);
+        } else if( geometryType.isTypeOf(Geometry.TYPES.CURVE) ) {
+            geom = getGeometryManager().createCurve(newGp, Geometry.SUBTYPES.GEOM2D);
+        } else if( geometryType.isTypeOf(Geometry.TYPES.MULTICURVE) ) {
+            geom = getGeometryManager().createMultiCurve(newGp, Geometry.SUBTYPES.GEOM2D);
+        } else if( geometryType.isTypeOf(Geometry.TYPES.SURFACE) ) {
+            geom = getGeometryManager().createSurface(newGp, Geometry.SUBTYPES.GEOM2D);
+        } else if( geometryType.isTypeOf(Geometry.TYPES.MULTISURFACE) ) {
+            geom = getGeometryManager().createMultiSurface(newGp, Geometry.SUBTYPES.GEOM2D);
+        }
+        return geom;
+    }
+
+}
Index: trunk/org.gvsig.desktop/org.gvsig.desktop.library/org.gvsig.symbology/org.gvsig.symbology.lib/org.gvsig.symbology.lib.impl/src/main/java/org/gvsig/symbology/fmap/mapcontext/rendering/symbol/impl/FSymbol.java
===================================================================
--- trunk/org.gvsig.desktop/org.gvsig.desktop.library/org.gvsig.symbology/org.gvsig.symbology.lib/org.gvsig.symbology.lib.impl/src/main/java/org/gvsig/symbology/fmap/mapcontext/rendering/symbol/impl/FSymbol.java	(revision 43509)
+++ trunk/org.gvsig.desktop/org.gvsig.desktop.library/org.gvsig.symbology/org.gvsig.symbology.lib/org.gvsig.symbology.lib.impl/src/main/java/org/gvsig/symbology/fmap/mapcontext/rendering/symbol/impl/FSymbol.java	(revision 43510)
@@ -1,1167 +0,0 @@
-/**
- * gvSIG. Desktop Geographic Information System.
- *
- * Copyright (C) 2007-2013 gvSIG Association.
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 3
- * of the License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
- * MA  02110-1301, USA.
- *
- * For any additional information, do not hesitate to contact us
- * at info AT gvsig.com, or visit our website www.gvsig.com.
- */
-/*
- * Created on 19-feb-2004
- *
- * To change the template for this generated file go to
- * Window&gt;Preferences&gt;Java&gt;Code Generation&gt;Code and Comments
- */
-/* gvSIG. Sistema de Informaci�n Geogr�fica de la Generalitat Valenciana
- *
- * Copyright (C) 2004 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.gvsig.symbology.fmap.mapcontext.rendering.symbol.impl;
-
-import java.awt.BasicStroke;
-import java.awt.Color;
-import java.awt.Font;
-import java.awt.Graphics2D;
-import java.awt.Image;
-import java.awt.Paint;
-import java.awt.Rectangle;
-import java.awt.Stroke;
-import java.awt.geom.AffineTransform;
-import java.awt.image.BufferedImage;
-import java.awt.image.ImageObserver;
-import java.net.MalformedURLException;
-import java.net.URI;
-import java.net.URISyntaxException;
-import java.util.StringTokenizer;
-
-import javax.swing.ImageIcon;
-
-import org.gvsig.compat.CompatLocator;
-import org.gvsig.compat.print.PrintAttributes;
-import org.gvsig.fmap.dal.feature.Feature;
-import org.gvsig.fmap.geom.Geometry;
-import org.gvsig.fmap.geom.exception.CreateGeometryException;
-import org.gvsig.fmap.mapcontext.MapContext;
-import org.gvsig.fmap.mapcontext.ViewPort;
-import org.gvsig.fmap.mapcontext.rendering.symbols.ISymbol;
-import org.gvsig.fmap.mapcontext.rendering.symbols.SymbolDrawingException;
-import org.gvsig.tools.persistence.PersistentState;
-import org.gvsig.tools.persistence.exception.PersistenceException;
-import org.gvsig.tools.task.Cancellable;
-import org.gvsig.utils.StringUtilities;
-import org.gvsig.utils.XMLEntity;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-
-
-/**
- * S�mbolo utilizado para guardar las caracter�sticas que se deben de aplicar a
- * los Shapes a dibujar.
- *
- * @author Vicente Caballero Navarro
- * @deprecated (jaume)
- */
-public class FSymbol implements ISymbol{
-	private static final Logger logger = LoggerFactory.getLogger(FSymbol.class);
-//	 Para s�mbolos de tipo pol�gono.
-	public final static int SYMBOL_STYLE_FILL_SOLID = 1;
-	public final static int SYMBOL_STYLE_FILL_TRANSPARENT = 2;
-	public final static int SYMBOL_STYLE_FILL_HORIZONTAL = 3;
-	public final static int SYMBOL_STYLE_FILL_VERTICAL = 4;
-	public final static int SYMBOL_STYLE_FILL_CROSS = 5;
-	public final static int SYMBOL_STYLE_FILL_UPWARD_DIAGONAL = 6;
-	public final static int SYMBOL_STYLE_FILL_DOWNWARD_DIAGONAL = 7;
-	public final static int SYMBOL_STYLE_FILL_CROSS_DIAGONAL = 8;
-	public final static int SYMBOL_STYLE_FILL_GRAYFILL = 9;
-	public final static int SYMBOL_STYLE_FILL_LIGHTGRAYFILL = 10;
-	public final static int SYMBOL_STYLE_FILL_DARKGRAYFILL = 11;
-
-	//	Para s�mbolos de tipo Punto
-	public final static int SYMBOL_STYLE_MARKER_CIRCLE = 30;
-	public final static int SYMBOL_STYLE_MARKER_SQUARE = 31;
-	public final static int SYMBOL_STYLE_MARKER_TRIANGLE = 32;
-	public final static int SYMBOL_STYLE_MARKER_CROSS = 33;
-	public final static int SYMBOL_STYLE_MARKER_TRUETYPE = 34;
-	public final static int SYMBOL_STYLE_MARKER_IMAGEN = 35;
-	public final static int SYMBOL_STYLE_DGNSPECIAL = 40;
-
-	// Para s�mbolos de l�neas
-	public final static int SYMBOL_STYLE_LINE_SOLID = 60;
-	public final static int SYMBOL_STYLE_LINE_DASH = 61;
-	public final static int SYMBOL_STYLE_LINE_DOT = 62;
-	public final static int SYMBOL_STYLE_LINE_DASHDOT = 63;
-	public final static int SYMBOL_STYLE_LINE_DASHDOTDOT = 64;
-	public final static int SYMBOL_STYLE_LINE_RAIL = 65;
-	public final static int SYMBOL_STYLE_LINE_ARROW = 66;
-
-	// Para s�mbolos de tipo texto
-	public final static int SYMBOL_STYLE_TEXT_NORMAL = 90;
-	public final static int SYMBOL_STYLE_TEXT_CURSIVE = 91;
-	public final static int SYMBOL_STYLE_TEXT_BOLD = 92;
-	public final static int SYMBOL_STYLE_TEXT_BOLDCURSIVE = 93;
-
-
-
-	private static BufferedImage img =
-		CompatLocator.getGraphicsUtils().createBufferedImage(1, 1,
-			BufferedImage.TYPE_INT_ARGB);
-	
-	private static Rectangle rect = new Rectangle(0, 0, 1, 1);
-	private int m_symbolType;
-	private int m_Style;
-	private boolean m_useOutline;
-	private Color m_Color;
-	private Color m_outlineColor;
-	private Font m_Font;
-	private Color m_FontColor;
-	private float m_FontSize;
-	private int rgb;
-	private ImageObserver imgObserver;
-
-	/**
-	 * Si <code>m_bUseFontSize</code> viene a false entonces m_FontSize viene
-	 * en unidades de mapa (metros)
-	 */
-	private boolean m_bUseFontSizeInPixels;
-
-	/**
-	 * <code>m_bDrawShape</code> indica si queremos dibujar el shape de fondo.
-	 * Es �til cuando est�s etiquetando y no quieres que se dibuje el s�mbolo
-	 * que te sirve de base para etiquetar.
-	 */
-	private boolean m_bDrawShape = true;
-	private int m_Size;
-	private Image m_Icon;
-	private URI m_IconURI;
-	private int m_Rotation;
-	private Paint m_Fill;
-	public String m_LinePattern = "0"; // Solo para poder mostrarlo cuando vamos a seleccionar un s�mbolo
-
-	// En realidad lo podemos ver de BasicStroke, pero....
-	// ya veremos si luego lo quitamos.
-	private Stroke m_Stroke;
-
-	//private float m_stroke=0;
-	// public int m_Transparency; // Ya la lleva dentro del Color
-	private boolean m_bUseSize; // Si est� a true, m_Size viene en coordenadas de mundo real.
-	private int m_AlingVert;
-	private int m_AlingHoriz;
-	private String m_Descrip;
-	public Color m_BackColor;
-	public Paint m_BackFill;
-
-	// private int resolutionPrinting=300;
-
-    /**
-     * Converts the comma-delimited string into a List of trimmed strings.
-     *
-     * @param linePattern a String with comma-delimited values
-     * @param lineWidth DOCUMENT ME!
-     *
-     * @return a List of the Strings that were delimited by commas
-     *
-     * @throws IllegalArgumentException DOCUMENT ME!
-     */
-    public static float[] toArray(String linePattern, float lineWidth) {
-        StringTokenizer st = new StringTokenizer(linePattern, ",");
-        int numTokens = st.countTokens();
-
-        float[] array = new float[numTokens];
-
-        for (int i = 0; i < numTokens; i++) {
-            String string = st.nextToken();
-            array[i] = Float.parseFloat(string) * lineWidth;
-
-            if (array[i] <= 0) {
-                return null;
-            }
-        }
-
-        return array;
-    }
-
-	/**
-	 * Crea un nuevo FSymbol.
-	 * @deprecated use SymbologyFactory.createDefaultSymbol() instead
-	 */
-//    FSymbol() {
-	private FSymbol() {
-		// Nothing to do
-	}
-
-	/**
-	 * Creates a new FSymbol object.
-	 *
-	 * @param tipoSymbol Tipo de s�mbolo.
-	 * @param c Color.
-	 * @deprecated use SymbologyFactory.createDefaultSymbol(shapeType, color) instead
-	 */
-//	public FSymbol(int tipoSymbol, Color c) {
-	// private FSymbol(int tipoSymbol, Color c) {
-	// createSymbol(tipoSymbol, c);
-	// }
-
-	/**
-	 * Crea un nuevo FSymbol.
-	 *
-	 * @param tipoSymbol Tipo de S�mbolo.
-	 * 			case FConstant.SYMBOL_TYPE_POINT:
-			case FConstant.SYMBOL_TYPE_POINTZ:
-			case FConstant.SYMBOL_TYPE_MULTIPOINT:
-				m_bUseSize = true; // Esto es lo primero que hay que hacer siempre
-
-				// para evitar un StackOverflow
-				m_useOutline = false;
-				setStyle(FConstant.SYMBOL_STYLE_MARKER_SQUARE);
-				setSize(5); //pixels
-
-				break;
-
-			case FConstant.SYMBOL_TYPE_LINE:
-			case FConstant.SYMBOL_TYPE_POLYLINEZ:
-			case FConstant.SYMBOL_TYPE_POLYGONZ:
-				setStroke(new BasicStroke());
-				setStyle(FConstant.SYMBOL_STYLE_LINE_SOLID);
-
-				break;
-
-			case FConstant.SYMBOL_TYPE_FILL:
-			    setStroke(new BasicStroke());
-				setStyle(FConstant.SYMBOL_STYLE_FILL_SOLID);
-
-				break;
-			case FShape.MULTI:
-				m_bUseSize = true;
-			    setStroke(new BasicStroke());
-				setStyle(FConstant.SYMBOL_STYLE_FILL_SOLID);
-
-				// setStyle(FConstant.SYMBOL_STYLE_MARKER_SQUARE);
-				setSize(5); //pixels
-				break;
-
-			case FConstant.SYMBOL_TYPE_TEXT:
-				setStroke(new BasicStroke());
-				setStyle(FConstant.SYMBOL_STYLE_TEXT_NORMAL);
-				setFont(new Font("Dialog",Font.PLAIN,12));
-				break;
-
-	 */
-	public FSymbol(int tipoSymbol) {
-//	private FSymbol(int tipoSymbol) {
-		int numreg = (int) (Math.random() * 100);
-		Color colorAleatorio = new Color(((numreg * numreg) + 100) % 255,
-				(numreg + ((3 * numreg) + 100)) % 255, numreg % 255);
-
-		createSymbol(tipoSymbol, colorAleatorio);
-	}
-
-	/**
-	 * A partir de un s�mbolo devuelve otro similar pero con el color de
-	 * selecci�n.
-	 *
-	 * @param sym S�mbolo a modificar.
-	 *
-	 * @return S�mbolo modificado.
-	 */
-	public static FSymbol getSymbolForSelection(FSymbol sym) {
-		FSymbol selecSymbol = sym.fastCloneSymbol();
-		selecSymbol.setColor(MapContext.getSelectionColor());
-
-		selecSymbol.setFill(null);
-		// 050215, jmorell: Si en los drivers cambiamos el estilo, aqu� tenemos que
-		// actualizar los cambios. SYMBOL_STYLE_MARKER_SQUARE --> SYMBOL_STYLE_DGNSPECIAL.
-		if ((selecSymbol.getStyle() == SYMBOL_STYLE_FILL_TRANSPARENT)
-		        || (selecSymbol.getStyle() == SYMBOL_STYLE_DGNSPECIAL)) {
-			selecSymbol.setStyle(SYMBOL_STYLE_FILL_SOLID);
-		} else if (selecSymbol.getStyle() == SYMBOL_STYLE_TEXT_BOLD ||
-				selecSymbol.getStyle() == SYMBOL_STYLE_TEXT_BOLDCURSIVE ||
-				selecSymbol.getStyle() == SYMBOL_STYLE_TEXT_CURSIVE ||
-				selecSymbol.getStyle() == SYMBOL_STYLE_TEXT_NORMAL){
-			selecSymbol.setFontColor(MapContext.getSelectionColor());
-		}
-		selecSymbol.rgb = MapContext.getSelectionColor().getRGB();
-
-		return selecSymbol;
-	}
-
-	/**
-	 * Clona el s�mbolo actual.
-	 *
-	 * @return Nuevo s�mbolo clonado.
-	 */
-	public FSymbol cloneSymbol() {
-		return createFromXML(getXMLEntity());
-	}
-
-	/**
-	 * Se usa para el s�mbolo de selecci�n. Es una forma
-	 * r�pida de clonar un s�mbolo, sin hacerlo via XML.
-	 * Vicente, no lo borres!!!
-	 * @return
-	 */
-	public FSymbol fastCloneSymbol()
-	{
-		FSymbol nS = new FSymbol();
-
-
-		nS.m_symbolType = m_symbolType;
-		nS.m_Style = m_Style;
-		nS.m_useOutline = m_useOutline;
-		nS.m_Color = m_Color;
-		nS.m_outlineColor = m_outlineColor;
-		nS.m_Font = m_Font;
-		nS.m_FontColor = m_FontColor;
-		nS.m_FontSize = m_FontSize;
-		nS.m_bUseFontSizeInPixels = m_bUseFontSizeInPixels;
-		nS.m_bDrawShape = m_bDrawShape;
-		nS.m_Size = m_Size;
-		nS.m_Icon = m_Icon;
-		nS.m_IconURI = m_IconURI;
-		nS.m_Rotation = m_Rotation;
-		nS.m_Fill = m_Fill;
-		nS.m_Stroke = m_Stroke;
-		// nS.m_Transparency =m_Transparency ;
-		nS.m_bUseSize = m_bUseSize;
-		nS.m_AlingVert = m_AlingVert;
-		nS.m_AlingHoriz = m_AlingHoriz;
-		nS.m_Descrip = m_Descrip;
-		nS.m_BackColor = m_BackColor;
-		nS.m_BackFill = m_BackFill;
-
-		nS.m_LinePattern = m_LinePattern;
-
-		return nS;
-	}
-
-
-	/**
-	 * Crea un s�mbolo a partir del tipo y el color.
-	 *
-	 * @param tipoSymbol Tipo de s�mbolo.
-	 * @param c Color del s�mbolo a crear.
-	 */
-	private void createSymbol(int tipoSymbol, Color c) {
-		// OJO: HE HECHO COINCIDIR LOS TIPOS DE SIMBOLO
-		//FConstant.SYMBOL_TYPE_POINT, LINE Y FILL CON
-		// FShape.POINT, LINE, POLYGON. EL .MULTI SE REFIERE
-		// A MULTIPLES TIPO DENTRO DEL SHAPE, AS� QUE SER� UN
-		// MULTISIMBOLO
-		// Tipo de simbolo
-		m_symbolType = tipoSymbol; // Para no recalcular el pixel, no usamos los set
-
-		// Ponemos un estilo por defecto
-		m_useOutline = true;
-		m_Color = c;
-		m_Stroke = null;
-		m_Fill = null;
-
-		m_FontColor = Color.BLACK;
-		m_FontSize = 10;
-		m_bUseFontSizeInPixels = true;
-
-		m_Size = 2;
-
-		switch (getSymbolType()) {
-			case Geometry.TYPES.POINT:
-			case Geometry.TYPES.MULTIPOINT:
-				m_bUseSize = true; // Esto es lo primero que hay que hacer siempre
-
-				// para evitar un StackOverflow
-				m_useOutline = false;
-				setStyle(SYMBOL_STYLE_MARKER_SQUARE);
-				setSize(5); //pixels
-
-				break;
-
-			case Geometry.TYPES.CURVE:			
-				setStroke(new BasicStroke());
-				setStyle(SYMBOL_STYLE_LINE_SOLID);
-
-				break;
-
-			case Geometry.TYPES.SURFACE:
-			    setStroke(new BasicStroke());
-				setStyle(SYMBOL_STYLE_FILL_SOLID);
-
-				break;
-			case Geometry.TYPES.GEOMETRY:
-				m_bUseSize = true;
-			    setStroke(new BasicStroke());
-				setStyle(SYMBOL_STYLE_FILL_SOLID);
-
-				// setStyle(FConstant.SYMBOL_STYLE_MARKER_SQUARE);
-				setSize(5); //pixels
-				break;
-		}
-
-		m_outlineColor = c.darker();
-
-		calculateRgb();
-	}
-
-	/**
-	 * Calcula el RGB del s�mbolo.
-	 */
-	public void calculateRgb() {
-		// Recalculamos el RGB
-		Graphics2D g2 = img.createGraphics();
-
-		try {
-			FGraphicUtilities.DrawSymbol(g2, g2.getTransform(), rect, this);
-		} catch (CreateGeometryException e) {
-			logger.error("Creating a geometry", e);
-			e.printStackTrace();
-		}
-		rgb = img.getRGB(0, 0);
-	}
-
-	/**
-	 * Devuelve el rgb del s�mbolo.
-	 *
-	 * @return rgb del s�mbolo.
-	 */
-	public int getOnePointRgb() {
-		return rgb;
-	}
-
-	/**
-	 * @see com.iver.cit.gvsig.gui.layout.fframes.IFFrame#getXMLEntity()
-	 */
-	public XMLEntity getXMLEntity() {
-		XMLEntity xml = new XMLEntity();
-		xml.putProperty("className",this.getClass().getName());
-		xml.putProperty("m_symbolType", getSymbolType());
-		xml.putProperty("m_Style", getStyle());
-		xml.putProperty("m_useOutline", isOutlined());
-
-		if (getColor() != null) {
-			xml.putProperty("m_Color", StringUtilities.color2String(getColor()));
-		}
-
-		if (getOutlineColor() != null) {
-			xml.putProperty("m_outlineColor",
-				StringUtilities.color2String(getOutlineColor()));
-		}
-
-		if (getFont() != null) {
-			xml.putProperty("fontname", getFont().getName());
-			xml.putProperty("fontstyle", getFont().getStyle());
-
-			xml.putProperty("m_FontSize", getFontSize());
-			xml.putProperty("m_FontColor",
-				StringUtilities.color2String(getFontColor()));
-
-		}
-		xml.putProperty("m_bUseFontSize", isFontSizeInPixels());
-		xml.putProperty("m_bDrawShape", isShapeVisible());
-		xml.putProperty("m_Size", getSize());
-
-		//xml.putProperty("m_Icon",m_Icon.);
-		xml.putProperty("m_Rotation", getRotation());
-
-		if (getFill() instanceof Color) {
-			xml.putProperty("m_Fill",
-				StringUtilities.color2String((Color) getFill()));
-		}
-		else
-			if (getFill() != null)
-			{
-			    xml.putProperty("m_Fill", "WithFill");
-			}
-
-
-		xml.putProperty("m_LinePattern", m_LinePattern);
-
-		//Ancho del stroke en float
-		if (getStroke() != null) {
-			xml.putProperty("m_stroke",
-				((BasicStroke) getStroke()).getLineWidth());
-		} else {
-			xml.putProperty("m_stroke", 0f);
-		}
-
-		xml.putProperty("m_bUseSize", isSizeInPixels());
-		xml.putProperty("m_AlingVert", getAlingVert());
-		xml.putProperty("m_AlingHoriz", getAlingHoriz());
-		xml.putProperty("m_Descrip", getDescription());
-
-		if (m_BackColor != null) {
-			xml.putProperty("m_BackColor",
-				StringUtilities.color2String(m_BackColor));
-		}
-
-		if (m_BackFill instanceof Color) {
-			xml.putProperty("m_BackFill",
-				StringUtilities.color2String((Color) m_BackFill));
-		}
-
-		xml.putProperty("rgb", rgb);
-
-		if (m_Icon != null)
-		{
-		    xml.putProperty("m_IconURI", m_IconURI);
-		}
-
-		return xml;
-	}
-	/**
-	 * Crea el s�mbolo a partir del xml.
-	 *
-	 * @param xml xml que contiene la informaci�n para crear el s�mbolo.
-	 *
-	 * @return S�mbolo creado a partir del XML.
-	 */
-	public static FSymbol createFromXML(XMLEntity xml) {
-		FSymbol symbol = new FSymbol();
-		symbol.setSymbolType(xml.getIntProperty("m_symbolType"));
-		symbol.setStyle(xml.getIntProperty("m_Style"));
-		// System.out.println("createFromXML: m_Style=" + xml.getIntProperty("m_Style"));
-
-		symbol.setOutlined(xml.getBooleanProperty("m_useOutline"));
-
-		if (xml.contains("m_Color")) {
-			symbol.setColor(StringUtilities.string2Color(xml.getStringProperty(
-						"m_Color")));
-		}
-
-		if (xml.contains("m_outlineColor")) {
-			symbol.setOutlineColor(StringUtilities.string2Color(
-					xml.getStringProperty("m_outlineColor")));
-		}
-
-		if (xml.contains("fontname")) {
-			symbol.setFont(new Font(xml.getStringProperty("fontname"),
-					xml.getIntProperty("fontstyle"),
-					(int) xml.getFloatProperty("m_FontSize")));
-
-			symbol.setFontColor(StringUtilities.string2Color(
-					xml.getStringProperty("m_FontColor")));
-			symbol.setFontSize(xml.getFloatProperty("m_FontSize"));
-
-		}
-		symbol.setFontSizeInPixels(xml.getBooleanProperty("m_bUseFontSize"));
-		symbol.setShapeVisible(xml.getBooleanProperty("m_bDrawShape"));
-		symbol.setSize(xml.getIntProperty("m_Size"));
-
-		//xml.putProperty("m_Icon",m_Icon.);
-		symbol.setRotation(xml.getIntProperty("m_Rotation"));
-
-		if (xml.contains("m_Fill")) {
-		    // TODO: Si es un Fill de tipo imagen, deber�amos recuperar la imagen.
-		    String strFill = xml.getStringProperty("m_Fill");
-		    if (strFill.compareTo("WithFill") == 0) {
-				symbol.setFill(FSymbolFactory.createPatternFill(symbol.getStyle(), symbol.getColor()));
-			} else {
-				symbol.setFill(StringUtilities.string2Color(strFill));
-			}
-		}
-
-
-		symbol.m_LinePattern = xml.getStringProperty("m_LinePattern");
-
-		//Ancho del stroke en float
-        float lineWidth = xml.getFloatProperty("m_stroke");
-        if (symbol.m_LinePattern.compareTo("0") == 0)
-        {
-            symbol.setStroke(new BasicStroke(lineWidth));
-        }
-        else
-        {
-            symbol.setStroke(new BasicStroke(lineWidth, BasicStroke.CAP_ROUND,
-                    BasicStroke.JOIN_BEVEL, 1.0f,
-                        toArray(symbol.m_LinePattern, lineWidth), 0));
-        }
-
-		symbol.setSizeInPixels(xml.getBooleanProperty("m_bUseSize"));
-		symbol.setAlingVert(xml.getIntProperty("m_AlingVert"));
-		symbol.setAlingHoriz(xml.getIntProperty("m_AlingHoriz"));
-		symbol.setDescription(xml.getStringProperty("m_Descrip"));
-
-		if (xml.contains("m_BackColor")) {
-			symbol.m_BackColor = StringUtilities.string2Color(xml.getStringProperty(
-						"m_BackColor"));
-		}
-
-		if (xml.contains("m_BackFill")) {
-			symbol.m_BackFill = StringUtilities.string2Color(xml.getStringProperty(
-						"m_BackFill"));
-		}
-
-		symbol.rgb = xml.getIntProperty("rgb");
-
-		if (xml.contains("m_IconURI")) {
-		    try {
-                symbol.setIconURI(new URI(xml.getStringProperty("m_IconURI")));
-            } catch (URISyntaxException e) {
-                // TODO Auto-generated catch block
-                e.printStackTrace();
-            }
-		}
-
-		return symbol;
-	}
-
-	/**
-	 * Introduce el estilo del s�mbolo.
-	 *
-	 * @param m_Style The m_Style to set.
-	 */
-	public void setStyle(int m_Style) {
-		this.m_Style = m_Style;
-
-		//		 calculateRgb();
-	}
-
-	/**
-	 * Devuelve el estilo del s�mbolo.
-	 *
-	 * @return Returns the m_Style.
-	 */
-	public int getStyle() {
-		return m_Style;
-	}
-
-	/**
-	 * Introduce el tipo de s�mbolo.
-	 *
-	 * @param m_symbolType The m_symbolType to set.
-	 */
-	public void setSymbolType(int m_symbolType) {
-		this.m_symbolType = m_symbolType;
-	}
-
-	/**
-	 * Devuelve el tipo de s�mbolo.
-	 *
-	 * @return Returns the m_symbolType.
-	 */
-	public int getSymbolType() {
-		return m_symbolType;
-	}
-
-	/**
-	 * Introduce si el s�mbolo contiene linea de brode o no.
-	 *
-	 * @param m_useOutline The m_useOutline to set.
-	 */
-	public void setOutlined(boolean m_useOutline) {
-		this.m_useOutline = m_useOutline;
-
-		//		 calculateRgb();
-	}
-
-	/**
-	 * Devuelve si el s�mbolo contiene o no linea de borde.
-	 *
-	 * @return Returns the m_useOutline.
-	 */
-	public boolean isOutlined() {
-		return m_useOutline;
-	}
-
-	/**
-	 * Introduce el color del s�mbolo.
-	 *
-	 * @param m_Color The m_Color to set.
-	 */
-	public void setColor(Color m_Color) {
-		this.m_Color = m_Color;
-		calculateRgb();
-	}
-
-	/**
-	 * Devuelve el color del s�mbolo.
-	 *
-	 * @return Returns the m_Color.
-	 */
-	public Color getColor() {
-		return m_Color;
-	}
-
-	/**
-	 * Introduce el color de la l�nea de borde.
-	 *
-	 * @param m_outlineColor The m_outlineColor to set.
-	 */
-	public void setOutlineColor(Color m_outlineColor) {
-		this.m_outlineColor = m_outlineColor;
-
-		//		 calculateRgb();
-	}
-
-	/**
-	 * Devuelve el color de la l�nea de borde.
-	 *
-	 * @return Returns the m_outlineColor.
-	 */
-	public Color getOutlineColor() {
-		return m_outlineColor;
-	}
-
-	/**
-	 * Introduce el Font del s�mbolo.
-	 *
-	 * @param m_Font The m_Font to set.
-	 */
-	public void setFont(Font m_Font) {
-		this.m_Font = m_Font;
-
-		//		 calculateRgb();
-	}
-
-	/**
-	 * Devuelve el Font del s�mbolo.
-	 *
-	 * @return Returns the m_Font.
-	 */
-	public Font getFont() {
-		return m_Font;
-	}
-
-	/**
-	 * Introduce el color de la fuente.
-	 *
-	 * @param m_FontColor The m_FontColor to set.
-	 */
-	public void setFontColor(Color m_FontColor) {
-		this.m_FontColor = m_FontColor;
-
-		//		 calculateRgb();
-	}
-
-	/**
-	 * Devuelve el color de la fuente.
-	 *
-	 * @return Returns the m_FontColor.
-	 */
-	public Color getFontColor() {
-		return m_FontColor;
-	}
-
-	/**
-	 * Introduce si se usa el tama�o de la fuente en pixels.
-	 *
-	 * @param m_bUseFontSize The m_bUseFontSize to set.
-	 */
-	public void setFontSizeInPixels(boolean m_bUseFontSize) {
-		this.m_bUseFontSizeInPixels = m_bUseFontSize;
-
-		// calculateRgb();
-	}
-
-	/**
-	 * Devuelve true si el tama�o de la fuente esta seleccionado en pixels.
-	 *
-	 * @return Returns the m_bUseFontSize.
-	 */
-	public boolean isFontSizeInPixels() {
-		return m_bUseFontSizeInPixels;
-	}
-
-	/**
-	 * Introduce si el shape e visible o no lo es.
-	 *
-	 * @param m_bDrawShape The m_bDrawShape to set.
-	 */
-	public void setShapeVisible(boolean m_bDrawShape) {
-		this.m_bDrawShape = m_bDrawShape;
-
-		//		 calculateRgb();
-	}
-
-	/**
-	 * Devuelve true si el shape es visible.
-	 *
-	 * @return Returns the m_bDrawShape.
-	 */
-	public boolean isShapeVisible() {
-		return m_bDrawShape;
-	}
-
-	/**
-	 * Introduce el tama�o del s�mbolo.
-	 *
-	 * @param m_Size The m_Size to set.
-	 */
-	public void setSize(int m_Size) {
-		this.m_Size = m_Size;
-
-		//		 calculateRgb();
-	}
-
-	/**
-	 * Devuelve el tama�o del s�mbolo.
-	 *
-	 * @return Returns the m_Size.
-	 */
-	public int getSize() {
-		return m_Size;
-	}
-
-	/**
-	 * Introduce la imagen que hace de icono.
-	 *
-	 * @param m_Icon The m_Icon to set.
-	 */
-	public void setIcon(Image m_Icon) {
-		this.m_Icon = m_Icon;
-
-		//		 calculateRgb();
-	}
-
-	/**
-	 * Devuelve el icono.
-	 *
-	 * @return Returns the m_Icon.
-	 */
-	public Image getIcon() {
-		return m_Icon;
-	}
-
-	/**
-	 * Introduce la rotaci�n.
-	 *
-	 * @param m_Rotation The m_Rotation to set.
-	 */
-	public void setRotation(int m_Rotation) {
-		this.m_Rotation = m_Rotation;
-
-		//		 calculateRgb();
-	}
-
-	/**
-	 * Devuelve la rotaci�n.
-	 *
-	 * @return Returns the m_Rotation.
-	 */
-	public int getRotation() {
-		return m_Rotation;
-	}
-
-	/**
-	 * Introduce el relleno.
-	 *
-	 * @param m_Fill The m_Fill to set.
-	 */
-	public void setFill(Paint m_Fill) {
-		this.m_Fill = m_Fill;
-
-		//		 calculateRgb();
-	}
-
-	/**
-	 * Devuelve el relleno.
-	 *
-	 * @return Returns the m_Fill.
-	 */
-	public Paint getFill() {
-		return m_Fill;
-	}
-
-	/**
-	 * Introduce el Stroke.
-	 *
-	 * @param m_Stroke The m_Stroke to set.
-	 */
-	public void setStroke(Stroke m_Stroke) {
-		this.m_Stroke = m_Stroke;
-
-		//		 calculateRgb();
-	}
-
-	/**
-	 * Devuelve el Stroke.
-	 *
-	 * @return Returns the m_Stroke.
-	 */
-	public Stroke getStroke() {
-		return m_Stroke;
-	}
-
-	/**
-	 * Introduce si el tama�o del simbolo est� en pixels.
-	 *
-	 * @param m_bUseSize The m_bUseSize to set.
-	 */
-	public void setSizeInPixels(boolean m_bUseSize) {
-		this.m_bUseSize = m_bUseSize;
-
-		//		 calculateRgb();
-	}
-
-	/**
-	 * Devuelve si el tama�o del s�mbolo est� en pixels.
-	 *
-	 * @return Returns the m_bUseSize.
-	 */
-	public boolean isSizeInPixels() {
-		return m_bUseSize;
-	}
-
-	/**
-	 * Introduce la descripci�n del s�mbolo.
-	 *
-	 * @param m_Descrip The m_Descrip to set.
-	 */
-	public void setDescription(String m_Descrip) {
-		this.m_Descrip = m_Descrip;
-	}
-
-	/**
-	 * Devuelve la descripci�n del s�mbolo.
-	 *
-	 * @return Returns the m_Descrip.
-	 */
-	public String getDescription() {
-		return m_Descrip != null ? m_Descrip : "Default";
-	}
-
-	/**
-	 * Introduce la alineaci�n en vertical.
-	 *
-	 * @param m_AlingVert The m_AlingVert to set.
-	 */
-	public void setAlingVert(int m_AlingVert) {
-		this.m_AlingVert = m_AlingVert;
-
-		//		 calculateRgb();
-	}
-
-	/**
-	 * Devuelve la alineaci�n en vertical.
-	 *
-	 * @return Returns the m_AlingVert.
-	 */
-	public int getAlingVert() {
-		return m_AlingVert;
-	}
-
-	/**
-	 * Introduce la alineaci�n en horizontal.
-	 *
-	 * @param m_AlingHoriz The m_AlingHoriz to set.
-	 */
-	public void setAlingHoriz(int m_AlingHoriz) {
-		this.m_AlingHoriz = m_AlingHoriz;
-
-		// calculateRgb();
-	}
-
-	/**
-	 * Devuelve la alineaci�n en horizontal.
-	 *
-	 * @return Returns the m_AlingHoriz.
-	 */
-	public int getAlingHoriz() {
-		return m_AlingHoriz;
-	}
-
-
-	/**
-	 * Introduce el tama�o de la fuente.
-	 *
-	 * @param m_FontSize The m_FontSize to set.
-	 */
-	public void setFontSize(float m_FontSize) {
-		this.m_FontSize = m_FontSize;
-	}
-
-	/**
-	 * Devuelve el tama�o de la fuente.
-	 *
-	 * @return Returns the m_FontSize.
-	 */
-	public float getFontSize() {
-		return m_FontSize;
-	}
-    public URI getIconURI() {
-        return m_IconURI;
-    }
-    public void setIconURI(URI iconURI) {
-        m_IconURI = iconURI;
-        ImageIcon prov;
-        try {
-            prov = new ImageIcon(iconURI.toURL());
-            m_Icon = prov.getImage();
-        } catch (MalformedURLException e) {
-            // TODO Auto-generated catch block
-            e.printStackTrace();
-        }
-
-    }
-   	/**
-	 * @return Returns the imgObserver.
-	 */
-	public ImageObserver getImgObserver() {
-		return imgObserver;
-	}
-
-	/**
-	 * @param imgObserver The imgObserver to set.
-	 */
-	public void setImgObserver(ImageObserver imgObserver) {
-		this.imgObserver = imgObserver;
-	}
-
-	public ISymbol getSymbolForSelection() {
-		return getSymbolForSelection(this);
-	}
-
-	public void draw(Graphics2D g, AffineTransform affineTransform,
-			Geometry geom, Feature feature, Cancellable cancel) {
-		FGraphicUtilities.DrawShape(g, affineTransform, geom, this);
-	}
-
-	public void getPixExtentPlus(Geometry geom, float[] distances, ViewPort viewPort, int dpi) {
-		// Nothing to do
-	}
-
-	public boolean isSuitableFor(Geometry geom) {
-		return true;
-	}
-
-	public void drawInsideRectangle(Graphics2D g2, AffineTransform scaleInstance, Rectangle r, PrintAttributes properties) throws SymbolDrawingException {
-		try {
-			FGraphicUtilities.DrawSymbol(g2, scaleInstance, r, this);
-		} catch (CreateGeometryException e) {
-			
-			throw new SymbolDrawingException(getSymbolType());
-		}
-	}
-
-	public String getClassName() {
-		// TODO Auto-generated method stub
-		return null;
-	}
-
-	public void setXMLEntity(XMLEntity xml) {
-		// TODO Auto-generated method stub
-
-	}
-
-	public void print(Graphics2D g, AffineTransform at, Geometry shape, PrintAttributes properties){
-		int strokeValue=0;
-		BasicStroke stroke=(BasicStroke)this.getStroke();
-		if (stroke != null && stroke.getLineWidth()!=0) {
-			strokeValue=(int)stroke.getLineWidth();
-			double d = strokeValue;
-			
-			int pq = properties.getPrintQuality();
-			if (pq == PrintAttributes.PRINT_QUALITY_NORMAL){
-				d *= (double) 300/72;
-			}else if (pq == PrintAttributes.PRINT_QUALITY_HIGH){
-				d *= (double) 600/72;
-			}else if (pq == PrintAttributes.PRINT_QUALITY_DRAFT){
-				// d *= 72/72; // (which is the same than doing nothing)
-			}
-			this.setStroke(new BasicStroke((int)d,BasicStroke.CAP_ROUND,BasicStroke.JOIN_ROUND));
-		}
-		draw(g, at, shape, null, null);
-		this.setStroke(new BasicStroke(strokeValue));
-	}
-	
-	public boolean isOneDotOrPixel(Geometry geom,
-			double[] positionOfDotOrPixel, ViewPort viewPort, int dpi) {
-		int type = geom.getType();
-		switch (type) {
-		case Geometry.TYPES.NULL:
-		case Geometry.TYPES.POINT:
-		case Geometry.TYPES.MULTIPOINT:
-			return false;
-		default:
-			org.gvsig.fmap.geom.primitive.Envelope geomBounds = geom
-			.getEnvelope();
-
-			double dist1Pixel = viewPort.getDist1pixel();
-
-			float[] distances = new float[2];
-			this.getPixExtentPlus(geom, distances, viewPort, dpi);
-
-			boolean onePoint =
-					(geomBounds.getLength(0) + distances[0] <= dist1Pixel && geomBounds
-					.getLength(1)
-					+ distances[1] <= dist1Pixel);
-
-			if (onePoint) {
-				Rectangle bounds = geom.getShape().getBounds();
-				positionOfDotOrPixel[0] = bounds.x;
-				positionOfDotOrPixel[1] = bounds.y;
-			}
-			return onePoint;
-		}
-	}
-
-	public Object clone() throws CloneNotSupportedException {
-		// TODO Auto-generated method stub
-		return super.clone();
-	}
-
-	/* (non-Javadoc)
-	 * @see org.gvsig.tools.persistence.Persistent#loadFromState(org.gvsig.tools.persistence.PersistentState)
-	 */
-	public void loadFromState(PersistentState state)
-			throws PersistenceException {
-		// TODO Auto-generated method stub
-		
-	}
-
-	/* (non-Javadoc)
-	 * @see org.gvsig.tools.persistence.Persistent#saveToState(org.gvsig.tools.persistence.PersistentState)
-	 */
-	public void saveToState(PersistentState state) throws PersistenceException {
-		// TODO Auto-generated method stub
-		
-	}
-}
Index: trunk/org.gvsig.desktop/org.gvsig.desktop.library/org.gvsig.symbology/org.gvsig.symbology.lib/org.gvsig.symbology.lib.impl/src/main/java/org/gvsig/symbology/fmap/mapcontext/rendering/symbol/impl/FGraphicUtilities.java
===================================================================
--- trunk/org.gvsig.desktop/org.gvsig.desktop.library/org.gvsig.symbology/org.gvsig.symbology.lib/org.gvsig.symbology.lib.impl/src/main/java/org/gvsig/symbology/fmap/mapcontext/rendering/symbol/impl/FGraphicUtilities.java	(revision 43509)
+++ trunk/org.gvsig.desktop/org.gvsig.desktop.library/org.gvsig.symbology/org.gvsig.symbology.lib/org.gvsig.symbology.lib.impl/src/main/java/org/gvsig/symbology/fmap/mapcontext/rendering/symbol/impl/FGraphicUtilities.java	(revision 43510)
@@ -1,850 +0,0 @@
-/**
- * gvSIG. Desktop Geographic Information System.
- *
- * Copyright (C) 2007-2013 gvSIG Association.
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 3
- * of the License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
- * MA  02110-1301, USA.
- *
- * For any additional information, do not hesitate to contact us
- * at info AT gvsig.com, or visit our website www.gvsig.com.
- */
-package org.gvsig.symbology.fmap.mapcontext.rendering.symbol.impl;
-
-import java.awt.Color;
-import java.awt.Font;
-import java.awt.FontMetrics;
-import java.awt.Graphics2D;
-import java.awt.Rectangle;
-import java.awt.geom.AffineTransform;
-import java.awt.geom.Point2D;
-
-import org.apache.batik.ext.awt.geom.DefaultPathLength;
-import org.gvsig.fmap.geom.Geometry;
-import org.gvsig.fmap.geom.GeometryLocator;
-import org.gvsig.fmap.geom.GeometryManager;
-import org.gvsig.fmap.geom.Geometry.SUBTYPES;
-import org.gvsig.fmap.geom.exception.CreateGeometryException;
-import org.gvsig.fmap.geom.handler.Handler;
-import org.gvsig.fmap.geom.primitive.GeneralPathX;
-import org.gvsig.fmap.geom.primitive.Point;
-import org.gvsig.fmap.mapcontext.MapContext;
-import org.gvsig.fmap.mapcontext.rendering.symbols.ISymbol;
-import org.gvsig.symbology.PathLength;
-import org.gvsig.symbology.fmap.mapcontext.rendering.symbol.fill.IFillSymbol;
-import org.gvsig.symbology.fmap.mapcontext.rendering.symbol.line.ILineSymbol;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-/**
- * Clase con m�todos est�ticos para dibujar sobre el Graphics que se les pase
- * como par�metro.
- *
- * Esta clase deber�a ser privada. Las clases que la usan son GraphicLayer
- * y AnnotationStrategy, pero hay que revisarlas para que no sea necesario.
- * Lo m�s urgente ser�a lo del dibujado de textos, para que sea
- * Hay que quitar las dependecias de FSymbol, y trabajar SIEMPRE con ISymbol.
- * Recordar: Que sea ISymbol el que renderiza.
- * extensible el s�mbolo a usar. NOTA: Ver tambi�n comentario en ISymbol
- *
- * @deprecated
- */
-public class FGraphicUtilities {
-	private static final GeometryManager geomManager = GeometryLocator.getGeometryManager();
-	private static final Logger logger = LoggerFactory.getLogger(FGraphicUtilities.class);
-
-	/**
-	 * Dibuja el s�mbolo que se le pasa como par�metro en el Graphics.
-	 *
-	 * @param g2 Graphics2D sobre el que dibujar.
-	 * @param mT2 Matriz de transformaci�n.
-	 * @param r Rect�ngulo.
-	 * @param symbol S�mbolo a dibujar.
-	 * @throws CreateGeometryException 
-	 */
-	public static void DrawSymbol(Graphics2D g2, AffineTransform mT2,
-		Rectangle r, FSymbol symbol) throws CreateGeometryException {
-		Geometry geom;
-
-		AffineTransform mT = new AffineTransform();
-		mT.setToIdentity();
-
-		Rectangle r2 = new Rectangle(r.x + 2 + (r.width / 3), r.y, r.width / 3,
-				r.height);
-		Rectangle r3 = new Rectangle(r.x + 2 + ((2 * r.width) / 3), r.y,
-				r.width / 3, r.height);
-
-		// g2.clearRect(r.x, r.y, r.width, r.height);
-		// System.out.println("r = " + r.toString() + " Color preview:" + symbol.m_Color.toString());
-		// System.out.println("symbol.m_symbolType= "+symbol.m_symbolType);
-		switch (symbol.getSymbolType()) {
-			case Geometry.TYPES.POINT:
-				geom = geomManager.createPoint(r.x + (r.width / 2), r.y + (r.height / 2), SUBTYPES.GEOM2D);
-
-				//  Para no tener que clonarlo si viene en unidades de mapa
-				boolean bAux2 = symbol.isSizeInPixels();
-				int alturaMetros = symbol.getSize(); // Nota: Cambiar m_Size a float
-
-				if (!bAux2) {
-					symbol.setSizeInPixels(true);
-					symbol.setSize(8); // tama�o fijo
-				}
-
-				symbol.draw(g2, mT, geom, null, null);
-				// FGraphicUtilities.DrawShape(g2, mT, shp, symbol);
-
-
-				if (!bAux2) {
-					symbol.setSize(alturaMetros);
-					symbol.setSizeInPixels(bAux2);
-				}
-
-				if (symbol.getFont() != null) {
-					// Para no tener que clonarlo si viene en unidades de mapa
-					boolean bAux = symbol.isFontSizeInPixels();
-					symbol.setFontSizeInPixels(true);
-					FGraphicUtilities.DrawLabel(g2, mT, geom, symbol,
-						new FLabel("Abcd"));
-					symbol.setFontSizeInPixels(bAux);
-				}
-
-				break;
-
-			case Geometry.TYPES.CURVE:
-
-				Rectangle rect = mT2.createTransformedShape(r).getBounds();
-				GeneralPathX line = new GeneralPathX();
-				line.moveTo(rect.x, rect.y + (rect.height / 2));
-
-				// line.lineTo(rect.x + rect.width/3, rect.y + rect.height);
-				// line.lineTo(rect.x + 2*rect.width/3, rect.y);
-				// line.lineTo(rect.x + rect.width, rect.y + rect.height/2);
-				line.curveTo(rect.x + (rect.width / 3),
-					rect.y + (2 * rect.height),
-					rect.x + ((2 * rect.width) / 3), rect.y - rect.height,
-					rect.x + rect.width, rect.y + (rect.height / 2));
-
-				geom = geomManager.createSurface(line, SUBTYPES.GEOM2D);
-				symbol.draw(g2, mT, geom, null, null);
-				// FGraphicUtilities.DrawShape(g2, mT, shp, symbol);
-
-				break;
-
-			case Geometry.TYPES.SURFACE:
-
-				GeneralPathX rectAux = new GeneralPathX(r.getPathIterator(null));
-				rectAux.transform(mT2);
-				geom = geomManager.createSurface(rectAux, SUBTYPES.GEOM2D);
-
-				// System.out.println("rect = "+rectAux.getBounds());
-				symbol.draw(g2, mT, geom, null, null);
-				// FGraphicUtilities.DrawShape(g2, mT, shp, symbol);
-
-				break;
-
-			case Geometry.TYPES.GEOMETRY:
-
-				// Pol�gono
-				r.setSize(r.width / 3, r.height);
-
-				GeneralPathX rectAux2 = new GeneralPathX(r.getPathIterator(null));
-				rectAux2.transform(mT2);
-				geom = geomManager.createSurface(rectAux2, SUBTYPES.GEOM2D);
-				symbol.draw(g2, mT, geom, null, null);
-				// FGraphicUtilities.DrawShape(g2, mT, shp, symbol);
-
-				// L�nea
-				rect = mT2.createTransformedShape(r2).getBounds();
-				line = new GeneralPathX();
-				line.moveTo(rect.x, rect.y + (rect.height / 2));
-
-				line.curveTo(rect.x + (rect.width / 3),
-					rect.y + (2 * rect.height),
-					rect.x + ((2 * rect.width) / 3), rect.y - rect.height,
-					rect.x + rect.width, rect.y + (rect.height / 2));
-
-				geom = geomManager.createCurve(line, SUBTYPES.GEOM2D);
-				symbol.draw(g2, mT, geom, null, null);
-				// FGraphicUtilities.DrawShape(g2, mT, shp, symbol);
-
-				// Punto:
-				geom = geomManager.createPoint(r3.x + (r3.width / 2), r3.y +
-						(r3.height / 2), SUBTYPES.GEOM2D);
-
-				//  Para no tener que clonarlo si viene en unidades de mapa
-				bAux2 = symbol.isSizeInPixels();
-				alturaMetros = symbol.getSize(); // Nota: Cambiar m_Size a float
-
-				if (!bAux2) {
-					symbol.setSizeInPixels(true);
-					symbol.setSize(4); // tama�o fijo
-				}
-				symbol.draw(g2, mT, geom, null, null);
-				// FGraphicUtilities.DrawShape(g2, mT, shp, symbol);
-
-				if (!bAux2) {
-					symbol.setSize(alturaMetros);
-					symbol.setSizeInPixels(bAux2);
-				}
-
-				if (symbol.getFont() != null) {
-					// Para no tener que clonarlo si viene en unidades de mapa
-					boolean bAux = symbol.isFontSizeInPixels();
-					symbol.setFontSizeInPixels(true);
-					FGraphicUtilities.DrawLabel(g2, mT, geom, symbol,
-						new FLabel("Abcd"));
-					symbol.setFontSizeInPixels(bAux);
-				}
-
-				break;
-		}
-	}
-
-	/**
-	 * Dibuja el shape que se pasa como par�metro con las caracter�sticas que
-	 * aporta el s�mbolo sobre el Graphics2D.
-	 *
-	 * @param g2 Graphics2D sobre el que dibujar.
-	 * @param mT Matriz de transformaci�n.
-	 * @param shp FShape a dibujar.
-	 * @param theSymbol S�mbolo.
-	 * @deprecated
-	 */
-	public static void DrawShape(Graphics2D g2, AffineTransform mT, Geometry geom,
-		FSymbol theSymbol) {
-		// Hacemos la transformaci�n del shape aqu� dentro... por ahora.
-		if (geom == null || theSymbol == null || (!theSymbol.isShapeVisible())) {
-			return;
-		}
-        g2.setColor(theSymbol.getColor());
-
-		/* if (shp instanceof FPolygon2D)
-		   {
-		           System.out.println("Entra pol�gono");
-		   } */
-		int type=geom.getType();
-		/* if (shp.getShapeType()>=FShape.Z){
-			type=shp.getShapeType()-FShape.Z;
-		} */
-		switch (type) {
-			case Geometry.TYPES.POINT: //Tipo punto            
-				drawSymbolPoint(g2, mT, (org.gvsig.fmap.geom.primitive.Point) geom, theSymbol);
-
-				break;
-
-			case Geometry.TYPES.CURVE:           
-			case Geometry.TYPES.ARC:			
-				// Shape theShp = mT.createTransformedShape(shp.m_Polyline);
-				// g2.setColor(theSymbol.m_Color);
-				if (theSymbol.getStroke() != null) {
-					g2.setStroke(theSymbol.getStroke());
-				}
-
-				g2.draw(geom.getShape());
-
-				break;
-
-			case Geometry.TYPES.SURFACE:
-       		case Geometry.TYPES.ELLIPSE:
-		    case Geometry.TYPES.CIRCLE:
-		
-			    if (theSymbol.getFill() != null)
-			        g2.setPaint(theSymbol.getFill());
-
-			    if (theSymbol.getColor() != null)
-				    if (theSymbol.getStyle() != FSymbol.SYMBOL_STYLE_DGNSPECIAL) {
-				        g2.fill(geom.getShape());
-				}
-
-				if (theSymbol.isOutlined()) {
-					g2.setColor(theSymbol.getOutlineColor());
-
-					if (theSymbol.getStroke() != null) {
-						g2.setStroke(theSymbol.getStroke());
-					}
-
-					g2.draw(geom.getShape());
-				}
-
-				break;
-
-		}
-	}
-//	public static double toMapDistance(AffineTransform at,int d) {
-//		double dist = d / at.getScaleX();
-//
-//		return dist;
-//	}
-//	public static int fromMapDistance(AffineTransform at,double d) {
-//		Point2D.Double pWorld = new Point2D.Double(1, 1);
-//		Point2D.Double pScreen = new Point2D.Double();
-//
-//		try {
-//			at.deltaTransform(pWorld, pScreen);
-//		} catch (Exception e) {
-//			System.err.print(e.getMessage());
-//		}
-//
-//		return (int) (d * pScreen.x);
-//	}
-	/**
-	 * Dibuja el FLabel que se pasa como par�metro sobre el Graphics2D.
-	 *
-	 * @param g2 Graphics2D sobre el que dibujar.
-	 * @param mT Matriz de transformaci�n.
-	 * @param shp FShape a dibujar.
-	 * @param theSymbol S�mbolo para aplicar.
-	 * @param theLabel FLabel que contiene el texto que se debe dibujar.
-	 */
-	public static void DrawLabel(Graphics2D g2, AffineTransform mT, Geometry geom,
-		FSymbol theSymbol, FLabel theLabel) {
-		float angle;
-		float x;
-		float y;
-		Point2D pAux = null;
-
-		// USAR TEXTLAYOUT SI QUEREMOS PERMITIR SELECCIONAR UN TEXTO
-		// Y/O EDITARLO "IN SITU"
-
-		/* if (m_labelValues[numReg].length() > 0)
-		   {
-		           TextLayout layout = new TextLayout(m_labelValues[numReg], font, frc);
-		           layout.draw(g2, x, y);
-		   } */
-		if (geom == null) {
-			return;
-		}
-
-		// Las etiquetas que pongamos a nulo ser� porque no la queremos dibujar.
-		// �til para cuando queramos eliminar duplicados.
-		if (theLabel.getString() == null) {
-			return;
-		}
-
-		FontMetrics metrics;// = g2.getFontMetrics();
-		int width;// = metrics.stringWidth(theLabel.getString());
-		int height;// = metrics.getMaxAscent();
-
-		// int height = metrics.getHeight();
-		//g2.setFont(theSymbol.getFont());
-		//g2.setColor(theSymbol.getFontColor());
-
-		// Aqu� hay que mirar m_Size y m_useSize...
-		if (!theSymbol.isFontSizeInPixels()) {
-			// Suponemos que m_Size viene en coordenadas de mundo real
-			// Esto habr� que cambiarlo. Probablemente usar Style2d de geotools en lugar
-			// de FSymbol.
-			// CAMBIO: La altura del texto la miramos en FLabel
-			// float alturaPixels = (float) (theSymbol.m_FontSize * mT.getScaleX());
-			float alturaPixels = (float) (theLabel.getHeight() * mT.getScaleX());
-
-			/* System.out.println("m_bUseSize = " + theSymbol.m_bUseSize +
-			   " Escala: " + mT.getScaleX() + " alturaPixels = " + alturaPixels); */
-			if (alturaPixels < 3) {
-				return; // No leemos nada
-			}
-
-			Font nuevaFuente = theSymbol.getFont().deriveFont(theSymbol.getFont().getStyle(),alturaPixels);
-			g2.setFont(nuevaFuente);
-			g2.setColor(theSymbol.getFontColor());
-			metrics=g2.getFontMetrics();
-			height= metrics.getMaxAscent();
-			width = metrics.stringWidth(theLabel.getString());
-		}else {
-			metrics = g2.getFontMetrics();
-			width = metrics.stringWidth(theLabel.getString());
-			height = metrics.getMaxAscent();
-			g2.setFont(theSymbol.getFont());
-			g2.setColor(theSymbol.getFontColor());
-		}
-		int type=geom.getType();
-		switch (type) {
-			case Geometry.TYPES.POINT: //Tipo punto
-				pAux = new Point2D.Double(((org.gvsig.fmap.geom.primitive.Point) geom).getX(),
-						((org.gvsig.fmap.geom.primitive.Point) geom).getY());
-				pAux = mT.transform(pAux, null);
-
-				break;
-
-			case Geometry.TYPES.CURVE:
-
-				//
-				if (theLabel.getOrig() == null) // Calculamos el punto y la orientaci�n solo la primera vez
-				 {
-					PathLength pathLen = new DefaultPathLength(geom.getShape());
-
-					// if (pathLen.lengthOfPath() < width / mT.getScaleX()) return;
-					float midDistance = pathLen.lengthOfPath() / 2;
-					pAux = pathLen.pointAtLength(midDistance);
-					angle = pathLen.angleAtLength(midDistance);
-
-					if (angle < 0) {
-						angle = angle + (float) (2 * Math.PI);
-					}
-
-					if ((angle > (Math.PI / 2)) &&
-							(angle < ((3 * Math.PI) / 2))) {
-						angle = angle - (float) Math.PI;
-					}
-
-					theLabel.setRotation(Math.toDegrees(angle));
-					theLabel.setOrig(pAux);
-				}
-
-				pAux = mT.transform(theLabel.getOrig(), null);
-
-				// pAux = theLabel.getOrig();
-				// GlyphVector theGlyphs = theSymbol.m_Font.createGlyphVector(g2.getFontRenderContext(), theLabel);
-				// Shape txtShp = TextPathLayout.layoutGlyphVector(theGlyphs, shp.m_Polyline,TextPathLayout.ALIGN_MIDDLE);
-				// g2.draw(txtShp);
-				// System.out.println("Pintando etiqueta " + theLabel );
-				break;
-
-			case Geometry.TYPES.SURFACE:
-
-				if (theLabel.getOrig() == null) // Calculamos el punto solo la primera vez
-				 {
-					
-					Point pLabel;
-					try {
-						pLabel = geom.getInteriorPoint();
-						theLabel.setRotation(0);
-						theLabel.setOrig(new Point2D.Double(
-								pLabel.getX(),
-								pLabel.getY()));
-					} catch (Exception e) {
-						logger.info("Error: Impossible to create the label. ", e);
-					}				
-				}
-
-				pAux = mT.transform(theLabel.getOrig(), null);
-
-				break;
-		}
-
-		AffineTransform ant = g2.getTransform();
-
-		x = (float) pAux.getX();
-		y = (float) pAux.getY();
-
-		AffineTransform Tx = (AffineTransform) ant.clone();
-		Tx.translate(x, y); // S3: final translation
-		Tx.rotate(theLabel.getRotation()); // S2: rotate around anchor
-		g2.setTransform(Tx);
-
-		switch (theLabel.getJustification()) {
-			case FLabel.LEFT_BOTTOM:
-				g2.drawString(theLabel.getString(), 0, 0 - 3);
-
-				break;
-
-			case FLabel.LEFT_CENTER:
-				g2.drawString(theLabel.getString(), 0, 0 - (height / 2));
-
-				break;
-
-			case FLabel.LEFT_TOP:
-				g2.drawString(theLabel.getString(), 0, 0 - height);
-
-				break;
-
-			case FLabel.CENTER_BOTTOM:
-				g2.drawString(theLabel.getString(), 0 - (width / 2), 0 - 3);
-
-				break;
-
-			case FLabel.CENTER_CENTER:
-				g2.drawString(theLabel.getString(), 0 - (width / 2),
-					0 - (height / 2));
-
-				break;
-
-			case FLabel.CENTER_TOP:
-				g2.drawString(theLabel.getString(), 0 - (width / 2), 0 -
-					height);
-
-				break;
-
-			case FLabel.RIGHT_BOTTOM:
-				g2.drawString(theLabel.getString(), 0 - width, 0 - 3);
-
-				break;
-
-			case FLabel.RIGHT_CENTER:
-				g2.drawString(theLabel.getString(), 0 - width, 0 -
-					(height / 2));
-
-				break;
-
-			case FLabel.RIGHT_TOP:
-				g2.drawString(theLabel.getString(), 0 - width, 0 - height);
-
-				break;
-		}
-
-		// Restauramos
-		g2.setTransform(ant);
-	}
-	/**
-	 * Dibuja el FLabel que se pasa como par�metro sobre el Graphics2D.
-	 *
-	 * @param g2 Graphics2D sobre el que dibujar.
-	 * @param mT Matriz de transformaci�n.
-	 * @param shp FShape a dibujar.
-	 * @param theSymbol S�mbolo para aplicar.
-	 * @param theLabel FLabel que contiene el texto que se debe dibujar.
-	 */
-	public static void DrawAnnotation(Graphics2D g2, AffineTransform at,
-		FSymbol theSymbol, FLabel theLabel,FontMetrics metrics,boolean isSelected) {
-		float x;
-		float y;
-		Point2D pAux = null;
-		// Las etiquetas que pongamos a nulo ser� porque no la queremos dibujar.
-		// �til para cuando queramos eliminar duplicados.
-		if (theLabel.getString() == null) {
-			return;
-		}
-
-//		 Aqu� hay que mirar m_Size y m_useSize...
-		if (!theSymbol.isFontSizeInPixels()) {
-			// Suponemos que m_Size viene en coordenadas de mundo real
-			// Esto habr� que cambiarlo. Probablemente usar Style2d de geotools en lugar
-			// de FSymbol.
-			// CAMBIO: La altura del texto la miramos en FLabel
-			// float alturaPixels = (float) (theSymbol.m_FontSize * mT.getScaleX());
-			float alturaPixels = (float) (theLabel.getHeight() * at.getScaleX()*FLabel.SQUARE);
-			if (alturaPixels < 3) {
-				return; // No leemos nada
-			}
-			Font nuevaFuente = theSymbol.getFont().deriveFont(theSymbol.getFont().getStyle(),alturaPixels);
-			g2.setFont(nuevaFuente);
-		}
-
-
-		if (isSelected){
-			g2.setColor(MapContext.getSelectionColor());
-		}else{
-			g2.setColor(theSymbol.getFontColor());
-		}
-		pAux = at.transform(theLabel.getOrig(), null);
-		AffineTransform ant = g2.getTransform();
-
-		x = (float) pAux.getX();
-		y = (float) pAux.getY();
-
-		AffineTransform Tx = (AffineTransform) ant.clone();
-		Tx.translate(x, y); // S3: final translation
-		Tx.rotate(theLabel.getRotation()); // S2: rotate around anchor
-		g2.setTransform(Tx);
-
-
-		String s=theLabel.getString();
-
-
-		//switch (theLabel.getJustification()) {
-
-		 //case FLabel.LEFT_BOTTOM:
-				g2.drawString(s, 0, 0 - 3);
-/*
-				break;
-
-			case FLabel.LEFT_CENTER:
-				float height = metrics.getMaxAscent();
-				g2.drawString(s, 0, 0 - (height / 2));
-
-				break;
-
-			case FLabel.LEFT_TOP:
-				height = metrics.getMaxAscent();
-				g2.drawString(s, 0, 0 - height);
-
-				break;
-
-			case FLabel.CENTER_BOTTOM:
-				float width = metrics.stringWidth(s);
-				g2.drawString(s, 0 - (width / 2), 0 - 3);
-
-				break;
-
-			case FLabel.CENTER_CENTER:
-				height = metrics.getMaxAscent();
-				width = metrics.stringWidth(s);
-				g2.drawString(s, 0 - (width / 2),
-					0 - (height / 2));
-
-				break;
-
-			case FLabel.CENTER_TOP:
-				width = metrics.stringWidth(s);
-				height = metrics.getMaxAscent();
-				g2.drawString(s, 0 - (width / 2), 0 -
-					height);
-
-				break;
-
-			case FLabel.RIGHT_BOTTOM:
-				width = metrics.stringWidth(s);
-				g2.drawString(s, 0 - width, 0 - 3);
-
-				break;
-
-			case FLabel.RIGHT_CENTER:
-				width = metrics.stringWidth(s);
-				height = metrics.getMaxAscent();
-				g2.drawString(s, 0 - width, 0 -
-					(height / 2));
-
-				break;
-
-			case FLabel.RIGHT_TOP:
-				width = metrics.stringWidth(s);
-				height = metrics.getMaxAscent();
-				g2.drawString(s, 0 - width, 0 - height);
-
-				break;
-		}
-		*/
-		///Rectangle2D borde=vp.fromMapRectangle(theLabel.getBoundBox());//theLabel.getBoundingBox();
-		///g2.setColor(Color.blue);
-		///g2.drawRect((int)borde.getX(),(int)borde.getY(),(int)borde.getWidth(),(int)borde.getHeight());
-		// Restauramos
-		g2.setTransform(ant);
-	}
-
-	/**
-	 * Dibuja un punto sobre el Graphics2D que se pasa como par�metro.
-	 *
-	 * @param g2 Graphics2D sobre el que dibujar.
-	 * @param mT MAtriz de transformaci�n.
-	 * @param pAux punto a dibujar.
-	 * @param theSymbol S�mbolo a aplicar.
-	 */
-	private static void drawSymbolPoint(Graphics2D g2, AffineTransform mT,
-		org.gvsig.fmap.geom.primitive.Point pAux, FSymbol theSymbol) {
-		int x;
-		int y;
-		x = (int) pAux.getX();
-		y = (int) pAux.getY();
-
-		/*if (x==0){
-		   x=100;
-		   }
-		   if (y==0){
-		           y=100;
-		   }
-		 */
-		Rectangle rectAux = new Rectangle();
-
-		// Aqu� hay que mirar m_Size y m_useSize...
-		float radio_simbolo;
-		radio_simbolo = theSymbol.getSize() / 2;
-		// theSymbol.setSizeInPixels(true);
-
-		if (!theSymbol.isSizeInPixels()) {
-			// Suponemos que m_Size viene en coordenadas de mundo real
-			radio_simbolo = (float) (theSymbol.getSize() * mT.getScaleX());
-
-			/* System.out.println("m_bUseSize = " + theSymbol.m_bUseSize +
-			   " Escala: " + mT.getScaleX() + " alturaPixels = " + alturaPixels); */
-			// if (radio_simbolo < 1) return; // No dibujamos nada
-			rectAux.setRect(x - radio_simbolo, y - radio_simbolo,
-				radio_simbolo * 2, radio_simbolo * 2);
-		} else {
-			// m_Size viene en pixels
-			rectAux.setRect(x - radio_simbolo, y - radio_simbolo,
-				theSymbol.getSize(), theSymbol.getSize());
-		}
-
-		// 	continue; //radioSimbolo_en_pixels = 3;
-		if (theSymbol.getFill() != null) {
-			g2.setPaint(theSymbol.getFill());
-		}
-
-		if (theSymbol.getStroke() != null) {
-			g2.setStroke(theSymbol.getStroke());
-		}
-
-		if (radio_simbolo < 2) {
-			g2.fillRect(rectAux.x, rectAux.y, rectAux.width, rectAux.height);
-
-			return;
-		}
-
-		switch (theSymbol.getStyle()) {
-			case FSymbol.SYMBOL_STYLE_MARKER_CIRCLE: // Circulito
-
-				if (theSymbol.getColor() != null) {
-					g2.fillOval(rectAux.x, rectAux.y, rectAux.width,
-						rectAux.height);
-				}
-
-				if (theSymbol.isOutlined()) {
-					g2.setColor(theSymbol.getOutlineColor());
-					g2.drawOval(rectAux.x, rectAux.y, rectAux.width,
-						rectAux.height);
-				}
-
-				break;
-
-			case FSymbol.SYMBOL_STYLE_MARKER_SQUARE: // Cuadrado
-			case FSymbol.SYMBOL_STYLE_FILL_SOLID:
-				g2.fillRect(rectAux.x, rectAux.y, rectAux.width, rectAux.height);
-
-				if (theSymbol.isOutlined()) {
-					g2.setColor(theSymbol.getOutlineColor());
-					g2.drawRect(rectAux.x, rectAux.y, rectAux.width,
-						rectAux.height);
-				}
-
-				break;
-
-			case FSymbol.SYMBOL_STYLE_MARKER_TRIANGLE: // Triangulo
-
-				// y = r*sin30, x = r*cos30
-				GeneralPathX genPath = new GeneralPathX();
-				genPath.moveTo(x - (int) (radio_simbolo * 0.866),
-					y + (int) (radio_simbolo * 0.5));
-				genPath.lineTo(x + (int) (radio_simbolo * 0.866),
-					y + (int) (radio_simbolo * 0.5));
-				genPath.lineTo(x, y - (float) radio_simbolo);
-				genPath.closePath();
-
-				g2.fill(genPath);
-
-				break;
-
-			case FSymbol.SYMBOL_STYLE_MARKER_CROSS: // cruz
-			case FSymbol.SYMBOL_STYLE_DGNSPECIAL: // Cruz
-
-				GeneralPathX genPathCruz = new GeneralPathX();
-				genPathCruz.moveTo(x, y - radio_simbolo);
-				genPathCruz.lineTo(x, y + radio_simbolo);
-				genPathCruz.moveTo(x - radio_simbolo, y);
-				genPathCruz.lineTo(x + radio_simbolo, y);
-				g2.draw(genPathCruz);
-
-				break;
-
-			case 34: // TrueType marker
-
-			/* lf.lfHeight = -radioSimbolo_en_pixels;
-			   angulo = pSimbolo->m_Rotation;  // En radianes, de -pi a pi
-			   angulo = -180.0 * angulo / PI;
-
-			   lf.lfEscapement = (long) angulo*10;
-			   lf.lfOrientation = (long) angulo*10;
-
-			   fuente.CreateFontIndirect(&lf);
-			   pOldFont = pDC->SelectObject(&fuente);
-
-			   pDC->TextOut(pAPI.x, pAPI.y+radioSimbolo_en_pixels/2,elChar,1);
-
-			   pDC->SelectObject(pOldFont);
-			   fuente.DeleteObject();
-
-			   break; */
-			case FSymbol.SYMBOL_STYLE_MARKER_IMAGEN: // Icono
-			 {
-				if (theSymbol.getIcon() != null) {
-					float w;
-					float h;
-
-					if (!theSymbol.isSizeInPixels()) {
-						// Suponemos que m_Size viene en coordenadas de mundo real
-						// Por ejemplo, nos valemos del ancho para fijar la escala
-						w = (float) (theSymbol.getSize() * mT.getScaleX());
-						h = (theSymbol.getIcon().getHeight(null) * w) / theSymbol.getIcon()
-																				 .getWidth(null);
-
-						rectAux.setRect(x - w, y - h, w * 2, h * 2);
-					} else {
-						// m_Size viene en pixels
-						w = theSymbol.getSize();
-						h = (theSymbol.getIcon().getHeight(null) * w) / theSymbol.getIcon()
-																				 .getWidth(null);
-						rectAux.setRect(x - w/2, y - h/2, w, h);
-					}
-					/* if (theSymbol.getImgObserver() != null)
-					{
-						g2.setColor(Color.WHITE);
-						g2.fillRect(rectAux.x, rectAux.y, rectAux.width, rectAux.height);
-					} */
-					g2.drawImage(theSymbol.getIcon(), rectAux.x, rectAux.y,
-						rectAux.width, rectAux.height, theSymbol.getImgObserver());
-				} else {
-					String strImg = "Image"; // Utilities.getMessage(FGraphicUtilities.class,"imagen");
-					FontMetrics metrics = g2.getFontMetrics();
-					int width = metrics.stringWidth(strImg);
-					int height = metrics.getMaxAscent();
-
-					g2.drawString(strImg, x - (width / 2), y - 2 +
-						(height / 2));
-				}
-
-				break;
-			}
-
-			/* DrawIconEx(pDC->m_hDC, pAPI.x-(pSimbolo->m_widthIco/2), pAPI.y-(pSimbolo->m_heightIco/2),
-			   pSimbolo->m_hIcon, pSimbolo->m_widthIco, pSimbolo->m_heightIco, 0 , NULL, DI_NORMAL);
-			   break; */
-// TODO This case has been commented: check it!!!
-//			case Geometry.TYPES.POINT|Geometry.TYPES.Z: // Circulito
-//
-//				if (theSymbol.getColor() != null) {
-//					g2.fillOval(rectAux.x, rectAux.y, rectAux.width,
-//						rectAux.height);
-//				}
-//
-//				if (theSymbol.isOutlined()) {
-//					g2.setColor(theSymbol.getOutlineColor());
-//					g2.drawOval(rectAux.x, rectAux.y, rectAux.width,
-//						rectAux.height);
-//				}
-//
-//				break;
-		} // del switch estilo
-	}
-	public static void DrawHandlers(Graphics2D g, AffineTransform at,
-			Handler[] handlers,ISymbol symbol) {
-
-			for (int i = 0; i < handlers.length; i++) {
-				Point2D point = handlers[i].getPoint();
-				at.transform(point, point);
-				g.setColor(((IFillSymbol)symbol).getFillColor());
-				g.fillRect((int) (point.getX() - 3), (int) (point.getY() - 3), 7, 7);
-				g.setColor(((ILineSymbol)symbol).getColor());
-				g.drawRect((int) (point.getX() - 5), (int) (point.getY() - 5), 10, 10);
-				g.drawString( "" + i, (int) (point.getX() - 5), (int) (point.getY() - 5));
-			}
-		}
-
-	public static void DrawVertex(Graphics2D g, AffineTransform at, Handler handlers) {
-		//for (int i = 0; i < handlers.length; i++) {
-			Point2D point = handlers.getPoint();
-			at.transform(point, point);
-			g.setColor(Color.black);
-			g.drawLine((int)point.getX()-2,(int)point.getY()-10,(int)point.getX()-2,(int)point.getY()+10);
-			g.drawLine((int)point.getX()+2,(int)point.getY()-10,(int)point.getX()+2,(int)point.getY()+10);
-			g.drawLine((int)point.getX()-10,(int)point.getY()-2,(int)point.getX()+10,(int)point.getY()-2);
-			g.drawLine((int)point.getX()-10,(int)point.getY()+2,(int)point.getX()+10,(int)point.getY()+2);
-			g.setColor(Color.red);
-			g.drawLine((int)point.getX()-1,(int)point.getY()-10,(int)point.getX()-1,(int)point.getY()+10);
-			g.drawLine((int)point.getX()+1,(int)point.getY()-10,(int)point.getX()+1,(int)point.getY()+10);
-			g.drawLine((int)point.getX()-10,(int)point.getY()-1,(int)point.getX()+10,(int)point.getY()-1);
-			g.drawLine((int)point.getX()-10,(int)point.getY()+1,(int)point.getX()+10,(int)point.getY()+1);
-
-		//}
-	}
-}
Index: trunk/org.gvsig.desktop/org.gvsig.desktop.library/org.gvsig.symbology/org.gvsig.symbology.lib/org.gvsig.symbology.lib.impl/src/main/java/org/gvsig/symbology/fmap/mapcontext/rendering/symbol/impl/FSymbolFactory.java
===================================================================
--- trunk/org.gvsig.desktop/org.gvsig.desktop.library/org.gvsig.symbology/org.gvsig.symbology.lib/org.gvsig.symbology.lib.impl/src/main/java/org/gvsig/symbology/fmap/mapcontext/rendering/symbol/impl/FSymbolFactory.java	(revision 43509)
+++ trunk/org.gvsig.desktop/org.gvsig.desktop.library/org.gvsig.symbology/org.gvsig.symbology.lib/org.gvsig.symbology.lib.impl/src/main/java/org/gvsig/symbology/fmap/mapcontext/rendering/symbol/impl/FSymbolFactory.java	(revision 43510)
@@ -1,253 +0,0 @@
-/**
- * gvSIG. Desktop Geographic Information System.
- *
- * Copyright (C) 2007-2013 gvSIG Association.
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 3
- * of the License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
- * MA  02110-1301, USA.
- *
- * For any additional information, do not hesitate to contact us
- * at info AT gvsig.com, or visit our website www.gvsig.com.
- */
-/*
- * Created on 04-may-2004
- *
- * To change the template for this generated file go to
- * Window&gt;Preferences&gt;Java&gt;Code Generation&gt;Code and Comments
- */
-/* gvSIG. Sistema de Informaci�n Geogr�fica de la Generalitat Valenciana
- *
- * Copyright (C) 2004 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.gvsig.symbology.fmap.mapcontext.rendering.symbol.impl;
-
-import java.awt.BasicStroke;
-import java.awt.Color;
-import java.awt.Graphics2D;
-import java.awt.Paint;
-import java.awt.Rectangle;
-import java.awt.TexturePaint;
-import java.awt.geom.Rectangle2D;
-import java.awt.image.BufferedImage;
-
-import org.gvsig.compat.CompatLocator;
-
-/**
- * @author fjp
- *
- * To change the template for this generated type comment go to
- * Window&gt;Preferences&gt;Java&gt;Code Generation&gt;Code and Comments
- * @deprecated
- */
-public class FSymbolFactory {
-	static int w, h;
-
-	// Podr�amos pasarle tambi�n un color de fondo, y usarlo como background del
-	// graphics2D.
-	static private Graphics2D createG2(Color cRef, BufferedImage bi)
-	{
-		   Graphics2D big = bi.createGraphics();
-		   Color color=new Color(0,0,0,0);
-		   big.setBackground(color);
-		   big.clearRect(0, 0, w, h);
-		   big.setColor(new Color(cRef.getRed(),cRef.getGreen(), cRef.getBlue(),cRef.getAlpha()));
-		   big.setStroke(new BasicStroke());
-
-		   return big;
-
-	}
-
-
-	static public Paint createPatternFill(int style, Color cRef)
-	{
-		/* public final static int SYMBOL_STYLE_FILL_SOLID = 1;
-		public final static int SYMBOL_STYLE_FILL_TRANSPARENT = 2;
-		public final static int SYMBOL_STYLE_FILL_HORIZONTAL = 3;
-		public final static int SYMBOL_STYLE_FILL_VERTICAL = 4;
-		public final static int SYMBOL_STYLE_FILL_CROSS = 5;
-		public final static int SYMBOL_STYLE_FILL_UPWARD_DIAGONAL = 6;
-		public final static int SYMBOL_STYLE_FILL_DOWNWARD_DIAGONAL = 7;
-		public final static int SYMBOL_STYLE_FILL_CROSS_DIAGONAL = 8;
-		public final static int SYMBOL_STYLE_FILL_GRAYFILL = 9;
-		public final static int SYMBOL_STYLE_FILL_LIGHTGRAYFILL = 10;
-		public final static int SYMBOL_STYLE_FILL_DARKGRAYFILL = 11; */
-
-
-		w=7; h=7;
-
-		BufferedImage bi = null;
-		Graphics2D big = null;
-
-		Rectangle2D rProv = new Rectangle();
-		rProv.setFrame(0, 0,w,h);
-
-		Paint resulPatternFill = null;
-		bi= CompatLocator.getGraphicsUtils().createBufferedImage(w, h, BufferedImage.TYPE_INT_ARGB);
-		big = createG2(cRef, bi);
-
-		switch (style)
-		{
-			case FSymbol.SYMBOL_STYLE_FILL_SOLID:
-			    return null;
-			case FSymbol.SYMBOL_STYLE_FILL_TRANSPARENT:
-			    return null;
-			case FSymbol.SYMBOL_STYLE_FILL_UPWARD_DIAGONAL:
-			    big.drawLine(0,0,w,h);
-				break;
-			case FSymbol.SYMBOL_STYLE_FILL_CROSS:
-				big.drawLine(w/2,0,w/2,h);
-				big.drawLine(0,h/2,w,h/2);
-				break;
-			case FSymbol.SYMBOL_STYLE_FILL_CROSS_DIAGONAL:
-				big.drawLine(0,0,w,h);
-				big.drawLine(0,h,w,0);
-				break;
-			case FSymbol.SYMBOL_STYLE_FILL_VERTICAL:
-				big.drawLine(w/2,0,w/2,h);
-				break;
-			case FSymbol.SYMBOL_STYLE_FILL_HORIZONTAL:
-				big.drawLine(0,h/2,w,h/2);
-				break;
-			case FSymbol.SYMBOL_STYLE_FILL_DOWNWARD_DIAGONAL:
-				// DOWNWARD_DIAGONAL m�s ancho
-				w=15;h=15;
-				rProv.setFrame(0, 0,w,h);
-				bi= CompatLocator.getGraphicsUtils().createBufferedImage(
-						w, h, BufferedImage.TYPE_INT_ARGB);
-				big = createG2(cRef, bi);
-				big.drawLine(-1,h,w,-1);
-				break;
-
-		}
-
-		resulPatternFill = new TexturePaint(bi,rProv);
-
-		return resulPatternFill;
-
-	}
-
-	/**
-	 * Al crear esto lo mejor ser�a mirar en un directorio y cargar todas las
-	 * imagenes que tengamos predise�adas.
-	 *
-	 * @param cRef
-	 * @return
-	 */
-//	static public Paint[] createPatternFills(Color cRef)
-//	{
-//
-//		int aux = 3;
-//
-//		w=7; h=7;
-//
-//		BufferedImage bi = null;
-//		Graphics2D big = null;
-//
-//		Rectangle2D rProv = new Rectangle();
-//		rProv.setFrame(0, 0,w,h);
-//
-//		Paint[] patternFills = new Paint[8];
-//
-//		// UPWARD_DIAGONAL
-//		bi= new Bu-f-f-eredImage(w, h, BufferedImage.TYPE_INT_ARGB);
-//		big = createG2(cRef, bi);
-//		big.drawLine(0,0,w,h);
-//		patternFills[FStyle2D.SYMBOL_STYLE_FILL_UPWARD_DIAGONAL-aux] =
-//				new TexturePaint(bi,rProv);
-//
-//		// CROSS
-//		bi= new Bu-f-f-eredImage(w, h, BufferedImage.TYPE_INT_ARGB);
-//		big = createG2(cRef, bi);
-//		big.drawLine(w/2,0,w/2,h);
-//		big.drawLine(0,h/2,w,h/2);
-//		patternFills[FConstant.SYMBOL_STYLE_FILL_CROSS-aux] =
-//				new TexturePaint(bi,rProv);
-//
-//		// CROSS
-//		bi= new BufferedImage(w, h, BufferedImage.TYPE_INT_ARGB);
-//		big = createG2(cRef, bi);
-//		big.drawLine(0,0,w,h);
-//		big.drawLine(0,h,w,0);
-//		patternFills[FConstant.SYMBOL_STYLE_FILL_CROSS_DIAGONAL-aux] =
-//				new TexturePaint(bi,rProv);
-//
-//
-//		// VERTICAL
-//		bi= new BufferedImage(w, h, BufferedImage.TYPE_INT_ARGB);
-//		big = createG2(cRef, bi);
-//		big.drawLine(w/2,0,w/2,h);
-//		patternFills[FConstant.SYMBOL_STYLE_FILL_VERTICAL-aux] =
-//				new TexturePaint(bi,rProv);
-//
-//		// HORIZONTAL
-//		bi= new BufferedImage(w, h, BufferedImage.TYPE_INT_ARGB);
-//		big = createG2(cRef, bi);
-//		big.drawLine(0,h/2,w,h/2);
-//		patternFills[FConstant.SYMBOL_STYLE_FILL_HORIZONTAL-aux] =
-//				new TexturePaint(bi,rProv);
-//
-//		// DOWNWARD_DIAGONAL m�s ancho
-//		w=15;h=15;
-//		rProv.setFrame(0, 0,w,h);
-//		bi= new BufferedImage(w, h, BufferedImage.TYPE_INT_ARGB);
-//		big = createG2(cRef, bi);
-//		// big.setColor(Color.BLUE);
-//		big.drawLine(-1,h,w,-1);
-//		// big.setColor(Color.RED);
-//		// big.drawLine(0,0,w,h);
-//		patternFills[FConstant.SYMBOL_STYLE_FILL_DOWNWARD_DIAGONAL-aux] =
-//				new TexturePaint(bi,rProv);
-//		int trans=((TexturePaint)patternFills[FConstant.SYMBOL_STYLE_FILL_DOWNWARD_DIAGONAL-aux]).getTransparency();
-//
-//		return patternFills;
-//	}
-
-}
Index: trunk/org.gvsig.desktop/org.gvsig.desktop.library/org.gvsig.symbology/org.gvsig.symbology.lib/org.gvsig.symbology.lib.impl/src/main/java/org/gvsig/symbology/fmap/mapcontext/rendering/symbol/impl/FLabel.java
===================================================================
--- trunk/org.gvsig.desktop/org.gvsig.desktop.library/org.gvsig.symbology/org.gvsig.symbology.lib/org.gvsig.symbology.lib.impl/src/main/java/org/gvsig/symbology/fmap/mapcontext/rendering/symbol/impl/FLabel.java	(revision 43509)
+++ trunk/org.gvsig.desktop/org.gvsig.desktop.library/org.gvsig.symbology/org.gvsig.symbology.lib/org.gvsig.symbology.lib.impl/src/main/java/org/gvsig/symbology/fmap/mapcontext/rendering/symbol/impl/FLabel.java	(revision 43510)
@@ -1,408 +0,0 @@
-/**
- * gvSIG. Desktop Geographic Information System.
- *
- * Copyright (C) 2007-2013 gvSIG Association.
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 3
- * of the License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
- * MA  02110-1301, USA.
- *
- * For any additional information, do not hesitate to contact us
- * at info AT gvsig.com, or visit our website www.gvsig.com.
- */
-package org.gvsig.symbology.fmap.mapcontext.rendering.symbol.impl;
-
-import java.awt.Color;
-import java.awt.Font;
-import java.awt.Graphics2D;
-import java.awt.Shape;
-import java.awt.geom.AffineTransform;
-import java.awt.geom.Point2D;
-import java.awt.geom.Rectangle2D;
-
-import org.apache.batik.ext.awt.geom.DefaultPathLength;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-import org.gvsig.fmap.geom.aggregate.MultiPoint;
-import org.gvsig.fmap.geom.exception.CreateGeometryException;
-import org.gvsig.fmap.geom.primitive.Point;
-import org.gvsig.fmap.mapcontext.ViewPort;
-import org.gvsig.fmap.mapcontext.rendering.symbols.ISymbol;
-import org.gvsig.symbology.PathLength;
-import org.gvsig.utils.XMLEntity;
-
-/**
- * Se utiliza para etiquetar. Las capas vectoriales tienen un arrayList
- * (m_labels) de FLabel, un FLabel por cada registro.
- * @deprecated
- */
-public class FLabel implements Cloneable {
-
-    private static final Logger logger = LoggerFactory.getLogger(FLabel.class);
-
-
-	public final static byte LEFT_TOP = 0;
-	public final static byte LEFT_CENTER = 1;
-	public final static byte LEFT_BOTTOM = 2;
-	public final static byte CENTER_TOP = 6;
-	public final static byte CENTER_CENTER = 7;
-	public final static byte CENTER_BOTTOM = 8;
-	public final static byte RIGHT_TOP = 12;
-	public final static byte RIGHT_CENTER = 13;
-	public final static byte RIGHT_BOTTOM = 14;
-	private String m_Str = null;
-	private Point2D m_Orig = null;
-	private double m_Height;
-	public static final double SQUARE = Math.sqrt(2.0);
-	/**
-	 * <code>m_rotation</code> en grados, NO en radianes. Se convierte en
-	 * radianes al dibujar.
-	 */
-	private double m_rotation;
-
-	/**
-	 * Valores posibles para <code>m_Justification</code>: Left/Top = 0
-	 * Center/Top = 6                Right/Top = 12 Left/Center = 1
-	 * Center/Center = 7            Right/Center = 13 Left/Bottom = 2
-	 * Center/Bottom = 8            Right/Bottom = 14
-	 */
-	private byte m_Justification = LEFT_BOTTOM; // Por defecto
-	private int m_Style;
-	private Rectangle2D boundBox;
-	private Color color;
-	private static Font font=new Font("Dialog",Font.PLAIN,12);
-	/**
-	 * Crea un nuevo FLabel.
-	 */
-	public FLabel() {
-		// nothing to do
-	}
-
-	/**
-	 * Crea un nuevo FLabel.
-	 *
-	 * @param str DOCUMENT ME!
-	 */
-	public FLabel(String str) {
-		m_Str = str;
-	}
-
-	/**
-	 * Crea un nuevo FLabel.
-	 *
-	 * @param str
-	 * @param pOrig
-	 * @param heightText
-	 * @param rotation
-	 */
-	public FLabel(String str, Point2D pOrig, double heightText, double rotation) {
-		m_Str = str;
-		m_Orig = pOrig;
-		m_Height = heightText;
-		m_rotation = rotation;
-	}
-
-	/**
-	 * Introduce un nuevo FLabel al ya existente.
-	 *
-	 * @param label
-	 */
-	public void setFLabel(FLabel label) {
-		m_Str = label.m_Str;
-		m_Orig = label.m_Orig;
-		m_Height = label.m_Height;
-		m_rotation = label.m_rotation;
-	}
-
-	/**
-	 * Clona el FLabel.
-	 *
-	 * @return Object clonado.
-	 */
-	public Object clone() {
-		FLabel label=new FLabel(m_Str, m_Orig, m_Height, m_rotation);
-		label.boundBox=(Rectangle2D)boundBox.clone();
-		return label;
-	}
-
-	/**
-	 * Devuelve la altura del Label.
-	 *
-	 * @return Returns the m_Height.
-	 */
-	public double getHeight() {
-		return m_Height;
-	}
-
-	/**
-	 * Devuelve el punto de origen.
-	 *
-	 * @return Returns the m_Orig.
-	 */
-	public Point2D getOrig() {
-		return m_Orig;
-	}
-
-	/**
-	 * Devuelve la rotaci�n.
-	 *
-	 * @return Returns the m_rotation.
-	 */
-	public double getRotation() {
-		return m_rotation;
-	}
-
-	/**
-	 * Devuelve un String con el texto del Label.
-	 *
-	 * @return Returns the m_Str.
-	 */
-	public String getString() {
-		return m_Str;
-	}
-
-	/**
-	 * Introduce la altura del Label.
-	 *
-	 * @param height The m_Height to set.
-	 */
-	public void setHeight(double height) {
-		m_Height = height;
-	}
-
-	/**
-	 * Introduce el punto de origen del Label.
-	 *
-	 * @param orig The m_Orig to set.
-	 */
-	public void setOrig(Point2D orig) {
-		m_Orig = orig;
-	}
-
-	/**
-	 * Introduce la rotaci�n a aplicar al Label.
-	 *
-	 * @param m_rotation The m_rotation to set.
-	 */
-	public void setRotation(double m_rotation) {
-		this.m_rotation = Math.toRadians(-m_rotation);
-	}
-
-	/**
-	 * Introduce el texto del Label.
-	 *
-	 * @param str The m_Str to set.
-	 */
-	public void setString(String str) {
-		m_Str = str;
-	}
-
-	/**
-	 * Valores posibles para <code>m_Justification</code>: Left/Top = 0
-	 * Center/Top = 6                Right/Top = 12 Left/Center = 1
-	 * Center/Center = 7            Right/Center = 13 Left/Bottom = 2
-	 * Center/Bottom = 8            Right/Bottom = 14
-	 *
-	 * @return byte.
-	 */
-	public byte getJustification() {
-		return m_Justification;
-	}
-
-	/**
-	 * Valores posibles para <code>m_Justification</code>: Left/Top = 0
-	 * Center/Top = 6                Right/Top = 12 Left/Center = 1
-	 * Center/Center = 7            Right/Center = 13 Left/Bottom = 2
-	 * Center/Bottom = 8            Right/Bottom = 14
-	 *
-	 * @param justification byte
-	 */
-	public void setJustification(byte justification) {
-		m_Justification = justification;
-	}
-
-	/**
-	 * Devuelve un Objeto XMLEntity con la informaci�n los atributos necesarios
-	 * para poder despu�s volver a crear el objeto original.
-	 *
-	 * @return XMLEntity.
-	 */
-	public XMLEntity getXMLEntity() {
-		XMLEntity xml = new XMLEntity();
-		xml.putProperty("className",this.getClass().getName());
-		xml.setName("flabel");
-		xml.putProperty("m_Height", m_Height);
-		xml.putProperty("m_Justification", (int) m_Justification);
-		xml.putProperty("m_OrigX", m_Orig.getX());
-		xml.putProperty("m_OrigY", m_Orig.getY());
-		xml.putProperty("m_rotation", m_rotation);
-		xml.putProperty("m_Str", m_Str);
-
-		return xml;
-	}
-
-	/**
-	 * Crea un Objeto de esta clase a partir de la informaci�n del XMLEntity.
-	 *
-	 * @param xml XMLEntity
-	 *
-	 * @return Objeto de esta clase.
-	 */
-	public static FLabel createFLabel(XMLEntity xml) {
-		FLabel label = new FLabel();
-		label.setHeight(xml.getDoubleProperty("m_Height"));
-		label.setJustification((byte) xml.getIntProperty("m_Justification"));
-		label.setOrig(new Point2D.Double(xml.getDoubleProperty("m_OrigX"),
-				xml.getDoubleProperty("m_OrigY")));
-		label.setString("m_Str");
-
-		return label;
-	}
-
-	/**
-	 * M�todo est�tico que crea un FLabel a partir de una Geometry.
-	 *
-	 * @param geom Geometry.
-	 *
-	 * @return nuevo FLabel creado.
-	 * @throws CreateGeometryException
-	 */
-	public static FLabel createFLabel(org.gvsig.fmap.geom.Geometry geom) throws CreateGeometryException {
-		float angle;
-		Point2D pAux = createLabelPoint(geom);
-
-		FLabel label = new FLabel();
-		label.setOrig(pAux);
-		switch (geom.getType()) {
-			case org.gvsig.fmap.geom.Geometry.TYPES.CURVE:
-                                PathLength pathLen = new DefaultPathLength(geom.getShape());
-				float midDistance = pathLen.lengthOfPath() / 2;
-				angle = pathLen.angleAtLength(midDistance);
-
-				if (angle < 0) {
-					angle = angle + (float) (2 * Math.PI);
-				}
-				if ((angle > (Math.PI / 2)) && (angle < ((3 * Math.PI) / 2))) {
-					angle = angle - (float) Math.PI;
-				}
-				label.setRotation(Math.toDegrees(angle));
-				break;
-		} // switch
-
-		return label;
-	}
-	public static Point2D createLabelPoint(org.gvsig.fmap.geom.Geometry geom) throws CreateGeometryException {
-		Point2D pAux = null;
-		switch (geom.getType()) {
-			case org.gvsig.fmap.geom.Geometry.TYPES.POINT:
-            	pAux = new Point2D.Double(((org.gvsig.fmap.geom.primitive.Point) geom).getX(),
-						((org.gvsig.fmap.geom.primitive.Point) geom).getY());
-				return pAux;
-
-			case org.gvsig.fmap.geom.Geometry.TYPES.CURVE:
-            	DefaultPathLength pathLen = new DefaultPathLength(geom.getShape());
-
-				// if (pathLen.lengthOfPath() < width / mT.getScaleX()) return;
-				float midDistance = pathLen.lengthOfPath() / 2;
-				pAux = pathLen.pointAtLength(midDistance);
-				return pAux;
-
-			case org.gvsig.fmap.geom.Geometry.TYPES.SURFACE:
-
-			    try {
-	                Point pLabel = geom.centroid();
-	                if(pLabel!=null){
-	                    return new Point2D.Double(pLabel.getX(), pLabel.getY());
-	                }
-			    } catch (Exception ex) {
-			        logger.info("Error while computing centroid. ", ex);
-			    }
-				break;
-            case org.gvsig.fmap.geom.Geometry.TYPES.MULTIPOINT:
-            	int num=((MultiPoint)geom).getPrimitivesNumber();
-    			Rectangle2D r=null;
-    			if (num>0){
-    				r= ((MultiPoint)geom).getPointAt(0).getBounds2D();
-    				for (int i=1;i<num;i++){
-    					org.gvsig.fmap.geom.primitive.Point fp=((MultiPoint)geom).getPointAt(i);
-    					r.add(new Point2D.Double(fp.getX(),fp.getY()));
-    				}
-    			}
-    			if (r!=null)
-    			return new Point2D.Double(r.getCenterX(),r.getCenterY());
-    			break;
-
-		} // switch
-
-		return null;
-	}
-	public void setTypeFont(String t) {
-		font=Font.getFont(t,font);
-	}
-	public int getStyle() {
-		return m_Style;
-	}
-
-	public void setBoundBox(Rectangle2D boundBox) {
-		this.boundBox=boundBox;
-
-	}
-	public Rectangle2D getBoundBox(){
-		return boundBox;
-	}
-
-	public Rectangle2D getBoundingBox(ViewPort vp) {
-		return vp.fromMapRectangle(boundBox);
-	}
-
-	public void setColor(int i) {
-		color=new Color(i);
-	}
-
-	public Color getColor() {
-		return color;
-	}
-	/*public Font getFont(AffineTransform at,boolean isInPixels){
-		if (!isInPixels) {
-			float alturaPixels = (float) ((getHeight() * at.getScaleX())*SQUARE);
-			//Font nuevaFuente = font.deriveFont(alturaPixels);//new Font(getTypeFont(),getStyle(),(int)alturaPixels);
-			return font.deriveFont(alturaPixels);
-		}
-		//Font nuevaFuente = font.deriveFont((float)(getHeight()*SQUARE));//new Font(getTypeFont(),getStyle(),(int)(getHeight()*SQUARE));
-		return font;//font.deriveFont((float)(getHeight()*SQUARE));
-	}*/
-	public Font getFont(AffineTransform at,Font font){
-		float alturaPixels = (float) ((getHeight() * at.getScaleX())*SQUARE);
-		//return font.deriveFont(alturaPixels);
-        return font.deriveFont(font.getStyle(),alturaPixels);
-	}
-
-	/**
-	 * Por ahora, para extender el renderizado de etiquetas, habr�a que
-	 * crear otro FLabel y reimplementar este m�todo para que haga caso
-	 * a otros s�mbolos. Es decir, NO usar FGraphicUtilities
-	 * @param g
-	 * @param affineTransform
-	 * @param theShape
-	 * @param theSymbol
-	 */
-	public void draw(Graphics2D g, AffineTransform affineTransform, Shape theShape, ISymbol theSymbol) {
-        FGraphicUtilities.DrawLabel(g, affineTransform,
-                (org.gvsig.fmap.geom.Geometry) theShape, (FSymbol) theSymbol, this);
-
-
-	}
-
-}
Index: trunk/org.gvsig.desktop/org.gvsig.desktop.library/org.gvsig.symbology/org.gvsig.symbology.lib/org.gvsig.symbology.lib.impl/src/main/java/org/gvsig/symbology/fmap/mapcontext/rendering/symbol/impl/MultiShapeSymbol.java
===================================================================
--- trunk/org.gvsig.desktop/org.gvsig.desktop.library/org.gvsig.symbology/org.gvsig.symbology.lib/org.gvsig.symbology.lib.impl/src/main/java/org/gvsig/symbology/fmap/mapcontext/rendering/symbol/impl/MultiShapeSymbol.java	(revision 43509)
+++ trunk/org.gvsig.desktop/org.gvsig.desktop.library/org.gvsig.symbology/org.gvsig.symbology.lib/org.gvsig.symbology.lib.impl/src/main/java/org/gvsig/symbology/fmap/mapcontext/rendering/symbol/impl/MultiShapeSymbol.java	(revision 43510)
@@ -50,6 +50,7 @@
 import org.gvsig.symbology.fmap.mapcontext.rendering.symbol.style.IMask;
 import org.gvsig.tools.ToolsLocator;
 import org.gvsig.tools.dynobject.DynStruct;
+import org.gvsig.tools.exception.NotYetImplemented;
 import org.gvsig.tools.persistence.PersistenceManager;
 import org.gvsig.tools.persistence.PersistentState;
 import org.gvsig.tools.persistence.exception.PersistenceException;
@@ -174,30 +175,27 @@
 	    }
 	}
 	
+    @Override
 	public boolean isOneDotOrPixel(Geometry geom,
 			double[] positionOfDotOrPixel, ViewPort viewPort, int dpi) {
-		switch (geom.getType()) {
-		case Geometry.TYPES.POINT: //Tipo punto
+		
+        GeometryType geomType = geom.getGeometryType();
+        if( geomType.isSubTypeOf(Geometry.TYPES.POINT) ) {
            	if (marker != null) {
 				return marker.isOneDotOrPixel(geom, positionOfDotOrPixel, viewPort, dpi);
 			}
-			break;
-		case Geometry.TYPES.CURVE:
-		case Geometry.TYPES.ARC:
-		case Geometry.TYPES.SPLINE:
-		if (line != null) {
-				return line.isOneDotOrPixel(geom, positionOfDotOrPixel, viewPort, dpi);
+
+        } else if( geomType.isSubTypeOf(Geometry.TYPES.CURVE) ) {
+            if (line != null) {
+                return line.isOneDotOrPixel(geom, positionOfDotOrPixel, viewPort, dpi);
 			}
-			break;
-
-		case Geometry.TYPES.SURFACE:
-        case Geometry.TYPES.ELLIPSE:
-		case Geometry.TYPES.CIRCLE:
+            
+        } else if( geomType.isSubTypeOf(Geometry.TYPES.SURFACE) ) {
 			if (fill != null) {
 				return fill.isOneDotOrPixel(geom, positionOfDotOrPixel, viewPort, dpi);
 			}
-			break;
-		}
+            
+        }
 		if (!geom.isSimple()){
 			Aggregate aggregate = (Aggregate)geom;			
 			for (int i=0 ; i<aggregate.getPrimitivesNumber() ; i++){
@@ -332,34 +330,28 @@
 		}
 	}
 
-//	public String getClassName() {
-//		return getClass().getName();
-//	}
-
+    @Override
 	public void print(Graphics2D g, AffineTransform at, Geometry geom, PrintAttributes properties) {
-		switch (geom.getType()) {
-		case Geometry.TYPES.POINT: //Tipo punto
+        GeometryType geomType = geom.getGeometryType();
+        if( geomType.isTypeOf(Geometry.TYPES.POINT) ) {
            	if (marker != null) {
 				marker.print(g, at, geom, properties);
 			}
-			break;
-		case Geometry.TYPES.CURVE:
-		case Geometry.TYPES.ARC:
+
+        } else if( geomType.isTypeOf(Geometry.TYPES.CURVE) ) {
 			if (line != null) {
 				line.print(g, at, geom, properties);
 			}
-			break;
 
-		case Geometry.TYPES.SURFACE:
-		case Geometry.TYPES.ELLIPSE:
-        case Geometry.TYPES.CIRCLE:
+        } else if( geomType.isTypeOf(Geometry.TYPES.SURFACE) ) {
 			if (fill != null) {
 				fill.print(g, at, geom, properties);
 			}
-			break;
-		}
+
+        }
 	}
 
+    @Override
 	public double getRotation() {
 		if (marker != null) {
 			return marker.getRotation();
@@ -459,6 +451,7 @@
 		}
 	}
 
+    @Override
 	public int getUnit() {
 		if (marker != null) {
 			return marker.getUnit();
@@ -469,109 +462,114 @@
 		return -1;
 	}
 
+    @Override
 	public void setMask(IMask mask) {
-		// TODO Implement it
-		throw new Error("Not yet implemented!");
+		throw new NotYetImplemented();
 
 	}
 
+    @Override
 	public int getReferenceSystem() {
 		return this.referenceSystem;
 	}
 
+    @Override
 	public void setReferenceSystem(int system) {
 		this.referenceSystem = system;
 
 	}
 
+    @Override
 	public double toCartographicSize(ViewPort viewPort, double dpi, Geometry geom) {
-		switch (geom.getType()) {
-		case Geometry.TYPES.POINT: //Tipo punto
+        GeometryType geomType = geom.getGeometryType();
+        if( geomType.isTypeOf(Geometry.TYPES.POINT) ) {
         	if (marker != null) {
 				return marker.toCartographicSize(viewPort, dpi, geom);
 			}
-		case Geometry.TYPES.CURVE:
-		case Geometry.TYPES.ARC:
+
+        } else if( geomType.isTypeOf(Geometry.TYPES.CURVE) ) {
 			if (line != null) {
 				return line.toCartographicSize(viewPort, dpi, geom);
 			}
-		case Geometry.TYPES.SURFACE:
-		case Geometry.TYPES.ELLIPSE:
-		case Geometry.TYPES.CIRCLE:
+
+        } else if( geomType.isTypeOf(Geometry.TYPES.SURFACE) ) {
 			LOG.warn("Cartographic size does not have any sense for fill symbols");
 
-		}
+        }
 		return -1;
 	}
 
+    @Override
 	public void setCartographicSize(double cartographicSize, Geometry geom) {
-		switch (geom.getType()) {
-		case Geometry.TYPES.POINT: //Tipo punto
+        GeometryType geomType = geom.getGeometryType();
+        if( geomType.isTypeOf(Geometry.TYPES.POINT) ) {
         	if (marker != null) {
 				marker.setCartographicSize(cartographicSize, null);
 			}
-        	break;
-		case Geometry.TYPES.CURVE:
-		case Geometry.TYPES.ARC:
+
+        } else if( geomType.isTypeOf(Geometry.TYPES.CURVE) ) {
 			if (line != null) {
 				line.setCartographicSize(cartographicSize, null);
 			}
-        	break;
-		case Geometry.TYPES.SURFACE:
-		case Geometry.TYPES.ELLIPSE:
-	    case Geometry.TYPES.CIRCLE:
+
+        } else if( geomType.isTypeOf(Geometry.TYPES.SURFACE) ) {
 	    	LOG.warn("Cartographic size does not have any sense for fill symbols");
-		}
+
+        }
 	}
 
 
+    @Override
 	public double getCartographicSize(ViewPort viewPort, double dpi, Geometry geom) {
-		switch (geom.getType()) {
-		case Geometry.TYPES.POINT: //Tipo punto
-        	return CartographicSupportToolkit.
-			getCartographicLength(marker,
-								  getSize(),
-								  viewPort,
-								  dpi);
-		case Geometry.TYPES.CURVE:
-		case Geometry.TYPES.ARC:
-			return CartographicSupportToolkit.
-			getCartographicLength(line,
-								  getSize(),
-								  viewPort,
-								  dpi);
-		case Geometry.TYPES.SURFACE:
-     	case Geometry.TYPES.ELLIPSE:
-	    case Geometry.TYPES.CIRCLE:
+        GeometryType geomType = geom.getGeometryType();
+        if( geomType.isTypeOf(Geometry.TYPES.POINT) ) {
+        	return CartographicSupportToolkit.getCartographicLength(
+                marker, getSize(), viewPort, dpi
+            );
+
+        } else if( geomType.isTypeOf(Geometry.TYPES.CURVE) ) {
+			return CartographicSupportToolkit.getCartographicLength(
+                line, getSize(), viewPort, dpi
+            );
+
+        } else if( geomType.isTypeOf(Geometry.TYPES.SURFACE) ) {
 	    	LOG.warn("Cartographic size does not have any sense for fill symbols");
-		}
+
+        }
 		return -1;
 	}
 
+    @Override
 	public IMarkerSymbol getMarkerSymbol() {
 		return marker;
 	}
 
+    @Override
 	public ILineSymbol getLineSymbol() {
 		return line;
 	}
 
+    @Override
 	public IFillSymbol getFillSymbol() {
 		return fill;
 	}
 
+    @Override
 	public void setMarkerSymbol(IMarkerSymbol markerSymbol) {
 		this.marker = markerSymbol;
 	}
 
+    @Override
 	public void setLineSymbol(ILineSymbol lineSymbol) {
 		this.line = lineSymbol;
 	}
 
+    @Override
 	public void setFillSymbol(IFillSymbol fillFillSymbol) {
 		this.fill = fillFillSymbol;
 	}
 
+    @Override
 	public boolean hasFill() {
 	if (fill == null) {
 		return false;
@@ -579,23 +577,24 @@
 	return fill.hasFill();
 	}
 
+    @Override
 	public void setHasFill(boolean hasFill) {
 		if (fill != null) {
 			fill.setHasFill(hasFill);
-//			this.hasFill = hasFill;
 		}
 	}
 
+    @Override
 	public boolean hasOutline() {
-		// TODO Auto-generated method stub
 		return false;
 	}
 
+    @Override
 	public void setHasOutline(boolean hasOutline) {
-		// TODO Auto-generated method stub
 
 	}
 
+    @Override
 	public Object clone() throws CloneNotSupportedException {
 		MultiShapeSymbol copy = (MultiShapeSymbol) super.clone();
 
@@ -622,6 +621,7 @@
 		return copy;
 	}
 
+    @Override
 	public void loadFromState(PersistentState state)
 			throws PersistenceException {
 		setDescription(state.getString(FIELD_DESCRIPTION));
@@ -630,6 +630,7 @@
 		setLineSymbol((ILineSymbol) state.get(FIELD_LINE));
 	}
 
+    @Override
 	public void saveToState(PersistentState state) throws PersistenceException {
 		state.set(FIELD_DESCRIPTION, getDescription());
 		state.set(FIELD_FILL, getFillSymbol());
@@ -639,6 +640,7 @@
 
 	public static class RegisterPersistence implements Callable {
 
+        @Override
 		public Object call() throws Exception {
 			PersistenceManager manager = ToolsLocator.getPersistenceManager();
 			if( manager.getDefinition(MULTI_SHAPE_SYMBOL_PERSISTENCE_DEFINITION_NAME)==null ) {
@@ -665,6 +667,7 @@
 
 	public static class RegisterSymbol implements Callable {
 
+        @Override
 		public Object call() throws Exception {
 	        int[] shapeTypes;
 	        SymbolManager manager = MapContextLocator.getSymbolManager();

Property changes on: trunk/org.gvsig.desktop/org.gvsig.desktop.library/org.gvsig.symbology/org.gvsig.symbology.lib/org.gvsig.symbology.lib.impl/src/main/java/org/gvsig/symbology/fmap/mapcontext/rendering/symbol/impl
___________________________________________________________________
Added: svn:ignore
   + .directory


Index: trunk/org.gvsig.desktop/org.gvsig.desktop.library/org.gvsig.symbology/org.gvsig.symbology.lib/org.gvsig.symbology.lib.impl/src/main/java/org/gvsig/symbology/fmap/mapcontext/rendering/symbol/line/impl/AbstractLineSymbol.java
===================================================================
--- trunk/org.gvsig.desktop/org.gvsig.desktop.library/org.gvsig.symbology/org.gvsig.symbology.lib/org.gvsig.symbology.lib.impl/src/main/java/org/gvsig/symbology/fmap/mapcontext/rendering/symbol/line/impl/AbstractLineSymbol.java	(revision 43509)
+++ trunk/org.gvsig.desktop/org.gvsig.desktop.library/org.gvsig.symbology/org.gvsig.symbology.lib/org.gvsig.symbology.lib.impl/src/main/java/org/gvsig/symbology/fmap/mapcontext/rendering/symbol/line/impl/AbstractLineSymbol.java	(revision 43510)
@@ -98,14 +98,17 @@
 		setLineColor(color);
 	}
 
+    @Override
 	public int getOnePointRgb() {
 		return color.getRGB();
 	}
 
+    @Override
 	public final int getSymbolType() {
 		return Geometry.TYPES.CURVE;
 	}
 
+    @Override
 	public void getPixExtentPlus(Geometry geom, float[] distances, ViewPort viewPort, int dpi) {
 		float cs = (float) getCartographicSize(viewPort, dpi, geom);
 		// TODO and add the line offset
@@ -113,16 +116,12 @@
 		distances[1] = cs;
 	}
 
+    @Override
 	public boolean isSuitableFor(Geometry geom) {
-		switch(geom.getType()) {
-		case Geometry.TYPES.CURVE:
-		case Geometry.TYPES.ARC:
-		case Geometry.TYPES.LINE:
-			return true;
-		}
-		return false;
+        return geom.getGeometryType().isTypeOf(Geometry.TYPES.CURVE);
 	}
 
+    @Override
 	public ILineStyle getLineStyle() {
 		return lineStyle;
 	}
Index: trunk/org.gvsig.desktop/org.gvsig.desktop.library/org.gvsig.symbology/org.gvsig.symbology.lib/org.gvsig.symbology.lib.impl/src/main/java/org/gvsig/symbology/fmap/mapcontext/rendering/symbol/line/impl/MultiLayerLineSymbol.java
===================================================================
--- trunk/org.gvsig.desktop/org.gvsig.desktop.library/org.gvsig.symbology/org.gvsig.symbology.lib/org.gvsig.symbology.lib.impl/src/main/java/org/gvsig/symbology/fmap/mapcontext/rendering/symbol/line/impl/MultiLayerLineSymbol.java	(revision 43509)
+++ trunk/org.gvsig.desktop/org.gvsig.desktop.library/org.gvsig.symbology/org.gvsig.symbology.lib/org.gvsig.symbology.lib.impl/src/main/java/org/gvsig/symbology/fmap/mapcontext/rendering/symbol/line/impl/MultiLayerLineSymbol.java	(revision 43510)
@@ -177,15 +177,12 @@
 		return selectionSymbol;
 	}
 
+    @Override
 	public boolean isSuitableFor(Geometry geom) {
-	      switch(geom.getType()) {
-	        case Geometry.TYPES.CURVE:
-	        case Geometry.TYPES.LINE:
-	            return true;
-	        }
-	        return false;
+        return geom.getGeometryType().isTypeOf(Geometry.TYPES.CURVE);
 	}
 
+    @Override
 	public void print(Graphics2D g, AffineTransform at, Geometry geom, PrintAttributes properties) {
 		for (int i = 0; layers != null && i < layers.length; i++) {
 			layers[i].print(g, at, geom, properties);
Index: trunk/org.gvsig.desktop/org.gvsig.desktop.library/org.gvsig.symbology/org.gvsig.symbology.lib/org.gvsig.symbology.lib.impl/pom.xml
===================================================================
--- trunk/org.gvsig.desktop/org.gvsig.desktop.library/org.gvsig.symbology/org.gvsig.symbology.lib/org.gvsig.symbology.lib.impl/pom.xml	(revision 43509)
+++ trunk/org.gvsig.desktop/org.gvsig.desktop.library/org.gvsig.symbology/org.gvsig.symbology.lib/org.gvsig.symbology.lib.impl/pom.xml	(revision 43510)
@@ -33,11 +33,11 @@
         <scope>compile</scope>
     </dependency>
 
-    <dependency>
+<!--    <dependency>
       <groupId>org.gvsig</groupId>
       <artifactId>org.gvsig.fmap.mapcontext.operation</artifactId>
       <scope>compile</scope>
-    </dependency>
+    </dependency>-->
     
     <dependency>
       <groupId>org.apache.xmlgraphics</groupId>
Index: trunk/org.gvsig.desktop/org.gvsig.desktop.library/org.gvsig.symbology/org.gvsig.symbology.swing/org.gvsig.symbology.swing.api/src/main/java/org/gvsig/app/gui/styling/SymbolSelector.java
===================================================================
--- trunk/org.gvsig.desktop/org.gvsig.desktop.library/org.gvsig.symbology/org.gvsig.symbology.swing/org.gvsig.symbology.swing.api/src/main/java/org/gvsig/app/gui/styling/SymbolSelector.java	(revision 43509)
+++ trunk/org.gvsig.desktop/org.gvsig.desktop.library/org.gvsig.symbology/org.gvsig.symbology.swing/org.gvsig.symbology.swing.api/src/main/java/org/gvsig/app/gui/styling/SymbolSelector.java	(revision 43510)
@@ -152,12 +152,13 @@
 		private Geometry dummyPolygonGeom = null;
 		private boolean isInitialized = false;
 
+        @Override
 		public boolean accepts(Object obj) {
 			if (!isInitialized){
 				try {
 					dummyPointGeom = geomManager.createPoint(0, 0, SUBTYPES.GEOM2D);
-					dummyLineGeom = geomManager.create(TYPES.CURVE, SUBTYPES.GEOM2D);
-					dummyPolygonGeom = geomManager.create(TYPES.SURFACE, SUBTYPES.GEOM2D);
+					dummyLineGeom = geomManager.createLine(SUBTYPES.GEOM2D);
+					dummyPolygonGeom = geomManager.createPolygon(SUBTYPES.GEOM2D);
 				} catch (CreateGeometryException e) {
 					logger.error("Error creating a geometry", e);
 				}
Index: trunk/org.gvsig.desktop/org.gvsig.desktop.library/org.gvsig.symbology/org.gvsig.symbology.swing/org.gvsig.symbology.swing.api/src/main/java/org/gvsig/app/gui/styling/SymbolLayerManager.java
===================================================================
--- trunk/org.gvsig.desktop/org.gvsig.desktop.library/org.gvsig.symbology/org.gvsig.symbology.swing/org.gvsig.symbology.swing.api/src/main/java/org/gvsig/app/gui/styling/SymbolLayerManager.java	(revision 43509)
+++ trunk/org.gvsig.desktop/org.gvsig.desktop.library/org.gvsig.symbology/org.gvsig.symbology.swing/org.gvsig.symbology.swing.api/src/main/java/org/gvsig/app/gui/styling/SymbolLayerManager.java	(revision 43510)
@@ -156,9 +156,9 @@
         		shapeType = Geometry.TYPES.SURFACE;
 			}
 
-        	if (shapeType != -1)
-				symbol.addLayer(MapContextLocator.getSymbolManager()
-						.createSymbol(shapeType));
+        	if (shapeType != -1) {
+				symbol.addLayer(MapContextLocator.getSymbolManager().createSymbol(shapeType));
+            }
    		}
         initialize();
 
Index: trunk/org.gvsig.desktop/org.gvsig.desktop.library/org.gvsig.symbology/org.gvsig.symbology.swing/org.gvsig.symbology.swing.api/src/main/java/org/gvsig/app/gui/styling/MultiShapeSymbolSelector.java
===================================================================
--- trunk/org.gvsig.desktop/org.gvsig.desktop.library/org.gvsig.symbology/org.gvsig.symbology.swing/org.gvsig.symbology.swing.api/src/main/java/org/gvsig/app/gui/styling/MultiShapeSymbolSelector.java	(revision 43509)
+++ trunk/org.gvsig.desktop/org.gvsig.desktop.library/org.gvsig.symbology/org.gvsig.symbology.swing/org.gvsig.symbology.swing.api/src/main/java/org/gvsig/app/gui/styling/MultiShapeSymbolSelector.java	(revision 43510)
@@ -98,14 +98,11 @@
     private MultiShapeSymbolSelector() throws BaseException {
 
         GeometryType
-        gt = getGeomManager().getGeometryType(Geometry.TYPES.POINT,
-            SUBTYPES.GEOM2D);
+        gt = getGeomManager().getGeometryType(Geometry.TYPES.POINT, SUBTYPES.GEOM2D);
         markerSelector = new SymbolSelectorBrowser(gt, true);
-        gt = getGeomManager().getGeometryType(Geometry.TYPES.CURVE,
-            SUBTYPES.GEOM2D);
+        gt = getGeomManager().getGeometryType(Geometry.TYPES.CURVE, SUBTYPES.GEOM2D);
         lineSelector = new SymbolSelectorBrowser(gt, true);
-        gt = getGeomManager().getGeometryType(Geometry.TYPES.SURFACE,
-            SUBTYPES.GEOM2D);
+        gt = getGeomManager().getGeometryType(Geometry.TYPES.SURFACE, SUBTYPES.GEOM2D);
         fillSelector = new SymbolSelectorBrowser(gt, true);
 
         initialize(true);
@@ -116,33 +113,24 @@
 		this.wi = wi;
 	}
 	
-	MultiShapeSymbolSelector(Object currSymbol) {
-                IMultiShapeSymbol sym = null;
-                try {
-                    sym = (IMultiShapeSymbol) currSymbol;
-                } catch(Exception ex) {
-                    logger.warn("Incorrect symbol type, use default.",ex);
-                }
-		if (sym == null) {
-			markerSelector = (SymbolSelector) SymbolSelector
-					.createSymbolSelector(null, Geometry.TYPES.POINT);
-			lineSelector = (SymbolSelector) SymbolSelector
-					.createSymbolSelector(null, Geometry.TYPES.CURVE);
-			fillSelector = (SymbolSelector) SymbolSelector
-					.createSymbolSelector(null, Geometry.TYPES.SURFACE);
-		} else {
-			markerSelector = (SymbolSelector) SymbolSelector
-					.createSymbolSelector(sym.getMarkerSymbol(),
-							Geometry.TYPES.POINT);
-			lineSelector = (SymbolSelector) SymbolSelector
-					.createSymbolSelector(sym.getLineSymbol(),
-							Geometry.TYPES.CURVE);
-			fillSelector = (SymbolSelector) SymbolSelector
-					.createSymbolSelector(sym.getFillSymbol(),
-							Geometry.TYPES.SURFACE);
-		}
-		initialize(false);
-	}
+    MultiShapeSymbolSelector(Object currSymbol) {
+        IMultiShapeSymbol sym = null;
+        try {
+            sym = (IMultiShapeSymbol) currSymbol;
+        } catch (Exception ex) {
+            logger.warn("Incorrect symbol type, use default.", ex);
+        }
+        if( sym == null ) {
+            markerSelector = (SymbolSelector) SymbolSelector.createSymbolSelector(null, Geometry.TYPES.POINT);
+            lineSelector = (SymbolSelector) SymbolSelector.createSymbolSelector(null, Geometry.TYPES.CURVE);
+            fillSelector = (SymbolSelector) SymbolSelector.createSymbolSelector(null, Geometry.TYPES.SURFACE);
+        } else {
+            markerSelector = (SymbolSelector) SymbolSelector.createSymbolSelector(sym.getMarkerSymbol(), Geometry.TYPES.POINT);
+            lineSelector = (SymbolSelector) SymbolSelector.createSymbolSelector(sym.getLineSymbol(), Geometry.TYPES.CURVE);
+            fillSelector = (SymbolSelector) SymbolSelector.createSymbolSelector(sym.getFillSymbol(), Geometry.TYPES.SURFACE);
+        }
+        initialize(false);
+    }
 
 
 	private void initialize(boolean add_close_button) {
Index: trunk/org.gvsig.desktop/org.gvsig.desktop.library/org.gvsig.newlayer/org.gvsig.newlayer.lib/org.gvsig.newlayer.lib.impl/src/main/java/org/gvsig/newlayer/impl/FeatureTypePanel.java
===================================================================
--- trunk/org.gvsig.desktop/org.gvsig.desktop.library/org.gvsig.newlayer/org.gvsig.newlayer.lib/org.gvsig.newlayer.lib.impl/src/main/java/org/gvsig/newlayer/impl/FeatureTypePanel.java	(revision 43509)
+++ trunk/org.gvsig.desktop/org.gvsig.desktop.library/org.gvsig.newlayer/org.gvsig.newlayer.lib/org.gvsig.newlayer.lib.impl/src/main/java/org/gvsig/newlayer/impl/FeatureTypePanel.java	(revision 43510)
@@ -722,22 +722,16 @@
 
 	private List<ComboItemGeomType> getGeomTypes() {
 		List<ComboItemGeomType> geomTypes = new ArrayList<ComboItemGeomType>();
-		geomTypes
-				.add(new ComboItemGeomType("GEOMETRY", Geometry.TYPES.GEOMETRY));
+		geomTypes.add(new ComboItemGeomType("GEOMETRY", Geometry.TYPES.GEOMETRY));
 		geomTypes.add(new ComboItemGeomType("POINT", Geometry.TYPES.POINT));
-		geomTypes.add(new ComboItemGeomType("CURVE", Geometry.TYPES.CURVE));
-		geomTypes.add(new ComboItemGeomType("SURFACE", Geometry.TYPES.SURFACE));
+		geomTypes.add(new ComboItemGeomType("LINE", Geometry.TYPES.LINE));
+		geomTypes.add(new ComboItemGeomType("POLYGON", Geometry.TYPES.POLYGON));
 		geomTypes.add(new ComboItemGeomType("SOLID", Geometry.TYPES.SOLID));
-		geomTypes.add(new ComboItemGeomType("AGGREGATE",
-				Geometry.TYPES.AGGREGATE));
-		geomTypes.add(new ComboItemGeomType("MULTIPOINT",
-				Geometry.TYPES.MULTIPOINT));
-		geomTypes.add(new ComboItemGeomType("MULTICURVE",
-				Geometry.TYPES.MULTICURVE));
-		geomTypes.add(new ComboItemGeomType("MULTISURFACE",
-				Geometry.TYPES.MULTISURFACE));
-		geomTypes.add(new ComboItemGeomType("MULTISOLID",
-				Geometry.TYPES.MULTISOLID));
+		geomTypes.add(new ComboItemGeomType("AGGREGATE", Geometry.TYPES.AGGREGATE));
+		geomTypes.add(new ComboItemGeomType("MULTIPOINT", Geometry.TYPES.MULTIPOINT));
+		geomTypes.add(new ComboItemGeomType("MULTILINE", Geometry.TYPES.MULTILINE));
+		geomTypes.add(new ComboItemGeomType("MULTIPOLYGON", Geometry.TYPES.MULTIPOLYGON));
+		geomTypes.add(new ComboItemGeomType("MULTISOLID", Geometry.TYPES.MULTISOLID));
 
 		return geomTypes;
 	}
