util
Class ReferencePoint

java.lang.Object
  |
  +--util.ReferencePoint

public class ReferencePoint
extends java.lang.Object

This class represents a reference point on a map image. A reference point is where pixel x equals a longitude value, and pixel y equals a latitude value. Thus every ReferencePoint object must contain an x pixel, a y pixel, and the corresponding longitude and latitude value. This is class is need ed so that we can take a pixel point on a map and determine its latitude/longitude in the real world. And thus we can send real latitude longitude values to the ipaq gps receiver program.


Field Summary
 double lat
           
 double lng
           
static double MAX_EAST
          Used to convert latitude/longitude String to double.
static double MAX_NORTH
          Used to convert latitude/longitude String to double.
static double MAX_SOUTH
          Used to convert latitude/longitude String to double.
static double MAX_WEST
          Used to convert latitude/longitude String to double.
 int x
           
 int y
           
 
Constructor Summary
ReferencePoint(java.lang.String xr, java.lang.String yr, java.lang.String latr, java.lang.String lngr)
           
 
Method Summary
static int numLen(java.lang.String str)
           
static double parseLatLng(java.lang.String str, char pos, char neg)
           
 void setLat(java.lang.String str)
           
 void setLng(java.lang.String str)
           
 java.lang.String toString()
           
static java.lang.String toStringLatLng(double minutes, char pos, char neg)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

x

public int x

y

public int y

lat

public double lat

lng

public double lng

MAX_NORTH

public static final double MAX_NORTH
Used to convert latitude/longitude String to double.

See Also:
Constant Field Values

MAX_SOUTH

public static final double MAX_SOUTH
Used to convert latitude/longitude String to double.

See Also:
Constant Field Values

MAX_WEST

public static final double MAX_WEST
Used to convert latitude/longitude String to double.

See Also:
Constant Field Values

MAX_EAST

public static final double MAX_EAST
Used to convert latitude/longitude String to double.

See Also:
Constant Field Values
Constructor Detail

ReferencePoint

public ReferencePoint(java.lang.String xr,
                      java.lang.String yr,
                      java.lang.String latr,
                      java.lang.String lngr)
Method Detail

setLat

public void setLat(java.lang.String str)

setLng

public void setLng(java.lang.String str)

parseLatLng

public static double parseLatLng(java.lang.String str,
                                 char pos,
                                 char neg)
                          throws java.lang.NumberFormatException
java.lang.NumberFormatException

numLen

public static int numLen(java.lang.String str)

toStringLatLng

public static java.lang.String toStringLatLng(double minutes,
                                              char pos,
                                              char neg)

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object