com.bbn.openmap.geo
Class BoundingCircle.Impl
java.lang.Object
com.bbn.openmap.geo.BoundingCircle.Impl
- All Implemented Interfaces:
- BoundingCircle
- Direct Known Subclasses:
- RadialRegion
- Enclosing interface:
- BoundingCircle
public static class BoundingCircle.Impl
- extends java.lang.Object
- implements BoundingCircle
A simple implementation of BoundingCircle, storing the center
and radius as data members.
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
BoundingCircle.Impl
public BoundingCircle.Impl(Geo center,
double radius)
BoundingCircle.Impl
public BoundingCircle.Impl(GeoArray arrayPoints)
BoundingCircle.Impl
public BoundingCircle.Impl(GeoPath path)
BoundingCircle.Impl
public BoundingCircle.Impl(Geo[] gs)
init
protected void init(Geo[] region)
- Works by computing the centroid, then finding the
largest radius. This will not, in general, produce the
minimal bounding circle.
init
protected void init(GeoArray region)
- Works by computing the centroid, then finding the
largest radius. This will not, in general, produce the
minimal bounding circle.
init
protected void init(Geo center,
double radius)
getCenter
public final Geo getCenter()
- Description copied from interface:
BoundingCircle
- Returns a Geo representing the center of the circle.
- Specified by:
getCenter
in interface BoundingCircle
- Returns:
- Geo
getRadius
public final double getRadius()
- Specified by:
getRadius
in interface BoundingCircle
- Returns:
- the radius of the bounding circle in radians.
intersects
public boolean intersects(BoundingCircle bc)
- Specified by:
intersects
in interface BoundingCircle
- Returns:
- whether this bounding circle intersects with another.
intersects
public boolean intersects(Geo g,
double r)
- Specified by:
intersects
in interface BoundingCircle
- Returns:
- whether this bounding circle intersects with a Geo with a radius (radians) around it.
toString
public java.lang.String toString()
- Overrides:
toString
in class java.lang.Object
createFromLatLonDegrees
public static BoundingCircle createFromLatLonDegrees(double[] latlons)
createFromLatLonDegrees
public static BoundingCircle createFromLatLonDegrees(float[] latlons)
createFromLatLonRadians
public static BoundingCircle createFromLatLonRadians(double[] latlons)
createFromLatLonRadians
public static BoundingCircle createFromLatLonRadians(float[] latlons)
Copyright (C) BBNT Solutions LLC; See http://openmap.bbn.com/ for details