Index: PolygonPlacementInside.java
===================================================================
--- PolygonPlacementInside.java	(revision 43509)
+++ 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;
 		}
