Revision 39594 branches/v2_0_0_prep/libraries/libFMap_geometries/src/org/gvsig/fmap/geom/primitive/impl/Point2D.java
Point2D.java | ||
---|---|---|
32 | 32 |
|
33 | 33 |
import org.gvsig.fmap.geom.DirectPosition; |
34 | 34 |
import org.gvsig.fmap.geom.Geometry; |
35 |
import org.gvsig.fmap.geom.exception.ReprojectionRuntimeException; |
|
35 | 36 |
import org.gvsig.fmap.geom.handler.AbstractHandler; |
36 | 37 |
import org.gvsig.fmap.geom.handler.FinalHandler; |
37 | 38 |
import org.gvsig.fmap.geom.handler.Handler; |
... | ... | |
194 | 195 |
|
195 | 196 |
public void reProject(ICoordTrans ct) { |
196 | 197 |
java.awt.geom.Point2D p = getPoint2D(); |
197 |
p = ct.convert(p, p); |
|
198 |
this.x = p.getX(); |
|
199 |
this.y = p.getY(); |
|
198 |
|
|
199 |
try { |
|
200 |
p = ct.convert(p, p); |
|
201 |
this.x = p.getX(); |
|
202 |
this.y = p.getY(); |
|
203 |
} catch (Exception exc) { |
|
204 |
/* |
|
205 |
* This can happen when the reprojection lib is unable |
|
206 |
* to reproject (for example the source point |
|
207 |
* is out of the valid range and some computing |
|
208 |
* problem happens) |
|
209 |
*/ |
|
210 |
throw new ReprojectionRuntimeException( |
|
211 |
ct.getPOrig(), ct.getPDest(), getPoint2D(), exc); |
|
212 |
} |
|
200 | 213 |
} |
201 | 214 |
|
202 | 215 |
public Handler[] getStretchingHandlers() { |
Also available in: Unified diff