Revision 42464 trunk/org.gvsig.desktop/org.gvsig.desktop.compat.cdc/org.gvsig.fmap.geometry/org.gvsig.fmap.geometry.jts/src/main/java/org/gvsig/fmap/geom/jts/primitive/surface/circle/AbstractCircle.java
AbstractCircle.java | ||
---|---|---|
26 | 26 |
import java.awt.geom.AffineTransform; |
27 | 27 |
import java.awt.geom.PathIterator; |
28 | 28 |
|
29 |
import org.cresques.cts.CoordTransRuntimeException; |
|
29 | 30 |
import org.cresques.cts.ICoordTrans; |
30 | 31 |
|
32 |
import org.gvsig.fmap.geom.GeometryLocator; |
|
33 |
import org.gvsig.fmap.geom.exception.CreateGeometryException; |
|
31 | 34 |
import org.gvsig.fmap.geom.jts.gputils.DefaultGeneralPathX; |
32 | 35 |
import org.gvsig.fmap.geom.jts.primitive.point.Point2D; |
33 | 36 |
import org.gvsig.fmap.geom.jts.primitive.point.PointJTS; |
... | ... | |
41 | 44 |
import org.gvsig.fmap.geom.primitive.Polygon; |
42 | 45 |
import org.gvsig.fmap.geom.primitive.Ring; |
43 | 46 |
import org.gvsig.tools.exception.BaseException; |
47 |
import org.gvsig.tools.locator.LocatorException; |
|
44 | 48 |
|
45 | 49 |
|
46 | 50 |
/** |
... | ... | |
374 | 378 |
// Ser?a incorrecto para las de deformaci?n en cizallamiento |
375 | 379 |
|
376 | 380 |
Point2D aux = new Point2D(center.getX(), center.getY()-radius); |
377 |
center.reProject(ct); |
|
378 |
aux.reProject(ct); |
|
379 | 381 |
try { |
382 |
center.reProject(ct); |
|
383 |
aux.reProject(ct); |
|
384 |
} catch (CoordTransRuntimeException e){ |
|
385 |
center.setX(0); |
|
386 |
center.setY(0); |
|
387 |
radius = 0; |
|
388 |
return; |
|
389 |
} |
|
390 |
try { |
|
380 | 391 |
radius = center.distance(aux); |
381 | 392 |
} catch (BaseException e) { |
382 | 393 |
throw new UnsupportedOperationException("Error calculating the radius of the transformed circle.", e); |
Also available in: Unified diff