|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--com.bbn.openmap.geo.Intersection
Contains great circle intersection algorithms and helper methods. Sources:
http://williams.best.vwh.net/intersect.htm http://mathforum.org/library/drmath/view/60711.html
Constructor Summary | |
Intersection()
|
Method Summary | |
static float[] |
getIntersection(float lat1,
float lon1,
float lat2,
float lon2,
float lat3,
float lon3,
float lat4,
float lon4)
Returns the two antipodal points of interection of two great circles defined by the arcs (lat1, lon1) to (lat2, lon2) and (lat2, lon2) to (lat4, lon4). |
static float[] |
getSegIntersection(float lat1,
float lon1,
float lat2,
float lon2,
float lat3,
float lon3,
float lat4,
float lon4)
Returns the point of intersection of two great circle segments defined by the arcs (lat1, lon1) to (lat2, lon2) and (lat2, lon2) to (lat4, lon4). |
static float |
greatCircleDistance(float lat1,
float lon1,
float lat2,
float lon2)
Calculates the great circle distance between the two lat, lon points. |
static boolean |
intersects(float lat1,
float lon1,
float lat2,
float lon2,
float lat3,
float lon3,
float lat4,
float lon4)
Returns true if the two segs intersect in at least one point. |
static boolean |
intersectsCircle(float[] polyPoints,
float lat,
float lon,
float radius)
Returns true if the specified poly path intersects the circle centered at (lat, lon). |
static boolean |
intersectsCircle(float lat1,
float lon1,
float lat2,
float lon2,
float lat,
float lon,
float radius)
Returns true or false depending on whether the great circle seg from point (lat1, lon1) to (lat2, lon2) intersects the circle of radius centered at point (lat, lon). |
static boolean |
isSelfIntersectingPoly(float[] polyPoints)
Checks if the polygon or polyline represented by the polypoints contains any lines that intersect each other. |
static void |
main(java.lang.String[] args)
|
static float |
pointCircleDistance(float lat1,
float lon1,
float lat2,
float lon2,
float lat,
float lon)
Calculates the great circle distance from the point (lat, lon) to the great circle containing the points (lat1, lon1) and (lat2, lon2). |
static boolean |
polyIntersect(float[] polyPoints1,
float[] polyPoints2)
Checks if the two polygonal areas intersect. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public Intersection()
Method Detail |
public static float[] getIntersection(float lat1, float lon1, float lat2, float lon2, float lat3, float lon3, float lat4, float lon4)
public static float[] getSegIntersection(float lat1, float lon1, float lat2, float lon2, float lat3, float lon3, float lat4, float lon4)
public static boolean intersects(float lat1, float lon1, float lat2, float lon2, float lat3, float lon3, float lat4, float lon4)
public static boolean polyIntersect(float[] polyPoints1, float[] polyPoints2)
public static boolean isSelfIntersectingPoly(float[] polyPoints)
public static float pointCircleDistance(float lat1, float lon1, float lat2, float lon2, float lat, float lon)
public static boolean intersectsCircle(float lat1, float lon1, float lat2, float lon2, float lat, float lon, float radius)
public static boolean intersectsCircle(float[] polyPoints, float lat, float lon, float radius)
public static float greatCircleDistance(float lat1, float lon1, float lat2, float lon2)
public static void main(java.lang.String[] args)
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |