public abstract class CoordinateSystem
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
protected Position |
locus
The Position of this Coordinate
|
protected Datum |
ref
The Datum for this point
|
protected Ellipsoid |
sph
The Ellipsoid for this point
|
Modifier | Constructor and Description |
---|---|
protected |
CoordinateSystem()
Creates a new instance of CoordinateSystem using the default Ellipsoid and Datum
|
|
CoordinateSystem(Position pos,
Ellipsoid e,
Datum d)
Create a new instance of CoordinateSystem for a specific Position, Ellipsoid and Datum
|
Modifier and Type | Method and Description |
---|---|
abstract Datum |
defaultDatum()
Get the defaul Datum for an instance of CoordinateSystem.
|
abstract Ellipsoid |
defaultEllipsoid()
The default Ellipsoid used by instances of this CoordinateSystem
For example, a CoordinateSystem of type OSGB has the AirySphere as its default Ellipsoid
|
Datum |
getDatum()
Get the Datum used by this point
|
Ellipsoid |
getEllipsoid()
Get the Ellipsoid used by this point
|
java.lang.String |
getName()
Get the name of this CoordinateSystem.
|
Position |
getPosition()
Get the Position of this point
|
XYZ |
getWGS84()
Get the "absolute" cartesian coordinates for this location.
|
protected static double |
parseDouble(java.lang.String s) |
LatLong |
toLatLong()
Get the Latitude & Longitude for this point.
|
java.lang.String |
toLatLongString()
Return a String containing values of Latitude & Longitude.referred to the current Ellipsoid & Datum
|
abstract java.lang.String |
toString()
Provide a String representing the position in a correct format for the
CoordinateSystem
|
protected Position locus
protected Ellipsoid sph
protected Datum ref
protected CoordinateSystem()
public CoordinateSystem(Position pos, Ellipsoid e, Datum d)
Create a new instance of CoordinateSystem for a specific Position, Ellipsoid and Datum
pos
- Position of the point in this CoordinateSysteme
- Ellipsoid to be used in this CoordinateSystemd
- Datum for this instance of CopordinateSystempublic LatLong toLatLong()
public java.lang.String toLatLongString()
public Datum getDatum()
public Ellipsoid getEllipsoid()
public java.lang.String getName()
Get the name of this CoordinateSystem. By default, this method returns the short name of the
class. For example, an instance of mccombe.mapping.IrishGrid
returns the name "IrishGrid".
Implementers of sub-classes of CoordinateSystem are encouraged to override this method if a more descriptive name is needed
public Position getPosition()
public XYZ getWGS84()
public abstract Ellipsoid defaultEllipsoid()
public abstract Datum defaultDatum()
public abstract java.lang.String toString()
toString
in class java.lang.Object
protected static double parseDouble(java.lang.String s) throws java.text.ParseException
java.text.ParseException