Revision 37514

View differences:

branches/v2_0_0_prep/extensions/extEditing/src/org/gvsig/editing/gui/cad/tools/ComplexSelectionCADTool.java
110 110
        if (status.equals("Selection.FirstPoint")) {
111 111
            firstPoint = new Point2D.Double(x, y);
112 112
            pointsPolygon.add(firstPoint);
113
        } else
114
            if (status.equals("Selection.SecondPoint")) {
113
        } else if (status.equals("Selection.SecondPoint")) {
115 114

  
116
            } else
117
                if (status.equals("Selection.WithSelectedFeatures")) {
115
        } else if (status.equals("Selection.WithSelectedFeatures")) {
118 116

  
119
                } else
120
                    if (status.equals("Selection.WithHandlers")) {
121
                        FeatureStore featureStore = null;
122
                        try {
123
                            VectorialLayerEdited vle = getVLE();
124
                            featureStore = vle.getFeatureStore();
125
                            addPointWithHandlers(x, y, featureStore,
126
                                vle.getSelectedHandler());
127
                        } catch (ReadException e) {
128
                            LOG.error("Error getting the feature store");
129
                        }
130
                    } else
131
                        if (status.equals("Selection.NextPointPolygon")) {
132
                            pointsPolygon.add(new Point2D.Double(x, y));
133
                        }
117
        } else if (status.equals("Selection.WithHandlers")) {
118
            FeatureStore featureStore = null;
119
            try {
120
                VectorialLayerEdited vle = getVLE();
121
                featureStore = vle.getFeatureStore();
122
                addPointWithHandlers(x, y, featureStore,
123
                    vle.getSelectedHandler());
124
            } catch (ReadException e) {
125
                LOG.error("Error getting the feature store");
126
            }
127
        } else if (status.equals("Selection.NextPointPolygon")) {
128
            pointsPolygon.add(new Point2D.Double(x, y));
129
        } else if (status.equals("Selection.SecondPointCircle")) {
130
            selectWithCircle(x, y, event);
131
        }
134 132
    }
135 133

  
136 134
    /**
branches/v2_0_0_prep/libraries/libFMap_geometries/src/org/gvsig/fmap/geom/primitive/impl/Circle2D.java
47 47
import java.util.ArrayList;
48 48

  
49 49
import org.cresques.cts.IProjection;
50

  
50 51
import org.gvsig.fmap.geom.Geometry;
51 52
import org.gvsig.fmap.geom.handler.AbstractHandler;
52 53
import org.gvsig.fmap.geom.handler.CuadrantHandler;
......
266 267
					.getY()
267 268
					- radio, 2 * radio, 2 * radio, 0, 360, Arc2D.OPEN);
268 269
			gp = new GeneralPathX(arc.getPathIterator(null));
269

  
270
			gp.closePath();
270 271
		}
271 272
	}
272 273

  
......
355 356
				.getY()
356 357
				- radious, 2 * radious, 2 * radious, 0, 360, Arc2D.OPEN);
357 358
		this.gp = new GeneralPathX(arc.getPathIterator(null));
359
		gp.closePath();
358 360
		this.center = _center;
359 361
		this.radio = radious;	
360 362
	}
......
389 391
				.getY()
390 392
				- radious, 2 * radious, 2 * radious, 0, 360, Arc2D.OPEN);
391 393
		this.gp = new GeneralPathX(arc.getPathIterator(null));
394
		gp.closePath();
392 395
		this.center = center;
393 396
		this.radio = radious;	
394 397
		
branches/v2_0_0_prep/libraries/libFMap_geometries/src/org/gvsig/fmap/geom/operation/towkt/ToWKT.java
1 1
package org.gvsig.fmap.geom.operation.towkt;
2 2

  
3
import com.vividsolutions.jts.io.WKTWriter;
4

  
3 5
import org.gvsig.fmap.geom.Geometry;
4 6
import org.gvsig.fmap.geom.GeometryLocator;
5 7
import org.gvsig.fmap.geom.operation.GeometryOperation;
6 8
import org.gvsig.fmap.geom.operation.GeometryOperationContext;
7
import org.gvsig.fmap.geom.util.Converter;
9
import org.gvsig.fmap.geom.operation.GeometryOperationException;
10
import org.gvsig.fmap.geom.operation.GeometryOperationNotSupportedException;
11
import org.gvsig.fmap.geom.operation.tojts.ToJTS;
8 12

  
9
import com.vividsolutions.jts.io.WKTWriter;
10

  
11 13
public class ToWKT extends GeometryOperation {
12 14
    public static final String NAME = "toWKT";
13 15
	public static final int CODE = GeometryLocator.getGeometryManager().
......
15 17
	
16 18
	private static WKTWriter writer = new WKTWriter();
17 19

  
18
	public Object invoke(Geometry geom, GeometryOperationContext ctx) {
19
		return writer.write(Converter.geometryToJts(geom));
20
	public Object invoke(Geometry geom, GeometryOperationContext ctx) throws GeometryOperationException {
21
		try {
22
            return writer.write((com.vividsolutions.jts.geom.Geometry)geom.invokeOperation(ToJTS.CODE, null));
23
        } catch (GeometryOperationNotSupportedException e) {
24
           throw new GeometryOperationException(e);
25
        }
20 26
	}
21 27

  
22 28
	public int getOperationIndex() {

Also available in: Unified diff