Class SimpleGeographicTransform

  • All Implemented Interfaces:
    ICoordinateTransform

    public class SimpleGeographicTransform
    extends Object
    implements ICoordinateTransform
    Provides a rudimentary implementation of a geographic transform. This implementation is intended as a demonstration, and does not provide sufficient accuracy for true Geographic Information Analysis applications.

    This transform will map geographic coordinates to an planar coordinate system that can be used for Tinfour processing. The transformation attempts to scale the coordinates to an isotropic coordinate system with positions given in meters. It is important to note that this transform is not a true map projection. In particular, the transformation is not suitable for data collected over areas larger than a few hundred kilometers and is not suitable for coordinates in polar areas. Because it assumes a spherical Earth, it is not suitable for high-precision analysis.

    • Field Detail

      • earthSemiMajorAxis

        public static final double earthSemiMajorAxis
        Radius of the Earth at the equator, as specified by World Geodetic Survey 1984 (WGS84).
        See Also:
        Constant Field Values
      • earthFlattening

        public static final double earthFlattening
        The flattening ratio for the Earth, as specified by World Geodetic Survey 1984.
        See Also:
        Constant Field Values
      • earthSemiMinorAxis

        public static final double earthSemiMinorAxis
        Radius of the Earth at the poles, as specified by World Geodetic Survey 1984 (WGS84).
        See Also:
        Constant Field Values
    • Constructor Detail

      • SimpleGeographicTransform

        public SimpleGeographicTransform​(double centerLatitude,
                                         double centerLongitude,
                                         LinearUnits linearUnits)
        Constructs a transform with the origin at the specified center latitude and longitude. All coordinates are given in degrees. The maximum absolute latitude is 87.5 degrees, but the accuracy of this transformation is degraded at high latitudes.
        Parameters:
        centerLatitude - a valid latitude, in degrees, positive to the North, negative to the South.
        centerLongitude - a valid longitude, in degrees, positive to the East, negative to the West.
        linearUnits - the linear unit system to be used for the transformation, most commonly meters or feet.
    • Method Detail

      • forward

        public boolean forward​(double xSource,
                               double ySource,
                               CoordinatePair c)
        Description copied from interface: ICoordinateTransform
        Transforms a point in a source coordinate system to the equivalent output. The return value indicates whether the transform was successful. In some cases, a transform may be defined only over a finite region.

        All transforms are assumed to be fully invertible (bijective) over their domain. If a forward transform is defined for a set of input coordinates, then the inverse transform must be defined for the resulting output coordinates.

        Specified by:
        forward in interface ICoordinateTransform
        Parameters:
        xSource - the x value in the source coordinate system
        ySource - the y value in the source coordinate system
        c - a simple container to receive the results of the computation, the transformed coordinates for (xSource, ySource).
        Returns:
        true if the transform is successful; otherwise, false
      • inverse

        public boolean inverse​(double xOutput,
                               double yOutput,
                               CoordinatePair c)
        Description copied from interface: ICoordinateTransform
        Transforms a point in an output coordinate system to the equivalent point in the source coordinate system. The return value indicates whether the transform was successful. In some cases, a transform may be defined only over a finite region.

        All transforms are assumed to be fully invertible (bijective) over their domain. If a forward transform is defined for a set of input coordinates, then the inverse transform must be defined for the resulting output coordinates.

        Specified by:
        inverse in interface ICoordinateTransform
        Parameters:
        xOutput - x value in the transformed coordinate system
        yOutput - y value in the transformed coordiante system
        c - a simple container to receive the results of the computation, the transformed coordinates for (xSource, ySource).
        Returns:
        true if the inverse transform is successful; otherwise, false
      • getCenterLatitude

        public double getCenterLatitude()
        Gets the center latitude used for this projection
        Returns:
        a value in degrees, in the range -87.5 to 87.5
      • getCenterLongitude

        public double getCenterLongitude()
        Gets the center longitude used for this projection
        Returns:
        a value in degrees
      • getLinearUnits

        public LinearUnits getLinearUnits()
        Gets the linear units specified for this object
        Returns:
        a valid instance