Class UPSCoordConverter


  • public class UPSCoordConverter
    extends java.lang.Object
    Ported to Java from the NGA GeoTrans ups.c and ups.h code - Feb 12, 2007 4:52:59 PM
    • Method Detail

      • convertGeodeticToUPS

        public long convertGeodeticToUPS​(double latitude,
                                         double longitude)
        The function convertGeodeticToUPS converts geodetic (latitude and longitude) coordinates to UPS (hemisphere, easting, and northing) coordinates, according to the current ellipsoid parameters. If any errors occur, the error code(s) are returned by the function, otherwide UPS_NO_ERROR is returned.
        Parameters:
        latitude - latitude in radians
        longitude - longitude in radians
        Returns:
        error code
      • getEasting

        public double getEasting()
        Returns:
        easting/X in meters
      • getNorthing

        public double getNorthing()
        Returns:
        northing/Y in meters
      • convertUPSToGeodetic

        public long convertUPSToGeodetic​(Hemisphere hemisphere,
                                         double easting,
                                         double northing)
        The function Convert_UPS_To_Geodetic converts UPS (hemisphere, easting, and northing) coordinates to geodetic (latitude and longitude) coordinates according to the current ellipsoid parameters. If any errors occur, the error code(s) are returned by the function, otherwise UPS_NO_ERROR is returned.
        Parameters:
        hemisphere - hemisphere, either Hemisphere.N of Hemisphere.S.
        easting - easting/X in meters
        northing - northing/Y in meters
        Returns:
        error code
      • getLatitude

        public double getLatitude()
        Returns:
        latitude in radians.
      • getLongitude

        public double getLongitude()
        Returns:
        longitude in radians.