drasys.or.geom.geo
Class Point

java.lang.Object
  |
  +--drasys.or.geom.geo.Geo
        |
        +--drasys.or.geom.geo.Point

public class Point
extends Geo
implements PointI, PointI, java.io.Serializable

An implementation of a point in the geographic coordinate system.

See Also:
Serialized Form

Constructor Summary
Point(double[] coordinates)
          The latitude must be in the range -90.0 to +90.0; The longitude will be adjusted to the range -180.0 to +180.0.
Point(double longitude, double latitude)
          The latitude must be in the range -90.0 to +90.0; The longitude will be adjusted to the range -180.0 to +180.0.
Point(PointI point)
          The latitude must be in the range -90.0 to +90.0; The longitude will be adjusted to the range -180.0 to +180.0.
Point(VectorI coordinates)
          The latitude must be in the range -90.0 to +90.0; The longitude will be adjusted to the range -180.0 to +180.0.
 
Method Summary
 PointI centroid()
           
 double directionTo(PointI point)
          Returns the direction to the argument.
 double distanceProxyTo(PointI point)
          Returns an easily computable proxy that can be used to compare the distance from this point to the argument point.
 double distanceTo(PointI point)
          Returns the great circle distance in the units of the ellipsoid.
 boolean equals(java.lang.Object o)
           
 double getCoordinate(int i)
          Returns individual coordinates by ordinality.
 double getDirectionTo(PointI point)
          Returns the direction to the argument.
 int hashCode()
           
 double latitude()
          Returns the latitude coordinate.
 double longitude()
          Returns the longitude coordinate.
 PointI nearestPointTo(PointI point)
           
 RangeI range()
           
 java.lang.String toString()
           
 
Methods inherited from class drasys.or.geom.geo.Geo
coordinateSystem, ellipsoid, getCentroid, getDistanceProxyTo, getDistanceTo, getNearestPointTo, getRange
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

Point

public Point(double longitude,
             double latitude)
The latitude must be in the range -90.0 to +90.0; The longitude will be adjusted to the range -180.0 to +180.0.

Point

public Point(PointI point)
The latitude must be in the range -90.0 to +90.0; The longitude will be adjusted to the range -180.0 to +180.0.

Point

public Point(VectorI coordinates)
The latitude must be in the range -90.0 to +90.0; The longitude will be adjusted to the range -180.0 to +180.0.

Point

public Point(double[] coordinates)
The latitude must be in the range -90.0 to +90.0; The longitude will be adjusted to the range -180.0 to +180.0.
Method Detail

latitude

public double latitude()
Description copied from interface: PointI
Returns the latitude coordinate.
Specified by:
latitude in interface PointI

longitude

public double longitude()
Description copied from interface: PointI
Returns the longitude coordinate.
Specified by:
longitude in interface PointI

getCoordinate

public double getCoordinate(int i)
Description copied from interface: PointI
Returns individual coordinates by ordinality.
Specified by:
getCoordinate in interface PointI

range

public RangeI range()

centroid

public PointI centroid()

nearestPointTo

public PointI nearestPointTo(PointI point)

hashCode

public int hashCode()
Overrides:
hashCode in class java.lang.Object

equals

public boolean equals(java.lang.Object o)
Overrides:
equals in class java.lang.Object

toString

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

getDirectionTo

public double getDirectionTo(PointI point)
Description copied from interface: PointI
Returns the direction to the argument. The return value is in the range -PI to +PI.
Specified by:
getDirectionTo in interface PointI

directionTo

public double directionTo(PointI point)
Returns the direction to the argument. The return value is in the range -PI to +PI and is measured from north. If angle is positive if 'point' is clockwise and negative if it is counterclockwise.
Specified by:
directionTo in interface PointI

distanceProxyTo

public double distanceProxyTo(PointI point)
Returns an easily computable proxy that can be used to compare the distance from this point to the argument point.
Specified by:
distanceProxyTo in interface PointI

distanceTo

public double distanceTo(PointI point)
Returns the great circle distance in the units of the ellipsoid.
Specified by:
distanceTo in interface PointI


Copyright(C)1997-2000 by DRA Systems all rights reserved. OpsResearch.com