Revision 74 org.gvsig.vectorediting/trunk/org.gvsig.vectorediting/org.gvsig.vectorediting.lib/org.gvsig.vectorediting.lib.impl/src/main/java/org/gvsig/vectorediting/lib/impl/DefaultEditingProviderServices.java
DefaultEditingProviderServices.java | ||
---|---|---|
184 | 184 |
|
185 | 185 |
} |
186 | 186 |
|
187 |
public Circle createCircle(Point2D p1, Point2D p2, FeatureStore featureStore) |
|
188 |
throws CreateGeometryException, DataException { |
|
189 |
Point centro = createPoint(p1.getX(), p1.getY(), featureStore); |
|
190 |
Point radio = createPoint(p2.getX(), p2.getY(), featureStore); |
|
191 |
return createCircle(centro, radio, featureStore); |
|
192 |
} |
|
193 |
|
|
194 |
public Circle createCircle(Point p1, Point p2, FeatureStore featureStore) |
|
195 |
throws CreateGeometryException, DataException { |
|
196 |
Circle circle = null; |
|
197 |
GeometryType featStoreGeomType = getGeomType(featureStore); |
|
198 |
circle = (Circle) geomManager.create(TYPES.CIRCLE, |
|
199 |
featStoreGeomType.getSubType()); |
|
200 |
circle.setPoints(p1, p2); |
|
201 |
|
|
202 |
return circle; |
|
203 |
} |
|
204 |
|
|
205 | 187 |
public Circle createCircle(Point center, double radius, |
206 | 188 |
FeatureStore featureStore) |
207 | 189 |
throws CreateGeometryException, DataException { |
... | ... | |
224 | 206 |
return arc; |
225 | 207 |
} |
226 | 208 |
|
227 |
public Arc createArc(Point p1, Point midPoint, Point p2, |
|
228 |
FeatureStore featureStore) |
|
229 |
throws CreateGeometryException, DataException, |
|
230 |
GeometryOperationNotSupportedException, GeometryOperationException { |
|
231 |
Arc arc = null; |
|
232 |
GeometryType featStoreGeomType = getGeomType(featureStore); |
|
233 |
arc = (Arc) geomManager.create(TYPES.ARC, featStoreGeomType.getSubType()); |
|
234 |
arc.setPoints(p1, midPoint, p2); |
|
235 |
return arc; |
|
236 |
} |
|
237 |
|
|
238 | 209 |
public Point createPoint(double x, double y, FeatureStore featureStore) |
239 | 210 |
throws CreateGeometryException, DataException { |
240 | 211 |
Point point = null; |
Also available in: Unified diff