Search in sources :

Example 1 with Longitude

use of org.opensextant.geodesy.Longitude in project Xponents by OpenSextant.

the class GeocoordMatch method toMGRS.

/**
     * Convert the current coordinate to MGRS
     *
     * @return string version of MGRS
     */
public String toMGRS() {
    if (mgrs == null) {
        mgrs = new MGRS(new Longitude(longitude, Angle.DEGREES), new Latitude(latitude, Angle.DEGREES));
        gridzone = mgrs.toString().substring(0, 5);
    }
    return mgrs.toString();
}
Also used : Latitude(org.opensextant.geodesy.Latitude) Longitude(org.opensextant.geodesy.Longitude) MGRS(org.opensextant.geodesy.MGRS)

Aggregations

Latitude (org.opensextant.geodesy.Latitude)1 Longitude (org.opensextant.geodesy.Longitude)1 MGRS (org.opensextant.geodesy.MGRS)1