Class Topocentric2DPoint

java.lang.Object
org.opensextant.geodesy.Topocentric2DPoint
All Implemented Interfaces:
Serializable, GeoPoint
Direct Known Subclasses:
Topocentric3DPoint

public class Topocentric2DPoint extends Object implements GeoPoint, Serializable
The Topocentric2DPoint class is used to represent a point in Cartesian coordinate space, relative to a plane that is tangent to the surface of an Ellipsoid at a particular Geodetic Latitude and Longitude point, called the topocentric origin. To be correctly interpreted, one needs a particular reference Topocentric origin point and Ellipsoid model of the earth (see FrameOfReference class for ways to define and use this in coordinate conversions). The coordinate system used here is consistent with the one defined by Nato Standards for Airborne Ground Survelliance (AGS) data. In particular, the x-axis is positive in the Easterly direction, the y-axis is positive in the Northly direction. All units of length are specified in meters. Note that there are other commonly used systems of topocentric reference that make different assumptions about the directional orientation of the axes. The x and y values are called easting and northing here, but they may not actually follow the corresponding compass directions, depending on how close you are to the polar regions. For example, the MGRS system uses a PolarStereographic projection for the poles, and the easting and northing values of a topocentric point there would follow the MGRS grid layed over that projection.
See Also:
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    protected double
     
    protected double
     
  • Constructor Summary

    Constructors
    Constructor
    Description
    Topocentric2DPoint(double easting, double northing)
    The constructor takes double precision floating point values for easting and northing distances in meters from the topographic origin.
  • Method Summary

    Modifier and Type
    Method
    Description
    boolean
    equals(Object that)
    This method is used to test whether two points are equal in the sense that have the same coordinate value.
    boolean
    This method is used to test whether two points are equal in the sense that have the same coordinate value.
    double
    This accessor method is used to get the number of meters from the topographic origin, along the x-axis or easting direction.
    double
    This accessor method is used to get the number of meters from the topographic origin, along the y-axis or northing direction.
    int
    This method returns a hash code for this Topocentric2DPoint object.
    void
    setEasting(double easting)
    This settor method is used to update the number of meters from the topographic origin, along the x-axis or easting direction.
    void
    setNorthing(double northing)
    This settor method is used to update the number of meters from the topographic origin, along the y-axis or northing direction.
    This method abstracts this Topocentric2DPoint object as a general purpose GeoPoint.
    This method formats the Topocentric2DPoint point as a parenthezised String containing easting and northing values in integer meters.
    toString(int fractDig)
    This method formats the Topocentric2DPoint point as a parenthezised String containing easting and northing values with the number of fractional digits of precision specified.
    This method converts this Topocentric2DPoint to a Topocentric3DPoint, by assuming an elevation (z-axis) value of zero meters from the Topographic point of origin.

    Methods inherited from class java.lang.Object

    clone, finalize, getClass, notify, notifyAll, wait, wait, wait
  • Field Details

    • easting

      protected double easting
    • northing

      protected double northing
  • Constructor Details

    • Topocentric2DPoint

      public Topocentric2DPoint(double easting, double northing)
      The constructor takes double precision floating point values for easting and northing distances in meters from the topographic origin. The origin itself is a contextual variable set in the FrameOfReference object and used there by the coordinate transform methods that need it.
      Parameters:
      easting - number of meters along x-axis from topographic origin
      northing - number of meters along y-axis from topographic origin
  • Method Details

    • getEasting

      public double getEasting()
      This accessor method is used to get the number of meters from the topographic origin, along the x-axis or easting direction.
      Returns:
      number of meters along x-axis from topographic origin (easting)
    • setEasting

      public void setEasting(double easting)
      This settor method is used to update the number of meters from the topographic origin, along the x-axis or easting direction.
      Parameters:
      easting - number of meters along x-axis from topographic origin
    • getNorthing

      public double getNorthing()
      This accessor method is used to get the number of meters from the topographic origin, along the y-axis or northing direction.
      Returns:
      number of meters along y-axis from topographic origin (northing)
    • setNorthing

      public void setNorthing(double northing)
      This settor method is used to update the number of meters from the topographic origin, along the y-axis or northing direction.
      Parameters:
      northing - number of meters along y-axis from topographic origin
    • hashCode

      public int hashCode()
      This method returns a hash code for this Topocentric2DPoint object. The result is the exclusive OR of the component values to maintain the general contract for the hashCode method, which states that equal objects must have equal hash codes.
      Overrides:
      hashCode in class Object
      Returns:
      a hash code value for this object.
    • equals

      public boolean equals(Topocentric2DPoint that)
      This method is used to test whether two points are equal in the sense that have the same coordinate value.
      Parameters:
      that - Topocentric2DPoint point to compare against this one.
      Returns:
      true if specified Topocentric2DPoint point is equal in value to this Topocentric2DPoint point.
    • equals

      public boolean equals(Object that)
      This method is used to test whether two points are equal in the sense that have the same coordinate value.
      Overrides:
      equals in class Object
      Parameters:
      that - Topocentric2DPoint point to compare against this one.
      Returns:
      true if specified Topocentric2DPoint point is equal in value to this Topocentric2DPoint point.
    • toTopocentric3D

      @NotNull public @NotNull Topocentric3DPoint toTopocentric3D()
      This method converts this Topocentric2DPoint to a Topocentric3DPoint, by assuming an elevation (z-axis) value of zero meters from the Topographic point of origin.
      Returns:
      the equivalent Topocentric3DPoint
    • toGeodetic3D

      @NotNull public @NotNull Geodetic3DPoint toGeodetic3D(FrameOfReference fRef)
      This method abstracts this Topocentric2DPoint object as a general purpose GeoPoint.
      Specified by:
      toGeodetic3D in interface GeoPoint
      Parameters:
      fRef - the FrameOfReference in which to interpret this coordinate.
      Returns:
      the equivalent Geodetic3DPoint
    • toString

      public String toString(int fractDig)
      This method formats the Topocentric2DPoint point as a parenthezised String containing easting and northing values with the number of fractional digits of precision specified.
      Parameters:
      fractDig - number of fractional digits to display
      Returns:
      String representation of this coordinate suitable for debugging
    • toString

      public String toString()
      This method formats the Topocentric2DPoint point as a parenthezised String containing easting and northing values in integer meters.
      Overrides:
      toString in class Object
      Returns:
      String representation of this coordinate suitable for debugging