|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.placelab.core.FixedTwoDCoordinate
The Coordinate class used on systems that do not support floating point math. If you write an application that only runs on fixed point hardware (some phones) you can cast any Coordinate into a FixedTwoDCoordinate.
| Constructor Summary | |
FixedTwoDCoordinate()
Create a null FixedTwoDCoordinate |
|
FixedTwoDCoordinate(FixedTwoDCoordinate c)
|
|
FixedTwoDCoordinate(long flongLat,
long flongLon)
|
|
FixedTwoDCoordinate(java.lang.String lat,
java.lang.String lon)
|
|
FixedTwoDCoordinate(java.lang.String latNMEA,
java.lang.String latHem,
java.lang.String lonNMEA,
java.lang.String lonHem)
|
|
| Method Summary | |
void |
constructFromMap(java.util.Hashtable map)
Constructs from a Hashtable. |
void |
constructFromNMEA(java.lang.String latNMEA,
java.lang.String latHem,
java.lang.String lonNMEA,
java.lang.String lonHem)
Constructs a Coordinate from the NMEA specification for Coordinates which is a hemisphere and a lat and lon in hhmm.sssss format. |
void |
constructFromStrings(java.lang.String lat,
java.lang.String lon)
Constructs a Coordinate from String representations of lat and lon as doubles in hh.ddddd format |
Coordinate |
createClone()
|
java.lang.String |
distanceFromAsString(Coordinate c2)
|
long |
distanceFromFlong(FixedTwoDCoordinate c2)
Returns the distance between points in meters |
int |
distanceFromInMeters(Coordinate c2)
|
boolean |
equals(java.lang.Object o)
|
java.lang.String |
getLatitudeAsString()
|
long |
getLatitudeFlong()
|
java.lang.String |
getLatitudeHemisphereNMEA()
|
java.lang.String |
getLatitudeNMEA()
|
java.lang.String |
getLongitudeAsString()
|
long |
getLongitudeFlong()
|
java.lang.String |
getLongitudeHemisphereNMEA()
|
java.lang.String |
getLongitudeNMEA()
|
boolean |
isNull()
The Null coordinate is a Coordinate which does not map to anywhere at all. |
java.lang.String |
toString()
|
Coordinate |
translate(int north,
int east)
Provides a new Coordinate at a position translated from an existing one |
FixedTwoDCoordinate |
translateFixed(long northFlong,
long eastFlong)
|
boolean |
within(Coordinate coord1,
Coordinate coord2)
c1 and c2 define opposing corners of a rectangular region. |
long |
xDistanceFrom(FixedTwoDCoordinate c2)
|
long |
yDistanceFrom(FixedTwoDCoordinate c2)
|
| Methods inherited from class java.lang.Object |
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
public FixedTwoDCoordinate()
public FixedTwoDCoordinate(java.lang.String lat,
java.lang.String lon)
public FixedTwoDCoordinate(java.lang.String latNMEA,
java.lang.String latHem,
java.lang.String lonNMEA,
java.lang.String lonHem)
public FixedTwoDCoordinate(FixedTwoDCoordinate c)
public FixedTwoDCoordinate(long flongLat,
long flongLon)
| Method Detail |
public boolean isNull()
Coordinate
isNull in interface Coordinatepublic Coordinate createClone()
createClone in interface Coordinatepublic void constructFromMap(java.util.Hashtable map)
CoordinateTypes.LATITUDE=latitude as a String in hh.dddddd format Types.LONGITUDE=longitude as a String in hh.ddddd format
constructFromMap in interface CoordinateTypes#newCoordinate(HashMap)
public void constructFromStrings(java.lang.String lat,
java.lang.String lon)
Coordinate
constructFromStrings in interface Coordinate
public void constructFromNMEA(java.lang.String latNMEA,
java.lang.String latHem,
java.lang.String lonNMEA,
java.lang.String lonHem)
Coordinate
constructFromNMEA in interface Coordinatepublic long getLatitudeFlong()
public long getLongitudeFlong()
public java.lang.String getLatitudeAsString()
getLatitudeAsString in interface Coordinatepublic java.lang.String getLongitudeAsString()
getLongitudeAsString in interface Coordinatepublic java.lang.String toString()
toString in interface Coordinatepublic boolean equals(java.lang.Object o)
public java.lang.String getLatitudeHemisphereNMEA()
getLatitudeHemisphereNMEA in interface Coordinatepublic java.lang.String getLongitudeHemisphereNMEA()
getLongitudeHemisphereNMEA in interface Coordinatepublic java.lang.String getLatitudeNMEA()
getLatitudeNMEA in interface Coordinatepublic java.lang.String getLongitudeNMEA()
getLongitudeNMEA in interface Coordinate
public long distanceFromFlong(FixedTwoDCoordinate c2)
throws FixedPointLongException
FixedPointLongExceptionpublic int distanceFromInMeters(Coordinate c2)
distanceFromInMeters in interface Coordinatepublic java.lang.String distanceFromAsString(Coordinate c2)
distanceFromAsString in interface Coordinate
public boolean within(Coordinate coord1,
Coordinate coord2)
Coordinate
within in interface Coordinate
public long xDistanceFrom(FixedTwoDCoordinate c2)
throws FixedPointLongException
FixedPointLongException
public long yDistanceFrom(FixedTwoDCoordinate c2)
throws FixedPointLongException
FixedPointLongException
public FixedTwoDCoordinate translateFixed(long northFlong,
long eastFlong)
throws FixedPointLongException
northFlong - the distance in meters to move northeastFlong - the distance in meters to move east
FixedPointLongException
public Coordinate translate(int north,
int east)
Coordinate
translate in interface Coordinatenorth - the distance in meters to move northeast - the distance in meters to move east
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||