|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjava.awt.geom.Point2D
com.bbn.openmap.proj.coords.LatLonPoint
com.bbn.openmap.proj.coords.LatLonPoint.Double
public static class LatLonPoint.Double
Double precision version of LatLonPoint.
Nested Class Summary |
---|
Nested classes/interfaces inherited from class com.bbn.openmap.proj.coords.LatLonPoint |
---|
LatLonPoint.Double, LatLonPoint.Float |
Field Summary | |
---|---|
protected double |
lat
|
protected double |
lon
|
protected double |
radLat
|
protected double |
radLon
|
Fields inherited from class com.bbn.openmap.proj.coords.LatLonPoint |
---|
DATELINE, LON_RANGE, NORTH_POLE, SOUTH_POLE |
Constructor Summary | |
---|---|
LatLonPoint.Double()
Default constructor, values set to 0, 0. |
|
LatLonPoint.Double(double lat,
double lon)
Set the latitude, longitude for this point in decimal degrees. |
|
LatLonPoint.Double(double lat,
double lon,
boolean isRadian)
Set the latitude, longitude for this point, with the option of noting whether the values are in degrees or radians. |
|
LatLonPoint.Double(LatLonPoint llp)
Create Double version from another LatLonPoint. |
|
LatLonPoint.Double(java.awt.geom.Point2D pt2D)
Create Double version from Point2D object, where the x, y values are expected to be decimal degrees. |
Method Summary | |
---|---|
float |
getLatitude()
|
float |
getLongitude()
|
LatLonPoint |
getPoint(double dist,
double az)
Find a LatLonPoint a distance and direction away from this point, based on the spherical earth model. |
double |
getRadLat()
|
double |
getRadLon()
|
double |
getX()
|
double |
getY()
|
void |
read(java.io.DataInputStream s)
Read object. |
void |
read(java.io.DataInputStream s,
boolean inRadians)
Read object. |
void |
setLatitude(double lat)
Set latitude. |
void |
setLatLon(double lat,
double lon)
Set latitude and longitude. |
void |
setLatLon(double lat,
double lon,
boolean isRadians)
Set latitude and longitude. |
void |
setLocation(double x,
double y)
Point2D method, inheriting signature!! |
void |
setLongitude(double lon)
Set longitude. |
java.lang.String |
toString()
|
void |
write(java.io.DataOutputStream s)
Write object. |
Methods inherited from class com.bbn.openmap.proj.coords.LatLonPoint |
---|
azimuth, distance, equals, getDouble, getFloat, isInvalidLatitude, isInvalidLongitude, normalizeLatitude, normalizeLatitude, setLatLon, wrapLongitude, wrapLongitude |
Methods inherited from class java.awt.geom.Point2D |
---|
clone, distance, distance, distance, distanceSq, distanceSq, distanceSq, hashCode, setLocation |
Methods inherited from class java.lang.Object |
---|
finalize, getClass, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
protected double lat
protected double lon
protected transient double radLat
protected transient double radLon
Constructor Detail |
---|
public LatLonPoint.Double()
public LatLonPoint.Double(double lat, double lon)
lat
- latitudelon
- longitude.public LatLonPoint.Double(double lat, double lon, boolean isRadian)
lat
- latitudelon
- longitude.isRadian
- true of values are radians.public LatLonPoint.Double(LatLonPoint llp)
llp
- public LatLonPoint.Double(java.awt.geom.Point2D pt2D)
pt2D
- Method Detail |
---|
public void setLocation(double x, double y)
setLocation
in class java.awt.geom.Point2D
x
- longitude value in decimal degrees.y
- latitude value in decimal degrees.public void setLatLon(double lat, double lon)
setLatLon
in class LatLonPoint
lat
- latitude in decimal degrees.lon
- longitude in decimal degrees.public void setLatLon(double lat, double lon, boolean isRadians)
setLatLon
in class LatLonPoint
lat
- latitude.lon
- longitude.isRadians
- true if lat/lon values are radians.public double getX()
getX
in class java.awt.geom.Point2D
public double getY()
getY
in class java.awt.geom.Point2D
public float getLatitude()
getLatitude
in class LatLonPoint
public float getLongitude()
getLongitude
in class LatLonPoint
public double getRadLon()
getRadLon
in class LatLonPoint
public double getRadLat()
getRadLat
in class LatLonPoint
public void setLatitude(double lat)
setLatitude
in class LatLonPoint
lat
- latitude in decimal degreespublic void setLongitude(double lon)
setLongitude
in class LatLonPoint
lon
- longitude in decimal degreespublic LatLonPoint getPoint(double dist, double az)
getPoint
in class LatLonPoint
dist
- distance, in radians.az
- radians of azimuth (direction) east of north (-PI <= Az
< PI)
public void write(java.io.DataOutputStream s) throws java.io.IOException
s
- DataOutputStream
java.io.IOException
public void read(java.io.DataInputStream s) throws java.io.IOException
s
- DataInputStream
java.io.IOException
public void read(java.io.DataInputStream s, boolean inRadians) throws java.io.IOException
s
- DataInputStreaminRadians
- if true, the floats read off stream will be
considered to be radians. Otherwise, they will be considered
to be decimal degrees.
java.io.IOException
public java.lang.String toString()
toString
in class java.lang.Object
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |