Index: branches/v2_0_0_prep/libraries/libFMap_geometries/src/org/gvsig/fmap/geom/type/AbstractGeometryType.java
===================================================================
--- branches/v2_0_0_prep/libraries/libFMap_geometries/src/org/gvsig/fmap/geom/type/AbstractGeometryType.java	(revision 0)
+++ branches/v2_0_0_prep/libraries/libFMap_geometries/src/org/gvsig/fmap/geom/type/AbstractGeometryType.java	(revision 38596)
@@ -0,0 +1,60 @@
+package org.gvsig.fmap.geom.type;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import org.gvsig.fmap.geom.operation.GeometryOperation;
+
+public abstract class AbstractGeometryType implements GeometryType {
+
+    /**
+     * Registered operations for a concrete geometry type
+     */
+    private List geometryOperations = new ArrayList();
+    
+    public boolean isTypeOf(GeometryType geometryType) {
+        return isTypeOf(geometryType.getType());
+    }
+
+    public boolean isSubTypeOf(GeometryType geometryType) {
+        return isSubTypeOf(geometryType.getSubType());
+    }
+
+    public void setGeometryOperation(int index, GeometryOperation geomOp) {
+        while (index > geometryOperations.size()) {
+            geometryOperations.add(null);
+        }
+
+        if (index == geometryOperations.size()) {
+            geometryOperations.add(geomOp);
+        } else {
+            geometryOperations.set(index, geomOp);
+        }
+    }
+
+    public GeometryOperation getGeometryOperation(int index) {
+        return (GeometryOperation) geometryOperations.get(index);
+    }
+
+    public boolean equals(Object obj) {
+        if (obj instanceof GeometryType) {
+            GeometryType other = (GeometryType) obj;
+            return getType() == other.getType()
+                && getSubType() == other.getSubType();
+        }
+        return false;
+    }
+
+    protected List getGeometryOperations() {
+        return geometryOperations;
+    }
+
+    public String toString() {
+        StringBuffer sb =
+            new StringBuffer("[").append(getName()).append(",[")
+                .append(getGeometryOperations().toString()).append("]");
+
+        return sb.toString();
+    }
+
+}
Index: branches/v2_0_0_prep/libraries/libFMap_geometries/src/org/gvsig/fmap/geom/type/impl/DefaultGeometryType.java
===================================================================
--- branches/v2_0_0_prep/libraries/libFMap_geometries/src/org/gvsig/fmap/geom/type/impl/DefaultGeometryType.java	(revision 38595)
+++ branches/v2_0_0_prep/libraries/libFMap_geometries/src/org/gvsig/fmap/geom/type/impl/DefaultGeometryType.java	(revision 38596)
@@ -28,23 +28,17 @@
 package org.gvsig.fmap.geom.type.impl;
 
 import java.lang.reflect.Constructor;
-import java.util.ArrayList;
-import java.util.List;
 
 import org.gvsig.fmap.geom.Geometry;
 import org.gvsig.fmap.geom.GeometryManager;
 import org.gvsig.fmap.geom.exception.CreateGeometryException;
-import org.gvsig.fmap.geom.operation.GeometryOperation;
+import org.gvsig.fmap.geom.type.AbstractGeometryType;
 import org.gvsig.fmap.geom.type.GeometryType;
 
 /**
  * @author <a href="mailto:jpiera@gvsig.org">Jorge Piera</a>
  */
