Class UTMCoordinate

java.lang.Object
edu.cnu.mdi.mapping.util.UTMCoordinate

public class UTMCoordinate extends Object
Immutable Universal Transverse Mercator coordinate.

Normal instances contain an easting, northing, longitudinal zone, and latitude-band letter. An instance created with UTMCoordinate(boolean) can instead represent a geographic location outside the latitude range supported by UTM.

  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    final double
    Easting in meters.
    final char
    UTM latitude-band letter.
    final double
    Northing in meters.
    final int
    Longitudinal UTM zone in the range 1–60.
  • Constructor Summary

    Constructors
    Constructor
    Description
    UTMCoordinate(boolean outsideRange)
    Constructs a UTM coordinate representing an out-of-range location.
    UTMCoordinate(double e, double n, int z, char l)
    Constructs a UTM coordinate with the given parameters.
  • Method Summary

    Modifier and Type
    Method
    Description
    Returns the coordinate in a compact human-readable form.

    Methods inherited from class java.lang.Object

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

    • easting

      public final double easting
      Easting in meters.
    • northing

      public final double northing
      Northing in meters.
    • zone

      public final int zone
      Longitudinal UTM zone in the range 1–60.
    • letter

      public final char letter
      UTM latitude-band letter.
  • Constructor Details

    • UTMCoordinate

      public UTMCoordinate(double e, double n, int z, char l)
      Constructs a UTM coordinate with the given parameters.
      Parameters:
      e - the easting value in meters
      n - the northing value in meters
      z - the UTM zone number (1-60)
      l - the latitude band letter (C-X, excluding I and O)
    • UTMCoordinate

      public UTMCoordinate(boolean outsideRange)
      Constructs a UTM coordinate representing an out-of-range location.
      Parameters:
      outsideRange - whether this coordinate should be formatted as outside the supported UTM latitude range
  • Method Details

    • toString

      public String toString()
      Returns the coordinate in a compact human-readable form.
      Overrides:
      toString in class Object
      Returns:
      formatted zone, easting, and northing, or "outside valid range"