com.bbn.openmap.proj.coords
Class ZonedUTMPoint

java.lang.Object
  extended by com.bbn.openmap.proj.coords.UTMPoint
      extended by com.bbn.openmap.proj.coords.ZonedUTMPoint
Direct Known Subclasses:
MGRSPoint

public class ZonedUTMPoint
extends UTMPoint

A ZonedUTMPoint is a UTMPoint that handles a MGRS zone letter instead of N or S.

Author:
dietrick

Field Summary
 
Fields inherited from class com.bbn.openmap.proj.coords.UTMPoint
easting, northing, zone_letter, zone_number
 
Constructor Summary
ZonedUTMPoint()
          Constructor pass-through.
ZonedUTMPoint(double northing, double easting, int zone_number, char zone_letter)
           
ZonedUTMPoint(LatLonPoint llpoint)
          Constructor pass-through.
ZonedUTMPoint(LatLonPoint llpoint, Ellipsoid ellip)
          Constructor pass-through.
ZonedUTMPoint(UTMPoint point)
          Constructor pass-through.
 
Method Summary
protected  char getLetterDesignator(double lat)
          Determines the correct MGRS letter designator for the given latitude returns 'Z' if latitude is outside the MGRS limits of 84N to 80S.
static LatLonPoint ZonedUTMtoLL(Ellipsoid ellip, double UTMNorthing, double UTMEasting, int ZoneNumber, char ZoneLetter, LatLonPoint llpoint)
          Converts UTM coords to lat/long given an ellipsoid.
 
Methods inherited from class com.bbn.openmap.proj.coords.UTMPoint
checkZone, equals, getZoneNumber, hashCode, LLtoUTM, LLtoUTM, LLtoUTM, LLtoUTM, toLatLonPoint, toLatLonPoint, toLatLonPoint, toString, UTMtoLL, UTMtoLL, UTMtoLL, UTMtoLL
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

ZonedUTMPoint

public ZonedUTMPoint()
Constructor pass-through.


ZonedUTMPoint

public ZonedUTMPoint(double northing,
                     double easting,
                     int zone_number,
                     char zone_letter)
Parameters:
northing - The northing component.
easting - The easting component.
zone_number - The zone of the coordinate.
zone_letter - MGRS zone letter

ZonedUTMPoint

public ZonedUTMPoint(UTMPoint point)
Constructor pass-through.


ZonedUTMPoint

public ZonedUTMPoint(LatLonPoint llpoint)
Constructor pass-through.


ZonedUTMPoint

public ZonedUTMPoint(LatLonPoint llpoint,
                     Ellipsoid ellip)
Constructor pass-through.

Method Detail

ZonedUTMtoLL

public static LatLonPoint ZonedUTMtoLL(Ellipsoid ellip,
                                       double UTMNorthing,
                                       double UTMEasting,
                                       int ZoneNumber,
                                       char ZoneLetter,
                                       LatLonPoint llpoint)
Converts UTM coords to lat/long given an ellipsoid.

Equations from USGS Bulletin 1532
East Longitudes are positive, West longitudes are negative.
North latitudes are positive, South latitudes are negative.

Parameters:
ellip - an ellipsoid definition.
UTMNorthing - A float value for the northing to be converted.
UTMEasting - A float value for the easting to be converted.
ZoneNumber - An int value specifiying the UTM zone number.
ZoneLetter - A char value specifying the ZoneLetter within the ZoneNumber, letter being MGRS zone.
llpoint - a LatLonPoint, if you want it to be filled in with the results. If null, a new LatLonPoint will be allocated.
Returns:
A LatLonPoint class instance containing the lat/long value, or null if conversion failed. If you pass in a LatLonPoint, it will be returned as well, if successful.

getLetterDesignator

protected char getLetterDesignator(double lat)
Determines the correct MGRS letter designator for the given latitude returns 'Z' if latitude is outside the MGRS limits of 84N to 80S.

Overrides:
getLetterDesignator in class UTMPoint
Parameters:
lat - The float value of the latitude.
Returns:
A char value which is the MGRS zone letter.


Copyright (C) BBNT Solutions LLC; See http://openmap.bbn.com/ for details