Index: DefaultEditingContext.java
===================================================================
--- DefaultEditingContext.java	(revision 1672)
+++ DefaultEditingContext.java	(revision 1673)
@@ -90,12 +90,20 @@
 import org.gvsig.vectorediting.swing.api.EditingSwingManager;
 import org.gvsig.vectorediting.swing.api.console.EditingConsole;
 import org.gvsig.vectorediting.swing.impl.console.DefaultEditingConsole;
+import org.gvsig.fmap.geom.primitive.Point;
 
 import org.apache.commons.lang3.StringUtils;
+import org.gvsig.expressionevaluator.ExpressionUtils;
+import org.gvsig.expressionevaluator.MutableSymbolTable;
+import org.gvsig.fmap.dal.DataTypes;
 
 import org.gvsig.fmap.dal.EditingNotification;
 import org.gvsig.fmap.dal.EditingNotificationManager;
 import org.gvsig.fmap.dal.swing.DALSwingLocator;
+import org.gvsig.temporarystorage.TemporaryStorageGroup;
+import org.gvsig.temporarystorage.TemporaryStorageLocator;
+import org.gvsig.temporarystorage.TemporaryStorageManager;
+import org.gvsig.tools.dataTypes.DataTypesManager;
 import org.gvsig.tools.swing.api.ToolsSwingLocator;
 import org.gvsig.tools.swing.api.threadsafedialogs.ThreadSafeDialogsManager;
 
@@ -909,54 +917,55 @@
         }
         return false;
     }
-
+    
     private Point parsePoint(String response) throws ParsePointException {
-        String[] numbers = new String[1];
-        numbers[0] = response;
-        numbers = response.split(",");
-        int dimension = numbers.length;
-        if (dimension >= 2 && dimension <= 4) {
+        TemporaryStorageManager manager = TemporaryStorageLocator.getTemporaryStorageManager();
+        TemporaryStorageGroup storage = manager.create("Points",Point.class);
 
-            if (numbers[0].startsWith("(") && numbers[dimension-1].endsWith(")\n")) { // CCS
-                numbers[0] = numbers[0].replace("(", "");
-                numbers[dimension-1] = numbers[dimension-1].replace(")\n", "");
+        MutableSymbolTable symbolTable = ExpressionUtils.createSymbolTable();
+        symbolTable.setVar("LAST_POINT_ADDED", storage.get("LAST_POINT_ADDED_IN_EDTING"));
+        
+        try {
+            Object x = ExpressionUtils.evaluate(symbolTable, response);
+            if( x instanceof Point ) {
+                storage.put("LAST_POINT_ADDED_IN_EDTING", x);
+                return (Point) x;
             }
-
-            Point point;
-            try {
-                GeometryManager geomManager =
-                    GeometryLocator.getGeometryManager();
-                int subType;
-                switch (dimension) {
-                case 3:
-                    subType = Geometry.SUBTYPES.GEOM3D;
-                    break;
-                case 4:
-                    subType = Geometry.SUBTYPES.GEOM3DM;
-                    break;
-                default:
-                    subType = Geometry.SUBTYPES.GEOM2D;
-                    break;
-                }
-                point = (Point) geomManager.create(geomManager.getGeometryType(Geometry.TYPES.POINT, subType));
-                for (int i = 0; i < dimension; i++) {
-                    point.setCoordinateAt(i, Double.parseDouble(numbers[i]));
-                }
-
-            } catch (Exception e) {
-                throw new ParsePointException(e);
+        } catch(Exception ex) {
+            
+        }
+        String s = "ST_MakePoint("+response+")";
+        try {
+            Object x = ExpressionUtils.evaluate(symbolTable, s);
+            if( x instanceof Point ) {
+                storage.put("LAST_POINT_ADDED_IN_EDTING", x);
+                return (Point) x;
             }
-            return point;
-        } else {
-            throw new ParsePointException(null);
+        } catch(Exception ex) {
+            throw new ParsePointException(ex);
         }
+        throw new ParsePointException(null);
     }
+    
+    private Double parseValue(String response) throws ParseValueException {
+        TemporaryStorageManager manager = TemporaryStorageLocator.getTemporaryStorageManager();
+        TemporaryStorageGroup storage = manager.create("Points",Point.class);
 
-    private Double parseValue(String response) throws ParseValueException {
+        MutableSymbolTable symbolTable = ExpressionUtils.createSymbolTable();
+        symbolTable.setVar("LAST_POINT_ADDED", storage.get("LAST_POINT_ADDED_IN_EDTING"));
+        
         try {
-            return Double.valueOf(response);
-        } catch (Exception e) {
-            throw new ParseValueException(e);
+            Object x = ExpressionUtils.evaluate(symbolTable, response);
+            if( x instanceof Double ) {
+                return (Double) x;
+            }  
+            if( x==null ) {
+                throw new ParseValueException(new NullPointerException());
+            }
+            DataTypesManager.Coercion toDouble = ToolsLocator.getDataTypesManager().get(DataTypes.DOUBLE).getCoercion();
+            return (Double) toDouble.coerce(x);
+        } catch(Exception ex) {
+            throw new ParseValueException(ex);
         }
 
     }
