public class Datum extends java.lang.Object implements SpheroidConstants
Datum
holds a geodetic datum name, spheroid name,
spheroid parameters, and WGS84-relative datum transformation
parameters. The datum may be used to transform
EarthLocation
objects to and from different datums.AIRY, AUS_NAT, BESSEL, CLARKE1866, CLARKE1880, EVEREST, GRS1980, HOUGH, INT1909, INT1967, KRASS, MAX_SPHEROIDS, MERCURY1960, MOD_AIRY, MOD_EVEREST, MOD_MER1968, SE_ASIA, SPHERE, SPHEROID_INV_FLAT, SPHEROID_NAMES, SPHEROID_SEMI_MAJOR, SPHEROID_SEMI_MINOR, STD_RADIUS, WGS66, WGS72, WGS84
Constructor and Description |
---|
Datum(java.lang.String datumName,
int spheroid,
double dx,
double dy,
double dz)
Creates a new geodetic datum based on a spheroid code.
|
Datum(java.lang.String datumName,
java.lang.String spheroidName,
double axis,
double invFlat,
double dx,
double dy,
double dz)
Creates a new geodetic datum based on user-specified spheroid
parameters.
|
Modifier and Type | Method and Description |
---|---|
java.lang.Object |
clone() |
boolean |
equals(java.lang.Object obj)
Checks if this datum is equal to another.
|
double |
getAxis()
Gets the semi-major axis in meters.
|
java.lang.String |
getDatumName()
Gets the datum name.
|
double |
getE2()
Gets the eccentricity value squared.
|
double |
getFlat()
Gets the flattening value.
|
java.lang.String |
toString() |
static EarthLocation |
transform(EarthLocation from,
Datum toDatum,
EarthLocation to)
Transforms an earth location from one datum to another.
|
public Datum(java.lang.String datumName, java.lang.String spheroidName, double axis, double invFlat, double dx, double dy, double dz)
datumName
- the datum name.spheroidName
- the spheroid name.axis
- the spheroid semi-major axis (meters).invFlat
- the spheroid inverse flattening.dx
- the x-axis shift (meters).dy
- the y-axis shift (meters).dz
- the z-axis shift (meters).public Datum(java.lang.String datumName, int spheroid, double dx, double dy, double dz)
datumName
- the datum name.spheroid
- the spheroid code for the datum.dx
- the x-axis shift (meters).dy
- the y-axis shift (meters).dz
- the z-axis shift (meters).public double getAxis()
public double getFlat()
public double getE2()
public java.lang.String getDatumName()
public static EarthLocation transform(EarthLocation from, Datum toDatum, EarthLocation to)
from
- the earth location to transform.toDatum
- the new datum to transform to.to
- the earth location to modify, or null to create a new
transformed earth location. The to
and
from
locations may be the same, in which case the
location is modified in-place.public boolean equals(java.lang.Object obj)
equals
in class java.lang.Object
public java.lang.String toString()
toString
in class java.lang.Object
public java.lang.Object clone()
clone
in class java.lang.Object