Class TMCoord


  • public class TMCoord
    extends java.lang.Object
    This class holds a set of Transverse Mercator coordinates along with the corresponding latitude and longitude.
    See Also:
    TMCoordConverter
    • Constructor Summary

      Constructors 
      Constructor Description
      TMCoord​(Angle latitude, Angle longitude, double easting, double northing, Angle originLatitude, Angle centralMeridian, double falseEasting, double falseNorthing, double scale)
      Create an arbitrary set of Transverse Mercator coordinates with the given values.
    • Constructor Detail

      • TMCoord

        public TMCoord​(Angle latitude,
                       Angle longitude,
                       double easting,
                       double northing,
                       Angle originLatitude,
                       Angle centralMeridian,
                       double falseEasting,
                       double falseNorthing,
                       double scale)
        Create an arbitrary set of Transverse Mercator coordinates with the given values.
        Parameters:
        latitude - the latitude Angle.
        longitude - the longitude Angle.
        easting - the easting distance value in meters.
        northing - the northing distance value in meters.
        originLatitude - the origin latitude Angle.
        centralMeridian - the central meridian longitude Angle.
        falseEasting - easting value at the center of the projection in meters.
        falseNorthing - northing value at the center of the projection in meters.
        scale - scaling factor.
        Throws:
        java.lang.IllegalArgumentException - if latitude, longitude, originLatitude or centralMeridian is null.
    • Method Detail

      • fromLatLon

        public static TMCoord fromLatLon​(Angle latitude,
                                         Angle longitude,
                                         Globe globe,
                                         java.lang.Double a,
                                         java.lang.Double f,
                                         Angle originLatitude,
                                         Angle centralMeridian,
                                         double falseEasting,
                                         double falseNorthing,
                                         double scale)
        Create a set of Transverse Mercator coordinates from a pair of latitude and longitude, for the given Globe and projection parameters.
        Parameters:
        latitude - the latitude Angle.
        longitude - the longitude Angle.
        globe - the Globe - can be null (will use WGS84).
        a - semi-major ellipsoid radius. If this and argument f are non-null and globe is null, will use the specfied a and f.
        f - ellipsoid flattening. If this and argument a are non-null and globe is null, will use the specfied a and f.
        originLatitude - the origin latitude Angle.
        centralMeridian - the central meridian longitude Angle.
        falseEasting - easting value at the center of the projection in meters.
        falseNorthing - northing value at the center of the projection in meters.
        scale - scaling factor.
        Returns:
        the corresponding TMCoord.
        Throws:
        java.lang.IllegalArgumentException - if latitude or longitude is null, or the conversion to TM coordinates fails. If the globe is null conversion will default to using WGS84.
      • fromTM

        public static TMCoord fromTM​(double easting,
                                     double northing,
                                     Globe globe,
                                     Angle originLatitude,
                                     Angle centralMeridian,
                                     double falseEasting,
                                     double falseNorthing,
                                     double scale)
        Create a set of Transverse Mercator coordinates for the given Globe, easting, northing and projection parameters.
        Parameters:
        easting - the easting distance value in meters.
        northing - the northing distance value in meters.
        globe - the Globe - can be null (will use WGS84).
        originLatitude - the origin latitude Angle.
        centralMeridian - the central meridian longitude Angle.
        falseEasting - easting value at the center of the projection in meters.
        falseNorthing - northing value at the center of the projection in meters.
        scale - scaling factor.
        Returns:
        the corresponding TMCoord.
        Throws:
        java.lang.IllegalArgumentException - if originLatitude or centralMeridian is null, or the conversion to geodetic coordinates fails. If the globe is null conversion will default to using WGS84.
      • getLatitude

        public Angle getLatitude()
      • getLongitude

        public Angle getLongitude()
      • getOriginLatitude

        public Angle getOriginLatitude()
      • getCentralMeridian

        public Angle getCentralMeridian()
      • getFalseEasting

        public double getFalseEasting()
      • getFalseNorthing

        public double getFalseNorthing()
      • getScale

        public double getScale()
      • getEasting

        public double getEasting()
      • getNorthing

        public double getNorthing()