Class UTM


  • public class UTM
    extends TransverseMercator
    The Universal Transverse Mercator coordinate system
    • Constructor Detail

      • UTM

        public UTM​(Position p,
                   Ellipsoid e,
                   Datum d)
        Create a new instance from Position, Ellipsoid and Datum. The UTM zone is calculated automatically from the Position's longitude (relative to the specified Ellipsoid and Datum).
        Parameters:
        p - Position
        e - Ellipsoid to use
        d - Datum to use
      • UTM

        public UTM​(Position p,
                   int z,
                   Ellipsoid e,
                   Datum d)
        Create a new instance of UTM from Position, UTM zone, Ellipsoid and Datum.
        Parameters:
        p - Position
        z - The UTM zone number
        e - Ellipsoid to use
        d - The Datum for this point
      • UTM

        public UTM​(ENPair en,
                   int z,
                   Ellipsoid sphere,
                   Datum datum,
                   boolean hemisphere)
        Create a new UTM object from easting and northing values, zone number, Ellipsoid and Datum
        Parameters:
        en - Easting and northing values (m)
        z - Zone number (0-59)
        sphere - Ellipsoid for this point
        datum - Datu for this point
        hemisphere - - true if point is in the NOrthern Hemisphere
      • UTM

        public UTM​(ENPair en,
                   int z,
                   Ellipsoid sphere,
                   Datum datum)
        Create a new UTM object from easting and northing values, zone number, Ellipsoid and Datum
        Parameters:
        en - Easting and northing values (m)
        z - Zone number (0-59)
        sphere - Ellipsoid for this point
        datum - Datu for this point
      • UTM

        @Deprecated
        public UTM​(ENPair en)
        Deprecated.
        This constructor is provided for test purposes only (because it has a common interface with other sub-classes of Projection). Its use is @deprecated Use the UTM(ENPair, int, Ellipsoid, Datum) instead.
        Parameters:
        en - Easting and northing values (m). Zone number is assumed to be 0.
    • Method Detail

      • makePoint

        public static UTM makePoint​(java.lang.String gridRef,
                                    Ellipsoid e,
                                    Datum d)
                             throws GridFormatException
        Static factory method to create a UTM instance from a grid reference String
        Parameters:
        gridRef - Grid reference String e.g. "32T 31577 202576"
        e - Ellipsoid for this instance
        d - Datum for this instance
        Returns:
        A new instance of UTM for the specified point.
        Throws:
        GridFormatException - if the grid rference String is invalid
      • defaultDatum

        public Datum defaultDatum()
        Get the default datum for this type of CoordinateSystem
        Specified by:
        defaultDatum in class CoordinateSystem
        Returns:
        The default Datum (WGS84)
      • toString

        public java.lang.String toString()
        Provide a String representation of this UTM point in UTM coordinates
        Specified by:
        toString in class CoordinateSystem
        Returns:
        A UTM coordinate String
      • getZone

        public static int getZone​(double lon)
        A static method to calculate the correct zone number for a specified longitude.
        Parameters:
        lon - Longitude (degrees)
        Returns:
        Zone number (0-59)
      • getZone

        public int getZone()
        Get the zone number of this point
        Returns:
        Zone number (0-59)
      • getNorthernHemisphere

        public boolean getNorthernHemisphere()
        Check if this point is in the northern hemisphere
        Returns:
        true if this point is north of the equator
      • f0

        public double f0()
        The scale factor on the Central Meridian. Generally, Transverse Mercator projections increasingly exagerate distances further from the central meridian. It is usual to reduce the scale factor at the central meridian to compensate for this effect and optimise the scale over the area of interest.
        Specified by:
        f0 in class TransverseMercator
        Returns:
        the value of the ScaleFactor at the central meridian.
      • e0

        public double e0()
        e0() defines the "false easting" distance of the projection. False origins are usually used with TM projections to ensure that easting and northing distances are always positive over the area of interest. e0() is used as an offset to the grid so that the "true origin" appears to have an easting value equal to e0().
        Specified by:
        e0 in class TransverseMercator
        Returns:
        The false easting distance (double)
      • n0

        public double n0()
        n0() defines the "false northing" distance of the projection. False origins are usually used with TM projections to ensure that easting and northing distances are always positive over the area of interest. n0() is used as an offset to the grid so that the "true origin" appears to have a northing value equal to n0().
        Specified by:
        n0 in class TransverseMercator
        Returns:
        The false northing distance (double)
      • phi0

        public double phi0()
        phi0() defines the latitude of the true origin of the projection. Note, however, that many Transverse Mercator projections employ a false origin. See n0() and e0() .
        Specified by:
        phi0 in class TransverseMercator
        Returns:
        The latitude of the true origin (radians)
      • lamda0

        public double lamda0()
        lamda0() defines the longitude (in radians) of the true origin also known as the "Central Meridian".
        Specified by:
        lamda0 in class TransverseMercator
        Returns:
        The central meridian (radians)