Package gov.nasa.worldwind.geom.coords
Class UPSCoordConverter
- java.lang.Object
-
- gov.nasa.worldwind.geom.coords.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
-
-
Field Summary
Fields Modifier and Type Field Description static int
UPS_EASTING_ERROR
static int
UPS_HEMISPHERE_ERROR
static int
UPS_NO_ERROR
static int
UPS_NORTHING_ERROR
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description 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.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.double
getEasting()
Hemisphere
getHemisphere()
double
getLatitude()
double
getLongitude()
double
getNorthing()
-
-
-
Field Detail
-
UPS_NO_ERROR
public static final int UPS_NO_ERROR
- See Also:
- Constant Field Values
-
UPS_HEMISPHERE_ERROR
public static final int UPS_HEMISPHERE_ERROR
- See Also:
- Constant Field Values
-
UPS_EASTING_ERROR
public static final int UPS_EASTING_ERROR
- See Also:
- Constant Field Values
-
UPS_NORTHING_ERROR
public static final int UPS_NORTHING_ERROR
- See Also:
- Constant Field Values
-
-
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 radianslongitude
- longitude in radians- Returns:
- error code
-
getEasting
public double getEasting()
- Returns:
- easting/X in meters
-
getNorthing
public double getNorthing()
- Returns:
- northing/Y in meters
-
getHemisphere
public Hemisphere getHemisphere()
- Returns:
- hemisphere, either
Hemisphere.N
ofHemisphere.S
.
-
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, eitherHemisphere.N
ofHemisphere.S
.easting
- easting/X in metersnorthing
- northing/Y in meters- Returns:
- error code
-
getLatitude
public double getLatitude()
- Returns:
- latitude in radians.
-
getLongitude
public double getLongitude()
- Returns:
- longitude in radians.
-
-