public class UPSCoordConverter extends Object
Modifier and Type | Field and Description |
---|---|
static int |
UPS_EASTING_ERROR |
static int |
UPS_HEMISPHERE_ERROR |
static int |
UPS_NO_ERROR |
static int |
UPS_NORTHING_ERROR |
Modifier and Type | Method and 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(String 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() |
String |
getHemisphere() |
double |
getLatitude() |
double |
getLongitude() |
double |
getNorthing() |
long |
setUPSParameters(double a,
double f)
The function SetUPSParameters receives the ellipsoid parameters and sets the corresponding state variables.
|
public static final int UPS_EASTING_ERROR
public static final int UPS_HEMISPHERE_ERROR
public static final int UPS_NO_ERROR
public static final int UPS_NORTHING_ERROR
public long convertGeodeticToUPS(double latitude, double longitude)
latitude
- Latitude in radianslongitude
- Longitude in radianspublic long convertUPSToGeodetic(String Hemisphere, double Easting, double Northing)
Hemisphere
- Hemisphere, either AVKey.NORTH
or AVKey.SOUTH
.Easting
- Easting/X in metersNorthing
- Northing/Y in meterspublic double getEasting()
public String getHemisphere()
AVKey.NORTH
or AVKey.SOUTH
.public double getLatitude()
public double getLongitude()
public double getNorthing()
public long setUPSParameters(double a, double f)
a
- Semi-major axis of ellipsoid in metersf
- Flattening of ellipsoid