给出Java代码 wgs84、cgcs2000
时间: 2023-12-12 09:02:50 浏览: 91
WGS84代码:
```
public class WGS84 {
private double latitude;
private double longitude;
public WGS84(double latitude, double longitude) {
this.latitude = latitude;
this.longitude = longitude;
}
public double getLatitude() {
return latitude;
}
public double getLongitude() {
return longitude;
}
public void setLatitude(double latitude) {
this.latitude = latitude;
}
public void setLongitude(double longitude) {
this.longitude = longitude;
}
}
```
CGCS2000代码:
```
public class CGCS2000 {
private double x;
private double y;
private double z;
public CGCS2000(double x, double y, double z) {
this.x = x;
this.y = y;
this.z = z;
}
public double getX() {
return x;
}
public double getY() {
return y;
}
public double getZ() {
return z;
}
public void setX(double x) {
this.x = x;
}
public void setY(double y) {
this.y = y;
}
public void setZ(double z) {
this.z = z;
}
}
```
阅读全文