-public class DefaultGeometryType implements GeometryType {
-	/** 
-	 * The geometry identifier
-	 */
-	private int id;
+public class DefaultGeometryType extends AbstractGeometryType {
 	
 	/** 
 	 * Geometry type name
@@ -68,11 +62,6 @@
 	 */
 	private int subType;	
 		
-	/** 
-	 * Registered operations for a concrete geometry type
-	 */
-	private List geometryOperations = new ArrayList();
-	
 	/**
 	 * Super types of a geometry. e.g: the super type of an
 	 * arc is a curve, the super type of a circle is a surface...
@@ -114,7 +103,7 @@
      * @param superSubTypes
      * The superSubtypes of the geometry type      
      */
-    public DefaultGeometryType(Class geomClass, String name, int id, int type, int subType, 
+    public DefaultGeometryType(Class geomClass, String name, int type, int subType, 
         int[] superTypes, int[] superSubTypes) {
         this.geometryClass = geomClass;
         if (name == null) {
@@ -122,7 +111,6 @@
         } else {
             this.name = name;
         }
-        this.id = id;       
         this.type = type;   
         this.subType = subType;
         this.superTypes = superTypes;
@@ -155,8 +143,8 @@
 	 * @param type
 	 * The geometry abstract type			
 	 */
-	public DefaultGeometryType(Class geomClass, String name, int id, int type, int subType) {
-		this(geomClass, name, id, type, subType, new int[0], new int[0]);
+	public DefaultGeometryType(Class geomClass, String name, int type, int subType) {
+		this(geomClass, name, type, subType, new int[0], new int[0]);
 	}
 	
 	/**
@@ -175,48 +163,10 @@
 		} 
 	}
 	
-	/**
-	 * Guardamos una referencia a una instancia de la operación en el índice que se pasa como parámetro.
-	 * Si el índice ya está ocupado se sobrescribe.
-	 * 
-	 * @param index
-	 * @param geomOp
-	 */
-	public void setGeometryOperation(int index, GeometryOperation geomOp) {
-		
-		while (index > geometryOperations.size()) {
-			geometryOperations.add(null);
-		}
-		
-		if (index == geometryOperations.size()) {
-			geometryOperations.add(geomOp);
-		} else {				
-			geometryOperations.set(index, geomOp);
-		}
-	}
-	
-	public GeometryOperation getGeometryOperation(int index) {
-		return (GeometryOperation) geometryOperations.get(index);
-	}
-	
 	public Class getGeometryClass() {
 		return geometryClass;
 	}
 	
-	public String toString() {
-		StringBuffer sb = new StringBuffer("[")
-		.append(geometryClass.getName())
-		.append(",[")
-		.append(geometryOperations.toString())
-		.append("]");
-		
-		return sb.toString();
-	}
-	
-	public int getId() {
-		return id;
-	}
-
 	public String getName() {
 		return name;
 	}
@@ -253,20 +203,5 @@
         return false;
     }
 
-    public boolean isTypeOf(GeometryType geometryType) {
-        return isTypeOf(geometryType.getType());
-    }
-
-    public boolean isSubTypeOf(GeometryType geometryType) {
-        return isSubTypeOf(geometryType.getSubType());
-    }
-
-    public boolean equals(Object obj) {
-        if (obj instanceof GeometryType) {
-            GeometryType other = (GeometryType) obj;
-            return type == other.getType() && subType == other.getSubType();
-        }
-        return false;
-    }
 }
 
Index: branches/v2_0_0_prep/libraries/libFMap_geometries/src/org/gvsig/fmap/geom/type/GeometryType.java
===================================================================
--- branches/v2_0_0_prep/libraries/libFMap_geometries/src/org/gvsig/fmap/geom/type/GeometryType.java	(revision 38595)
+++ branches/v2_0_0_prep/libraries/libFMap_geometries/src/org/gvsig/fmap/geom/type/GeometryType.java	(revision 38596)
@@ -1,7 +1,6 @@
 package org.gvsig.fmap.geom.type;
 
 import org.gvsig.fmap.geom.Geometry;
-import org.gvsig.fmap.geom.GeometryManager;
 import org.gvsig.fmap.geom.exception.CreateGeometryException;
 import org.gvsig.fmap.geom.operation.GeometryOperation;
 
@@ -13,12 +12,6 @@
  * @author <a href="mailto:jpiera@gvsig.org">Jorge Piera</a>
  */
 public interface GeometryType {
-		
-	/**
-	 * @return the identifier of the geometry type. This identifier
-	 * is assigned by the {@link GeometryManager} in run time.
-	 */
-	public int getId();
 	
 	/**
 	 * @return the name of the geometry type.
Index: branches/v2_0_0_prep/libraries/libFMap_geometries/src/org/gvsig/fmap/geom/impl/DefaultGeometryManager.java
===================================================================
--- branches/v2_0_0_prep/libraries/libFMap_geometries/src/org/gvsig/fmap/geom/impl/DefaultGeometryManager.java	(revision 38595)
+++ branches/v2_0_0_prep/libraries/libFMap_geometries/src/org/gvsig/fmap/geom/impl/DefaultGeometryManager.java	(revision 38596)
@@ -57,6 +57,7 @@
 import org.gvsig.fmap.geom.primitive.GeneralPathX;
 import org.gvsig.fmap.geom.primitive.NullGeometry;
 import org.gvsig.fmap.geom.primitive.Point;
+import org.gvsig.fmap.geom.primitive.PointGeometryType;
 import org.gvsig.fmap.geom.primitive.Surface;
 import org.gvsig.fmap.geom.primitive.impl.DefaultNullGeometry;
 import org.gvsig.fmap.geom.primitive.impl.Envelope2D;
@@ -109,15 +110,6 @@
      */
     private GeometryType[][] geometryTypes;
 
-    /**
-     * GeometryType index counter. Each time a new geometry type (not
-     * predefined) is registered it is assigned this counter's value as index
-     * and after that
-     * it is incremented by 1
-     */
-    private int geometryTypeIndex = 0;// Geometry.EXTENDED_GEOMTYPE_OFFSET;
-    // //65536;//2^16
-
     // Initially create a matrix of 17 x 6, which are the current default
     // types and subtypes. If another type or subtype is registered, the
     // matrix will grow as needed
@@ -261,12 +253,6 @@
     }
 
     public GeometryType registerGeometryType(Class geomClass, String name,
-        int type, int subType, int[] superTypes, int[] superSubTypes) {
-        return registerGeometryType(geomClass, name, geometryTypeIndex++, type, subType,
-            superTypes, superSubTypes);
-    }
-
-    public GeometryType registerGeometryType(Class geomClass, String name,
         int type, int subType, int[] superTypes) {
         return registerGeometryType(geomClass, name, type, subType,
             superTypes, new int[0]);
@@ -287,7 +273,6 @@
      *   private static final GeometryType geomType = GeometryManager.getInstance()
      *    .registerBasicGeometryType(Point2D.class, "Point2D", Geometry.TYPES.POINT);
      * 
-     *   public static final int CODE = geomType.getId();
      * ...
      *   public int getType() {
      *      return geomType.getType();
@@ -317,8 +302,8 @@
      * @throws IllegalArgumentException
      *             If geomClass is null or does not implement Geometry
      */
-    private GeometryType registerGeometryType(Class geomClass, String name,
-        int id, int type, int subType, int[] superTypes, int superSubTypes[]) {
+    public GeometryType registerGeometryType(Class geomClass, String name,
+        int type, int subType, int[] superTypes, int superSubTypes[]) {
         if (geomClass == null) {
             throw new IllegalArgumentException("geomClass cannot be null.");
         }
@@ -333,7 +318,7 @@
         if (type >= geometryTypes.length || subType >= geometryTypes[0].length
             || (geomType = geometryTypes[type][subType]) == null) {
             geomType =
-                new DefaultGeometryType(geomClass, name, id, type, subType,
+                new DefaultGeometryType(geomClass, name, type, subType,
                     superTypes, superSubTypes);
             registerGeometryType(geomType);
             geometryTypeName.put(geomClass.getName(), geomType);
@@ -345,7 +330,7 @@
         return geomType;
     }
 
-    private void registerGeometryType(GeometryType geometryType) {
+    public void registerGeometryType(GeometryType geometryType) {
         if (geometryType.getType() >= geometryTypes.length
             || geometryType.getSubType() >= geometryTypes[0].length) {
 
@@ -525,17 +510,9 @@
         org.gvsig.fmap.geom.primitive.Point min = null;
         org.gvsig.fmap.geom.primitive.Point max = null;
         try {
-            GeometryType gType = getGeometryType(TYPES.POINT, subType);
-            min = (Point) gType.create();
-            min.setX(minX);
-            min.setY(minY);
-            max = (Point) gType.create();
-            max.setX(maxX);
-            max.setY(maxY);
-            // min = createPoint(minX, minY, subType);
-            // max = createPoint(maxX, maxY, subType);
-        } catch (CreateGeometryException e) {
-            throw new CreateEnvelopeException(subType, e);
+            PointGeometryType gType = (PointGeometryType) getGeometryType(TYPES.POINT, subType);
+            min = gType.createPoint(minX, minY);
+            max = gType.createPoint(maxX, maxY);
         } catch (GeometryTypeNotSupportedException e) {
             throw new CreateEnvelopeException(subType, e);
         } catch (GeometryTypeNotValidException e) {
Index: branches/v2_0_0_prep/libraries/libFMap_geometries/src/org/gvsig/fmap/geom/impl/DefaultGeometryLibrary.java
===================================================================
--- branches/v2_0_0_prep/libraries/libFMap_geometries/src/org/gvsig/fmap/geom/impl/DefaultGeometryLibrary.java	(revision 38595)
+++ branches/v2_0_0_prep/libraries/libFMap_geometries/src/org/gvsig/fmap/geom/impl/DefaultGeometryLibrary.java	(revision 38596)
@@ -62,8 +62,8 @@
 import org.gvsig.fmap.geom.primitive.impl.Envelope3D;
 import org.gvsig.fmap.geom.primitive.impl.Geometry2D;
 import org.gvsig.fmap.geom.primitive.impl.Geometry2DZ;
-import org.gvsig.fmap.geom.primitive.impl.Point2D;
-import org.gvsig.fmap.geom.primitive.impl.Point2DZ;
+import org.gvsig.fmap.geom.primitive.impl.Point2DGeometryType;
+import org.gvsig.fmap.geom.primitive.impl.Point3DGeometryType;
 import org.gvsig.fmap.geom.primitive.impl.Solid2DZ;
 import org.gvsig.fmap.geom.primitive.impl.Spline2D;
 import org.gvsig.fmap.geom.primitive.impl.Spline2DZ;
@@ -126,8 +126,7 @@
             TYPES.GEOMETRY, SUBTYPES.GEOM3D);
 
         //Register points in 2D
-        geometryManager.registerGeometryType(Point2D.class, "Point2D",
-            TYPES.POINT, SUBTYPES.GEOM2D);
+        geometryManager.registerGeometryType(new Point2DGeometryType());
 
         //Register curves in 2D
         geometryManager.registerGeometryType(Curve2D.class, "Curve2D",
@@ -162,8 +161,7 @@
             TYPES.NULL, SUBTYPES.GEOM3D);
 
         //Register points in 3D
-        geometryManager.registerGeometryType(Point2DZ.class, "Point3D",
-            TYPES.POINT, SUBTYPES.GEOM3D, new int[0], new int[]{SUBTYPES.GEOM2D});
+        geometryManager.registerGeometryType(new Point3DGeometryType());
 
         //Register curves in 3D
         geometryManager.registerGeometryType(Curve2DZ.class, "Curve3D", 
Index: branches/v2_0_0_prep/libraries/libFMap_geometries/src/org/gvsig/fmap/geom/GeometryManager.java
===================================================================
--- branches/v2_0_0_prep/libraries/libFMap_geometries/src/org/gvsig/fmap/geom/GeometryManager.java	(revision 38595)
+++ branches/v2_0_0_prep/libraries/libFMap_geometries/src/org/gvsig/fmap/geom/GeometryManager.java	(revision 38596)
@@ -359,6 +359,16 @@
 
     /**
      * <p>
+     * Registers a GeometryType instance. 
+     * </p>
+     * 
+     * @param geometryType
+     *            A {@link GeometryType} instance to create {@link Geometry} objects
+     */
+    public void registerGeometryType(GeometryType geometryType);
+    
+    /**
+     * <p>
      * Registers a Geometry implementation class with a predefined geometry type
      * and returns the associated GeometryType instance. Available predefined
      * types are defined in {@link Geometry.TYPES} and the subtypes are defined
Index: branches/v2_0_0_prep/libraries/libFMap_geometries/src/org/gvsig/fmap/geom/primitive/PointGeometryType.java
===================================================================
--- branches/v2_0_0_prep/libraries/libFMap_geometries/src/org/gvsig/fmap/geom/primitive/PointGeometryType.java	(revision 0)
+++ branches/v2_0_0_prep/libraries/libFMap_geometries/src/org/gvsig/fmap/geom/primitive/PointGeometryType.java	(revision 38596)
@@ -0,0 +1,48 @@
+/* gvSIG. Desktop Geographic Information System.
+ *
+ * Copyright � 2007-2012 gvSIG Association
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
+ * MA  02110-1301, USA.
+ *
+ * For any additional information, do not hesitate to contact us
+ * at info AT gvsig.com, or visit our website www.gvsig.com.
+ */
+package org.gvsig.fmap.geom.primitive;
+
+import org.gvsig.fmap.geom.type.GeometryType;
+
+/**
+ * Geometry type for point geometries.
+ * 
+ * @author gvSIG Team
+ */
+public interface PointGeometryType extends GeometryType {
+
+    /**
+     * Creates a new point object 
+     * @param x the x coordinate of the point
+     * @param y the y coordinate of the point
+     * @return the new point
+     */
+    Point createPoint(double x, double y);
+    
+    /**
+     * Creates a new point object 
+     * @param coordinates the coordinates of the point
+     * @return the new point
+     */
+    Point createPoint(double[] coordinates);
+}
Index: branches/v2_0_0_prep/libraries/libFMap_geometries/src/org/gvsig/fmap/geom/primitive/impl/Point2DGeometryType.java
===================================================================
--- branches/v2_0_0_prep/libraries/libFMap_geometries/src/org/gvsig/fmap/geom/primitive/impl/Point2DGeometryType.java	(revision 0)
+++ branches/v2_0_0_prep/libraries/libFMap_geometries/src/org/gvsig/fmap/geom/primitive/impl/Point2DGeometryType.java	(revision 38596)
@@ -0,0 +1,72 @@
+/* gvSIG. Desktop Geographic Information System.
+ *
+ * Copyright � 2007-2012 gvSIG Association
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
+ * MA  02110-1301, USA.
+ *
+ * For any additional information, do not hesitate to contact us
+ * at info AT gvsig.com, or visit our website www.gvsig.com.
+ */
+package org.gvsig.fmap.geom.primitive.impl;
+
+import org.gvsig.fmap.geom.Geometry;
+import org.gvsig.fmap.geom.exception.CreateGeometryException;
+import org.gvsig.fmap.geom.primitive.Point;
+import org.gvsig.fmap.geom.primitive.PointGeometryType;
+import org.gvsig.fmap.geom.type.AbstractGeometryType;
+
+/**
+ * Geometry type implementation for the creation of {@link Point2D} objects.
+ * 
+ * @author gvSIG Team
+ */
+public class Point2DGeometryType extends AbstractGeometryType implements
+    PointGeometryType {
+
+    public String getName() {
+        return "Point2D";
+    }
+
+    public int getType() {
+        return Geometry.TYPES.POINT;
+    }
+
+    public int getSubType() {
+        return Geometry.SUBTYPES.GEOM2D;
+    }
+
+    public boolean isTypeOf(int geometryType) {
+        return Geometry.TYPES.POINT == geometryType
+            || Geometry.TYPES.GEOMETRY == geometryType;
+    }
+
+    public boolean isSubTypeOf(int geometrySubType) {
+        return Geometry.SUBTYPES.GEOM2D == geometrySubType;
+    }
+
+    public Geometry create() throws CreateGeometryException {
+        return new Point2D(this);
+    }
+
+    public Point createPoint(double x, double y) {
+        return new Point2D(this, x, y);
+    }
+
+    public Point createPoint(double[] coordinates) {
+        return new Point2D(this, coordinates[0], coordinates[1]);
+    }
+
+}
Index: branches/v2_0_0_prep/libraries/libFMap_geometries/src/org/gvsig/fmap/geom/primitive/impl/Point3DGeometryType.java
===================================================================
--- branches/v2_0_0_prep/libraries/libFMap_geometries/src/org/gvsig/fmap/geom/primitive/impl/Point3DGeometryType.java	(revision 0)
+++ branches/v2_0_0_prep/libraries/libFMap_geometries/src/org/gvsig/fmap/geom/primitive/impl/Point3DGeometryType.java	(revision 38596)
@@ -0,0 +1,62 @@
+/* gvSIG. Desktop Geographic Information System.
+ *
+ * Copyright � 2007-2012 gvSIG Association
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
+ * MA  02110-1301, USA.
+ *
+ * For any additional information, do not hesitate to contact us
+ * at info AT gvsig.com, or visit our website www.gvsig.com.
+ */
+package org.gvsig.fmap.geom.primitive.impl;
+
+import org.gvsig.fmap.geom.Geometry;
+import org.gvsig.fmap.geom.exception.CreateGeometryException;
+import org.gvsig.fmap.geom.primitive.Point;
+
+/**
+ * Geometry type implementation for the creation of {@link Point3D} objects.
+ * 
+ * @author gvSIG Team
+ */
+public class Point3DGeometryType extends Point2DGeometryType {
+
+    public String getName() {
+        return "Point3D";
+    }
+
+    public int getSubType() {
+        return Geometry.SUBTYPES.GEOM3D;
+    }
+
+    public boolean isSubTypeOf(int geometrySubType) {
+        return Geometry.SUBTYPES.GEOM3D == geometrySubType
+            || super.isSubTypeOf(geometrySubType);
+    }
+
+    public Geometry create() throws CreateGeometryException {
+        return new Point2DZ(this);
+    }
+
+    public Point createPoint(double x, double y) {
+        return new Point2DZ(x, y, 0.0d, this);
+    }
+
+    public Point createPoint(double[] coordinates) {
+        return new Point2DZ(coordinates[0], coordinates[1], coordinates[2],
+            this);
+    }
+
+}
