root / branches / v02_desarrollo / libraries / libCq CMS for java.old / src / org / cresques / geo / UtmPoint.java @ 988
History | View | Annotate | Download (1.24 KB)
1 |
package org.cresques.geo; |
---|---|
2 |
|
3 |
import java.awt.geom.Point2D; |
4 |
|
5 |
import org.cresques.cts.ICoordTrans; |
6 |
import org.cresques.cts.IProjection; |
7 |
|
8 |
public class UtmPoint extends ProjPoint { |
9 |
public UtmPoint() {
|
10 |
proj = UtmZone.getProjection(Ellipsoid.hayford, 30, UtmZone.NORTH);
|
11 |
setLocation(0.0,0.0); } |
12 |
public UtmPoint(double x, double y) { |
13 |
proj = UtmZone.getProjection(Ellipsoid.hayford, 30, UtmZone.NORTH);
|
14 |
setLocation(x,y); } |
15 |
public UtmPoint(Point2D pt) { |
16 |
proj = UtmZone.getProjection(Ellipsoid.hayford, 30, UtmZone.NORTH);
|
17 |
setLocation(pt.getX(), pt.getY()); } |
18 |
public UtmPoint(UtmZone zone) {
|
19 |
setLocation(0.0,0.0); proj = zone;} |
20 |
public UtmPoint(UtmZone zone, double x, double y) { |
21 |
setLocation(x,y); proj = zone;} |
22 |
|
23 |
public UtmPoint(UtmZone zone, Point2D pt) { |
24 |
setLocation(pt.getX(), pt.getY()); proj = zone;} |
25 |
|
26 |
public IProjection getProjection() { return proj; } |
27 |
public void reProject(ICoordTrans rp) { |
28 |
// TODO metodo reProject pendiente de implementar
|
29 |
} |
30 |
|
31 |
public double getX() { return X; } |
32 |
public double getY() { return Y; } |
33 |
public void setLocation(double x, double y) {X=x; Y=y; } |
34 |
|
35 |
|
36 |
public String toString() { |
37 |
return "("+((UtmZone) proj).Zone+": "+getX()+","+getY()+")"; |
38 |
} |
39 |
|
40 |
public Point2D toGeo() { |
41 |
return ((Projection) proj).toGeo(this); } |
42 |
} |